Updated PCI IDs to latest snapshot.
[tangerine.git] / workbench / system / AboutAROS / scripts / authors2header.py
blob8d02c365d703a2ef3d37c60703b09d2aa8823149
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 'Artistry' : 'SID_ARTISTRY',
26 'Website' : 'SID_WEBSITE',
27 'Datatypes' : 'SID_DATATYPES'
30 def parse(file):
31 credits = []
32 names = []
34 for line in file:
35 line = line.strip()
37 if ':' in line:
38 if len(names) > 0:
39 credits.append([area, names])
41 area = line[:-1]
43 names = []
45 elif line != '':
46 names.append(line)
48 if len(names) > 0:
49 credits.append([area, names])
51 return credits
53 credits = parse(sys.stdin)
55 sys.stdout.write('''#ifndef _AUTHORS_H_
56 #define _AUTHORS_H_
59 Copyright © 2008, The AROS Development Team. All rights reserved.
60 ****** This file is automatically generated. DO NOT EDIT! *******
63 #include <utility/tagitem.h>
64 #include <zune/aboutwindow.h>
66 #define SID_COORDINATION (100)
67 #define SID_EVANGELISM (101)
68 #define SID_HIDD (102)
69 #define SID_INTUITION (103)
70 #define SID_GRAPHICS (104)
71 #define SID_SHELL_COMMANDS (105)
72 #define SID_WORKBENCH (106)
73 #define SID_TOOLS (107)
74 #define SID_PREFERENCES (108)
75 #define SID_BGUI (109)
76 #define SID_ZUNE (110)
77 #define SID_KERNEL (111)
78 #define SID_DOS (112)
79 #define SID_LIBC_POSIX (113)
80 #define SID_DOCUMENTATION (114)
81 #define SID_TRANSLATION (115)
82 #define SID_ARTISTRY (116)
83 #define SID_WEBSITE (117)
84 #define SID_DATATYPES (118)
85 #define SID_NETWORKING (119)
87 struct TagItem *AUTHORS = TAGLIST
89 ''')
91 for area in credits:
92 sys.stdout.write(''' SECTION
94 %s''' % labels2sids[area[0]])
96 for name in area[1]:
97 sys.stdout.write(',\n NAME("%s")' % name.replace('"', '\\"'))
99 print '\n ),'
101 print ''' TAG_DONE
104 #endif /* _AUTHORS_H_ */'''