Commit bf1852e4 authored by Georges Khaznadar's avatar Georges Khaznadar

removed a useless command

parent d8e35f30
#! /usr/bin/python3
"""
Converts an RST file to Dokuwiki format.
This utility was taylored to feed the collaborative place
https://expeyes.aulaslibres.org
Usage:
./rst2dokuwiki.py somefile.rst
or:
cat somefile.rst | ./rst2dokuwiki.py
This feeds valid dokuwiki code in the standard output.
"""
import subprocess, sys
p = subprocess.Popen(
"pandoc -f rst -t dokuwiki",
shell=True,
stdin=subprocess.PIPE, stdout=subprocess.PIPE
)
comment="""\
> Editar y traducir esta página
"""
with (open(sys.argv[1]) if len(sys.argv) > 1 else sys.stdin) as data:
p.stdin.write(data.read().encode("utf-8"))
out, err = p.communicate()
sys.stdout.write(comment + out.decode("utf-8"))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment