Permalink
Browse files

Added support for MediaWiki output (txt)

git-svn-id: http://svn.rpmforge.net/svn/trunk/tools/unoconv@6357 60da1e97-ced4-0310-9a99-dd04229c09c9
  • Loading branch information...
1 parent 0183f64 commit b453c760a1f73b46ce379328042ac182336c0ce4 dag committed Jun 11, 2008
Showing with 6 additions and 5 deletions.
  1. +1 −0 ChangeLog
  2. +1 −0 TODO
  3. +1 −1 tests/Makefile
  4. +3 −4 unoconv
View
@@ -5,6 +5,7 @@
- Added support for OpenOffice on Windows (Fernando Lucas Rodriguez)
- Added -i/--pipe option to communicate with UNO pipe (Fernando Lucas Rodriguez)
- Added -o/--outputpath option to modify the output path (Fernando Lucas Rodriguez)
+- Added support for MediaWiki output (txt)
* 0.3 - released 31/08/2007
- Determine doctype from input filename (if not specified)
View
@@ -13,6 +13,7 @@ contact me as well. :) Send an email to: Dag Wieers <dag@wieers.com>
### Usability
- Maybe change the commandline interface to reflect ImageMagick's convert
- Add the list of input formats as well, and print that list too
+- Preserve the original timestamp, ownership and permissions
### Known bugs
- On some systems loading OpenOffice is slow and this could lead to random errors
View
@@ -1,6 +1,6 @@
### Please modify and send me improvements
-all: clean bib doc6 doc95 doc docbook html ooxml pdb pdf psw rtf latex sdw3 sdw4 sdw sxw text txt xhtml
+all: clean bib doc6 doc95 doc docbook html mediawiki ooxml pdb pdf psw rtf latex sdw3 sdw4 sdw sxw text txt xhtml
#xml: curriculum-vitae-dag-wieers.txt
# asciidoc -b docbook -d article curriculum-vitae-dag-wieers.txt
View
@@ -133,6 +133,7 @@ fmts.add('document', 'sdw3', 'sdw', 'StarWriter 3.0', 'StarWriter 3.0')
fmts.add('document', 'stw', 'stw', 'Open Office.org 1.0 Text Document Template', 'writer_StarOffice_XML_Writer_Template')
fmts.add('document', 'sxw', 'sxw', 'Open Office.org 1.0 Text Document', 'StarOffice XML (Writer)')
fmts.add('document', 'text', 'txt', 'Text Encoded', 'Text (encoded)')
+fmts.add('document', 'mediawiki', 'txt', 'Mediawiki', 'Mediawiki')
fmts.add('document', 'txt', 'txt', 'Plain Text', 'Text')
fmts.add('document', 'vor', 'vor', 'StarWriter 5.0 Template', 'StarWriter 5.0 Vorlage/Template')
fmts.add('document', 'vor4', 'vor', 'StarWriter 4.0 Template', 'StarWriter 4.0 Vorlage/Template')
@@ -280,8 +281,6 @@ class Options:
self.listener = True
elif opt in ['-o', '--outputpath']:
self.outputpath = arg
- if not (self.outputpath[len(self.outputpath)] == os.separator):
- self.outputpath = self.outputpath + os.separator
elif opt in ['-p', '--port']:
self.port = arg
elif opt in ['-s', '--server']:
@@ -483,10 +482,10 @@ class Convertor:
if not op.stdout:
(outputfn, ext) = os.path.splitext(inputfn)
- if not self.outputpath:
+ if not op.outputpath:
outputfn = outputfn + '.' + outputfmt.extension
else:
- outputfn = os.path.joint(self.outputpath, os.path.basename(outputfn) + '.' + outputfmt.extension)
+ outputfn = os.path.join(op.outputpath, os.path.basename(outputfn) + '.' + outputfmt.extension)
outputurl = unohelper.absolutize( self.cwd, unohelper.systemPathToFileUrl(outputfn) )
doc.storeToURL(outputurl, outputprops)
error(1, "Output file: %s" % outputfn)

0 comments on commit b453c76

Please sign in to comment.