Extracting RepliGo PDF annotations to a Org-mode format snippet (unmaintained!)
Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.org
vkextract_annotations_to_orgmode_snippet.sh

README.org

Extracting RepliGo PDF annotations to a Org-mode format snippet

I annotate PDF research paper files on my tablet using RepliGo Reader for Android. Because I am managing my research papers within Org-mode similar to this description I want to get the PDF annotations back out from the PDF files and into my Org-mode files.

Since RepliGo stores its annotations very parser-friendly (it’s text!) and Org-mode is just text, I can add something like this into Org-mode:

#+begin_src sh :results output
${HOME}/bin/vkextract_annotations_to_orgmode_snippet.sh Qian2008
#+end_src

When I execute this in Org-mode (using babel: C-c C-c) its text output gets back into Org-mode like this example demonstrates:

#+results:
#+begin_example
---- HIGHLIGHTS: ---
Manage Radiologic Portable Document Format \(PDF\) Files Using iTunes
In this article, we explain how to use the hidden function of iTunes \(Apple Computer\) to manage PDF documents as easily as managing music fles.
PDF

#+end_example

Sticky Notes:
#+begin_example
---- NOTES: ---
This paper seems to be very relevant to my PIM study!
#+end_example

This method works with GNU Linux. Adaptations of paths and so forth are necessary in the script!

Be aware of special characters and German umlauts

RepliGo does create «easy to extract» annotations under normal circumstances. But when you

  • highlight special characters such as German umlauts,
  • OR add sticky notes or text information containing non-ASCII characters,

RepliGo Reader Android switches to an UTF encoding. PDF files with annotations stored as UTF can not extracted with this simple method presented here. In this case you’ll notice (only) funny characters in the output of this script.

Bonus: .emacs setup

These lines are part of my configuration. “C-c )” shows the reftex citation menu and with “j” I can insert a snippet for inserting annotations.

The rest might be helpful for your setup as well.

;;add a custom reftex cite format to insert links                                                                                  
(reftex-set-cite-format                                                                                                           
 '((?b . "[[bib:%l][%l.bib]]")                                                                                                    
   (?r . "[[ref:%l][%l]]")                                                                                                
   (?p . "[[pdf:%l][%l.pdf]]")                                                                                                 
   (?h . (concat "** %l - %t\n:PROPERTIES:\n:CREATED: "                                                                           
         "<" (substring (format-time-string (org-time-stamp-format t t)) 1 -1) ">"                                                
         "\n:ID: %l\n:END:\n[[bib:%l][%l.bib]]\n[[papers:%l][%l.pdf]]\n\n"))                                                      
   (?n . (concat "*** PDF Annotations: [[%l-notes.pdf][%l-notes.pdf]]\n:PROPERTIES:\n:CREATED: "                                  
         "<" (substring (format-time-string (org-time-stamp-format t t)) 1 -1) ">"                                                
         "\n:ID: %l-annotations\n:END:\n\n"                                                                                       
         "\#+begin_src sh :results output\n"                                                                                      
         "${HOME}/bin/vkextract_annotations_to_orgmode_snippet.sh %l\n"                                                           
                     "#+end_src\n\n"))                                                                                            
   ))))                                                                                                             

:

;; define shortcut for inserting references:              
(define-key org-mode-map (kbd "C-c )") 'reftex-citation)

:

;; define my own links for e.g. "[[pdf:Voit2012]]" -> "~/archive/papers_from_web/Voit2012.pdf"
(setq org-link-abbrev-alist                                                                                                            
      '(                                                                                                                               
    ("bib" . "~/archive/papers_from_web/references.bib::%s")                                                                           
    ("ref" . "~/share/all/org-mode/references.org::/%s/")                                                                             
    ("pdf" . "~/archive/papers_from_web/%s.pdf")                                                                                    
    ("notes" . "~/archive/papers_from_web/%s-notes.pdf")                                                                           
    ))

License

This documentation is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

The script file is licenced under GPL v3 or newer.

Example

This is an example entry of one paper in my «references.org» file:

Voit2011 - TagTree: storing and Re-Finding Files Using Tags

Voit2011.bib Voit2011.pdf

ISBN-13: 978-3-642-25363-8 ISBN-10: 3-642-25363-6 http://www.meduni-graz.at/imi/usab2011/ 24-26 Nov 2011, Graz, Austria http://www.springerlink.com/content/978-3-642-25363-8

  • acceptance rate USAB2011: 18%
  • this paper got recommended by John Smith on CHI2012

PDF Annotations: Voit2011-notes.pdf

${HOME}/bin/vkextract_annotations_to_orgmode_snippet.sh Voit2011

Annotations:

---- Annotations: ---
this paper seems relevant to me
the authors seem to have achieved clever system integration

Alternatives

Matt published a very similar method on his blog. You might as well check it out.