Giter Site home page Giter Site logo

pdf-drop-mode's Introduction

Documentation

pdf-drop-mode is a convenient mode that search for the DOI of any file that is dropped onto a buffer. To do that, the mode searches the DOI using several different methods (whose order can be specified):

  1. Look at the file metadata to check if a DOI is attached using exiftool (whose path can be specified).
  2. Search the content of the file to try to locate a DOI regex on the first page (PDF is transformed into text using the pdftotext utility).
  3. Search again the metadata to try to find the title and query the crossref database to get a corresponding DOI.
  4. Ask the user to enter the title of the file and query the crossref database to try to get a correspondong DOI.

If all methods failed, then the search has failed. When search finishes, a user-defined function is called with the filename and the DOI as arguments.

Installation

(straight-use-package
 '(pdf-drop-mode :type git :host github :repo "rougier/pdf-drop-mode"))

Usage

(require 'pdf-drop-mode)

(defun my/pdf-process (file doi)
  (message "%s : %s" file doi))

(setq pdf-drop-search-hook #'my/pdf-process)
(pdf-drop-mode)

You can then drag and drop a PDF onto the buffer and the DOI should be displayed.

pdf-drop-mode's People

Contributors

rougier avatar localauthor 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.