Open
The open command is a very important command in the Papis workflow.
With it you can open documents, folders or marks.
Marks
One of this command’s special features is the ability to use marks for documents. For instance, if our library consists of PDF files and EPUB files, we would like to define bookmarks in order to go back to them at some later point.
How you define marks can be customized through the marks configuration
settings here. The default way of doing it is just by
defining a marks list in a document. Let us look at a concrete example:
author: Isaiah Shavitt, Rodney J. Bartlett
edition: '1'
files: [book.pdf]
isbn: 052181832X,9780521818322
marks:
- {name: Intermediates definition, value: 344}
- {name: EOM equations, value: 455}
publisher: Cambridge University Press
ref: book:293288
series: Cambridge Molecular Science
title: 'Many-Body Methods in Chemistry and Physics'
type: book
year: '2009'
This book has two defined marks. Each mark has a name and a value. If you tell
the open command to open marks, it will look for the marks and open the
value (page number). This is the default behavior. However, if you go to the
configuration, you’ll see that you can change the
convention to what suits you.
Examples
Open a PDF file linked to a document matching the string
bohm:papis open bohm
Open the folder where this last document is stored:
papis open -d bohm
The file browser used is given by the
file-browsersetting.Open a mark defined in the info file:
papis open --mark bohm
Command-line interface
Open document from a given library.
Usage
papis open [OPTIONS] [QUERY]
Options
- -h, --help
Show this message and exit.
- --sort <FIELD>
Sort documents with respect to the FIELD.
- --reverse
Reverse sort order.
- --doc-folder <doc_folder>
Document folder on which to apply action.
- -a, --all
Apply action to all matching documents.
- --tool <tool>
Tool for opening the file (opentool).
- -d, --dir
Open directory.
- -m, --mark, --no-mark
Open mark.
Arguments
- QUERY
Optional argument