All Projects → huijunchen9260 → Shbib

huijunchen9260 / Shbib

Licence: gpl-3.0
A BibTeX-centric bibliography manager written in POSIX shell

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Shbib

citeproc-el
A CSL 1.0.2 Citation Processor for Emacs.
Stars: ✭ 75 (+188.46%)
Mutual labels:  bibtex, bibliography
scr
🎤 A Super CRappy SCReenshot & SCreen Recording SCRipt for Sound Cloud Rappers + audio recorder, yes (sponsored by https://git.io/kiwmi)
Stars: ✭ 16 (-38.46%)
Mutual labels:  posix, sh
proofengineering-bib
BibTeX bibliographies for proof engineering-related papers
Stars: ✭ 24 (-7.69%)
Mutual labels:  bibtex, bibliography
Modernish
Modernish is a library for writing robust, portable, readable, and powerful programs for POSIX-based shells and utilities.
Stars: ✭ 586 (+2153.85%)
Mutual labels:  sh, posix
smoosh
The Symbolic, Mechanized, Observable, Operational SHell: an executable formalization of the POSIX shell standard.
Stars: ✭ 86 (+230.77%)
Mutual labels:  posix, sh
Shell Tricks
Simple bash tricks which make your life easier.
Stars: ✭ 153 (+488.46%)
Mutual labels:  sh, posix
scholia
Wikidata-based scholarly profiles
Stars: ✭ 166 (+538.46%)
Mutual labels:  bibtex, bibliography
Jekyll Scholar
jekyll extensions for the blogging scholar
Stars: ✭ 872 (+3253.85%)
Mutual labels:  bibtex, bibliography
videlibri
📚 Cross-platform library client to automate any OPAC and library catalog from your local device, e.g. for renewing of borrowed books or searching for books available in the library in automated scripts.
Stars: ✭ 18 (-30.77%)
Mutual labels:  bibtex, bibliography
pandoc alfred
Pandoc-Suite for Academic Writing in Markdown
Stars: ✭ 68 (+161.54%)
Mutual labels:  bibtex, bibliography
Goat
POSIX-compliant shell movement boosting hack for real ninjas (aka `cd x` and `cd ...`)
Stars: ✭ 27 (+3.85%)
Mutual labels:  sh, posix
Helm Bibtex
Search and manage bibliographies in Emacs
Stars: ✭ 328 (+1161.54%)
Mutual labels:  bibtex, bibliography
Jabref
Graphical Java application for managing BibTeX and biblatex (.bib) databases
Stars: ✭ 2,385 (+9073.08%)
Mutual labels:  bibtex, bibliography
Fet.sh
🐢 a fetch written in posix shell without any external commands (sponsored by https://github.com/buffet/kiwmi, plz star)
Stars: ✭ 209 (+703.85%)
Mutual labels:  sh, posix
Rebiber
A simple tool to update bib entries with their official information (e.g., DBLP or the ACL anthology).
Stars: ✭ 1,005 (+3765.38%)
Mutual labels:  bibtex, bibliography
LaTeX-Templates
Document templates composed using LaTeX for my college assignments and projects (Applicable for any other university or college) ✨
Stars: ✭ 18 (-30.77%)
Mutual labels:  bibtex, bibliography
bibtex-js
Library for parsing .bib files, used in Bibliography.js 📚
Stars: ✭ 55 (+111.54%)
Mutual labels:  bibtex, bibliography
Org Roam Bibtex
Connector between Org-roam, BibTeX-completion, and Org-ref
Stars: ✭ 253 (+873.08%)
Mutual labels:  bibtex, bibliography
Mrsh
A minimal POSIX shell
Stars: ✭ 381 (+1365.38%)
Mutual labels:  sh, posix
Mons
POSIX Shell script to quickly manage monitors on X
Stars: ✭ 457 (+1657.69%)
Mutual labels:  posix

shbib

A BibTeX-centric bibliography manager written in POSIX shell

  • Minimal (only require POSIX compliant shell)
  • Search BibTeX on crossref and google scholar (Key press: s, p, w)
  • Create and modify bib file on the fly (Key press: i, e)
  • Automatically and manually rename and encode metadata to pdf file (Key press: B, b)
  • Create and view sublibrary (Key press: R, r)
  • Write notes for BibTeX entry

Table of Content

Preview

Search function:

search

Note function:

note

Introduction

The prerequisites for shbib is:

  1. Dependencies including read, curl, sort, pdfinfo, gs, grep, curl, pdfinfo, xclip/xsel/pbcopy (Mac OS)
  2. Create two environmental variables: $BIB and $BIB_PDF_PATH. $BIB is the path to your BibTeX file, and $BIB_PDF_PATH is the path to your pdf directory. You can add these three variables by modifying the paths and running the following pseudo code in terminal:
printf '%s\n' "export BIB='path/to/your/BibTeX/file'" >> $HOME/.profile
printf '%s\n' "export BIB_PDF_PATH='path/to/your/pdf/directory'" >> $HOME/.profile
printf '%s\n' "export BIB_UNI_KEY='Key to access your journals by your university'" >> $HOME/.profile	# Not required

To run shbib, you just need open your terminal, type git clone https://github.com/huijunchen9260/shbib to download this project, cd to the directory with shbib script, and run shbib by typing ./shbib.

Type ? to understnad the keybinding corresponding to each action:

k/↑ - up
j/↓ - down
l/→ - right
h/← - left
Ctrl-f/PageDown - PageDown
Ctrl-u/PageUp - PageUp
g/Home - go to top
G/End - go to bottom
s - search online by text
p - search online by metadata in PDF file
w - search google scholar by text
c - copy BibTeX entry from your $BIB
o - open PDF file by BibTeX entry
i - insert new BibTeX entry
e - edit existing BibTeX entry
b - manually build database by rename and encode metadata into PDF file
B - automatically build database by rename and encode metadata into PDF file
R - create new BibTeX entry sublibrary
    store at: $BIB_PDF_PATH/Libs
r - open existing BibTeX entry sublibrary
    store at: $BIB_PDF_PATH/Libs
n - write notes for BibTeX entry
    store at: $BIB_PDF_PATH/Notes
/ - search the current page
    default: case-insensitive search
    contain uppercase: case-sensitive search
? - show keybinds

Nice! You are all set!

Dev's note

This project is highly inspired by shfm. The skeleton is borrowed from that project, while the content is optimized from my old project dmenubib.

Writing in POSIX shell is an adventure. What you need to do is to force yourself to NOT use external program , to NOT create sub-shell by command substitution $(), and furthermore, to NOT utilize regular expression but pathname globbing instead. I find a lot of useful technique that can basically replace the usage of sed, awk, and most external program while developing this project. Those technique are:

  1. set -- $var to create the only "array" in POSIX shell, and use for line do ... done to manipulate each item in this array.
  2. Manipulating internal field separator ($IFS) to decide how set -- $var would separate the array. E.g., we can create newline character $nl to force set -- $var to separate each line as an element in array.
  3. case statement globbing matching -> replace sed and awk regular expression matching
  4. Flow control using exit value (ref_search function and shell special parameters $?)
  5. Create a newline and tab character, $nl an $tab, by create a "hard" character:
    nl='
    '
    tab='	'
    
  6. Json file manipulation is also possible by pure POSIX shell. Look into shbib for json_pretty_print function for detail information.
  7. Case-insensitive search is done by transforming both searching string adn searched item to lower case, then match them together. Hope someone can provide a more elegant way to do so.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].