{"id":17102109,"url":"https://github.com/netgusto/upndown","last_synced_at":"2025-04-04T22:08:18.250Z","repository":{"id":15449812,"uuid":"18182737","full_name":"netgusto/upndown","owner":"netgusto","description":"HTML to Markdown javascript converter","archived":false,"fork":false,"pushed_at":"2024-01-02T17:09:29.000Z","size":777,"stargazers_count":276,"open_issues_count":4,"forks_count":32,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T21:06:35.160Z","etag":null,"topics":["html","javascript","markdown-converter","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/netgusto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-03-27T16:23:37.000Z","updated_at":"2024-11-29T13:42:13.000Z","dependencies_parsed_at":"2024-06-18T16:55:03.639Z","dependency_job_id":"94548881-fffe-46d0-899d-04503017b1d2","html_url":"https://github.com/netgusto/upndown","commit_stats":{"total_commits":45,"total_committers":6,"mean_commits":7.5,"dds":"0.24444444444444446","last_synced_commit":"1c9180c75411b70e5be2a72718005b3ce7c177e8"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netgusto%2Fupndown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netgusto%2Fupndown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netgusto%2Fupndown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netgusto%2Fupndown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netgusto","download_url":"https://codeload.github.com/netgusto/upndown/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247256112,"owners_count":20909240,"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":["html","javascript","markdown-converter","nodejs"],"created_at":"2024-10-14T15:28:11.869Z","updated_at":"2025-04-04T22:08:18.233Z","avatar_url":"https://github.com/netgusto.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# upndown\n\nJavascript HTML to Markdown converter, for Node.js and the browser.\n\n[![](https://travis-ci.org/netgusto/upndown.svg?branch=master)](https://travis-ci.org/netgusto/upndown)\n\n## About\n\n**upndown** converts HTML documents to Markdown documents.\n\n**upndown** is designed to offer a fast, reliable and whitespace perfect conversion for HTML documents.\n\n## Install / Usage\n\n### Browser\n\n**Standard loading**\n\nDownload the zip archive on github, unzip, copy in your web folder, and in your HTML:\n\n```html\n\u003cscript type=\"text/javascript\" src=\"/assets/upndown/lib/upndown.bundle.min.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\"\u003e\n\n    var und = new upndown();\n    und.convert('\u003ch1\u003eHello, World !\u003c/h1\u003e', function(err, markdown) {\n        if(err) { console.err(err); }\n        else { console.log(markdown); } // Outputs: # Hello, World !\n    });\n\n\u003c/script\u003e\n```\n\n**Using RequireJS**\n\nDownload the zip archive on github, unzip, copy in your web folder, and in your HTML:\n\n```html\n\u003cscript type=\"text/javascript\" src=\"http://requirejs.org/docs/release/2.1.11/minified/require.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\"\u003e\n\nrequire.config({\n    paths: {\n        'upndown': '/assets/upndown/lib/upndown.bundle.min'\n    }\n});\n\nrequire(['upndown'], function(upndown) {\n    var und = new upndown();\n    und.convert('\u003ch1\u003eHello, World !\u003c/h1\u003e', function(err, markdown) {\n        if(err) { console.err(err);\n        else { console.log(markdown); } // Outputs: # Hello, World !\n    });\n});\n\u003c/script\u003e\n```\n\n\n### Nodejs\n\n**Install**\n\n```bash\nnpm install upndown\n```\n\n**Use**\n\n```js\nvar upndown = require('upndown');\n\nvar und = new upndown();\nund.convert('\u003ch1\u003eHello, World !\u003c/h1\u003e', function(err, markdown) {\n    if(err) { console.err(err);\n    else { console.log(markdown); } // Outputs: # Hello, World !\n});\n```\n**Warning: With Node \u003c 0.12.8, you'll have to require a polyfill for the `Promise` functionnality (like https://www.npmjs.com/package/bluebird); see #10 on how to do that.**\n\n## Options\n\n### `decodeEntities`\n\nBy default Updown will decode all html entities, so source HTML like this:\n\n```html\n\u003cp\u003eI'm an escaped \u0026lt;em\u0026gt;code sample\u0026lt;/em\u0026gt;.\u003c/p\u003e\n```\n\nWill become:\n\n```\nI'm an escaped *code sample*.\n```\n\nIf your use case does not call for that behavior and you wish HTML entities to\nstay encoded, you can pass an option to the constructor:\n\n```js\nvar und = new upndown({decodeEntities: false})\n```\n\nThen just use as normal.\n\n## Test\n\n### In the browser\n\nNavigate to `test/browser/` inside the **upndown** folder. Browser tests are executed by QUnit.\n\n### Nodejs\n\nTo run the tests, simply execute:\n\n```sh\nnpm test\n```\n\nNodejs tests are executed using mocha.\n\n## Maintainer\n\n**upndown** is produced by [Net Gusto](http://netgusto.com). Drop us a line at \u003ccontact@netgusto.com\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetgusto%2Fupndown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetgusto%2Fupndown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetgusto%2Fupndown/lists"}