Giter VIP home page Giter VIP logo

alfred-bibtex-citation-picker's Introduction

Supercharged Citation Picker

A citation picker and minimalistic reference manager for Alfred. Uses a BibTeX File and supports various formats like Pandoc Markdown, Multi-Markdown or LaTeX.

Note
For inclusion in the upcoming Alfred Gallery, this workflow's auto-update feature had to be removed. However, the submission process for the upcoming Alfred Gallery takes longer than expected, and until admitted in the Gallery, you have to update the workflow manually by downloading the latest release at GitHub.

promo screenshot

Feature Overview

  • Inserts Pandoc Citation Syntax ([@citekey]), supporting page numbers & multiple citations ([@citekey, p. 23; @citekey, p. 42]). Can also be configured to use LaTeX, Multi-Markdown, eta templates, [[wikilinks]], or #tags as citation format.
  • app-independent: works system-wide, in every text field of every app.
  • Smart Search: search for citekeys, authors, title, publication, keywords (tags), include or exclude authors in et al, tab-completion, fuzzy-matching, sorting recently used entries to the top.
  • Feature-rich: paste single-entry bibliographies, open URLs, open or create literature notes, attach PDFs, search for .csl files online, and more.
  • Blazingly Fast: considerably quicker than any other citation pickers (~200 ms to fully reload a library with ~4000 entries).
  • Simple Installation: no dependencies, no required plugins, no setup. Just enter the path to your .bib file.
  • Minimalistic reference manager: add or remove entries the BibTeX library, automatically rename and file PDFs, and more.
  • Obsidian integration: When located in an Obsidian vault, literature notes are automatically opened or created in Obsidian instead of the default markdown app.

Table of Contents

Getting Started

  1. Download the latest release.
  2. Enter the BibTeX Library path.
  3. Set a hotkey for the citation picker by double-clicking the respective field in the workflow window.

Basic Usage

Press the hotkey in any text field to start the citation picker.

Search

  • Search for the title, author/editor (last name), year, or collection or journal-title.
  • Prepend @ to a word to search for a citekey, for example @Grieser2020.
  • Prepend # to search for keywords (tags), for example #sociology.
  • Smart Queries: You can search for any combination of the above. For example, the query 2020 #cognition Grieser searches for entries published in 2020, with the tag "cognition," and with "Grieser" as author/editor.

Citation Actions

  • : Paste the citekey of the selected citation.
  • ⌥ + ↵: Add another citation.
  • ⌘⇧ + ↵: Paste an inline-citation (citation without surrounding formatting, for example @Grieser2022 instead of [@Grieser2022])
  • ⌘ + ↵: Add page numbers before pasting the selected citekey.
    • Confirm the page number with ⌥ + ↵ to add another citation afterwards.
    • Confirm with ⌘⇧ + ↵ for an inline-citation with page number (@Grieser2022 [p. 42]).

