Permalink
Browse files

Initial commit

  • Loading branch information...
roxlukas committed Sep 11, 2012
0 parents commit d712c96831501655ee1f986406d85e676fd73104
Showing with 290 additions and 0 deletions.
  1. +22 −0 .gitattributes
  2. +163 −0 .gitignore
  3. +105 −0 reverence-dump.py
@@ -0,0 +1,22 @@
+# Auto detect text files and perform LF normalization
+* text=auto
+
+# Custom for Visual Studio
+*.cs diff=csharp
+*.sln merge=union
+*.csproj merge=union
+*.vbproj merge=union
+*.fsproj merge=union
+*.dbproj merge=union
+
+# Standard to msysgit
+*.doc diff=astextplain
+*.DOC diff=astextplain
+*.docx diff=astextplain
+*.DOCX diff=astextplain
+*.dot diff=astextplain
+*.DOT diff=astextplain
+*.pdf diff=astextplain
+*.PDF diff=astextplain
+*.rtf diff=astextplain
+*.RTF diff=astextplain
@@ -0,0 +1,163 @@
+#################
+## Eclipse
+#################
+
+*.pydevproject
+.project
+.metadata
+bin/
+tmp/
+*.tmp
+*.bak
+*.swp
+*~.nib
+local.properties
+.classpath
+.settings/
+.loadpath
+
+# External tool builders
+.externalToolBuilders/
+
+# Locally stored "Eclipse launch configurations"
+*.launch
+
+# CDT-specific
+.cproject
+
+# PDT-specific
+.buildpath
+
+
+#################
+## Visual Studio
+#################
+
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+
+# User-specific files
+*.suo
+*.user
+*.sln.docstates
+
+# Build results
+[Dd]ebug/
+[Rr]elease/
+*_i.c
+*_p.c
+*.ilk
+*.meta
+*.obj
+*.pch
+*.pdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.vspscc
+.builds
+*.dotCover
+
+## TODO: If you have NuGet Package Restore enabled, uncomment this
+#packages/
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opensdf
+*.sdf
+
+# Visual Studio profiler
+*.psess
+*.vsp
+
+# ReSharper is a .NET coding add-in
+_ReSharper*
+
+# Installshield output folder
+[Ee]xpress
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish
+
+# Others
+[Bb]in
+[Oo]bj
+sql
+TestResults
+*.Cache
+ClientBin
+stylecop.*
+~$*
+*.dbmdl
+Generated_Code #added for RIA/Silverlight projects
+
+# Backup & report files from converting an old project file to a newer
+# Visual Studio version. Backup files are not needed, because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+
+
+
+############
+## Windows
+############
+
+# Windows image file caches
+Thumbs.db
+
+# Folder config file
+Desktop.ini
+
+
+#############
+## Python
+#############
+
+*.py[co]
+
+# Packages
+*.egg
+*.egg-info
+dist
+build
+eggs
+parts
+bin
+var
+sdist
+develop-eggs
+.installed.cfg
+
+# Installer logs
+pip-log.txt
+
+# Unit test / coverage reports
+.coverage
+.tox
+
+#Translations
+*.mo
+
+#Mr Developer
+.mr.developer.cfg
+
+# Mac crap
+.DS_Store
@@ -0,0 +1,105 @@
+import string
+from reverence import blue
+#variables
+EVEPATH = "D:\\EVE\\"
+
+#init
+eve = blue.EVE(EVEPATH)
+cfg = eve.getconfigmgr()
+
+#IndexRowset - these are simple keyed tables:
+#
+# Getting a specific record:
+#
+# >>> rec = cfg.invtypes.Get(638)
+#
+# Iterating over records (inefficient):
+#
+# >>> for row in cfg.eveunits:
+# ... print row
+# ...
+# Row(unitID:1,unitName:Length,displayName:)
+# Row(unitID:2,unitName:Mass,displayName:kg)
+# Row(unitID:3,unitName:Time,displayName:sec)
+# (etc)
+
+#TABLENAME PRIMARY KEY
+# --------------------------- ------------------
+# invcategories categoryID
+# invgroups groupID
+# invmetagroups metaGroupID
+# invtypes typeID
+# invbptypes blueprintTypeID
+# dgmattribs attributeID
+# dgmeffects effectID
+# evegraphics graphicID
+# eveunits unitID
+# eveowners ownerID
+# evelocations locationID
+# corptickernames corporationID
+# allianceshortnames allianceID
+# ramaltypes assemblyLineTypeID
+# ramactivities activityID
+# ramcompletedstatuses completedStatusID
+# mapcelestialdescriptions celestialID
+# certificates certificateID
+# certificaterelationships relationshipID
+# locationwormholeclasses locationID
+
+blue.EVE.getconfigmgr()
+
+def makeInsertsFromRowset(obj, table):
+ for row in obj:
+ s = "INSERT INTO "+str(table)+" VALUES ("
+ for field in cfg.invtypes.header:
+ tmp = str(row[field])
+ tmp = string.replace(tmp, "\"", "\\\"");
+ s = s + '"' + tmp + '",'
+ s = s[:-1] + ');' #remove trailing "," and add ");"
+
+ s = string.replace(s, "\"None\"", "NULL") #replace None with NULL
+ s = string.replace(s, "False", "0") #replace False with 0
+ s = string.replace(s, "True", "1") #replace True with 1
+ print s
+
+def makeColumnNamesComment(obj):
+ #print "--",obj.__guid__
+ print "--",obj.header
+
+
+print "--invcategories"
+makeColumnNamesComment(cfg.invcategories);
+print "--invgroups"
+makeColumnNamesComment(cfg.invgroups);
+print "--invmetagroups"
+makeColumnNamesComment(cfg.invmetagroups);
+print "--invtypes"
+makeColumnNamesComment(cfg.invtypes);
+print "--invbptypes"
+makeColumnNamesComment(cfg.invbptypes);
+print "--dgmattribs"
+makeColumnNamesComment(cfg.dgmattribs);
+print "--dgmeffects"
+makeColumnNamesComment(cfg.dgmeffects);
+print "--eveowners"
+makeColumnNamesComment(cfg.eveowners);
+print "--evelocations"
+makeColumnNamesComment(cfg.evelocations);
+print "--corptickernames"
+makeColumnNamesComment(cfg.corptickernames);
+print "--ramaltypes"
+makeColumnNamesComment(cfg.ramaltypes);
+print "--ramactivities"
+makeColumnNamesComment(cfg.ramactivities);
+print "--ramcompletedstatuses"
+makeColumnNamesComment(cfg.ramcompletedstatuses);
+print "--mapcelestialdescriptions"
+makeColumnNamesComment(cfg.mapcelestialdescriptions);
+print "--certificates"
+makeColumnNamesComment(cfg.certificates);
+print "--certificaterelationships"
+makeColumnNamesComment(cfg.certificaterelationships);
+print "--locationwormholeclasses"
+makeColumnNamesComment(cfg.locationwormholeclasses);
+
+#makeInsertsFromRowset(cfg.invtypes,"invTypes")

0 comments on commit d712c96

Please sign in to comment.