Skip to content

Commit

Permalink
Updated the help on the CLI sub commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Adwaith-Rajesh committed May 27, 2022
1 parent 4657791 commit 867a104
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Fredy Somy
Copyright (c) 2022 Adwaith-Rajesh

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
8 changes: 4 additions & 4 deletions pysondb/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,25 @@ def main(argv: Optional[Sequence[str]] = None) -> int:
help='Get the pysondb version info and the JSON parser info')

sub = parser.add_subparsers(dest='sub')
migrate_cmd = sub.add_parser('migrate')
migrate_cmd = sub.add_parser('migrate', help='convert a v1 DB to v2')
migrate_cmd.add_argument(
'old', help='the path to the db with the old schema')
migrate_cmd.add_argument(
'new', help='the path to the file to put the db with the new schema')
migrate_cmd.add_argument('--indent', type=int,
default=4, help='set the indent of the output DB')
show = sub.add_parser('show')
show = sub.add_parser('show', help='Pretty print a DB')
show.add_argument('db', help='the path to the db to print as a table')
merge = sub.add_parser(
'merge', help='merge two or more DB with the same keys')
merge.add_argument('filenames', nargs='*')
merge.add_argument('--output', '-o', required=True,
help='The name of the output JSON file.')
to_csv = sub.add_parser('tocsv')
to_csv = sub.add_parser('tocsv', help='convert the DB to a csv file')
to_csv.add_argument('db_file', help='The DB file to convert to CSV')
to_csv.add_argument(
'--output', '-o', help='The name fo the output csv file')
purge = sub.add_parser('purge')
purge = sub.add_parser('purge', help='purge / empty the whole DB')
purge.add_argument('db_file', help='The DB file to purge')

args = parser.parse_args(argv)
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = pysondb-v2
version = 2.0.0
version = 2.0.1
author = Adwaith Rajesh
author_email = [email protected]
description = A Simple, Lightweight, Efficent JSON based database for Python.
Expand Down

0 comments on commit 867a104

Please sign in to comment.