Remove double output, typo
This commit is contained in:
parent
173aac081d
commit
a646714f76
@ -48,11 +48,6 @@ def remove_key_from_dict(dict, key):
|
||||
def exporter(blocklist, output=None, format: str = "toml", private: bool = False):
|
||||
if format == "markdown":
|
||||
exported_text = blocklist_to_markdown(blocklist, private)
|
||||
if output is not None:
|
||||
with open(output, "w") as f:
|
||||
f.write(exported_text)
|
||||
else:
|
||||
print(exported_text)
|
||||
if format == "toml":
|
||||
exported_text = blocklist_to_toml(blocklist, private)
|
||||
|
||||
@ -80,7 +75,7 @@ def cli():
|
||||
parser.add_argument('-v', '--verbose', action='store_true')
|
||||
parser.add_argument('-n', '--no-delete', action='store_true', help="Do not delete existing blocks")
|
||||
parser.add_argument('--format', help="Export format: toml|markdown")
|
||||
parser.add_argument('--private', action='store_true', help="When the flag is set private comment will also be "
|
||||
parser.add_argument('--private', action='store_true', help="When the flag is set, private comment will also be "
|
||||
"exported.")
|
||||
args = parser.parse_args()
|
||||
if args.verbose:
|
||||
|
Loading…
Reference in New Issue
Block a user