{"id":13493704,"url":"https://github.com/pvdlg/enml4j","last_synced_at":"2025-04-11T08:33:36.389Z","repository":{"id":7590570,"uuid":"8946829","full_name":"pvdlg/enml4j","owner":"pvdlg","description":"Simple utility to handle ENML (Evernote Markup Language) in Java.","archived":false,"fork":false,"pushed_at":"2014-04-29T01:02:30.000Z","size":661,"stargazers_count":22,"open_issues_count":0,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-09T17:01:38.265Z","etag":null,"topics":["enml","evernote-markup-language","evernote-sdk","java"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pvdlg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-03-22T07:14:54.000Z","updated_at":"2021-02-20T11:05:24.000Z","dependencies_parsed_at":"2022-09-26T21:51:20.313Z","dependency_job_id":null,"html_url":"https://github.com/pvdlg/enml4j","commit_stats":null,"previous_names":["vanduynslagerp/enml4j"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvdlg%2Fenml4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvdlg%2Fenml4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvdlg%2Fenml4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvdlg%2Fenml4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pvdlg","download_url":"https://codeload.github.com/pvdlg/enml4j/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248361678,"owners_count":21090962,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["enml","evernote-markup-language","evernote-sdk","java"],"created_at":"2024-07-31T19:01:17.964Z","updated_at":"2025-04-11T08:33:36.354Z","avatar_url":"https://github.com/pvdlg.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"ENML4j\n======\n\nSimple utility classes to handle ENML (Evernote Markup Language) in Java.\n\nOverview\n--------\nENML4j provide a convenient way to:\n\n  * Convert a `Note` ENML content to an HTML file referencing `Resource`s as configurable URL\n  * Convert a `Note` ENML content to an HTML file with inline `Resource`s as Data URI\n  * Replace `Resource` references in `Note` ENML content with new `Resources`\n  * Delete `Resource` references in `Note` ENML content\n  * Add `Resource` references in `Note` ENML content\n\nENML4j is design to be simple, customizable and to produce valid XHTML.\nENML4j uses stAX to parse ENML and write XHTML.\n\nGetting started\n-----\nConverting a Notes ENML content to XHTML is as simple as:\n\n```java\n    ENMLProcessor = new ENMLProcessor();\n    FileOutputStream fos = new FileOutputStream(\"/path/to/file.html\");\n    ENMLProcessor.noteToInlineHTML(note, fos);\n```\n\nThe best way to start is to look at [enml4j-sample](https://github.com/vanduynslagerp/enml4j-sample)\n\n### Including the SDK in your project\n\nThe easiest way to incorporate the SDK into your Java project is to use Maven. If you're using Maven already, simply add a new dependency to your `pom.xml`:\n\n```xml\n\u003cdependency\u003e\n\t\u003cgroupId\u003ecom.syncthemall\u003c/groupId\u003e\n\t\u003cartifactId\u003eenml4j\u003c/artifactId\u003e\n\t\u003cversion\u003e1.1.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nIf you'd prefer to build the jar yourself, it's as simple as running\n\n```bash\n$ mvn package\n```\n\nYou'll find `enml4j-1.1.0.jar` in the target directory after the build completes. This single JAR contains everything needed to use the API.\n\n### Dependencies\n\nYou'll also need to be sure to include in your classpath a stAX implementation and [evernote-sdk-java](https://github.com/evernote/evernote-sdk-java)\n\nUser Guide\n-------------\n### ENMLProcessor\n\nThis is the entry point of ENML4j. This class should be instantiated and kept in reference (as a static for example) for better performances. When\nconverting a `Note` to HTML the Evernote DTD has to be parsed the first time, then stays in memory. Parsing the DTD the first time is time-consuming.\n\nThis class rely on stAX to convert ENML to HTML. ENML4j will uses the default stAX implementation on the platform. Implementation can be easily chosen : [StAX Factory Classes]\n(http://docs.oracle.com/javaee/5/tutorial/doc/bnbem.html#bnbeo)\n\nThis class is thread-safe as long as the stAX implementation of `XMLInputFactory`, `XMLOutputFactory`, `XMLEventFactory` are thread-safe. Almost all implementation of this classes are thread-safe.\n\n### Customize the conversion\n\nENML4j rely on `Converter`s classes to convert specifics ENML tags to an HTML equivalent. Default `Converter`s are provided and instantiated by default.\n\n  * `DefaultNoteTagConverter`\n  * `DefaultInlineMediaTagConverter`\n  * `DefaultTodoTagConverter`\n  * `DefaultCryptTagConverter`\n  * `DefaultInlineMediaTagConverter`\n\nFor specifics needs `BaseConverter` and `MediaConverter` can be implemented and set with\n`ENMLProcessor#setConverters(BaseConverter, MediaConverter, BaseConverter, BaseConverter)` and `ENMLProcessor#setInlineConverters(BaseConverter, MediaConverter, BaseConverter, BaseConverter)`.\n\nFor more information on ENML see [Understanding the Evernote Markup Language](http://dev.evernote.com/start/core/enml.php)\n\nDevelopment\n-----------\nAny bug reported properly will be fixed.\nAny features request will be taken under consideration.\n\nPotential future features:\n  * Convert ENML to PDF with [Flying Saucer](https://github.com/flyingsaucerproject/flyingsaucer)\n  * Convert ENML to Plain text\n  * Convert valid XHTML to ENML\n  * Convert \"street HTML\" to ENML (very unlikely considering the lack of Java HTML renderer)\n\nChange log\n----------\n### 1.1.0\n  * Bug fixes\n  * added method addNoteResources\n  * Evernote DTD and it's dependencies are now embedded in the library\n\n### 1.0.0\n  * Bug fixes\n  * Updated to Evernote SDK to version 1.25.1\n\n### 0.2.1\n  * New methods to update `Resource`s in `Note` ENML content, based on their hash value\n  * Minor code improvements\n\n### 0.2.0\n  * New methods to delete `Resource`s from `Note` ENML content\n  * Methods to update `Resource` in `No` ENML can now also delete\n  * Minor code improvements\n  \n### 0.1.1\n  * Mapping of external resources path now uses `String` instead of `URL`\n  * Methods returning `void` now return the variable in parameter\n\nLicense\n-------\nMIT\n\n*Free Software, Fuck Yeah!*   \n\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/vanduynslagerp/enml4j/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpvdlg%2Fenml4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpvdlg%2Fenml4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpvdlg%2Fenml4j/lists"}