-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/pineapplemachine/PyDwarf
* 'master' of https://github.com/pineapplemachine/PyDwarf: (35 commits) Added a changelog, changelogs are cool Updated version numbers for manager.py, and raws and pydwarf packages Updated version numbers for scripts updated since v1.0.0 Rebuilt shitty html documentation Tweaked material values in pineapple.greensteel Improvements to raws package Added parse and parseone to raws.__init__ for convenience Rewrote file.tokens method to call token.tokens instead of having its own logic More operator overload tomfoolery More fixes related to overloads, this time to raws.file.root and raws.file.tail Even more overload related fixes More bugfixes related to those infernal operator overloads Added some useful operator overloads to raws.tokenfilter Several additions and bugfixes Fixed logging error in pineapple.cavegrass Fixed response.__str__ method Even more documentation More raws.file documentation Added file attribute to raws.token More documentation and improved existing ... Conflicts: .gitignore readme.md
- Loading branch information
Showing
22 changed files
with
1,929 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
*.DS_Store | ||
*.pyc | ||
*.xcf | ||
*test.py | ||
|
||
# Manager logs go here | ||
logs/* | ||
|
||
# Outputted raws go here (for my personal testing and stuff anyway) | ||
output/* | ||
backup/* | ||
|
||
# Older DF versions go here (for my help figuring version compatibility) | ||
refs/* | ||
|
||
# Stuff that's just not meant to be committed right now | ||
build/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
v1.0.1: Strange Mood | ||
|
||
Fixed pineapple.boneflux reaction by being less bad at string formatting | ||
Fixed pineapple.utils.addreaction not adding an OBJECT:REACTION token to created files | ||
Fixed new grasses in pineapple.cavegrass not being recognized by DF | ||
Fixed a small issue with logging in pineapple.cavegrass | ||
Fixed non-raws file from input directory not being written to output | ||
Fixed pydwarf.response casting to string always returning a string starting with "SUCCESS" even when unsuccessful | ||
Added a lot more documentation | ||
Added a shitty WIP tool for outputting docstrings as more readable html | ||
Added a list method to queryable raws objects which acts as a shortcut for raw.tokenlist(something.tokens()) | ||
Added a file attribute to raws.token objects for tracking which file they belong to, if any | ||
Added a bunch of helpful operator overloads | ||
Added length and clear methods to raws.file | ||
Added some convenience things to the raws package: raws.parse and raws.parseone refer to the raws.token static methods, raws.filter refers to raws.tokenfilter | ||
Added index and slice functionality to raws.token and raws.file, most easily accessible via conventional notations like token[1] or token[-8:0:2] | ||
Added step argument to tokens method for raws.token and raws.file | ||
Improved error handling for bad config settings | ||
Improved raws.tokenlist casting to string | ||
Improved objdict method to return a dictionary of raws.tokenlist objects where previously they were regular lists | ||
Improved handling of assignment of illegal strings to token text, now automatically resolves some common pitfalls | ||
Improved argument handling for raws.boolfilter static methods all, any, one, and none | ||
Tweaked grass colors in pineapple.cavegrass | ||
Tweaked names, craftable items, and material values in pineapple.greensteel | ||
|
||
v1.0.0: A New Hope | ||
|
||
First Release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Disclaimer: This is a shitty WIP | ||
|
||
import sys | ||
import os | ||
|
||
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..')) | ||
|
||
import inspect | ||
|
||
import raws | ||
import pydwarf | ||
|
||
output = 'index.html' | ||
|
||
items = { | ||
'raws.token': raws.token, | ||
'raws.file': raws.file, | ||
'raws.dir': raws.dir, | ||
'raws.color': raws.color, | ||
'raws.tokenfilter': raws.tokenfilter, | ||
'raws.boolfilter': raws.boolfilter, | ||
'pydwarf.session': pydwarf.session, | ||
'pydwarf.urist': pydwarf.urist | ||
} | ||
|
||
alldoc = {} | ||
for itemname, item in items.iteritems(): | ||
itemdoc = {} | ||
alldoc[itemname] = itemdoc | ||
|
||
for membername, member in inspect.getmembers(item): | ||
memdoc = {} | ||
itemdoc[membername] = member | ||
|
||
with open(output, 'wb') as html: | ||
css = 'pre { background-color: #ddd; color: #113 }' | ||
html.write('<html><head><title>%(title)s</title><style>%(style)s</style></head><body>' % {'title': 'PyDwarf docs', 'style': css}) | ||
html.write('<h1 style="font-size: 50; color: #800">Warning: This is a shitty WIP.</h1>') | ||
for itemname in sorted(alldoc.iterkeys()): | ||
itemdoc = alldoc[itemname] | ||
html.write('<h1>%s</h1>' % itemname) | ||
for membername in sorted(itemdoc.iterkeys()): | ||
member = itemdoc[membername] | ||
if callable(member) and membername not in ('__module__', '__str__', '__repr__', '__doc__'): | ||
html.write('<p><b>%s</b><br><pre>%s</pre></p>' % (membername, member.__doc__)) | ||
html.write('</body></html>') | ||
|
||
|
||
|
||
|
||
|
Oops, something went wrong.