A tool for annotating research papers (and more) and sharing those annotations (via git for starters)
Fermat's Last Theorem was captioned "I have a truly marvelous demonstration of this proposition which this margin is too narrow to contain."
This tool intends to be an infinite margin.
Do you read many research papers or PhD theses? If yes, you might want to use this tool!
I like to write in the margins of my books and printed research papers. I want to read what other people have to say about a paper after I write down my own notes. I want to be able to search my notes. I want to be able to share my notes! I want to be able to remember why I downloaded a paper years later.
Distributing PDFs will get you sued for lots of money ( https://en.wikipedia.org/wiki/Sci-Hub#United_States ). I don't want to get sued.
$PATH
cabal run
(optionally: nix-shell --run "cabal run"
)localhost:3000
All of the annotations are saved in a local directory ~/.fermatslastmargin/localuser
and your friend's annotations are saved in ~/.fermatslastmargin/friends/<github_name_of_friend>
Scotty is used to handle a bunch of HTTP endpoints.
All state is saved in ~/.fermatslastmargin/
. For the user viewing the papers, their state will be in ~/.fermatslastmargin/localuser
.
The notes for each paper will be in ~/.fermatslastmargin/localuser/$DOI/paper.json
.
For example, Conor McBride's paper "Everybody's Got to be Somewhere" has a DOI of 10.4204/EPTCS.275.6
.
Once that paper is added, the notes will be saved into ~/.fermatslastmargin/localuser/10.4204/EPTCS.275.6/paper.json
Notes written by users followed by this user will be in ~/.fermatslastmargin/friends/<github_name_of_friend>
When a PDF is uploaded to create a new paper, the PDF is saved into ~/.fermatslastmargin/pageimages/$DOI/paper.pdf
.
Next, page images are generated by poppler-utils into ~/.fermatslastmargin/pageimages/$DOI/page-1.png
up to however many pages in the PDF.
The front end uses jquery in a thoroughly haphazard manner.
The state is mostly passed around as GET parameters for DOI, page number, and friend name.
For example, http://localhost:3000/index.html?pagenum=1&uid=10.2168/LMCS-10(3:19)2014&friendview=chazzam
The front end javascript calls HTTP endpoints defined in Main.hs.
/getannotate
/annotate
/friends?paperuid=DOI
/gitpush
/gitpull
/paper
/newuser
If you created a local repository and annotated papers before January 2020, you'll need to do cabal run migrate
to get your repository in the new format!