GithubHelp home page GithubHelp logo

siudej / cite Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 0.0 40.05 MB

Mathematical citations fetcher(arXiv, MathSciNet, zbMATH) and formatter (BibTeX or LaTeX output).

Python 98.75% Shell 0.35% AppleScript 0.90%

cite's Introduction

Citation fetcher with customizable LaTeX/BibTeX output

PyQt GUI and a separate fetching engine for finding mathematics related citations on arXiv, MathSciNet and zbMATH.

Assuming required packages are present, application can be started with cite.py.

OS X:

  • Use Cite.dmg from the initial release.
    • Put Cite.app in /Applications folder
    • Optional: Double click on workflows to install them
    • Optional: Add TexShop macro
  • With Anaconda: Assuming all requrements are already installed, clone this repository, then run installMac.sh to install Services (user confirmation needed) and add cite to PATH. In either case cite should work from terminal.
TexShop macro

The supplied macro cuts the current line (or the selected lines) and runs it through the citation software.

Installation: Go to Macros->Open Macro Editor. Click on New Item and paste the contents of the TexShop.applescript file into the content field. Add some name and a convenient keyboard shortcut. The main Application must be started at least once before running the macro.

OS X Services

The supplied Automator scripts (workflows) allow filtering of any selected text in any application through the software. The output can either replace the selection, or appear in a new TextEdit window. Then right click on a selected text and look for Cite in Services.

General requirements

  • LaTeX/BibTeX
  • PyQt (4 or 5)
  • bibtexparser Python package

Search format

Search supports many field specifiers (author, title, journal, year, ...) as well as logical connectors (and/or/not). The search format is uniform for all databases, with all differences handled behind the scene.

Example search:

au:siudeja laugesen
2011

will find my papers written with my best collaborator, published in 2011.

It is also possible to feed a fully formatted bibitem or BibTeX entry as a search query, even including all the LaTeX formatting commands.

Output

Application supports raw BibTeX output, and custom LaTeX outputs:

  • font style can be chosen for authors, title, journal, ...
  • bibitem labels can be automatically generated, or preserved if given in the search query
  • links to databases can be automatically added

Batch processing is also possible. A list of citations can be processed to find links to databases, create BibTeX file, or to reformat/uniformize the LaTeX output.

System integration

The main script cite.py also accepts querries as parameters, or through stdin. In this case no GUI is created (PyQt is not needed) and the output is sent to stdout. This allows integration with text editors. One could use the following in Vim:

nmap ,bb !!cite.py<CR>
vmap ,bb !cite.py<CR>
nmap ,ba !!cite.py -a<CR>
vmap ,ba !cite.py -a<CR>

to feed a line, or a selection to the script.

The ,ba command can be used to force arXiv search. Other options are also available.

Application settings

Settings are saved in settings.xml file in the script's folder. This file is processed by both terminal and GUI versions. Hence it is convenient to set the settings in GUI, although the XML file can also be modified.

In PyQt, the settings are handled by a slightly modified pyqtconfig scipt (supplied).

Warning

This is an alpha version.

Some features are not yet fully implemented, and the documentation is lacking.

cite's People

Contributors

siudej avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

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