Skip to content

Commit

Permalink
help file: replace %SB, %SU, %EF with <b> and <u> html tags
Browse files Browse the repository at this point in the history
  • Loading branch information
ilius committed Jan 26, 2016
1 parent 4a26600 commit 9c74846
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
16 changes: 8 additions & 8 deletions help
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
PyGlossary is a tool for working with dictionary databases (glossaries)
%SBUsage:%EF
%SBPyGTK%EF Interface:
<b>Usage:</b>
<b>PyGTK</b> Interface:
To open PyGlossary window:
%SB%CMD%EF
<b>%CMD</b>
To directly open a glossary for edit:
%CMD %SUINPUT_FILE%EF
%CMD <u>INPUT_FILE</u>
PyGTK is the default interface, so no need to use option "--ui=gtk"
If PyGTK not found (was not installed), then PyGlossary will fallback
to Tkinter interface.
%SBTkinter%EF Interface:
<b>Tkinter</b> Interface:
%CMD --ui=tk
%SBCommand Line%EF Interface:
<b>Command Line</b> Interface:
To show this help:
%CMD --help
To show program version:
%CMD --version
To Convert:
%CMD %SUINPUT_FILE%EF %SUOUTPUT_FILE%EF
%CMD <u>INPUT_FILE</u> <u>OUTPUT_FILE</u>
To Reverse:
%CMD %SUINPUT_FILE%EF [%SUOUTPUT_FILE%EF] --reverse
%CMD <u>INPUT_FILE</u> [<u>OUTPUT_FILE</u>] --reverse
Input and output files formats will be detected from extensions. Except that
you explicitly specify input or output format, for example:
%CMD mydic.utf8 mydic.ifo --read-format=tabfile
Expand Down
7 changes: 4 additions & 3 deletions ui/ui_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,10 @@ def formats_table(formats, header):
def help():
text = open(join(rootDir, 'help')).read()\
.replace('%CMD', COMMAND)\
.replace('%SB', startBold)\
.replace('%SU', startUnderline)\
.replace('%EF', endFormat)
.replace('<b>', startBold)\
.replace('<u>', startUnderline)\
.replace('</b>', endFormat)\
.replace('</u>', endFormat)
text += formats_table(Glossary.readFormats, 'Supported input formats:')
text += formats_table(Glossary.writeFormats, 'Supported output formats:')
print(text)
Expand Down

0 comments on commit 9c74846

Please sign in to comment.