baniol / kindle-my-clippings Goto Github PK
View Code? Open in Web Editor NEWkindle My Clippings.txt parser to JSON / html
License: MIT License
kindle My Clippings.txt parser to JSON / html
License: MIT License
Thanks for kindle-my-clippings
. It's a perfect fit for my needs.
It'd be cool to do something like kindle-my-clippings --export-all
and have it create files as 1 - state-machine.txt
, 2- Of leisure.txt
...
I could provide a PR. Are you interested?
Thank you!
I'm new to node and not sure if this is an error in node itself, but I noticed it when trying to install your module. I'm on win 7 32-bit with python 2.7 and node 0.8.9. Below is the full commandline history and the debug log is at https://dl.dropbox.com/u/313647/npm-debug.zip
C:\Users\Pat>npm install kindle-my-clippings
npm http GET https://registry.npmjs.org/kindle-my-clippings
npm http 200 https://registry.npmjs.org/kindle-my-clippings
npm http GET https://registry.npmjs.org/kindle-my-clippings/-/kindle-my-clippings-0.1.0.tgz
npm http 200 https://registry.npmjs.org/kindle-my-clippings/-/kindle-my-clippings-0.1.0.tgz
npm http GET https://registry.npmjs.org/jade/0.27.7
npm http GET https://registry.npmjs.org/dateformat/1.0.4-1.2.3
npm http GET https://registry.npmjs.org/jquery/1.8.3
npm http 200 https://registry.npmjs.org/dateformat/1.0.4-1.2.3
npm http GET https://registry.npmjs.org/dateformat/-/dateformat-1.0.4-1.2.3.tgz
npm http 200 https://registry.npmjs.org/jquery/1.8.3
npm http 200 https://registry.npmjs.org/jade/0.27.7
npm http GET https://registry.npmjs.org/jquery/-/jquery-1.8.3.tgz
npm http GET https://registry.npmjs.org/jade/-/jade-0.27.7.tgz
npm http 200 https://registry.npmjs.org/dateformat/-/dateformat-1.0.4-1.2.3.tgz
npm http 200 https://registry.npmjs.org/jquery/-/jquery-1.8.3.tgz
npm http 200 https://registry.npmjs.org/jade/-/jade-0.27.7.tgz
npm http GET https://registry.npmjs.org/jsdom
npm http GET https://registry.npmjs.org/htmlparser/1.7.6
npm http GET https://registry.npmjs.org/xmlhttprequest
npm http GET https://registry.npmjs.org/location/0.0.1
npm http GET https://registry.npmjs.org/navigator
npm http GET https://registry.npmjs.org/contextify
npm http GET https://registry.npmjs.org/commander/0.6.1
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/coffee-script
npm http 200 https://registry.npmjs.org/location/0.0.1
npm http GET https://registry.npmjs.org/location/-/location-0.0.1.tgz
npm http 200 https://registry.npmjs.org/htmlparser/1.7.6
npm http GET https://registry.npmjs.org/htmlparser/-/htmlparser-1.7.6.tgz
npm http 200 https://registry.npmjs.org/xmlhttprequest
npm http GET https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.4.2.tgz
npm http 200 https://registry.npmjs.org/navigator
npm http 200 https://registry.npmjs.org/commander/0.6.1
npm http GET https://registry.npmjs.org/navigator/-/navigator-1.0.1.tgz
npm http GET https://registry.npmjs.org/commander/-/commander-0.6.1.tgz
npm http 200 https://registry.npmjs.org/contextify
npm http GET https://registry.npmjs.org/contextify/-/contextify-0.1.4.tgz
npm http 200 https://registry.npmjs.org/mkdirp
npm http 200 https://registry.npmjs.org/location/-/location-0.0.1.tgz
npm http GET https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz
npm http 200 https://registry.npmjs.org/htmlparser/-/htmlparser-1.7.6.tgz
npm http 200 https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.4.2.tgz
npm http 200 https://registry.npmjs.org/coffee-script
npm http 200 https://registry.npmjs.org/navigator/-/navigator-1.0.1.tgz
npm http 200 https://registry.npmjs.org/commander/-/commander-0.6.1.tgz
npm http 200 https://registry.npmjs.org/contextify/-/contextify-0.1.4.tgz
npm http 200 https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz
npm http 200 https://registry.npmjs.org/jsdom
npm http GET https://registry.npmjs.org/jsdom/-/jsdom-0.2.19.tgz
npm http 200 https://registry.npmjs.org/jsdom/-/jsdom-0.2.19.tgz
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/cssom
npm http GET https://registry.npmjs.org/cssstyle
npm http 200 https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/bindings/-/bindings-1.0.0.tgz
npm http 200 https://registry.npmjs.org/cssom
npm http GET https://registry.npmjs.org/cssom/-/cssom-0.2.5.tgz
npm http 200 https://registry.npmjs.org/cssstyle
npm http GET https://registry.npmjs.org/cssstyle/-/cssstyle-0.2.3.tgz
npm http 200 https://registry.npmjs.org/request
npm http 200 https://registry.npmjs.org/bindings/-/bindings-1.0.0.tgz
npm http GET https://registry.npmjs.org/request/-/request-2.14.0.tgz
npm http 200 https://registry.npmjs.org/cssom/-/cssom-0.2.5.tgz
[email protected] install C:\Users\Pat\node_modules\kindle-my-clippings\node_modules\jquery\node_mo
dules\contextify
node-gyp rebuild
npm http 200 https://registry.npmjs.org/cssstyle/-/cssstyle-0.2.3.tgz
C:\Users\Pat\node_modules\kindle-my-clippings\node_modules\jquery\node_modules\contextify>node "C:\P
rogram Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js"
rebuild
npm http 200 https://registry.npmjs.org/request/-/request-2.14.0.tgz
gyp ERR! configure error
gyp ERR! stack Error: Command failed: Traceback (most recent call last):
gyp ERR! stack File "", line 1, in
gyp ERR! stack File "C:\Python27\lib\platform.py", line 1467, in python_version
gyp ERR! stack return _sys_version()[1]
gyp ERR! stack File "C:\Python27\lib\platform.py", line 1422, in _sys_version
gyp ERR! stack repr(sys_version))
gyp ERR! stack ValueError: failed to parse CPython sys.version: '2.7.2 |EPD 7.1-2 (32-bit)| (default
, Jul 3 2011, 15:13:59) [MSC v.1500 32 bit (Intel)]'
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:540:15)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! stack at maybeClose (child_process.js:638:16)
gyp ERR! stack at Process._handle.onexit (child_process.js:680:5)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin
node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Pat\node_modules\kindle-my-clippings\node_modules\jquery\node_modules\contexti
fy
gyp ERR! node -v v0.8.9
gyp ERR! node-gyp -v v0.6.8
gyp ERR! not ok
npm ERR! Error: ENOENT, open 'C:\Users\Pat\node_modules\kindle-my-clippings\node_modules\jquery\node
_modules\jsdom\node_modules\cssstyle\lib\properties\borderLeft.js'
npm ERR! If you need help, you may report this log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! [email protected]
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\n
pm\bin\npm-cli.js" "install" "kindle-my-clippings"
npm ERR! cwd C:\Users\Pat
npm ERR! node -v v0.8.9
npm ERR! npm -v 1.1.61
npm ERR! path C:\Users\Pat\node_modules\kindle-my-clippings\node_modules\jquery\node_modules\jsdom\n
ode_modules\cssstyle\lib\properties\borderLeft.js
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! cmd "/c" "node-gyp rebuild"
failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the contextify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls contextify
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\n
pm\bin\npm-cli.js" "install" "kindle-my-clippings"
npm ERR! cwd C:\Users\Pat
npm ERR! node -v v0.8.9
npm ERR! npm -v 1.1.61
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\Pat\npm-debug.log
npm ERR! not ok code 0
C:\Users\Pat>
Could you possibly include a license for this module? Want to know what's kosher if I'm gonna use it :)
Running the script on a "My Clippings.txt" file taken directly from a Kindle produces this error:
Traceback (most recent call last):
File "./extract-clippings.py", line 151, in <module>
note_hash = hashlib.sha256(note_text.strip().encode('utf8')).hexdigest()[:8]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 27: ordinal not in range(128)
My code:
const opts = {
file: '/Volumes/Kindle/documents/My\ clippings.txt'
};
And result:
{ [Error: ENOENT: no such file or directory, open '/Users/a8h333/Projects/kindle//Volumes/Kindle/documents/My clippings.txt']
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/Users/a8h333/Projects/kindle//Volumes/Kindle/documents/My clippings.txt' }
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.