added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / workbench / system / AboutAROS / scripts / authors2header.py
blob9e01cfbed8621633c5683245fea6f67149480382
1 # -*- coding: iso-8859-15 -*-
2 # Copyright © 2002, 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 'C link library and POSIX layer' : 'SID_LIBC_POSIX',
22 'Documentation' : 'SID_DOCUMENTATION',
23 'Translation' : 'SID_TRANSLATION',
24 'Artistry' : 'SID_ARTISTRY',
25 'Website' : 'SID_WEBSITE',
26 'Datatypes' : 'SID_DATATYPES'
29 def parse(file):
30 credits = []
31 names = []
33 for line in file:
34 line = line.strip()
36 if ':' in line:
37 if len(names) > 0:
38 credits.append([area, names])
40 area = line[:-1]
42 names = []
44 elif line != '':
45 names.append(line)
47 if len(names) > 0:
48 credits.append([area, names])
50 return credits
52 credits = parse(sys.stdin)
54 sys.stdout.write('''#ifndef _AUTHORS_H_
55 #define _AUTHORS_H_
58 Copyright © 2003, The AROS Development Team. All rights reserved.
59 ****** This file is automatically generated. DO NOT EDIT! *******
62 #include <utility/tagitem.h>
63 #include <zune/aboutwindow.h>
65 #define SID_COORDINATION (100)
66 #define SID_EVANGELISM (101)
67 #define SID_HIDD (102)
68 #define SID_INTUITION (103)
69 #define SID_GRAPHICS (104)
70 #define SID_SHELL_COMMANDS (105)
71 #define SID_WORKBENCH (106)
72 #define SID_TOOLS (107)
73 #define SID_PREFERENCES (108)
74 #define SID_BGUI (109)
75 #define SID_ZUNE (110)
76 #define SID_KERNEL (111)
77 #define SID_DOS (112)
78 #define SID_LIBC_POSIX (113)
79 #define SID_DOCUMENTATION (114)
80 #define SID_TRANSLATION (115)
81 #define SID_ARTISTRY (116)
82 #define SID_WEBSITE (117)
83 #define SID_DATATYPES (118)
85 struct TagItem *AUTHORS = TAGLIST
87 ''')
89 for area in credits:
90 sys.stdout.write(''' SECTION
92 %s''' % labels2sids[area[0]])
94 for name in area[1]:
95 sys.stdout.write(',\n NAME("%s")' % name.replace('"', '\\"'))
97 print '\n ),'
99 print ''' TAG_DONE
102 #endif /* _AUTHORS_H_ */'''