Giter Club home page Giter Club logo

mendeleybibtexcleaner's Introduction

MendeleyBibTeXCleaner

Small CLI to "clean" the .bib files generated by Mendeley

Introduction

Mendeley is a popular software to organise bibliography. While it provides a basic feature to export the library in BibTeX format, I often found myself in the need of editing the .bib file to get it to work properly in my LaTeX documents. In particular, the exported .bib file contains a lot of unnecessary information for the use in a LaTeX document (e.g. abstract of the paper, filepath...). Moreover Mendely does not format correctly the month field, e.g. it exports month = {jun} rather than month = jun.

This script takes as input the .bib file created by Mendeley and returns a "cleaned up" file where only the user-specified fields are mantained. Moreover it gives the possibility of fixing the formatting of the month field.

Acknowledgements

This script makes use of click and bibtexparser.

Installation

Simply clone the repository and run

$ pip3 install .

Usage

$ mendeleycleaner COMMAND [ARGS] [OPTIONS] 

To 'clean' a file run

$ mendeleycleaner clean BIB_FILE.bib [OPTIONS]

The script will save the 'cleaned' file as BIB_FILE_edited.bib. This behaviour can be changed using appropriate options (see below).

To edit the configuration file run

$ mendeleycleaner config

At the first run, the script will create a default configuration file in ~/.MedeleyBibTeXCleaner The first few lines of the configuration file will look like

# Configuration file for MendeleyBibTeXCleaner
#
# Comment with "#" (or delete) the lines corresponding to the BibTeX fields
# that you DO NOT want in the processed bib file.
# If you want to include additional BibTeX fields, simply add them at the
# end of this file.
author
title
journal
pages
...

The user should edit the configuration file to their preferences before running the script. The default config file will return a bibliography with minimal information.

To display the help message, simply run

$ mendeleycleaner --help

Flags and options

  • --month will fix the month formatting.
  • --save-to DESTINATION allows the user to specify the destination file.
  • --overwrite overwrites the original .bib file.

Uninstall

To uninstall the script, simply run

$ pip3 uninstall MendeleyBibTeXCleaner

mendeleybibtexcleaner's People

Contributors

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