From: Debian Science Maintainers Date: Mon, 29 Sep 2025 16:11:15 +0200 Subject: tools~cmlwriter.py changes in the script to provide interactive exports to various formats --- tools/cmlwriter.py | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 83 insertions(+), 2 deletions(-) diff --git a/tools/cmlwriter.py b/tools/cmlwriter.py index dc218b1..2bb52be 100644 --- a/tools/cmlwriter.py +++ b/tools/cmlwriter.py @@ -17,6 +17,86 @@ class CMLWriter: self.fout = fout self.cml = cml_handler self.l10n = l10n_handler + self.scriptFormat=""" + +""" + self.selection=""" + +""" def parseFormula(self, raw_formula): """Parse formula and return the HTML formula @@ -57,8 +137,8 @@ class CMLWriter: xhtmlout.setOutput(self.fout) xhtmlout.setTitle(title) xhtmlout.addHead(' ') - xhtmlout.addHead(' ') - xhtmlout.addHead(' ') + xhtmlout.addHead(' ') + xhtmlout.addBody(self.scriptFormat) xhtmlout.addBody(' ') @@ -152,6 +232,7 @@ class CMLWriter: xhtmlout.addBody('
  • ' + self.l10n.translate('In CML format', lang) + ' Download cml file
  • ') if os.path.isfile(mol_file): xhtmlout.addBody('
  • ' + self.l10n.translate('In MOL format', lang) + ' Download mol file
  • ') + xhtmlout.addBody('
  • ' + self.l10n.translate('Other formats', lang) + ' '+self.selection+'
  • ') xhtmlout.addBody(' ') xhtmlout.addBody(' ') xhtmlout.addBody('
    ')