diff options
author | Robin Krahl <robin.krahl@ireas.org> | 2018-03-08 18:07:01 +0100 |
---|---|---|
committer | Robin Krahl <robin.krahl@ireas.org> | 2018-03-08 18:07:01 +0100 |
commit | 134d48399ac537d4841575ee0363a309a3461e23 (patch) | |
tree | 4b36a817a21e6434ba99aa302e1ad830ed587a16 | |
download | bibtool-134d48399ac537d4841575ee0363a309a3461e23.tar.gz bibtool-134d48399ac537d4841575ee0363a309a3461e23.tar.bz2 |
Initial commit
-rw-r--r-- | LICENSE | 21 | ||||
-rw-r--r-- | bibtool/__init__.py | 0 | ||||
-rw-r--r-- | bibtool/__main__.py | 6 | ||||
-rw-r--r-- | bibtool/cli.py | 20 | ||||
-rw-r--r-- | requirements.txt | 1 |
5 files changed, 48 insertions, 0 deletions
@@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018 Robin Krahl <robin.krahl@ireas.org> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/bibtool/__init__.py b/bibtool/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/bibtool/__init__.py diff --git a/bibtool/__main__.py b/bibtool/__main__.py new file mode 100644 index 0000000..59af02f --- /dev/null +++ b/bibtool/__main__.py @@ -0,0 +1,6 @@ +# Copyright (C) 2018 Robin Krahl <robin.krahl@ireas.org> +# SPDX-License-Identifier: MIT + +import bibtool.cli + +bibtool.cli.cli() diff --git a/bibtool/cli.py b/bibtool/cli.py new file mode 100644 index 0000000..23ceaa4 --- /dev/null +++ b/bibtool/cli.py @@ -0,0 +1,20 @@ +# Copyright (C) 2018 Robin Krahl <robin.krahl@ireas.org> +# SPDX-License-Identifier: MIT + +import click + + +TYPE_FILE = click.Path(exists=True, file_okay=True, dir_okay=False) +TYPE_DIR = click.Path(exists=True, file_okay=False, dir_okay=True) + + +@click.group() +def cli(): + pass + + +@cli.command('import') +@click.argument('filename', type=TYPE_FILE) +@click.option('--directory', type=TYPE_DIR) +def _import(filename, directory): + click.echo(filename) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..dca9a90 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +click |