forked from texastwister/OpenRHCE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rst2conversionnotes.txt
47 lines (23 loc) · 1021 Bytes
/
rst2conversionnotes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
### Create a Gedit "External Tool" configuration as follows, named rst2pdf, using a shortcut key of Ctrl+F5:
#!/bin/sh
SRCNAME=$GEDIT_CURRENT_DOCUMENT_PATH
TMPNAME=$(echo $SRCNAME | sed s/.rst.txt//)
DSTNAME=${TMPNAME}.pdf
STYLENAME=${TMPNAME}.style
rst2pdf "${SRCNAME}" --smart-quotes 2 -b 0 -s "${STYLENAME}" -o "${DSTNAME}"
nohup evince "${DSTNAME}" &
### Create a Gedit "External Tool" configuration as follows, named rst2pdfslides, using a shortcut key of Ctrl+F6:
#!/bin/sh
SRCNAME=$GEDIT_CURRENT_DOCUMENT_PATH
TMPNAME=$(echo $SRCNAME | sed s/.rst.txt//)
DSTNAME=${TMPNAME}_slides.pdf
STYLENAME=${TMPNAME}.slidestyle
rst2pdf "${SRCNAME}" -b 4 -s "${STYLENAME}" -o "${DSTNAME}"
nohup evince "${DSTNAME}" &
### Create a Gedit "External Tool" configuration as follows, named rst2html, using a shortcut key of Ctrl+F4:
#!/bin/sh
SRCNAME=$GEDIT_CURRENT_DOCUMENT_PATH
TMPNAME=$(echo $SRCNAME | sed s/.rst.txt//)
DSTNAME=${TMPNAME}.html
rst2html "${SRCNAME}" "${DSTNAME}"
firefox "${DSTNAME}"