• Stars
    star
    103
  • Rank 325,171 (Top 7 %)
  • Language
    Emacs Lisp
  • Created about 9 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Retrieve BibTeX entries from Google Scholar, ACM Digital Library, IEEE Xplore and DBLP

gscholar bibtex

http://melpa.org/packages/gscholar-bibtex-badge.svg http://stable.melpa.org/packages/gscholar-bibtex-badge.svg

Retrieve BibTeX entries from Google Scholar, ACM Digital Library, IEEE Xplore and DBLP by your query. All in Emacs Lisp!

UPDATE: ACM Digital Library, IEEE Xplore, and DBLP are now supported though the package name doesn’t suggest that.

Basic usage

Without package.el:

(add-to-list 'load-path "/path/to/gscholar-bibtex.el")
(require 'gscholar-bibtex)

With package.el: install via melpa!

To use, simply call

M-x gscholar-bibtex

Choose a source, then enter your query and select the results.

Available commands in `gscholar-bibtex-mode’, i.e., in the window of search results:

  • n/p: next/previous
  • TAB: show BibTeX entry for current search result
  • A/W: append/write to `gscholar-bibtex-database-file’ (see later)
  • a/w: append/write to a file
  • c: copy the current BibTeX entry
  • x: close BibTeX entry window
  • q: quit

Sources

By default, I enable all sources(Google Scholar, ACM Digital Library, IEEE Xplore and DBLP). If you don’t want to enable some of them, you could call

M-x gscholar-bibtex-turn-off-sources

Similarly, if you want to enable some of them, you could call

M-x gscholar-bibtex-turn-on-sources

To keep the configuration in your init file, you could use the following format(NOT real code):

(gscholar-bibtex-source-on-off action source-name)

Possible values:

  • action: :on or :off
  • source-name: “Google Scholar”, “ACM Digital Library”, “IEEE Xplore” or “DBLP”

Say if you want to disable “IEEE Xplore”, use the following code:

(gscholar-bibtex-source-on-off :off "IEEE Xplore")

Default source

If you have a preferred source, you can set it as default so you don’t have to type the name to select the source every time you call `gscholar-bibtex’. Say if you want to set “Google Scholar” as default:

(setq gscholar-bibtex-default-source "Google Scholar")

Note that in order to make it work, you have to make sure the source name is correct and you don’t disable the source that you set as default, otherwise the default source setting has no effect. Besides, if you only have one source enabled, then the enabled source automatically becomes the default, regardless of the value of `gscholar-bibtex-default-source’.

Configuring `gscholar-bibtex-database-file’

If you have a master BibTeX file, say refs.bib, as database, and want to append/write the BibTeX entry to refs.bib without being asked for a filename to be written every time, you can set `gscholar-bibtex-database-file’:

(setq gscholar-bibtex-database-file "/path/to/refs.bib")

Then use “A” or “W” to append or write to refs.bib, respectively.

Adding more sources

Currently these three sources cover nearly all my needs, and it is possible if you need to add more sources.

Basically, you need to implement following five functions(if you’re willing, I think looking the source code is better. The implementation is easy!):

(defun gscholar-bibtex-SourceName-search-results (query)
  "In the body, call `gscholar-bibtex--url-retrieve-as-string' to return a string
containing query results"
  body)

(defun gscholar-bibtex-SourceName-titles (buffer-content)
  "Given the `buffer-content', return the list of titles"
  body)

(defun gscholar-bibtex-SourceName-subtitles (buffer-content)
  "Given the `buffer-content', return the list of subtitles"
  body)

(defun gscholar-bibtex-SourceName-bibtex-urls (buffer-content)
  "Given the `buffer-content', return the list of urls(or maybe other
 feature) of the BibTeX entries, which would be fed to the next function"
  body)

(defun gscholar-bibtex-SourceName-bibtex-content (arg)
  "Given the url(or other feature) of a BibTeX entry, return the entry as string.
Also call `gscholar-bibtex--url-retrieve-as-string' for convenience"
  body)

Then you need to add a line:

(gscholar-bibtex-install-source "Source Name" 'SourceName)

You should put this line somewhere near the end of `gscholar-bibtex.el’, where you could find several `gscholar-bibtex-install-source’ lines.

That’s all. Enjoy hacking^_^

More Repositories

1

fcitx.el

Better fcitx integration for Emacs.
Emacs Lisp
125
star
2

parsec.el

A parser combinator library for Emacs Lisp, similar to Haskell's Parsec library.
Emacs Lisp
118
star
3

embrace.el

Add/Change/Delete pairs based on `expand-region', similar to `evil-surround'.
Emacs Lisp
114
star
4

ace-pinyin

Jump to Chinese character by pinyin with `avy' or `ace-jump-mode`
Emacs Lisp
84
star
5

emacs-firefox-controller

An improved Firefox controller for Emacs
Emacs Lisp
82
star
6

bing-dict.el

Minimalists' Bing dictionary for Emacs
Emacs Lisp
53
star
7

evil-embrace.el

Evil integration of embrace.el
Emacs Lisp
46
star
8

org-table-sticky-header

Sticky header for org-mode tables
Emacs Lisp
34
star
9

ace-jump-helm-line

Ace-jump to a candidate in helm window
Emacs Lisp
33
star
10

pinyinlib.el

Elisp library for converting first letter of Pinyin to Simplified/Traditional Chinese characters
Emacs Lisp
32
star
11

avy-zap

Zap to char using `avy'
Emacs Lisp
28
star
12

epipe

A fork of vipe to support emacsclient
Perl
27
star
13

fcitx-remote-for-windows

A fake fcitx-remote for Windows
C++
22
star
14

helm-ext

Extensions to helm (dirty hacks)
Emacs Lisp
19
star
15

evil-find-char-pinyin

Evil's f/F/t/T/evil-snipe commands with Pinyin support
Emacs Lisp
16
star
16

ace-flyspell

Jump to and correct spelling errors using ace-jump-mode and flyspell
Emacs Lisp
13
star
17

org2elcomment

Convert Org file to Elisp comments
Emacs Lisp
10
star
18

company-qml

Emacs company-mode backend for QML
Emacs Lisp
10
star
19

.emacs.d

Emacs config with an Evil editor
Emacs Lisp
9
star
20

plasma-rss-indicator

RSS indicator for Plasma 5
QML
9
star
21

BachelorThesis

Bachelor's final project
Scala
5
star
22

monad.el

(WIP) Toy implementation of monads in Emacs Lisp
Emacs Lisp
4
star
23

gmpl-mode

Major mode for editing GMPL (MathProg) files
Emacs Lisp
3
star
24

renren-indicator

Send notifications when news comes out in Renren.
Python
1
star
25

emacs-word-of-the-day

Show "Word of the Day" from 15 online sources in Emacs
Emacs Lisp
1
star
26

StudyRoomFinder

Helping students to find out available study rooms in Tsinghua University.
Python
1
star
27

KISS

Kiss: Insanely Simple/Stupid Scripts (for personal use only)
Ruby
1
star
28

XiamiDownloader

A naive(or not) music downloader for www.xiami.com
Python
1
star
29

cute-jumper.github.io

Personal blog using org-mode and Jekyll-Bootstrap
CSS
1
star
30

texmf

My own \LaTeX{} class files and macro packages
TeX
1
star
31

NerdishDoubanFM

A nerd-ish command line Douban FM client written in Python.
Python
1
star