-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path__init__.py
97 lines (69 loc) · 3.08 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#!/usr/bin/env python
# coding: utf-8
__author__ = 'Sophie Kirschner'
__license__ = 'zlib/libpng'
__email__ = '[email protected]'
__version__ = '1.1.4'
'''
The raws package provides querying and modification functionality for Dwarf Fortress raws.
raws.dir: An entire directory of raws files, stored as a dictionary of files.
raws.token: A single token within a raws file, for example [CREATURE:DWARF] or [INORGANIC:IRON].
raws.tokenlist: Extends Python's inbuilt list class with additional, specialized functionality.
raws.queryable: Many raws classes extend this class, which provides token querying functionality.
raws.queryableobj: An extension of the queryable class which adds methods optimized for finding object tokens, like the [CREATURE:DWARF] token which is underneath [OBJECT:CREATURE] in the creature_standard file.
raws.tokenfilter: Used by queryable objects' query method to find tokens meeting specific conditions.
raws.boolfilter: Can be used in place of a tokenfilter for operations like Filter A OR Filter B.
raws.color: Contains a convenience class and objects for dealing with colors in the DF raws.
raws.copytree: A general utility method for copying an entire directory and its contents from one location to another.
raws.objecs: Contains information and helper functions for knowing which object types belong to which headers, such as how [BUILDING_WORKSHOP:ID] belongs to [OBJECT:BUILDING].
raws.rawfile: A single raws file, stored as a linked list.
raws.reffile: A file stored as a reference to a source file.
raws.binfile: A file stored in a string, as its binary content.
raws.basefile: A base class which other file types inherit from.
raws.filter: A convenience alias for raws.tokenfilter.
raws.parse: A convenience alias for raws.token.parse, which accepts an input string and parses it into a token or tokenlist.
'''
import queryable, queryableobj, queryableadd, queryableprop, queryableaddprop
import queryresult
import token
import tokenargs
import basefile, contentfile, reffile, binfile, rawfile
import filefactory
import tokenlist
import tokengenerator
import tokenparse
import dir
import filters
import helpers
import copytree
import objects
import color
basefilter = filters.basefilter
tokenfilter = filters.tokenfilter
boolfilter = filters.boolfilter
queryable = queryable.queryable
queryableobj = queryableobj.queryableobj
queryableadd = queryableadd.queryableadd
queryableprop = queryableprop.queryableprop
queryableaddprop = queryableaddprop.queryableaddprop
queryresult = queryresult.queryresult
tokenlist = tokenlist.tokenlist
tokengenerator = tokengenerator.tokengenerator
token = token.token
tokenargs = tokenargs.tokenargs
basefile = basefile.basefile
contentfile = contentfile.contentfile
reffile = reffile.reffile
binfile = binfile.binfile
rawfile = rawfile.rawfile
filefactory = filefactory.filefactory
dir = dir.dir
copytree = copytree.copytree
parseplural = tokenparse.parseplural
parsesingular = tokenparse.parsesingular
parsevariable = tokenparse.parsevariable
copy = helpers.copy
equal = helpers.equal
ends = helpers.ends
filter = tokenfilter
parse = parsevariable