You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
656 B
28 lines
656 B
import os
|
|
import click
|
|
import backupill as bp
|
|
|
|
|
|
@click.argument("file", required=True)
|
|
@click.version_option(version=bp.__version__)
|
|
@click.command(context_settings=dict(help_option_names=["-h", "--help"]))
|
|
def main(file):
|
|
"""
|
|
\b
|
|
Generates barcoded PDF to backup text files on paper.
|
|
Source: https://github.com/beucismis/backupill
|
|
"""
|
|
|
|
if file:
|
|
if not os.path.isfile(file):
|
|
click.echo("Error: File '{}' not found!".format(file))
|
|
exit()
|
|
|
|
bp.generate_backup(file)
|
|
click.echo("Done!")
|
|
else:
|
|
click.echo("Usage: packupill FILENAME.asc")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|
|
|