{"id":27387111,"url":"https://github.com/bxt/sundownjni","last_synced_at":"2025-04-13T17:53:33.647Z","repository":{"id":2068278,"uuid":"3007031","full_name":"bxt/sundownJni","owner":"bxt","description":"Compile Markdown to HTML in Java using the well-tested sundown C-library via JNI","archived":false,"fork":false,"pushed_at":"2011-12-18T17:44:58.000Z","size":204,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-24T08:37:56.769Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"logochao/imsr","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bxt.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":"2011-12-18T17:31:21.000Z","updated_at":"2024-04-24T08:37:56.770Z","dependencies_parsed_at":"2022-08-29T14:41:39.450Z","dependency_job_id":null,"html_url":"https://github.com/bxt/sundownJni","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bxt%2FsundownJni","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bxt%2FsundownJni/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bxt%2FsundownJni/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bxt%2FsundownJni/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bxt","download_url":"https://codeload.github.com/bxt/sundownJni/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248758452,"owners_count":21156957,"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":[],"created_at":"2025-04-13T17:53:33.101Z","updated_at":"2025-04-13T17:53:33.638Z","avatar_url":"https://github.com/bxt.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"SundownJni - Markdown bindings for Java\n=======================================\n\nParse [Markdown][markdown] and compile to HTML in Java using the well-tested [sundown][sundown] C-library. \n\nInstalling\n----------\n\nDownload the source package, unzip and run `make` in the `sundownJni` directory. \nIf the file `README.html` appears, everything works. \n\nThen, add the file `libSundownJni.so` to your `LD_LIBRARY_PATH` by unsing something\nlike `export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.` or configuring in your IDE. \nAdd the `*.class` files to your java class path. \n\nUsage\n-----\n\nThis library includes a JNI adaptor for accessing the C methods from Java. \nThe API is pretty simple: \n\n    String quote = new SundownJni().toHtml(\"This is *Sparta!*\\n\"));\n\nThe `quote` variable will contain `\u003cp\u003eThis is \u003cem\u003eSparta!\u003c/em\u003e\u003c/p\u003e`. \n\nYou can pass Options objects to the constructor like this:\n\n    SundownJni parser = new SundownJni(\n      new MarkdownOptions().setStrikethrough().setSuperscript().setAutolink(),\n      new SundownJniOptions().setSmartypants(),\n      new HtmlOptions().setToc()\n    );\n\nAll options are optional and disabled by default. For example, if you want to \nremove all (other) HTML tags from the input, you could do the following: \n\n    SundownJni parser = new SundownJni(null,null,new HtmlOptions().setSkipHtml());\n\nThe SundownJniOptions are not passed to sundown but used by the C code of\nthe adaptor to enable Smartypants or TOC rendering. \n\nThis will construct you a paser which will extact a TOC from your embedded headlines:\n\n    SundownJni parser = new SundownJni(null,new SundownJniOptions().setToc(),null);\n\nThis will construct you a paser which will enable [Smartypants][smartypants]:\n\n    SundownJni parser = new SundownJni(null,new SundownJniOptions().setSmartypants(),null);\n\nAPI\n---\n\nFor detailled descriptions of the sundown options see sundown's documenation. \nAs a Java-API doc here is the trimmed java source: \n\n    package bxt.sundownJni;\n    \n    class SundownJni {\n      \n      public SundownJni() {}\n      public SundownJni(MarkdownOptions markdownOptions, SundownJniOptions sundownJniOptions, HtmlOptions htmlOptions) {}\n      \n      public String toHtml(String input) {}\n      \n      public static class MarkdownOptions {\n        public void setNoIntraEmphasis(boolean mkdextNoIntraEmphasis) {}\n        public void setTables(boolean mkdextTables) {}\n        public void setFencedCode(boolean mkdextFencedCode) {}\n        public void setAutolink(boolean mkdextAutolink) {}\n        public void setStrikethrough(boolean mkdextStrikethrough) {}\n        public void setLaxHtmlBlocks(boolean mkdextLaxHtmlBlocks) {}\n        public void setSpaceHeaders(boolean mkdextSpaceHeaders) {}\n        public void setSuperscript(boolean mkdextSuperscript) {}\n      }\n      \n      public static class SundownJniOptions {\n        public void setToc(boolean toc) {}\n        public void setSmartypants(boolean smartypants) {}\n      }\n      \n      public static class HtmlOptions {\n        public void setSkipHtml(boolean htmlSkipHtml) {}\n        public void setSkipStyle(boolean htmlSkipStyle) {}\n        public void setSkipImages(boolean htmlSkipImages) {}\n        public void setSkipLinks(boolean htmlSkipLinks) {}\n        public void setExpandTabs(boolean htmlExpandTabs) {}\n        public void setSafelink(boolean htmlSafelink) {}\n        public void setToc(boolean htmlToc) {}\n        public void setHardWrap(boolean htmlHardWrap) {}\n        public void setUseXhtml(boolean htmlUseXhtml) {}\n      }\n      \n    }\n\n\nExperimental\n------------\n\nThis library is very experimental and currently only tested with the\nfollowing setup: \n\n    java version \"1.6.0_20\"\n    OpenJDK Runtime Environment (IcedTea6 1.9.7) (suse-1.2.1-x86_64)\n    OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)\n    \n    gcc (SUSE Linux) 4.5.1 20101208 [gcc-4_5-branch revision 167585]\n    \n    Linux dhcppc1 2.6.37.1-1.2-default #1 SMP 2011-02-21 10:34:10 +0100 x86_64 x86_64 x86_64 GNU/Linux\n\n[smartypants]: http://daringfireball.net/projects/smartypants/\n  \"SmartyPants Documentation\"\n\n[markdown]: http://daringfireball.net/projects/markdown/syntax\n  \"Markdown Syntax Guide\"\n\n[sundown]: https://github.com/tanoku/sundown\n  \"Sundown C library on gihub.com\"\n\n[jni]: http://en.wikipedia.org/wiki/Java_Native_Interface\n  \"Java Native Interface - Wikipedia\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbxt%2Fsundownjni","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbxt%2Fsundownjni","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbxt%2Fsundownjni/lists"}