forked from wmo-registers/code-manuals
-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.py
23 lines (19 loc) · 806 Bytes
/
common.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import os
from ttlhead import ttlhead
import cleanttl
def writettl():
os.mkdir('ttl/common')
with open('ttl/common.ttl', 'w') as fhandle:
fhandle.write(ttlhead)
fhandle.write('<common> a reg:Register ;\n')
fhandle.write('\trdfs:label "WMO No. 306 common concepts" ;\n')
fhandle.write('\tdc:description "Register of concepts common across WMO No. 306 formats"@en ;\n')
fhandle.write('\treg:owner <http://codes.wmo.int/system/organization/wmo> ;\n')
fhandle.write('\tdct:publisher <http://codes.wmo.int/system/organization/wmo> ;\n')
fhandle.write('\treg:manager <http://codes.wmo.int/system/organization/www-dm> ;\n')
fhandle.write('\t.\n')
def main():
writettl()
if __name__ == '__main__':
cleanttl.clean()
writettl()