Add/fix shebang in python scripts, add execute permission (linux), remove whitespace/tabs at end of line
This commit is contained in:
12
docs/gen_reference_doc.py
Normal file → Executable file
12
docs/gen_reference_doc.py
Normal file → Executable file
@@ -1,3 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import glob
|
||||
import os
|
||||
import sys
|
||||
@@ -371,7 +373,7 @@ def parse_class(lno, lines, filename):
|
||||
|
||||
context = ''
|
||||
if verbose: print '?? %s' % l
|
||||
|
||||
|
||||
if len(name) > 0:
|
||||
print '\x1b[31mFAILED TO PARSE CLASS\x1b[0m %s\nfile: %s:%d' % (name, filename, lno)
|
||||
return [None, lno]
|
||||
@@ -416,7 +418,7 @@ def parse_enum(lno, lines, filename):
|
||||
start_brace += l.count('{')
|
||||
end_brace += l.count('}')
|
||||
|
||||
if '{' in l:
|
||||
if '{' in l:
|
||||
l = l.split('{')[1]
|
||||
l = l.split('}')[0]
|
||||
|
||||
@@ -1019,7 +1021,7 @@ for cat in categories:
|
||||
print >>out, '%s\n' % block.replace('\n', '\n\t')
|
||||
f['desc'] = linkify_symbols(f['desc'])
|
||||
print >>out, '%s' % f['desc']
|
||||
|
||||
|
||||
print >>out, dump_link_targets()
|
||||
|
||||
render_enums(out, c['enums'], False, '.')
|
||||
@@ -1060,7 +1062,7 @@ for cat in categories:
|
||||
print >>out, linkify_symbols(f['desc'])
|
||||
|
||||
print >>out, dump_link_targets()
|
||||
|
||||
|
||||
render_enums(out, enums, True, '-')
|
||||
|
||||
print >>out, dump_link_targets()
|
||||
@@ -1084,5 +1086,5 @@ for i,o in preprocess_rst.items():
|
||||
|
||||
out.close()
|
||||
f.close()
|
||||
|
||||
|
||||
|
||||
|
2
docs/gen_settings_doc.py
Normal file → Executable file
2
docs/gen_settings_doc.py
Normal file → Executable file
@@ -1,3 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
f = open('../include/libtorrent/settings_pack.hpp')
|
||||
|
||||
out = open('settings.rst', 'w+')
|
||||
|
4
docs/gen_stats_doc.py
Normal file → Executable file
4
docs/gen_stats_doc.py
Normal file → Executable file
@@ -1,3 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
counter_types = {}
|
||||
|
||||
f = open('../include/libtorrent/performance_counters.hpp')
|
||||
@@ -28,7 +30,7 @@ for l in f:
|
||||
if '=' in l: l = l[:l.index('=')].strip()
|
||||
|
||||
counter_types[l] = counter_type
|
||||
|
||||
|
||||
f.close()
|
||||
|
||||
f = open('../src/session_stats.cpp')
|
||||
|
4
docs/gen_todo.py
Normal file → Executable file
4
docs/gen_todo.py
Normal file → Executable file
@@ -1,3 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import glob
|
||||
import os
|
||||
|
||||
@@ -54,7 +56,7 @@ for f in files:
|
||||
prio = items[-1]['priority']
|
||||
if prio >= 0 and prio <= 4: priority_count[prio] += 1
|
||||
continue
|
||||
|
||||
|
||||
if state == '':
|
||||
context.append(html_sanitize(l))
|
||||
if len(context) > 20: context.pop(0)
|
||||
|
Reference in New Issue
Block a user