Giter Site home page Giter Site logo

mdzhangst / abbreviate_journal_names_in_bib Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jitingtian/abbreviate_journal_names_in_bib

0.0 0.0 0.0 267 KB

replace full journal names in a bibtex database file into official abbreviated names, or reverse.

Shell 5.27% Python 94.73%

abbreviate_journal_names_in_bib's Introduction

abbreviate_journal_names_in_bib

(In English)

One-sentence description: Quickly generate a bib file containing the items of all the references you want, and replace the full journal names in the file with official abbreviated names, or do the opposite.

Latex provides a wonderful method to include references in your paper. To do this, you need to save the information (title, journal, authours, year, etc) of your references into a .bib file. Each reference corresponds to an bib item, which can be copied from Google scholar.

However, if you have many bib items, it would be tedious to copy them all by hands. A better way is to pull the pdf files of these papers into Mendeley (a reference management software), and then output the bib items of all these papers using the output function of Mendeley.

But Mendeley often outputs some unnecessary information of papers, such as abstract,DOI,keywords. I write a bash file update_bib_from_mendeley.sh to remove these content. Additionally, Mendeley sometimes would mistake the type of some papers into 'generic' or 'report', which actually should be 'article'. I also add some commands into my bash file to remove these errors.

Usage of update_bib_from_mendeley.sh: In windows, put this file and your library.bib file under the same directory, and then double click the bash file; In Linux, . update_bib_from_mendeley.sh or source update_bib_from_mendeley.sh.

In this way you can quickly get a library.bib file, but the journals in this file are in their full names, while many publishers require them to be abbriviated. I write a python code to replace the full names in a bib file into their official abbreviated names. This code needs a reference file journal_list.txt which keeps most journal's full names and the corresponding official abbreviated names.

Usage of abbriviate.py: python abbriviate.py library.bib

I also write a python code extend.py to do the reverse thing, i.e., extending the abbreviated names into their full form. As a result, each time you only need to update one of the bib files.

(In Chinese)

一句话描述:快速生成一个bib文件,里面包含你想要的所有参考文献的条目,把文件中的期刊全名替换成官方缩写名,或者反之。更多信息见知乎文章:https://zhuanlan.zhihu.com/p/503375837。

Latex提供了很方便的文献引用。你需要把你想引用的文献的信息(题目,期刊,作者,年份,等等)存入一个bib文件。每篇文献对应一个bib item,这些item都可以从谷歌学术上下载到。

但如果需要加入大量的items,一个一个下载太tedious了,更好的办法是把这些文章的pdf全部拖入Mendeley(或者手动载入信息),然后用Mendeley一次性全部导出bib形式的items。

但是这些items包含了很多不必要的信息,比如abstract,DOI,keywords,所以我写了一个脚本update_bib_from_mendeley.sh来删除这些内容。此外,Mendeley有时候会把文章类型错弄成generic或report,我也用上面的脚本把它们更改为article。脚本使用方法:windows下把它和其他文件放到同一目录下,然后双击;Linux下,直接. update_bib_from_mendeley.sh 或者 source update_bib_from_mendeley.sh

这样得到的library.bib包含了完整的期刊名。很多杂志要求用期刊名的缩写。同样,一个一个改太慢了,我写了abbriviate.py,又下载了最全的期刊名全写与缩写的对照表,存于journal_list.txt, 使用方法:python abbriviate.py library.bib 就能得到期刊名缩写的library_abbreviated.bib。

我又写了extend.py来实现逆转换。后面只需要更新一个,另一个用代码转换即可。

abbreviate_journal_names_in_bib's People

Contributors

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