Ezibenroc / org_attach

Add an entry with attachment in an org-mode file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Org_attach

DOI Coverage Status

Installation

./setup.py install --user

Create a configuration file .orgattachrc in your working directory or one of its parent directories. Please refer to the example file.

You can also create a global configuration file in ~/.config/orgattach/orgattachrc.

Usage

org_attach {bib,ipynb} entries [entries ...]

The syntax for the entries depends on the command (bib or ipynb). The script will add a new entry in the org file according to the template specified in the configuration file. It will also attach the given file (when relevant).

  • Bibliographical entry (bib): An entry is made of two arguments separated by a comma. The first argument is mandatory, it is an identifier for a bibtex file. The second argument is optionnal, it is an identifier for any file (usually the corresponding PDF) that should be attached. Note that if no attachment file is specified, the script will try do fetch the file specified by the PDF field of the bibtex file (if there is one).
  • Jupyter notebook entry (ipynb): An entry is made of one mandatory argument, an identifier for a jupyter notebook file that should be attached.

An identifier for any file can be a path in your file system or a URL. An identifier for a bibtex file can also be a DOI or an IdHAL.

Examples

Add three entries for the given DOI.

org_attach bib 10.1137/0206024 10.1145/357172.357176 10.1145/321033.321034

Add an entry for the given DOI and attach the given file.

org_attach bib 10.1137/0206024,/path/to/the/file.pdf

Same thing, but the file is passed as an URL instead of a path.

org_attach bib 10.1137/0206024,http://somewebsite.com/path/to/the/file.pdf

This time, the bibtex file is passed as a path.

org_attach bib /path/to/some/biblio.bib

The bibtex file can be passed as a URL. Note that for this specific example, the bibtex file has a PDF field, so the paper will be attached automatically.

org_attach bib https://hal.inria.fr/hal-01017319v2/bibtex

Equivalent to the previous example, but using the IdHAL instead of the URL.

org_attach bib hal-01017319v2

Attaching a Jupyter notebook file specified by a path.

org_attach ipynb /path/to/the/file.ipynb

About

Add an entry with attachment in an org-mode file

License:MIT License


Languages

Language:Python 90.8%Language:TeX 5.4%Language:Jupyter Notebook 3.7%