summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2018-03-08 18:07:01 +0100
committerRobin Krahl <robin.krahl@ireas.org>2018-03-08 18:07:01 +0100
commit134d48399ac537d4841575ee0363a309a3461e23 (patch)
tree4b36a817a21e6434ba99aa302e1ad830ed587a16
downloadbibtool-134d48399ac537d4841575ee0363a309a3461e23.tar.gz
bibtool-134d48399ac537d4841575ee0363a309a3461e23.tar.bz2
Initial commit
-rw-r--r--LICENSE21
-rw-r--r--bibtool/__init__.py0
-rw-r--r--bibtool/__main__.py6
-rw-r--r--bibtool/cli.py20
-rw-r--r--requirements.txt1
5 files changed, 48 insertions, 0 deletions
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..1a3601d
--- /dev/null
+++ b/LICENSE
@@ -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