URL Actions

  • ⌃ + ↵: Open the URL in the browser.
  • ⌘ + C: Copy the URL to the clipboard.
  • In both cases, if the entry has a DOI but not a URL, the citation picker uses the DOI-URL (https://doi.org/…) instead.

Icon Meanings

Icon Entry has
🌐 URL or DOI
📄 Abstract
n 🏷 n Keywords
📓 Literature Note
📕 PDF

Changing the Citation Format

Available Formats

You can use the scp and select Change Citation Format to change the format of the citations:

  • Pandoc (default)
  • Multi-Markdown
  • Latex
  • Eta template
  • Wikilink
  • Tag

Note
Not all formats support all citation-related features, for example, adding Page numbers as well as inline-citations are not supported for Latex, Wikilinks, and Tags.

Further Format Customization

If you want to use a format that is not available, you can customize the format yourself by changing the workflow environment variables starting with _format. (Tutorial: how to set environment variables in Alfred)

If there is a citation syntax that is commonly used, or if you want to improve support for an existing format, feel free to make a PR to this file which generates the formats or open a Feature Request.

Advanced Usage

Bibliography Actions

  • ⇧ + ↵: Reveal the entry in Zotero, neovim, BibDesk, VS Code, or Sublime, depending on the setting in the workflow configuration.
  • ⌘⌥ + ↵: Paste the full bibliographic entry in the APA 6th Style (requires Pandoc).
  • ⌘ + L: Preview the (unabridged) title, abstract, and list of keywords in Large type.
  • ⌘fn + ↵: Delete the entry from the BibTeX library. (⚠️ This feature is untested with BibTeX files created with apps other than BibDesk and Bookends. Create an issue for problems with other apps.)
  • universal action: Uses the selected DOI, ISBN, or URL containing a DOI to add a new entry to the library.
    • Experimental: A second universal action can be used to parse & add a bibliographic entry. Requires anystyle.
    • The new entry is added to your library, with a correctly formatted and unique citekey. Afterward, the entry is opened.
  • file action: Use the "Add Entry and Auto-file" action on a PDF file that includes a DOI. The DOI is automatically retrieved from the PDF, the entry added to the library, and the PDF auto-filed (see PDF Management Actions). Requires pdfgrep.

Note
Adding or removing entries does not work with the BetterBibTeX Zotero Plugin since the plugin only does a one-way-sync (Zotero ➞ BibTeX file), meaning any changes to the .bib file are not reflected in Zotero.

Literature Note Actions

  • The citation picker looks in the folder specified in the workflow settings for files that are exactly named like the citekey, optionally followed by an underscore and some text like {citekey}_{title}.md. The citekey must not contain underscores (_), the filename should not include the @.
  • Entries that have such a literature note is indicated by a 📓.
  • Meh + ↵1: Open the literature note.
    • If the file is in an Obsidian Vault, it is opened directly in Obsidian instead of the default text editor.
    • If there is no literature note, a new one is created.
  • ⌘ + Y: Preview the literature note with QuickLook (requires QLmarkdown or Peek2).
  • Add * to any search query to filter only for entries with literature notes, for example * grieser searches for entries matching "grieser" which also have a literature notes. Can be combined with other queries (see: smart queries).

PDF Management Actions

The following features require that all your PDFs are located in the folder specified in your workflow settings.

  • fn + ↵: Auto-file and auto-rename the currently selected PDF. Inside your selected PDF folder, uses the template path: {first_letter_of_citekey}/{citekey-author-part}/{citekey}_{shortened_title}.pdf
  • The 📕 indicates that the entry already has an associated PDF at that location.
  • Hyper + ↵1: If the entry has an associated PDF file, open it with the default PDF reader. The citekey must not contain an underscore (_).
  • ℹ️ Add pdf to any search query to filter only for entries with PDFs that have been added by the auto-file feature. pdf grieser, for example, displays only entries from the author "Grieser" with PDFs. Can be combined with other queries (see: smart queries).

Auxiliary Features

Triggered via the Alfred Keyword scp (for Supercharged Citation Picker).

  • Cheat sheet: Citation Picker Actions: Open a cheat sheet of the available actions of the Supercharged Citation Picker.
  • Citation Style Search: Search for a citation style (.csl file), which is downloaded to the location specified in your workflow settings (default: ~/.pandoc/csl/).
  • Force Buffer Reload: Force a reload of the citation picker. Mostly for debugging purposes.

About the Developer

In my day job, I am a sociologist studying the social mechanisms underlying the digital economy. For my PhD project, I investigate the governance of the app economy and how software ecosystems manage the tension between innovation and compatibility. If you are interested in this subject, feel free to get in touch.

Profiles

Donate

Buy Me a Coffee at ko-fi.com

Credits

Icons created by Freepik (Flaticon)

Footnotes

  1. Hyper is an artificial "fifth" modifier key equal to ⌘⌥⌃⇧, and can be created using apps like Karabiner Elements, BetterTouchTool, or Hyperkey. Meh is an artificial "sixth" modifier key equal to ⌥⌃⇧. 2

  2. QLmarkdown and Peek both enable previewing of Markdown documents. Peek works with a wide range of other file types than Markdown, but costs around 5€. QLMarkdown is free, but only works for Markdown and requires some minor setup. To enable the proper display of YAML headers, you need to enable the respective setting in the Advanced Options of QLMarkdown or Peek.

alfred-bibtex-citation-picker's People

Contributors

chrisgrieser avatar jxpeng98 avatar tim-hilde avatar zeitlings avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.