2024-10-06 00:43:36 +02:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
2024-10-06 15:32:02 +02:00
|
|
|
#rr = open('read_me.doc', 'r', encoding='UTF-8')
|
|
|
|
rr = open('include/widget.h', 'r', encoding='UTF-8')
|
|
|
|
ww = open('scripts/junk', "w")
|
2024-10-06 00:43:36 +02:00
|
|
|
|
2024-10-06 15:32:02 +02:00
|
|
|
l = [None] * 75
|
2024-10-07 05:45:38 +02:00
|
|
|
n = -1
|
2024-10-06 00:43:36 +02:00
|
|
|
|
2024-10-06 15:32:02 +02:00
|
|
|
for line in rr:
|
|
|
|
if (line [0:4] == 'void'
|
|
|
|
or line [0:3] == 'int'
|
|
|
|
or line [0:4] == 'char'
|
2024-10-07 05:45:38 +02:00
|
|
|
or line [0:8] == 'GtkEntry'):
|
|
|
|
n += 1
|
|
|
|
l[n] = line.split(' ')[1]
|
|
|
|
if (len(l[n]) > 0
|
|
|
|
and l[n][0] == '*'):
|
|
|
|
l[n] = l[n][1:]
|
|
|
|
|
|
|
|
for line in rr:
|
|
|
|
if (line [0:10] == 'const char'
|
2024-10-06 15:32:02 +02:00
|
|
|
or line [0:17] == 'struct TreeNode_t'):
|
|
|
|
n += 1
|
2024-10-07 05:45:38 +02:00
|
|
|
l[n] = line.split(' ')[2]
|
|
|
|
if (len(l[n]) > 0
|
|
|
|
and l[n][0] == '*'):
|
|
|
|
l[n] = l[n][1:]
|
|
|
|
|
2024-10-06 15:32:02 +02:00
|
|
|
|
2024-10-07 05:45:38 +02:00
|
|
|
#l.sort()
|
|
|
|
n = -1
|
2024-10-06 15:32:02 +02:00
|
|
|
for line in l:
|
|
|
|
n += 1
|
2024-10-07 21:11:34 +02:00
|
|
|
if (line == None):
|
|
|
|
line = "None"
|
|
|
|
if (n in range(69)):
|
2024-10-07 05:45:38 +02:00
|
|
|
if (line[-1:] == '\n'):
|
|
|
|
line = line[:-1]
|
|
|
|
if (line[-3:] == '();'):
|
|
|
|
line = line[:-3]
|
2024-10-07 21:11:34 +02:00
|
|
|
#line = str(n) + ' ' + line
|
2024-10-07 05:45:38 +02:00
|
|
|
print(line)
|
|
|
|
line = line + '\n'
|
|
|
|
ww.write(line)
|
2024-10-06 15:32:02 +02:00
|
|
|
|
|
|
|
rr.close()
|
|
|
|
ww.close()
|
2024-10-06 00:43:36 +02:00
|
|
|
|