Coder Social home page Coder Social logo

damiendr / papercitekeyhandler Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 164 KB

A simple helper for opening the PDF file associated with a Papers2 universal citekey.

License: Creative Commons Zero v1.0 Universal

Objective-C 53.97% Python 46.03%

papercitekeyhandler's Introduction

Papers Citekey Handler

A simple helper for opening the PDF file associated with a Papers2 universal citekey.

Usage

  • via a custom URL: clicking a link in the form citekey://Author:2009iw will open the corresponding PDF. Percent-encoded URLs also work: citekey://Author%3A2009iw

  • via a text service: select the text Author:2009iw in any application, righ-click and choose "Open Paper PDF for Citekey" in the Services menu. Any spaces or {} characters around the citekey will be ignored, so selecting {Author:2009iw} works too.

I use this helper together with the Magic Citations feature of Papers2 and a modified nvALT which automatically creates a citekey:// hyperlink for citekeys. Thus I can insert citekeys into plain-text notes by calling up Magic Citations, and open the associated PDF files simply by clicking on the citekeys.

Installation

First compile the project in XCode (tested for MacOSX 10.8).

Then simply copy PapersCitekeyHandler.app to /Applications/ or to ~/Library/Services/. There is no need to start the application explicitely. This is a background application with no settings.

To use the text service, first enable it in the Keyboard preference pane. One may need to log out and log back in for the service to appear in the menu.

How it works

Most of the work is done by a Python script (open_citekey.py) that searches the Papers2 SQLite database located at ~/Library/Application Support/Papers2/Library.papers2/Database.papersdb for papers matching the supplied citekey.

For details of citekey generation, see this document: http://support.mekentosj.com/kb/read-write-cite/universal-citekey

The Python script is wrapped in a Cocoa background application that registers itself as a custom URL handler and as a text service.

License

See LICENSE.txt

Note that this tool is not affiliated to or endorsed by the makers of the Papers2 app.

papercitekeyhandler's People

Contributors

damiendr 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.