Skip to content

Commit

Permalink
Title is required for reveal and optional for remark
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljoseph committed Oct 15, 2013
1 parent 5fa36ed commit d6d3c46
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,24 @@ Run the cli:
remarkable.
Usage:
remarkable [options] remark <path-to-markdown-file>
remarkable [options] reveal <path-to-markdown-file>
remarkable [options] remark <path-to-markdown-file> [<title>]
remarkable [options] reveal <path-to-markdown-file> <title>
remarkable -h | --help
Options:
--debug Debug.
--title=<title> The title of the presentation
-h --help Show this screen.
```

Example:
```
remarkable reveal ../application-to-platform/application-to-platform.md
INFO:remarkable.cli:Created ../application-to-platform/application-to-platform.md.html
$ remarkable remark application-to-platform.md
INFO:remarkable.cli:Created remark.html
$ remarkable reveal application-to-platform.md application-to-platform
INFO:remarkable.cli:Created application-to-platform/index.html
```

## Documentation
Expand Down
9 changes: 4 additions & 5 deletions remarkable/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
remarkable.
Usage:
remarkable [options] remark <path-to-markdown-file>
remarkable [options] reveal <path-to-markdown-file>
remarkable [options] remark <path-to-markdown-file> [<title>]
remarkable [options] reveal <path-to-markdown-file> <title>
remarkable -h | --help
Options:
--debug Debug.
--title=<title> The title of the presentation
-h --help Show this screen.
"""
Expand Down Expand Up @@ -95,7 +94,7 @@ def remark(arguments):
dict(markdown=read_file(arguments['<path-to-markdown-file>'])),
)

title = arguments['--title']
title = arguments.get('<title>', 'Remark Presentation')
write_file(
'%s.html' % (title if title else 'remark'),
html,
Expand All @@ -104,7 +103,7 @@ def remark(arguments):

def reveal(arguments):
render_template_directory(Deck(
arguments.get('--title', 'Reveal Presentation'),
arguments.get('<title>', 'Reveal Presentation'),
read_file(arguments['<path-to-markdown-file>']),
'reveal'
))
Expand Down

0 comments on commit d6d3c46

Please sign in to comment.