summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org>2018-08-04 18:11:33 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2018-08-04 18:33:31 (GMT)
commit635ba88e73ee9bffa45b9e487ca555c25e931d05 (patch) (side-by-side diff)
treeada4ffb40bdffd002a90743b4976b1467fd92b8f
parentca53e0361ac27a532017057faa7e417fe1bc80bb (diff)
downloadwikitrans-635ba88e73ee9bffa45b9e487ca555c25e931d05.tar.gz
wikitrans-635ba88e73ee9bffa45b9e487ca555c25e931d05.tar.bz2
Minor changes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--MANIFEST.in5
-rw-r--r--WikiTrans/wiki2html.py2
-rw-r--r--WikiTrans/wiki2texi.py5
-rw-r--r--WikiTrans/wiki2text.py58
4 files changed, 6 insertions, 64 deletions
diff --git a/MANIFEST.in b/MANIFEST.in
index 207b54e..96ff0e1 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1 +1,6 @@
exclude .gitignore
+include COPYING.txtx
+recursive-include testdata *.wiki
+recursive-include testdata *.texi
+recursive-include testdata *.text
+recursive-include testdata *.html \ No newline at end of file
diff --git a/WikiTrans/wiki2html.py b/WikiTrans/wiki2html.py
index d2af746..eb1b611 100644
--- a/WikiTrans/wiki2html.py
+++ b/WikiTrans/wiki2html.py
@@ -269,7 +269,7 @@ class HtmlWiktionaryMarkup (HtmlWikiMarkup):
2. Capitulation notice:
Given the:
- 1. waste amount of wiktionaries available,
+ 1. vast amount of wiktionaries available,
2. abundance of various templates for each wictionary,
3. apparent lack of documentation thereof,
4. the lack of standardized language-independent templates,
diff --git a/WikiTrans/wiki2texi.py b/WikiTrans/wiki2texi.py
index f087c65..9c7eb7b 100644
--- a/WikiTrans/wiki2texi.py
+++ b/WikiTrans/wiki2texi.py
@@ -324,11 +324,6 @@ class TexiWikiMarkup (WikiMarkup):
else:
self.acc += text
- def swapacc(self, val = Acc()):
- s = self.acc
- self.acc = val
- return s
-
def _begin_print(self):
s = self.acc
self.acc = Acc()
diff --git a/WikiTrans/wiki2text.py b/WikiTrans/wiki2text.py
index 004ae4a..3fa2b0e 100644
--- a/WikiTrans/wiki2text.py
+++ b/WikiTrans/wiki2text.py
@@ -251,49 +251,6 @@ class TextWikiMarkup (WikiMarkup):
lang = self.lang
return self.html_base % { 'lang' : lang } + url_quote(tgt)
- def fmtlink(self, elt, istmpl):
- arg = self.format(elt.content[0])
- if len(elt.content) > 1:
- s = [x for x in map(self.format, elt.content)]
- text = s[1]
- else:
- s = None
- text = None
-
- if s:
- if s[0] == 'disambigR' or s[0] == 'wikiquote':
- return ""
- if len(s) > 1 and s[1] == 'thumb':
- return ""
- (qual,sep,tgt) = arg.partition(':')
- if tgt != '':
- ns = self.wiki_ns_name(qual)
- if ns:
- if ns == 'NS_IMAGE':
- if not self.references:
- return ""
- text = "[%s: %s]" % (qual, text if text else arg)
- tgt = self.image_base + '/' + \
- url_quote(tgt) + \
- '/250px-' + url_quote(tgt)
- elif ns == 'NS_MEDIA':
- text = "[%s]" % (qual)
- else:
- tgt = self.mktgt(tgt)
- elif not istmpl and qual in self.langtab:
- text = self.langtab[qual] + ": " + tgt
- tgt = self.mktgt(tgt, qual)
- else:
- tgt = self.mktgt(tgt)
- else:
- tgt = self.mktgt(arg)
- if self.references:
- return "%s (see %s) " % (text, tgt)
- elif not text or text == '':
- return arg
- else:
- return text
-
def indent (self, lev, text):
if text.find('\n') == -1:
s = (" " * lev) + text
@@ -304,8 +261,6 @@ class TextWikiMarkup (WikiMarkup):
s += (" " * lev) + elt + '\n'
if not text.endswith('\n'):
s = s.rstrip('\n')
-# print "IN: '%s'" % (text)
-# print "OUT: '%s'" % (s)
return s
def fmtpara(self, input):
@@ -330,19 +285,6 @@ class TextWikiMarkup (WikiMarkup):
length += wsc + wlen
return output + linebuf
- def str_tag(self, elt):
- if elt.tag == 'code':
- self.nested += 1
- s = self.format(elt.content)
- self.nested -= 1
- return s #FIXME
- else:
- s = '<' + elt.tag
- if elt.args:
- s += ' ' + str(elt.args)
- s += '>' + self.format(elt.content) + '</' + elt.tag + '>'
- return s
-
def __str__(self):
str = ""
for elt in self.tree:

Return to:

Send suggestions and report system problems to the System administrator.