Skip to content

prototype of research paper annotation tool

License

Notifications You must be signed in to change notification settings

shajra-simspace/spookel

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prototype has moved

This code has moved to http://github.com/shapr/fermatslastmargin

Getting Started

  • install poppler-utils, or more specifically, make sure the pdftocairo binary from poppler-utils is in your $PATH
  • git clone this repository
  • run this from cabal cabal run
  • point your web browser to 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>

Features

  • add paper info
  • read/write annotations
  • load page images
  • render 'uploaded' PDF to page images
  • push to github repo
  • pull from friends' github repo
  • switch notes view to see github friends' notes
  • setup new user (ask for github OAuth and username, set git remote correctly)
  • download paper (as PDF) when given unique ID (DOI for now)
  • search arxiv by title to get DOI
  • search crossref.org by title to get DOI

Requirements

  • poppler-utils (apt install poppler-utils)
  • zlib (apt install zlib1g-dev)

Project Implementation

(Scotty)[http://hackage.haskell.org/package/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.

Front End code

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.

  • page images are fetched from the filesystem via a static endpoint
  • local and friend notes are fetched by GET'ing from /getannotate
  • a new or updated note is saved by posting to /annotate
  • friends are found by GET'ing the DOI from /friends?paperuid=DOI
  • pushing local notes to github GETs /gitpush
  • pulling remote notes from github GETs /gitpull
  • creating a new paper POSTs to /paper
  • creating a new user will hit /newuser

About

prototype of research paper annotation tool

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Haskell 82.2%
  • JavaScript 13.4%
  • HTML 2.8%
  • CSS 1.6%