Convert from PubMed and BibTeX formats to Hayagriva

tohaya is a command-line tool and web application for converting from PubMed or BibTeX formats to Hayagriva.

2 Likes

Thank you for this, it’s pretty useful.

Previously I’ve been working with BibTeX to Hayagriva. I’ve done a test and it’s seems to me that tohaya is cleaner. Do you know BibTeX to Hayagriva? Do you have an opinion why tohaya is better? (I’m aware of the CLI side).

Regarding the CLI I couldn’t get it working. I’ve tried with:

tohaya --help
tohaya biblio.bib --output biblio.yml

but neither worked (it just hang up under Linux (Manjaro)). I don’t know if I’m doing something wrong (I’m just a noob with rust). Here is what the terminal says:

> which tohaya
/home/user/.cargo/bin/tohaya

> cargo install --list | grep tohaya
tohaya v0.0.1:
    tohaya

If you have any hint, I would appreciate it!

Thanks for checking it out!

tohaya is inspired by JonasLoos/bibtext-to-hayagriva-webapp, but it builds on top of it by integrating with biblib to support more input citation formats. Currently, PubMed format is supported, and more formats such as RIS and EndNote XML will be added in the near future. I have elaborated on this in the README’s Acknowledgements section.

Version 0.0.1 which you have installed from crates_io is outdated, though it does indeed work: it hangs because it is waiting for stdin.

tohaya < citation.nbib >> bibliography.yml

Sadly, installing from crates_io is not currently possible because the biblib dependency is being installed from GitHub. I have been working with its author on bug fixes and new features, so its latest update has not been published yet. In the meantime, you can compile from source, download a pre-compiled binary, or use npm:

# using npm or related
npm install -g tohaya@0.1.1
pnpm add -g tohaya@0.1.1
bun install -g tohaya@0.1.1

# using curl, for those who like danger
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/FNNDSC/tohaya/releases/download/v0.1.1/tohaya-installer.sh | sh

# using wget
cd /tmp
curl -LsSf 'https://github.com/FNNDSC/tohaya/releases/download/v0.1.1/tohaya-x86_64-unknown-linux-musl.tar.xz' | tar xvJ tohaya-x86_64-unknown-linux-musl/tohaya
mv tohaya-x86_64-unknown-linux-musl/tohaya ~/.local/bin

# compile from source
cargo install --git https://github.com/FNNDSC/tohaya.git

footnote: I mean crates (dot) io not crates_io, the forum software will not allow me to post more than two links…

1 Like

GitHub - typst/hayagriva: Rusty bibliography management. can convert .bib to .yaml.

1 Like

Ok, thank you for the explanation and the tips!

1 Like

True. tohaya builds on top of hayagriva, adding support for PubMed’s .nbib format, and in the near future it will also support EndNote XML and RIS.

I have asked the Typst team whether they’d be interested in upstream contributions: Community-developed converters to hayagriva · Issue #329 · typst/hayagriva · GitHub

I am a biomedical researcher, and my intention is to promote the use of Typst in my field. I couldn’t find a PubMed to hayagriva converter so I made tohaya.

1 Like