summaryrefslogtreecommitdiff
path: root/pcr/papis
diff options
context:
space:
mode:
authorAndreas Grapentin <andreas@grapentin.org>2018-12-16 22:28:44 +0100
committerAndreas Grapentin <andreas@grapentin.org>2018-12-16 22:28:44 +0100
commitdd8c36110494df9296c9ad6f04cce32c5cd6c754 (patch)
tree85e270f8cfad6bf1af989ef95f51c8f6ea45422a /pcr/papis
parent7d7b9bd27451d7a8b4b1ddc4ab8b321564bd4c18 (diff)
downloadabslibre-dd8c36110494df9296c9ad6f04cce32c5cd6c754.tar.gz
abslibre-dd8c36110494df9296c9ad6f04cce32c5cd6c754.tar.bz2
abslibre-dd8c36110494df9296c9ad6f04cce32c5cd6c754.zip
pcr/papis: updated to 0.7
Diffstat (limited to 'pcr/papis')
-rw-r--r--pcr/papis/PKGBUILD15
-rw-r--r--pcr/papis/papis-click-0.7.patch140
2 files changed, 150 insertions, 5 deletions
diff --git a/pcr/papis/PKGBUILD b/pcr/papis/PKGBUILD
index 5348aa7f6..16a0a8edd 100644
--- a/pcr/papis/PKGBUILD
+++ b/pcr/papis/PKGBUILD
@@ -1,5 +1,5 @@
pkgname="papis"
-pkgver=0.6
+pkgver=0.7
pkgrel=1
pkgdesc="Powerful and highly extensible command-line based document and bibliography manager."
arch=(any)
@@ -22,15 +22,20 @@ depends=("python-setuptools"
"python-pypi-magic"
"python-pylibgen"
"python-urwid"
- "python-habanero")
+ "python-habanero"
+ "python-slugify"
+ "python-click")
source=($pkgname-$pkgver.tar.gz::https://github.com/papis/papis/archive/v$pkgver.tar.gz
- $pkgname-vim-gui-add-notes-edit-key.patch)
-sha256sums=('2cb30ea9451e0a8b081d6ea9153f5220d703a4a49cf58ff0dd909bf249c50f81'
- 'ec7a2ada63b5eac58cc89e0230ef6db3438357c2669b7c0f88e247e0266cbe53')
+ $pkgname-vim-gui-add-notes-edit-key.patch
+ $pkgname-click-0.7.patch::https://github.com/papis/papis/commit/7414634a11c61268a98edd26a4de2d65cb44a28b.patch)
+sha256sums=('77381dfe764aaf1d0add1ed943697085a6c2cd596448681764678ae95490901c'
+ 'ec7a2ada63b5eac58cc89e0230ef6db3438357c2669b7c0f88e247e0266cbe53'
+ '389bb2a6b309f949f1be6ac400f4ea7f80eac2f5a7101d98a0f1e0b8ce2a04d1')
prepare() {
cd "$srcdir/$pkgname-$pkgver"
patch -Np1 -i "$srcdir/$pkgname-vim-gui-add-notes-edit-key.patch"
+ patch -Np1 -i "$srcdir/$pkgname-click-0.7.patch"
}
build () {
diff --git a/pcr/papis/papis-click-0.7.patch b/pcr/papis/papis-click-0.7.patch
new file mode 100644
index 000000000..5fd5a6f7a
--- /dev/null
+++ b/pcr/papis/papis-click-0.7.patch
@@ -0,0 +1,140 @@
+From 7414634a11c61268a98edd26a4de2d65cb44a28b Mon Sep 17 00:00:00 2001
+From: Alejandro Gallo <aamsgallo@gmail.com>
+Date: Sat, 29 Sep 2018 12:52:01 +0200
+Subject: [PATCH] Fix issue #110
+
+Thank you @ARamsey118 and @zamlz !
+---
+ papis/commands/add.py | 18 +++++++++---------
+ papis/commands/default.py | 14 ++++++++------
+ 2 files changed, 17 insertions(+), 15 deletions(-)
+
+diff --git a/papis/commands/add.py b/papis/commands/add.py
+index e25e330..57985c9 100644
+--- a/papis/commands/add.py
++++ b/papis/commands/add.py
+@@ -536,13 +536,13 @@ def run(
+ @click.help_option('--help', '-h')
+ @click.argument("files", type=click.Path(exists=True), nargs=-1)
+ @click.option(
+- "-s", "--set",
++ "-s", "--set", "set_list",
+ help="Set some information before",
+ multiple=True,
+ type=(str, str)
+ )
+ @click.option(
+- "-d", "--dir",
++ "-d", "--dir", "directory",
+ help="Subfolder in the library",
+ default=""
+ )
+@@ -604,7 +604,7 @@ def run(
+ default=lambda: True if papis.config.get('add-confirm') else False
+ )
+ @click.option(
+- "--open/--no-open",
++ "--open/--no-open", "open_file",
+ help="Open file before adding document",
+ default=lambda: True if papis.config.get('add-open') else False
+ )
+@@ -632,8 +632,8 @@ def run(
+ )
+ def cli(
+ files,
+- set,
+- dir,
++ set_list,
++ directory,
+ interactive,
+ name,
+ file_name,
+@@ -645,7 +645,7 @@ def cli(
+ from_pmid,
+ from_lib,
+ confirm,
+- open,
++ open_file,
+ edit,
+ commit,
+ link,
+@@ -655,7 +655,7 @@ def cli(
+ """
+ data = dict()
+
+- for data_set in set:
++ for data_set in set_list:
+ data[data_set[0]] = data_set[1]
+
+ logger = logging.getLogger('cli:add')
+@@ -694,7 +694,7 @@ def cli(
+ data=data,
+ name=name,
+ file_name=file_name,
+- subfolder=dir,
++ subfolder=directory,
+ interactive=interactive,
+ from_bibtex=from_bibtex,
+ from_yaml=from_yaml,
+@@ -703,7 +703,7 @@ def cli(
+ from_doi=from_doi,
+ from_pmid=from_pmid,
+ confirm=confirm,
+- open_file=open,
++ open_file=open_file,
+ edit=edit,
+ commit=commit,
+ link=link,
+diff --git a/papis/commands/default.py b/papis/commands/default.py
+index 791e134..dc5e2c3 100644
+--- a/papis/commands/default.py
++++ b/papis/commands/default.py
+@@ -74,7 +74,7 @@ import papis.cli
+ is_flag=True
+ )
+ @click.option(
+- "--clear-cache", "--cc",
++ "--cc", "--clear-cache", "clear_cache",
+ help="Clear cache of the library used",
+ default=False,
+ is_flag=True
+@@ -86,7 +86,7 @@ import papis.cli
+ default=__import__("multiprocessing").cpu_count(),
+ )
+ @click.option(
+- "-s", "--set",
++ "-s", "--set", "set_list",
+ type=(str, str),
+ multiple=True,
+ help="Set key value, e.g., "
+@@ -98,9 +98,9 @@ def run(
+ lib,
+ log,
+ pick_lib,
+- cc,
++ clear_cache,
+ cores,
+- set
++ set_list
+ ):
+ log_format = '%(levelname)s:%(name)s:%(message)s'
+ if verbose:
+@@ -110,8 +110,10 @@ def run(
+ level=getattr(logging, log),
+ format=log_format
+ )
++ logger = logging.getLogger('default')
+
+- for pair in set:
++ for pair in set_list:
++ logger.debug('Setting "{0}" to "{1}"'.format(*pair))
+ papis.config.set(pair[0], pair[1])
+
+ if config:
+@@ -140,5 +142,5 @@ def run(
+ papis.config.get_configuration()
+ )
+
+- if cc:
++ if clear_cache:
+ papis.api.clear_lib_cache(lib)