Skip to content

Commit

Permalink
Close #25
Browse files Browse the repository at this point in the history
  • Loading branch information
Leixb committed Oct 23, 2017
1 parent 6488b3f commit db74381
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions jutge_cli/commands/show.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def get_title(code: str, database: str, **kwargs) -> str:


def show(code: str, mode: str, database: str, inp_suffix: str = 'inp',
cor_suffix: str = 'cor', pandoc = False, **kwargs):
cor_suffix: str = 'cor', html = False, **kwargs):
"""Print title, test_cases or statement of given problem
:param code: problem code
Expand All @@ -65,7 +65,7 @@ def show(code: str, mode: str, database: str, inp_suffix: str = 'inp',
return title
:param inp_suffix: input file suffix for test cases
:param cor_suffix: output file suffix for test cases
:param pandoc: whether to use pandoc when printing stat
:param html: use html instead of pypandoc for test statement
"""

title = get_title(code=code, database=database)
Expand All @@ -86,7 +86,7 @@ def show(code: str, mode: str, database: str, inp_suffix: str = 'inp',
txt = ' '.join([str(i) for i in txt])

# Convert html to plain text using pandoc (if loaded)
if pandoc and PANDOC_LOADED:
if not html and PANDOC_LOADED:
txt = convert_text(txt, 'plain', 'html')

print(title + '\n')
Expand Down
6 changes: 3 additions & 3 deletions jutge_cli/jutge.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
defaults, download, get_code, import_zip, login,\
new, show, test, upload

JUTGE_CLI_VERSION = '2.0.7'
JUTGE_CLI_VERSION = '2.0.8'

CONFIG = defaults.config()
DEFAULT_PARAM = CONFIG['param']
Expand Down Expand Up @@ -233,8 +233,8 @@
default=DEFAULT_PARAM['cor-suffix'],
help='suffix of test correct output files')
PARSER_SHOW.add_argument(
'--pandoc', action='store_true', default=False,
help='Use pypandoc to print problem statement')
'--html', action='store_true', default=False,
help='Use html instead of pypandoc to print problem statement (faster)')

PARSER_TEST = SUBPARSERS.add_parser(
'test',
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

setup(
name='jutge_cli',
version='2.0.7',
version='2.0.8',

description='CLI to manage jutge.org problems',
long_description=long_description,
Expand Down
2 changes: 1 addition & 1 deletion zsh_completion/_jutge
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ case $state in
\
'--inp-suffix[input file suffix]:suffix' \
'--cor-suffix[correct output file suffix]:suffix'\
'--pandoc[use pypandoc to print problem statement]'
'--html[use use html instead of pypandoc to print problem statement (faster)]'
;;
(archive)
_arguments \
Expand Down

0 comments on commit db74381

Please sign in to comment.