Skip to content

Commit

Permalink
chg: dev: add program version.
Browse files Browse the repository at this point in the history
  • Loading branch information
rachmadaniHaryono committed May 7, 2017
1 parent cd5292e commit 393f49d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions export_saved.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
import praw


__version__ = '0.1.1'


# # Converter class from https://gist.github.com/raphaa/1327761
class Converter():
"""Converts a CSV instapaper export to a Chrome bookmark file."""
Expand Down Expand Up @@ -86,6 +89,7 @@ def get_args(argv):
action="store_true")
parser.add_argument("-up", "--upvoted", help="get upvoted posts instead of saved posts",
action="store_true")
parser.add_argument("-v", "--version", help="get program version.", action="store_true")

args = parser.parse_args(argv)
return args
Expand Down Expand Up @@ -194,6 +198,11 @@ def main():
if args.verbose:
logging.basicConfig(level=logging.DEBUG)

# print version
if args.version:
print(__version__)
return

# login
account = login(args=args)
client_id = account['client_id']
Expand Down

0 comments on commit 393f49d

Please sign in to comment.