ocschwar: (Doggie)
[personal profile] ocschwar
I got myself a Kindle Paperwhite specifically to stop my habit of printing scientific PDFs and lugging them around like dead weight literally for years as I read through them.

And quickly learned that while the Paperwhite is one of the best PDF readers on the market at the moment, that is not saying much. But every once in a while I develop an outright obsession, and this was one of those times. So some notes about this:

1. Elsevier is the spawn of Satan in so many ways, but they have one very nice feature: for any article they offer full text, they offer to generate MOBI files (as well as PDF and EPub). The service is flaky, but when it works, it just works, and the result is a scientific paper that displays properly.

2. Multicolumn PDFs suck. Single column PDFs are okay. And there is a Java app that converts the former into the latter: cut2col.

3. For IEEE papers, the HTML formatting is pretty nice. So:
a. Install Zotero, Calibre and pygnotero.
b. Take a snapshot of the HTML full text.
3. This script will then let you manipulate the snapshot into a MOBI:

from pygnotero import libzotero
import sys
import os
import subprocess

zotero_folder = '/home/omri/.mozilla/firefox/seb4oddc.default/zotero/'
z = libzotero.libzotero(zotero_folder)


The z.index structure holds all the metadata on your Zotero snapshots, with which you can manipulate the files into a MOBI. An example of what I did earlier:

z.update(True)
I =  z.index.items()
L = [ (i[1].key,i[1].title,i[1].authors) for i in I if i[1].key and  
     os.path.isfile(zotero_folder+'/storage/'+i[1].key+'/icp.mobi')]
print L
for i in L:
    a=  ["/usr/bin/ebook-meta" , "-t", i[1], 
           zotero_folder+'/storage/'+i[0]+'/icp.mobi']
    #p = subprocess.Popen(a,stdin=None,stderr=None,stdout=None)
    #p.wait()
    print a[-1]
    pass

Profile

ocschwar: (Default)
ocschwar

April 2017

S M T W T F S
      1
2345678
9101112131415
16171819 202122
23242526272829
30      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 27th, 2017 06:47 pm
Powered by Dreamwidth Studios