diff --git a/.gitignore b/.gitignore index 9c58ac0..3d03265 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ bin/* build/* +scripts/junk \ No newline at end of file diff --git a/scripts/parsing_functions_names.py b/scripts/parsing_functions_names.py new file mode 100755 index 0000000..56e3076 --- /dev/null +++ b/scripts/parsing_functions_names.py @@ -0,0 +1,49 @@ +#!/usr/bin/env python3 + +#rr = open('read_me.doc', 'r', encoding='UTF-8') +rr = open('include/widget.h', 'r', encoding='UTF-8') +ww = open('scripts/junk', "w") + +l = [None] * 75 +n = -1 + +for line in rr: + if (line [0:4] == 'void' + or line [0:3] == 'int' + or line [0:4] == 'char' + 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' + or line [0:17] == 'struct TreeNode_t'): + n += 1 + l[n] = line.split(' ')[2] + if (len(l[n]) > 0 + and l[n][0] == '*'): + l[n] = l[n][1:] + + +#l.sort() +n = -1 +for line in l: + n += 1 + if (line == None): + line = "None" + if (n in range(69)): + if (line[-1:] == '\n'): + line = line[:-1] + if (line[-3:] == '();'): + line = line[:-3] + #line = str(n) + ' ' + line + print(line) + line = line + '\n' + ww.write(line) + +rr.close() +ww.close() +