Skip to content

Commit

Permalink
Document and remove picktool from default
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandrogallo committed Aug 5, 2018
1 parent f73da60 commit b07bc1f
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 18 deletions.
28 changes: 19 additions & 9 deletions papis/commands/add.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,38 @@
Examples
^^^^^^^^
- Add a document located in ``~/Documents/interesting.pdf``
and name the folder where it will be stored in the database
``interesting-paper-2021``
- Add a document located in ``~/Documents/interesting.pdf`` and name the
folder where it will be stored in the database ``interesting-paper-2021``
.. code::
papis add ~/Documents/interesting.pdf --name interesting-paper-2021
- Add a paper that you have locally in a file and get the paper
information through its ``doi`` identifier (in this case
``10.10763/1.3237134`` as an example):
if you want to add directly some key values, like ``author``, ``title``
and ``tags``, you can also run the following:
.. code::
papis add ~/Documents/interesting.pdf \\
--name interesting-paper-2021 \\
--set author 'John Smith' \\
--set title 'The interesting life of bees' \\
--set year 1985 \\
--set tags 'biology interesting bees'
- Add a paper that you have locally in a file and get the paper information
through its ``doi`` identifier (in this case ``10.10763/1.3237134`` as an
example):
.. code::
papis add ~/Documents/interesting.pdf --from-doi 10.10763/1.3237134
- Add paper to a library named ``machine-learning`` from ``arxiv.org``
- Add paper to a library named ``machine-learning`` from ``arxiv.org``
.. code::
papis -l machine-learning add \
--from-url https://arxiv.org/abs/1712.03134
papis -l machine-learning add --from-url https://arxiv.org/abs/1712.03134
Examples in python
Expand Down
28 changes: 19 additions & 9 deletions papis/commands/default.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
"""
Examples
^^^^^^^^
- To override some configuration options, you can use the flag ``--set``, for
instance, if you want to override the editor used and the opentool to open
documents, you can just type
.. code:: shell
papis --set editor gedit --set opentool firefox edit
papis --set editor gedit --set opentool firefox open
- If you want to list the libraries and pick one before sending a database
query to papis, use ``--pick-lib`` as such
.. code:: shell
papis --pick-lib open 'einstein relativity'
Cli
^^^
.. click:: papis.commands.default:run
Expand Down Expand Up @@ -48,11 +67,6 @@
type=click.Choice(["INFO", "DEBUG", "WARNING", "ERROR", "CRITICAL"]),
default="INFO"
)
@click.option(
"--picktool",
help="Override picktool",
default=""
)
@click.option(
"--pick-lib",
help="Pick library to use",
Expand Down Expand Up @@ -83,7 +97,6 @@ def run(
config,
lib,
log,
picktool,
pick_lib,
cc,
cores,
Expand All @@ -105,9 +118,6 @@ def run(
papis.config.set_config_file(config)
papis.config.reset_configuration()

if picktool:
papis.config.set("picktool", picktool)

if pick_lib:
lib = papis.api.pick(
papis.api.get_libraries(),
Expand Down

0 comments on commit b07bc1f

Please sign in to comment.