revert between 56095 -> 55830 in arch
[AROS.git] / workbench / system / AboutAROS / scripts / authors2header.py
blobc2d844a7947166362c7d32d64f2b796368901d9e
1 # -*- coding: iso-8859-15 -*-
2 # Copyright © 2002-2008, The AROS Development Team. All rights reserved.
3 # $Id$
5 import os, sys, string
7 labels2sids = {
8 'Coordination' : 'SID_COORDINATION',
9 'Evangelism' : 'SID_EVANGELISM',
10 'HIDD subsystem' : 'SID_HIDD',
11 'Intuition' : 'SID_INTUITION',
12 'Graphics' : 'SID_GRAPHICS',
13 'Shell commands' : 'SID_SHELL_COMMANDS',
14 'Workbench' : 'SID_WORKBENCH',
15 'Tools' : 'SID_TOOLS',
16 'Preferences' : 'SID_PREFERENCES',
17 'BGUI' : 'SID_BGUI',
18 'Zune' : 'SID_ZUNE',
19 'Kernel' : 'SID_KERNEL',
20 'DOS' : 'SID_DOS',
21 'Networking' : 'SID_NETWORKING',
22 'C link library and POSIX layer' : 'SID_LIBC_POSIX',
23 'Documentation' : 'SID_DOCUMENTATION',
24 'Translation' : 'SID_TRANSLATION',
25 'Art work' : 'SID_ARTISTRY',
26 'Website' : 'SID_WEBSITE',
27 'Datatypes' : 'SID_DATATYPES',
28 'Testing' : 'SID_TESTING'
31 def parse(file):
32 credits = []
33 names = []
35 for line in file:
36 line = line.strip()
38 if ':' in line:
39 if len(names) > 0:
40 credits.append([area, names])
42 area = line[:-1]
44 names = []
46 elif line != '':
47 names.append(line)
49 if len(names) > 0:
50 credits.append([area, names])
52 return credits
54 credits = parse(sys.stdin)
56 sys.stdout.write('''#ifndef _AUTHORS_H_
57 #define _AUTHORS_H_
60 Copyright © 2008, The AROS Development Team. All rights reserved.
61 ****** This file is automatically generated. DO NOT EDIT! *******
64 #include <utility/tagitem.h>
65 #include <zune/aboutwindow.h>
67 #define SID_COORDINATION (100)
68 #define SID_EVANGELISM (101)
69 #define SID_HIDD (102)
70 #define SID_INTUITION (103)
71 #define SID_GRAPHICS (104)
72 #define SID_SHELL_COMMANDS (105)
73 #define SID_WORKBENCH (106)
74 #define SID_TOOLS (107)
75 #define SID_PREFERENCES (108)
76 #define SID_BGUI (109)
77 #define SID_ZUNE (110)
78 #define SID_KERNEL (111)
79 #define SID_DOS (112)
80 #define SID_LIBC_POSIX (113)
81 #define SID_DOCUMENTATION (114)
82 #define SID_TRANSLATION (115)
83 #define SID_ARTISTRY (116)
84 #define SID_WEBSITE (117)
85 #define SID_DATATYPES (118)
86 #define SID_NETWORKING (119)
87 #define SID_TESTING (120)
89 struct TagItem *AUTHORS = TAGLIST
91 ''')
93 for area in credits:
94 sys.stdout.write(''' SECTION
96 %s''' % labels2sids[area[0]])
98 for name in area[1]:
99 sys.stdout.write(',\n NAME("%s")' % name.replace('"', '\\"'))
101 print '\n ),'
103 print ''' TAG_DONE
106 #endif /* _AUTHORS_H_ */'''