GithubHelp home page GithubHelp logo

zerobase / enml2md Goto Github PK

View Code? Open in Web Editor NEW
35.0 2.0 4.0 708 KB

Evernote to Markdown Converter

License: MIT License

CoffeeScript 64.99% JavaScript 35.01%
evernote markdown-converter coffeescript javascript

enml2md's Introduction

Evernote Markup Language to Markdown Converter (enml2md.js)

Build Status

Enml2md converts an Evernote export format (ENML, .enex) into Markdown (.md) files.

Install

$ git clone [email protected]:zerobase/enml2md.git
$ npm install
$ npm test

Usage

$ node bin/enml2md <export.enex> <export_directory>

Requirements

  • node (>=0.10)
  • npm (>=1.3)

enml2md's People

Contributors

jgardner8 avatar zerobase avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

enml2md's Issues

Fatal error in ../deps/v8/src/handles.h, line 48

Hi,

I am trying to convert my Evernote notes and I get this error:

Fatal error in ../deps/v8/src/handles.h, line 48

CHECK(location_ != NULL) failed

==== C stack trace ===============================

1: V8_Fatal
2: v8::String::NewFromUtf8(v8::Isolate_, char const_, v8::String::NewStringType, int)
3: node::StringBytes::Encode(v8::Isolate_, char const_, unsigned long, node::encoding)
4: void node::Buffer::StringSlice<(node::encoding)1>(v8::FunctionCallbackInfov8::Value const&)
5: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfov8::Value const&))
6: ??
7: ??
Illegal instruction

could you please help me? What am I doing wrong?
after successful install also the test were OK.
npm test

[email protected] test /home/user/tmp/enml2md
grunt test

Local Npm module "grunt-cli" not found. Is it installed?

Running "clean:lib" (clean) task
Cleaning lib...OK

Running "clean:test" (clean) task
.....
//// SNIP ////
.....

26 passing (124ms)

Done, without errors.

Name too long

$ node bin/enml2md Music.enex ./Music                                                                                                                                             
fs.js:500
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^
Error: ENAMETOOLONG, name too long './Music/Электролитическое травление латуни (часть 1)   Мастерские   Зарубежные мастер-классы (зарубежная мастерская)   Коллективные блоги   Steampunker.ru - сеть для любителей steampunk'а.md'
    at Error (native)
    at Object.fs.openSync (fs.js:500:18)
    at Object.fs.writeFileSync (fs.js:1099:15)
    at EvernoteExport._exportNote (/home/omega9/Warehouse/Sources/Evernote/enml2md/lib/EvernoteExport.js:56:10)
    at Parser.eachProc [as cbEach] (/home/omega9/Warehouse/Sources/Evernote/enml2md/lib/EvernoteExport.js:28:16)
    at null.<anonymous> (/home/omega9/Warehouse/Sources/Evernote/enml2md/lib/Parser.js:30:27)
    at exports.each (/home/omega9/Warehouse/Sources/Evernote/enml2md/node_modules/cheerio/lib/api/traversing.js:122:24)
    at /home/omega9/Warehouse/Sources/Evernote/enml2md/lib/Parser.js:25:19
    at fs.js:334:14
    at /home/omega9/Warehouse/Sources/Evernote/enml2md/node_modules/graceful-fs/graceful-fs.js:103:5

Parsing ToDo Items

It looks like there is an issue wwith ToDo Items:

/Users/Nitrx/Desktop/enml2md/node_modules/html2markdown/markdown_html_parser.js:139
                throw "Parse Error: " + html;
                                      ^
Parse Error: <en-todo></en-todo>Look at…

Undefined Exception?

Looks like you had an issue here:

/Users/Nitrx/Desktop/enml2md/node_modules/html2markdown/html2markdown.js:44
    return value.replace(/^\s+|\s+$/g,"");
                 ^
TypeError: Cannot call method 'replace' of undefined
    at trim (/Users/Nitrx/Desktop/enml2md/node_modules/html2markdown/html2markdown.js:44:15)
    at Object.parser.end (/Users/Nitrx/Desktop/enml2md/node_modules/html2markdown/html2markdown.js:377:34)
    at parseEndTag (/Users/Nitrx/Desktop/enml2md/node_modules/html2markdown/markdown_html_parser.js:198:15)
    at String.replace (native)
    at HTMLParser (/Users/Nitrx/Desktop/enml2md/node_modules/html2markdown/markdown_html_parser.js:99:16)
    at html2markdown (/Users/Nitrx/Desktop/enml2md/node_modules/html2markdown/html2markdown.js:197:2)
    at module.exports (/Users/Nitrx/Desktop/enml2md/node_modules/html2markdown/index.js:7:10)
    at Note.loadENMLContent (/Users/Nitrx/Desktop/enml2md/lib/Note.js:71:29)
    at Function.Note.composeNoteWithCheerio (/Users/Nitrx/Desktop/enml2md/lib/Note.js:103:10)
    at null.<anonymous> (/Users/Nitrx/Desktop/enml2md/lib/Parser.js:28:23)
Nitrx@Davids-MacBook-Pro:~/Desktop/enml2md (master)$ node bin/enml2md ../EverNotes/MyNotes.enex ../EverNotes/Out

I patched it by replacing:

function trim(value) {
    return value.replace(/^\s+|\s+$/g,"");
}

with

function trim(value) {
    if(!value) return "";
    return value.replace(/^\s+|\s+$/g,"");
}

TypeError: Cannot read property 'exportFileName' of undefined

$ node bin/enml2md Recipes.enex ./Recipes                                                                                                                                         
/home/omega9/Warehouse/Sources/Evernote/enml2md/lib/Note.js:63
        attachmentFileName = attachment.exportFileName();
                                       ^
TypeError: Cannot read property 'exportFileName' of undefined
    at null.<anonymous> (/home/omega9/Warehouse/Sources/Evernote/enml2md/lib/Note.js:63:40)
    at exports.each (/home/omega9/Warehouse/Sources/Evernote/enml2md/node_modules/cheerio/lib/api/traversing.js:122:24)
    at Note.loadENMLContent (/home/omega9/Warehouse/Sources/Evernote/enml2md/lib/Note.js:58:21)
    at Function.Note.composeNoteWithCheerio (/home/omega9/Warehouse/Sources/Evernote/enml2md/lib/Note.js:103:10)
    at null.<anonymous> (/home/omega9/Warehouse/Sources/Evernote/enml2md/lib/Parser.js:28:23)
    at exports.each (/home/omega9/Warehouse/Sources/Evernote/enml2md/node_modules/cheerio/lib/api/traversing.js:122:24)
    at /home/omega9/Warehouse/Sources/Evernote/enml2md/lib/Parser.js:25:19
    at fs.js:334:14
    at /home/omega9/Warehouse/Sources/Evernote/enml2md/node_modules/graceful-fs/graceful-fs.js:103:5
    at FSReqWrap.oncomplete (fs.js:95:15)

Conversion of about 1100 expoted notes failed

en2md failed a few seconds after being run with following error message ..
FATAL ERROR: CALL_AND_RETRY_0 Allocation failed - process out of memory
Abort trap: 6

Is there a work-around to this .. perhaps having en2md serially process the .enex file instead of attempting to load it all in one go ?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.