summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Gallo <aamsgallo@gmail.com>2017-11-28 22:29:32 +0100
committerAlejandro Gallo <aamsgallo@gmail.com>2017-11-28 22:29:32 +0100
commite9f9e69355d930ff467ba1ec632a5c9b269da97f (patch)
treeefc22974f639e04f0b01f99c863516c784fe7d02
parentf1afd096427d4740344d5503b2ba3cbad69a47d3 (diff)
Update versionv0.4.7
-rw-r--r--doc/build/man/papis-config.1144
-rw-r--r--doc/build/man/papis.1272
-rw-r--r--papis/__init__.py4
3 files changed, 396 insertions, 24 deletions
diff --git a/doc/build/man/papis-config.1 b/doc/build/man/papis-config.1
index f994369d..afb7147a 100644
--- a/doc/build/man/papis-config.1
+++ b/doc/build/man/papis-config.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "PAPIS-CONFIG" "1" "Nov 21, 2017" "0.4.6" "papis"
+.TH "PAPIS-CONFIG" "1" "Nov 28, 2017" "0.4.7" "papis"
.SH NAME
papis-config \- Papis Configuration
.
@@ -161,6 +161,9 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fB493\fP
.UNINDENT
.UNINDENT
+.sp
+This is the default \fBumask\fP that will be used to create the new
+documents’ directories.
.INDENT 0.0
.TP
\fBbrowser\fP (\fI\%config\-settings\-browser\fP)
@@ -169,6 +172,9 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fB$BROWSER\fP
.UNINDENT
.UNINDENT
+.sp
+Program to be used for opening websites, the default is the environment
+variable \fB$BROWSER\fP\&.
.INDENT 0.0
.TP
\fBpicktool\fP (\fI\%config\-settings\-picktool\fP)
@@ -177,6 +183,21 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBpapis.pick\fP
.UNINDENT
.UNINDENT
+.sp
+This is the program used whenever papis asks you to pick a document
+or options in general.
+.INDENT 0.0
+.TP
+.B Possible options are:
+.INDENT 7.0
+.IP \(bu 2
+papis.pick
+.IP \(bu 2
+rofi
+.IP \(bu 2
+vim
+.UNINDENT
+.UNINDENT
.INDENT 0.0
.TP
\fBmvtool\fP (\fI\%config\-settings\-mvtool\fP)
@@ -185,6 +206,10 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBmv\fP
.UNINDENT
.UNINDENT
+.sp
+Tool used to in the \fBpapis mv\fP command to move documents.
+If you are using \fBgit\fP to manage your documents, you might consider
+setting it to \fBmvtool = git mv\fP\&.
.INDENT 0.0
.TP
\fBeditor\fP (\fI\%config\-settings\-editor\fP)
@@ -193,6 +218,11 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fB$EDITOR\fP
.UNINDENT
.UNINDENT
+.sp
+Editor used to edit files in papis, for instance for the \fBpapis edit\fP
+command. It defaults to the \fB$EDITOR\fP environment variable, if this is
+not set then it will default to the \fB$VISUAL\fP environment variable.
+Otherwise the default editor in your system will be used.
.INDENT 0.0
.TP
\fBxeditor\fP (\fI\%config\-settings\-xeditor\fP)
@@ -201,6 +231,10 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBxdg\-open\fP
.UNINDENT
.UNINDENT
+.sp
+Sometimes papis might use an editor that uses a windowing system
+(GUI Editor), you can set this to your prefered gui based editor, e.g.:
+\fBgedit\fP, \fBxemacs\fP, \fBgvim\fP to name a few.
.INDENT 0.0
.TP
\fBsync\-command\fP (\fI\%config\-settings\-sync\-command\fP)
@@ -209,6 +243,8 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBgit \-C {lib[dir]} pull origin master\fP
.UNINDENT
.UNINDENT
+.sp
+Command that is to be used when \fBpapis sync\fP is run.
.INDENT 0.0
.TP
\fBnotes\-name\fP (\fI\%config\-settings\-notes\-name\fP)
@@ -217,14 +253,10 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBnotes.tex\fP
.UNINDENT
.UNINDENT
-.INDENT 0.0
-.TP
-\fBformat\-doc\-name\fP (\fI\%config\-settings\-format\-doc\-name\fP)
-.INDENT 7.0
-.IP \(bu 2
-\fBDefault\fP: \fBdoc\fP
-.UNINDENT
-.UNINDENT
+.sp
+In \fBpapis edit\fP you can edit notes about the document. \fBnotes\-name\fP
+is the default name of the notes file, which by default is supposed
+to be a TeX file.
.INDENT 0.0
.TP
\fBuse\-cache\fP (\fI\%config\-settings\-use\-cache\fP)
@@ -233,6 +265,9 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBTrue\fP
.UNINDENT
.UNINDENT
+.sp
+Set to \fBFalse\fP if you do not want to use the \fBcache\fP
+for the given library.
.INDENT 0.0
.TP
\fBcache\-dir\fP (\fI\%config\-settings\-cache\-dir\fP)
@@ -249,6 +284,9 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBFalse\fP
.UNINDENT
.UNINDENT
+.sp
+Some commands will issue git commands if this option is set to \fBTrue\fP\&.
+For example in \fBmv\fP or \fBrename\fP\&.
.INDENT 0.0
.TP
\fBadd\-confirm\fP (\fI\%config\-settings\-add\-confirm\fP)
@@ -257,6 +295,11 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBFalse\fP
.UNINDENT
.UNINDENT
+.sp
+If set to \fBTrue\fP, everytime you run \fBpapis add\fP
+the flag \fB\-\-confirm\fP will be added automatically. If is set to \fBTrue\fP
+and you add it, i.e., you run \fBpapis add \-\-confirm\fP, then it will
+fave the contrary effect, i.e., it will not ask for confirmation.
.INDENT 0.0
.TP
\fBadd\-name\fP (\fI\%config\-settings\-add\-name\fP)
@@ -273,6 +316,10 @@ For mac users you might set this to \fBopen\fP\&.
.UNINDENT
.UNINDENT
+.sp
+Default name for newly added documents. For example, if you want
+your documents to be \fBauthor\-title\fP then you should set it to
+the papis format: \fB{doc[author]}\-{doc[title]}\fP\&.
.INDENT 0.0
.TP
\fBadd\-interactive\fP (\fI\%config\-settings\-add\-interactive\fP)
@@ -281,6 +328,11 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBFalse\fP
.UNINDENT
.UNINDENT
+.sp
+If set to \fBTrue\fP, everytime you run \fBpapis add\fP
+the flag \fB\-\-interactive\fP will be added automatically. If is set to
+\fBTrue\fP and you add it, i.e., you run \fBpapis add \-\-interactive\fP, then it
+will fave the contrary effect, i.e., it will not run in interactive mode.
.INDENT 0.0
.TP
\fBadd\-edit\fP (\fI\%config\-settings\-add\-edit\fP)
@@ -289,6 +341,12 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBFalse\fP
.UNINDENT
.UNINDENT
+.sp
+If set to \fBTrue\fP, everytime you run \fBpapis add\fP
+the flag \fB\-\-edit\fP will be added automatically. If is set to
+\fBTrue\fP and you add it, i.e., you run \fBpapis add \-\-edit\fP, then it
+will fave the contrary effect, i.e., it will not prompt to edit the info
+file.
.INDENT 0.0
.TP
\fBadd\-open\fP (\fI\%config\-settings\-add\-open\fP)
@@ -297,6 +355,12 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBFalse\fP
.UNINDENT
.UNINDENT
+.sp
+If set to \fBTrue\fP, everytime you run \fBpapis add\fP
+the flag \fB\-\-open\fP will be added automatically. If is set to
+\fBTrue\fP and you add it, i.e., you run \fBpapis add \-\-open\fP, then it
+will fave the contrary effect, i.e., it will not open the attached files
+before adding the document to the library.
.INDENT 0.0
.TP
\fBcheck\-keys\fP (\fI\%config\-settings\-check\-keys\fP)
@@ -305,6 +369,9 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBfiles\fP
.UNINDENT
.UNINDENT
+.sp
+Comma separated key values to be checked by default by the command
+\fBcheck\fP\&. E.g: \fBcheck\-keys = author, doi\fP\&.
.INDENT 0.0
.TP
\fBbrowse\-query\-format\fP (\fI\%config\-settings\-browse\-query\-format\fP)
@@ -313,6 +380,9 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fB{doc[title]} {doc[author]}\fP
.UNINDENT
.UNINDENT
+.sp
+The query string that is to be searched for in the \fBbrowse\fP command
+whenever a search engine is used.
.INDENT 0.0
.TP
\fBsearch\-engine\fP (\fI\%config\-settings\-search\-engine\fP)
@@ -321,6 +391,8 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBhttps://duckduckgo.com\fP
.UNINDENT
.UNINDENT
+.sp
+Search engine to be used by some commands like \fBbrowse\fP\&.
.INDENT 0.0
.TP
\fBuser\-agent\fP (\fI\%config\-settings\-user\-agent\fP)
@@ -329,6 +401,9 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBMozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3)\fP
.UNINDENT
.UNINDENT
+.sp
+User agent used by papis whenever it obtains information from external
+servers.
.INDENT 0.0
.TP
\fBdefault\-gui\fP (\fI\%config\-settings\-default\-gui\fP)
@@ -337,6 +412,9 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBvim\fP
.UNINDENT
.UNINDENT
+.sp
+Default gui to be used by papis, it can have the values given
+by \fBpapis gui \-\-help\fP\&.
.INDENT 0.0
.TP
\fBscripts\-short\-help\-regex\fP (\fI\%config\-settings\-scripts\-short\-help\-regex\fP)
@@ -345,6 +423,9 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fB\&.*papis\-short\-help: *(.*)\fP
.UNINDENT
.UNINDENT
+.sp
+This is the format of the short help indicator in external papis
+commands.
.INDENT 0.0
.TP
\fBinfo\-name\fP (\fI\%config\-settings\-info\-name\fP)
@@ -353,6 +434,8 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBinfo.yaml\fP
.UNINDENT
.UNINDENT
+.sp
+The default name of the information files.
.INDENT 0.0
.TP
\fBdoc\-url\-key\-name\fP (\fI\%config\-settings\-doc\-url\-key\-name\fP)
@@ -361,6 +444,10 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBdoc_url\fP
.UNINDENT
.UNINDENT
+.sp
+Some documents might have associated apart from an url also a file url,
+the key name appearing in the information file is defined by
+this setting.
.INDENT 0.0
.TP
\fBfile\-browser\fP (\fI\%config\-settings\-file\-browser\fP)
@@ -369,6 +456,10 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBxdg\-open\fP
.UNINDENT
.UNINDENT
+.sp
+File browser to be used when opening a directory, it defaults to the
+default file browser in your system, however you can set it to different
+file browsers such as \fBdolphin\fP, \fBthunar\fP, \fBranger\fP to name a few.
.INDENT 0.0
.TP
\fBextra\-bibtex\-keys\fP (\fI\%config\-settings\-extra\-bibtex\-keys\fP)
@@ -385,6 +476,11 @@ For mac users you might set this to \fBopen\fP\&.
.UNINDENT
.UNINDENT
+.sp
+When exporting documents in bibtex format, you might want to add
+non\-standard bibtex keys such as \fBdoc_url\fP or \fBtags\fP, you can add
+these here as comma separated values, for example
+\fBextra\-bibtex\-keys = tags, doc_url\fP\&.
.INDENT 0.0
.TP
\fBextra\-bibtex\-types\fP (\fI\%config\-settings\-extra\-bibtex\-types\fP)
@@ -401,6 +497,10 @@ For mac users you might set this to \fBopen\fP\&.
.UNINDENT
.UNINDENT
+.sp
+Allow non\-standard bibtex types to be recognised, e.g,
+\fBextra\-bibtex\-types = wikipedia, video, song\fP\&.
+See \fI\%bibtex reference\fP\&.
.INDENT 0.0
.TP
\fBdefault\-library\fP (\fI\%config\-settings\-default\-library\fP)
@@ -409,6 +509,9 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBpapers\fP
.UNINDENT
.UNINDENT
+.sp
+The name of the library that is to be searched when \fBpapis\fP
+is run without library arguments.
.INDENT 0.0
.TP
\fBexport\-text\-format\fP (\fI\%config\-settings\-export\-text\-format\fP)
@@ -417,6 +520,22 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fB{doc[author]}. {doc[title]}. {doc[journal]} {doc[pages]} {doc[month]} {doc[year]}\fP
.UNINDENT
.UNINDENT
+.sp
+The default output papis format for \fBpapis export \-\-text\fP\&.
+.INDENT 0.0
+.TP
+\fBformat\-doc\-name\fP (\fI\%config\-settings\-format\-doc\-name\fP)
+.INDENT 7.0
+.IP \(bu 2
+\fBDefault\fP: \fBdoc\fP
+.UNINDENT
+.UNINDENT
+.sp
+This setting controls the name of the document in the papis format strings
+like in format strings such as \fBmatch\-format\fP or \fBheader\-format\fP\&.
+For instance, if you are managing videos, you might want to
+set this option to \fBvid\fP in order to set the \fBheader\-format\fP to
+\fB{doc[title]} \- {doc[director]} \- {doc[duration]}\fP\&.
.INDENT 0.0
.TP
\fBmatch\-format\fP (\fI\%config\-settings\-match\-format\fP)
@@ -425,6 +544,11 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fB{doc[tags]}{doc.subfolder}{doc[title]}{doc[author]}{doc[year]}\fP
.UNINDENT
.UNINDENT
+.sp
+Default format that is used to match a document against in order to select
+it. For example if the \fBmatch\-format\fP is equal to
+\fB{doc[year]} {doc[author]}\fP then title of a document will not work
+to match a document, onlye the year and author.
.INDENT 0.0
.TP
\fBheader\-format\fP (\fI\%config\-settings\-header\-format\fP)
@@ -433,6 +557,8 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fB{doc[title]:<70.70}|{doc[author]:<20.20} ({doc[year]:\-<4})\fP
.UNINDENT
.UNINDENT
+.sp
+Default format that is used to show a document in order to select it.
.INDENT 0.0
.TP
\fBopen\-mark\fP (\fI\%config\-settings\-open\-mark\fP)
diff --git a/doc/build/man/papis.1 b/doc/build/man/papis.1
index 6ab1006c..f9c9f98c 100644
--- a/doc/build/man/papis.1
+++ b/doc/build/man/papis.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "PAPIS" "1" "Nov 21, 2017" "0.4.6" "papis"
+.TH "PAPIS" "1" "Nov 28, 2017" "0.4.7" "papis"
.SH NAME
papis \- Papis Documentation
.
@@ -230,6 +230,18 @@ pip3 install \-\-user papis
.fi
.UNINDENT
.UNINDENT
+.sp
+You can also \fBupdate\fP papis with \fBpip\fP
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+pip3 install \-\-upgrade papis
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
.SS From source
.sp
First of all you have to get the code, open a terminal and hit
@@ -507,6 +519,9 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fB493\fP
.UNINDENT
.UNINDENT
+.sp
+This is the default \fBumask\fP that will be used to create the new
+documents’ directories.
.INDENT 0.0
.TP
\fBbrowser\fP (\fI\%config\-settings\-browser\fP)
@@ -515,6 +530,9 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fB$BROWSER\fP
.UNINDENT
.UNINDENT
+.sp
+Program to be used for opening websites, the default is the environment
+variable \fB$BROWSER\fP\&.
.INDENT 0.0
.TP
\fBpicktool\fP (\fI\%config\-settings\-picktool\fP)
@@ -523,6 +541,21 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBpapis.pick\fP
.UNINDENT
.UNINDENT
+.sp
+This is the program used whenever papis asks you to pick a document
+or options in general.
+.INDENT 0.0
+.TP
+.B Possible options are:
+.INDENT 7.0
+.IP \(bu 2
+papis.pick
+.IP \(bu 2
+rofi
+.IP \(bu 2
+vim
+.UNINDENT
+.UNINDENT
.INDENT 0.0
.TP
\fBmvtool\fP (\fI\%config\-settings\-mvtool\fP)
@@ -531,6 +564,10 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBmv\fP
.UNINDENT
.UNINDENT
+.sp
+Tool used to in the \fBpapis mv\fP command to move documents.
+If you are using \fBgit\fP to manage your documents, you might consider
+setting it to \fBmvtool = git mv\fP\&.
.INDENT 0.0
.TP
\fBeditor\fP (\fI\%config\-settings\-editor\fP)
@@ -539,6 +576,11 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fB$EDITOR\fP
.UNINDENT
.UNINDENT
+.sp
+Editor used to edit files in papis, for instance for the \fBpapis edit\fP
+command. It defaults to the \fB$EDITOR\fP environment variable, if this is
+not set then it will default to the \fB$VISUAL\fP environment variable.
+Otherwise the default editor in your system will be used.
.INDENT 0.0
.TP
\fBxeditor\fP (\fI\%config\-settings\-xeditor\fP)
@@ -547,6 +589,10 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBxdg\-open\fP
.UNINDENT
.UNINDENT
+.sp
+Sometimes papis might use an editor that uses a windowing system
+(GUI Editor), you can set this to your prefered gui based editor, e.g.:
+\fBgedit\fP, \fBxemacs\fP, \fBgvim\fP to name a few.
.INDENT 0.0
.TP
\fBsync\-command\fP (\fI\%config\-settings\-sync\-command\fP)
@@ -555,6 +601,8 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBgit \-C {lib[dir]} pull origin master\fP
.UNINDENT
.UNINDENT
+.sp
+Command that is to be used when \fBpapis sync\fP is run.
.INDENT 0.0
.TP
\fBnotes\-name\fP (\fI\%config\-settings\-notes\-name\fP)
@@ -563,14 +611,10 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBnotes.tex\fP
.UNINDENT
.UNINDENT
-.INDENT 0.0
-.TP
-\fBformat\-doc\-name\fP (\fI\%config\-settings\-format\-doc\-name\fP)
-.INDENT 7.0
-.IP \(bu 2
-\fBDefault\fP: \fBdoc\fP
-.UNINDENT
-.UNINDENT
+.sp
+In \fBpapis edit\fP you can edit notes about the document. \fBnotes\-name\fP
+is the default name of the notes file, which by default is supposed
+to be a TeX file.
.INDENT 0.0
.TP
\fBuse\-cache\fP (\fI\%config\-settings\-use\-cache\fP)
@@ -579,6 +623,9 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBTrue\fP
.UNINDENT
.UNINDENT
+.sp
+Set to \fBFalse\fP if you do not want to use the \fBcache\fP
+for the given library.
.INDENT 0.0
.TP
\fBcache\-dir\fP (\fI\%config\-settings\-cache\-dir\fP)
@@ -595,6 +642,9 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBFalse\fP
.UNINDENT
.UNINDENT
+.sp
+Some commands will issue git commands if this option is set to \fBTrue\fP\&.
+For example in \fBmv\fP or \fBrename\fP\&.
.INDENT 0.0
.TP
\fBadd\-confirm\fP (\fI\%config\-settings\-add\-confirm\fP)
@@ -603,6 +653,11 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBFalse\fP
.UNINDENT
.UNINDENT
+.sp
+If set to \fBTrue\fP, everytime you run \fBpapis add\fP
+the flag \fB\-\-confirm\fP will be added automatically. If is set to \fBTrue\fP
+and you add it, i.e., you run \fBpapis add \-\-confirm\fP, then it will
+fave the contrary effect, i.e., it will not ask for confirmation.
.INDENT 0.0
.TP
\fBadd\-name\fP (\fI\%config\-settings\-add\-name\fP)
@@ -619,6 +674,10 @@ For mac users you might set this to \fBopen\fP\&.
.UNINDENT
.UNINDENT
+.sp
+Default name for newly added documents. For example, if you want
+your documents to be \fBauthor\-title\fP then you should set it to
+the papis format: \fB{doc[author]}\-{doc[title]}\fP\&.
.INDENT 0.0
.TP
\fBadd\-interactive\fP (\fI\%config\-settings\-add\-interactive\fP)
@@ -627,6 +686,11 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBFalse\fP
.UNINDENT
.UNINDENT
+.sp
+If set to \fBTrue\fP, everytime you run \fBpapis add\fP
+the flag \fB\-\-interactive\fP will be added automatically. If is set to
+\fBTrue\fP and you add it, i.e., you run \fBpapis add \-\-interactive\fP, then it
+will fave the contrary effect, i.e., it will not run in interactive mode.
.INDENT 0.0
.TP
\fBadd\-edit\fP (\fI\%config\-settings\-add\-edit\fP)
@@ -635,6 +699,12 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBFalse\fP
.UNINDENT
.UNINDENT
+.sp
+If set to \fBTrue\fP, everytime you run \fBpapis add\fP
+the flag \fB\-\-edit\fP will be added automatically. If is set to
+\fBTrue\fP and you add it, i.e., you run \fBpapis add \-\-edit\fP, then it
+will fave the contrary effect, i.e., it will not prompt to edit the info
+file.
.INDENT 0.0
.TP
\fBadd\-open\fP (\fI\%config\-settings\-add\-open\fP)
@@ -643,6 +713,12 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBFalse\fP
.UNINDENT
.UNINDENT
+.sp
+If set to \fBTrue\fP, everytime you run \fBpapis add\fP
+the flag \fB\-\-open\fP will be added automatically. If is set to
+\fBTrue\fP and you add it, i.e., you run \fBpapis add \-\-open\fP, then it
+will fave the contrary effect, i.e., it will not open the attached files
+before adding the document to the library.
.INDENT 0.0
.TP
\fBcheck\-keys\fP (\fI\%config\-settings\-check\-keys\fP)
@@ -651,6 +727,9 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBfiles\fP
.UNINDENT
.UNINDENT
+.sp
+Comma separated key values to be checked by default by the command
+\fBcheck\fP\&. E.g: \fBcheck\-keys = author, doi\fP\&.
.INDENT 0.0
.TP
\fBbrowse\-query\-format\fP (\fI\%config\-settings\-browse\-query\-format\fP)
@@ -659,6 +738,9 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fB{doc[title]} {doc[author]}\fP
.UNINDENT
.UNINDENT
+.sp
+The query string that is to be searched for in the \fBbrowse\fP command
+whenever a search engine is used.
.INDENT 0.0
.TP
\fBsearch\-engine\fP (\fI\%config\-settings\-search\-engine\fP)
@@ -667,6 +749,8 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBhttps://duckduckgo.com\fP
.UNINDENT
.UNINDENT
+.sp
+Search engine to be used by some commands like \fBbrowse\fP\&.
.INDENT 0.0
.TP
\fBuser\-agent\fP (\fI\%config\-settings\-user\-agent\fP)
@@ -675,6 +759,9 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBMozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3)\fP
.UNINDENT
.UNINDENT
+.sp
+User agent used by papis whenever it obtains information from external
+servers.
.INDENT 0.0
.TP
\fBdefault\-gui\fP (\fI\%config\-settings\-default\-gui\fP)
@@ -683,6 +770,9 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBvim\fP
.UNINDENT
.UNINDENT
+.sp
+Default gui to be used by papis, it can have the values given
+by \fBpapis gui \-\-help\fP\&.
.INDENT 0.0
.TP
\fBscripts\-short\-help\-regex\fP (\fI\%config\-settings\-scripts\-short\-help\-regex\fP)
@@ -691,6 +781,9 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fB\&.*papis\-short\-help: *(.*)\fP
.UNINDENT
.UNINDENT
+.sp
+This is the format of the short help indicator in external papis
+commands.
.INDENT 0.0
.TP
\fBinfo\-name\fP (\fI\%config\-settings\-info\-name\fP)
@@ -699,6 +792,8 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBinfo.yaml\fP
.UNINDENT
.UNINDENT
+.sp
+The default name of the information files.
.INDENT 0.0
.TP
\fBdoc\-url\-key\-name\fP (\fI\%config\-settings\-doc\-url\-key\-name\fP)
@@ -707,6 +802,10 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBdoc_url\fP
.UNINDENT
.UNINDENT
+.sp
+Some documents might have associated apart from an url also a file url,
+the key name appearing in the information file is defined by
+this setting.
.INDENT 0.0
.TP
\fBfile\-browser\fP (\fI\%config\-settings\-file\-browser\fP)
@@ -715,6 +814,10 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBxdg\-open\fP
.UNINDENT
.UNINDENT
+.sp
+File browser to be used when opening a directory, it defaults to the
+default file browser in your system, however you can set it to different
+file browsers such as \fBdolphin\fP, \fBthunar\fP, \fBranger\fP to name a few.
.INDENT 0.0
.TP
\fBextra\-bibtex\-keys\fP (\fI\%config\-settings\-extra\-bibtex\-keys\fP)
@@ -731,6 +834,11 @@ For mac users you might set this to \fBopen\fP\&.
.UNINDENT
.UNINDENT
+.sp
+When exporting documents in bibtex format, you might want to add
+non\-standard bibtex keys such as \fBdoc_url\fP or \fBtags\fP, you can add
+these here as comma separated values, for example
+\fBextra\-bibtex\-keys = tags, doc_url\fP\&.
.INDENT 0.0
.TP
\fBextra\-bibtex\-types\fP (\fI\%config\-settings\-extra\-bibtex\-types\fP)
@@ -747,6 +855,10 @@ For mac users you might set this to \fBopen\fP\&.
.UNINDENT
.UNINDENT
+.sp
+Allow non\-standard bibtex types to be recognised, e.g,
+\fBextra\-bibtex\-types = wikipedia, video, song\fP\&.
+See \fI\%bibtex reference\fP\&.
.INDENT 0.0
.TP
\fBdefault\-library\fP (\fI\%config\-settings\-default\-library\fP)
@@ -755,6 +867,9 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fBpapers\fP
.UNINDENT
.UNINDENT
+.sp
+The name of the library that is to be searched when \fBpapis\fP
+is run without library arguments.
.INDENT 0.0
.TP
\fBexport\-text\-format\fP (\fI\%config\-settings\-export\-text\-format\fP)
@@ -763,6 +878,22 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fB{doc[author]}. {doc[title]}. {doc[journal]} {doc[pages]} {doc[month]} {doc[year]}\fP
.UNINDENT
.UNINDENT
+.sp
+The default output papis format for \fBpapis export \-\-text\fP\&.
+.INDENT 0.0
+.TP
+\fBformat\-doc\-name\fP (\fI\%config\-settings\-format\-doc\-name\fP)
+.INDENT 7.0
+.IP \(bu 2
+\fBDefault\fP: \fBdoc\fP
+.UNINDENT
+.UNINDENT
+.sp
+This setting controls the name of the document in the papis format strings
+like in format strings such as \fBmatch\-format\fP or \fBheader\-format\fP\&.
+For instance, if you are managing videos, you might want to
+set this option to \fBvid\fP in order to set the \fBheader\-format\fP to
+\fB{doc[title]} \- {doc[director]} \- {doc[duration]}\fP\&.
.INDENT 0.0
.TP
\fBmatch\-format\fP (\fI\%config\-settings\-match\-format\fP)
@@ -771,6 +902,11 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fB{doc[tags]}{doc.subfolder}{doc[title]}{doc[author]}{doc[year]}\fP
.UNINDENT
.UNINDENT
+.sp
+Default format that is used to match a document against in order to select
+it. For example if the \fBmatch\-format\fP is equal to
+\fB{doc[year]} {doc[author]}\fP then title of a document will not work
+to match a document, onlye the year and author.
.INDENT 0.0
.TP
\fBheader\-format\fP (\fI\%config\-settings\-header\-format\fP)
@@ -779,6 +915,8 @@ For mac users you might set this to \fBopen\fP\&.
\fBDefault\fP: \fB{doc[title]:<70.70}|{doc[author]:<20.20} ({doc[year]:\-<4})\fP
.UNINDENT
.UNINDENT
+.sp
+Default format that is used to show a document in order to select it.
.INDENT 0.0
.TP
\fBopen\-mark\fP (\fI\%config\-settings\-open\-mark\fP)
@@ -1751,7 +1889,7 @@ Default: “”
Get contact information from a vcard (.vcf) file
.TP
.B\-\-to
-When –to is specified, the document will be added to theselected already existing document entry.
+When –to is specified, the document will be added to the selected already existing document entry.
.TP
.B\-\-confirm
Ask to confirm before adding to the collection
@@ -1818,7 +1956,7 @@ Default: False
.B\-m, \-\-mark
Open mark
.sp
-Default: False
+Default: True
.UNINDENT
.SS Edit
.INDENT 0.0
@@ -2649,13 +2787,18 @@ then the current library is used.
.UNINDENT
.INDENT 0.0
.TP
-.B papis.api.edit_file(file_path)
+.B papis.api.edit_file(file_path, wait=True)
Edit file using the \fBeditor\fP key value as a program to
handle file_path.
.INDENT 7.0
.TP
.B Parameters
+.INDENT 7.0
+.IP \(bu 2
\fBfile_path\fP (\fIstr\fP) – File path to be handled.
+.IP \(bu 2
+\fBwait\fP (\fIbool\fP) – Wait for the completion of the opener program to continue
+.UNINDENT
.UNINDENT
.UNINDENT
.INDENT 0.0
@@ -2751,13 +2894,18 @@ list
.UNINDENT
.INDENT 0.0
.TP
-.B papis.api.open_dir(dir_path)
+.B papis.api.open_dir(dir_path, wait=True)
Open dir using the \fBfile\-browser\fP key value as a program to
open dir_path.
.INDENT 7.0
.TP
.B Parameters
+.INDENT 7.0
+.IP \(bu 2
\fBdir_path\fP (\fIstr\fP) – Folder path to be handled.
+.IP \(bu 2
+\fBwait\fP (\fIbool\fP) – Wait for the completion of the opener program to continue
+.UNINDENT
.UNINDENT
.UNINDENT
.INDENT 0.0
@@ -3015,6 +3163,104 @@ as a relative path, so you should run the command where this relative path
makes sense.
.UNINDENT
.UNINDENT
+.SH IMPORTING FROM ZOTERO SQLITE FILE
+.sp
+There is also a script that decodes the
+\fBzotero.sqlite\fP sqlite file that \fBzotero\fP uses to manage documents
+and creates papis Documents out of it.
+.sp
+This script will retrieve the documents from zotero (be it \fBpdf\fP documents
+or else) and important information like tags.
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+wget \-O ~/.config/papis/scripts/papis\-zotero\-sql https://raw.githubusercontent.com/alejandrogallo/papis/master/examples/scripts/papis\-zotero\-sql
+chmod +x ~/.config/papis/scripts/papis\-zotero\-sql
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.sp
+Now you have to go to the directory where zotero saves all the information,
+it would look something like this on linux systems:
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+cd ~/.mozilla/firefox/zqb7ju1q.default/zotero
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.sp
+Maybe the path is slightly different, it may vary from version to version from
+zotero. In the zotero data directory there should be a file called
+\fBzotero.sqlite\fP and there might be a \fBstorage\fP directory with
+document data inside. These will be used by \fBzotero\-sql\fP to
+retrieve information and files from.
+.sp
+Now you can use the script as
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+papis zotero\-sql
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.sp
+This script by default will create a directory named \fBDocuments\fP (in your
+current directory) where papis documents are stored. You can add these document
+by simply moving them to your library folder
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+mv Documents/* /path/to/your/papis/library
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.sp
+or also by adding them through papis using the folder flag
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+papis add \-\-from\-folder Documents/ZOTERO_ID
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.sp
+or write a \fBbash\fP for loop to do it with all the converted documents
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+for folder in Documents/* ; do papis add \-\-from\-folder $folder ; done
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.sp
+\fBWARNING:\fP
+.INDENT 0.0
+.INDENT 3.5
+Please be aware that the database structure of zotero is version dependent
+and this script \fBmight\fP not work fully with your version.
+You can check \fI\%issue #18\fP
+for more information.
+.UNINDENT
+.UNINDENT
.SH FAQ
.sp
Here are some problems that users have come accross with often:
diff --git a/papis/__init__.py b/papis/__init__.py
index 114db3fa..6d1bd72b 100644
--- a/papis/__init__.py
+++ b/papis/__init__.py
@@ -1,7 +1,7 @@
# Information
-__license__ = 'GPL3'
-__version__ = '0.4.6'
+__license__ = 'GPLv3'
+__version__ = '0.4.7'
__author__ = __maintainer__ = 'Alejandro Gallo'
__email__ = 'aamsgallo@gmail.com'