Removed old manual page sources.

This commit is contained in:
Tatsuhiro Tsujikawa 2012-04-22 21:26:25 +09:00
parent 4a5f2b6f9f
commit eec761ec43
4 changed files with 0 additions and 7939 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,70 +0,0 @@
#!/usr/bin/env python
import re
import sys
from pprint import pprint
def enum_options(file):
# key = *opts*, value = refid, remove proceeding -- from long
# option name and s/-/_/g and prepend '_optref'
ref_db = {}
p = re.compile(r'^\*(-[a-zA-Z0-9-]+)\*(?:,\s*\*(-[a-zA-Z0-9-]+)\*)?.*::$')
for line in file:
m = p.match(line)
if m:
if m.group(2) is None:
short_opt = None
long_opt = m.group(1)
else:
short_opt = m.group(1)
long_opt = m.group(2)
ref_id = make_ref_id(long_opt)
if short_opt in ref_db:
print "warn: duplicate short_opt", short_opt
if long_opt in ref_db:
print "warn: duplicate long_opt", log_opt
if short_opt:
ref_db[short_opt] = ref_id
ref_db[long_opt] = ref_id
return ref_db
def make_ref_id(long_opt):
return 'aria2_optref_'+long_opt.strip('*').lstrip('-').replace('-', '_')
def make_cross_ref(out, file, ref_db):
opt_def = re.compile(r'^\*(-[a-zA-Z0-9-]+)\*(?:,\s*\*(-[a-zA-Z0-9-]+)\*)?.*::$')
opt_ref = re.compile(r'\*(-[a-zA-Z0-9-]+)\*')
for line in file:
m = opt_def.match(line)
if m:
if m.group(2) is None:
long_opt = m.group(1)
else:
long_opt = m.group(2)
out.write('[[{0}]]'.format(ref_db[long_opt]))
out.write(line)
continue
pos = 0
while 1:
m = opt_ref.search(line, pos)
if m:
opt = line[m.start(1):m.end(1)]
if opt in ref_db:
out.write(line[pos:m.start(0)])
out.write('*<<{0}, {1}>>*'.format(ref_db[opt], opt))
else:
print "warn: not in ref_db", opt
out.write(line[pos:m.end(0)])
pos = m.end(0)
else:
out.write(line[pos:])
break
if __name__ == '__main__':
with open(sys.argv[1]) as f:
ref_db = enum_options(f)
with open(sys.argv[1]) as f:
with open(sys.argv[2], 'wb') as out:
make_cross_ref(out, f, ref_db)

View File

@ -1,16 +0,0 @@
# Russian translation of man page.
mandir=@mandir@/ru
man_MANS = aria2c.1
EXTRA_DIST = $(man_MANS)
doc_rudir = $(docdir)/ru
dist_doc_ru_DATA = aria2c.1.html aria2c.1.asciidoc
if HAVE_A2X
aria2c.1: aria2c.1.asciidoc
@A2X@ -a lang=ru -f manpage aria2c.1.asciidoc
endif # HAVE_A2X
if HAVE_ASCIIDOC
aria2c.1.html: aria2c.1.asciidoc
@ASCIIDOC@ -a lang=ru -d manpage -b xhtml11 -a toc -a max-width=55em aria2c.1.asciidoc
endif # HAVE_ASCIIDOC

File diff suppressed because it is too large Load Diff