manuskript/manuskript/exporter/mmd.py

29 lines
922 B
Python
Raw Normal View History

2016-04-02 06:01:27 +13:00
#!/usr/bin/env python
# --!-- coding: utf8 --!--
2016-04-08 00:27:51 +12:00
from PyQt5.QtWidgets import qApp
2016-04-02 06:01:27 +13:00
from manuskript.exporter.basic import basicExporter, basicFormat
class mmdExporter(basicExporter):
name = "MultiMarkdown"
2016-04-08 00:47:29 +12:00
description = qApp.translate("Export", """<p>A superset of markdown.</p>
2016-04-02 06:01:27 +13:00
<p>Website: <a href="http://fletcherpenney.net/multimarkdown/">http://fletcherpenney.net/multimarkdown/</a></p>
2016-04-08 00:27:51 +12:00
""")
2016-04-02 06:01:27 +13:00
exportTo = [
2016-04-08 22:48:19 +12:00
basicFormat("HTML", "A little known format modestly used. You know, web sites for example.", "text-html"),
basicFormat("latex", "", "text-x-tex"),
basicFormat("Flat XML", "", "text-xml"),
basicFormat("ePub", "Books that don't kill trees.", icon="application-epub+zip"),
2016-04-02 06:01:27 +13:00
]
2017-03-24 22:26:20 +13:00
cmd = "multimarkdown"
2016-04-02 06:01:27 +13:00
2016-04-12 19:15:01 +12:00
def version(self):
if self.isValid():
r = self.run(["-v"])
2016-04-02 06:01:27 +13:00
return r.split("\n")[1]
else:
return ""