{ "info": { "author": "Thibaud Colas", "author_email": "thibaudcolas@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Internet :: WWW/HTTP :: Site Management", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Text Editors :: Word Processors" ], "description": "Draft.js exporter \ud83d\udc0d - Markdown edition ` `_ ` `_ ` `_\n==============================================================================================================================================================================================================================================================\n\n> Library to convert rich text from Draft.js raw ContentState to Markdown, based on `Draft.js exporter `_.\n>\n> \ud83d\udea7 This is an experimental exporter with limited Markdown support \u2013\u00a0please use with caution.\n\nUsage\n-----\n\nThis package is a Markdown export configuration for the `Draft.js exporter `_. Specifically, it provides:\n\n* A Markdown-friendly exporter engine, with fallbacks to HTML tags.\n* Configuration for basic Markdown formatting.\n\nFirst, install the package:\n\n.. code-block:: sh\n\n pip install draftjs_exporter_markdown\n \n\n\nThen, to convert Draft.js content to Markdown:\n\nAnd in Python:\n\n.. code-block:: py\n\n from draftjs_exporter.html import HTML\n from draftjs_exporter_markdown import BLOCK_MAP, ENGINE, ENTITY_DECORATORS, STYLE_MAP\n \n # Initialise the exporter.\n exporter = HTML({\n # Those configurations are overridable like for draftjs_exporter.\n 'block_map': BLOCK_MAP,\n 'style_map': STYLE_MAP,\n 'entity_decorators': ENTITY_DECORATORS,\n 'engine': ENGINE,\n })\n \n markdown = exporter.render({\n 'entityMap': {},\n 'blocks': [{\n 'key': '6mgfh',\n 'text': 'Hello, world!',\n 'type': 'unstyled',\n 'depth': 0,\n 'inlineStyleRanges': [],\n 'entityRanges': []\n }]\n })\n \n print(markdown)\n \n\n\nYou can also run an example by downloading this repository and then using `python example.py`.\n\nConfiguration\n~~~~~~~~~~~~~\n\nPlease refer to the `Draft.js exporter configuration documentation `_.\n\nSupported Markdown formatting\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe built-in configuration provides support for:\n\n* Inline styles: bold, italic, strikethrough, code\n* Blocks: paragraphs, heading levels, bullet and number lists, code blocks, blockquote\n* Images, links, and horizontal rules\n\nContrary to the main Draft.js exporter,\n\n* Nested / overlapping styles aren't supported.\n* None of the content is escaped (HTML escaping is unnecessary for Markdown, and there is no Markdown escaping).\n\nDevelopment\n-----------\n\n> Requirements: `virtualenv`, `pyenv`, `twine`\n\n.. code-block:: sh\n\n git clone git@github.com:thibaudcolas/draftjs_exporter_markdown.git\n cd draftjs_exporter_markdown/\n \n # Install the git hooks.\n ./.githooks/deploy\n \n # Install dependencies\n nvm install\n npm install\n # For tests and development in watch mode.\n npm install -g nodemon\n \n # Install the Python environment.\n virtualenv .venv\n source ./.venv/bin/activate\n make init\n \n # Install required Python versions\n pyenv install --skip-existing 2.7.11\n pyenv install --skip-existing 3.6.3\n # Make required Python versions available globally.\n pyenv global system 2.7.11 3.6.3\n \n # Run the built-in example.\n make dev\n \n\n\nReleases\n~~~~~~~~\n\nUse `make release`, which uses `standard-version `_ to generate the CHANGELOG and decide on the version bump based on the commits since the last release.\n\nCredits\n-------\n\nView the full list of `contributors `_. `MIT `_ licensed.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/thibaudcolas/draftjs_exporter_markdown", "keywords": "draftjs,exporter,markdown,content", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "draftjs-exporter-markdown", "package_url": "https://pypi.org/project/draftjs-exporter-markdown/", "platform": "", "project_url": "https://pypi.org/project/draftjs-exporter-markdown/", "project_urls": { "Homepage": "https://github.com/thibaudcolas/draftjs_exporter_markdown" }, "release_url": "https://pypi.org/project/draftjs-exporter-markdown/0.2.1/", "requires_dist": null, "requires_python": "", "summary": "Library to convert rich text from Draft.js raw ContentState to Markdown, based on draftjs_exporter", "version": "0.2.1" }, "last_serial": 4276492, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "9b4181de4817870834bc6316190d4412", "sha256": "62a60063b5c9207f8111ee124596fef6bf98a3f4a96e5c48376d0c7894b12035" }, "downloads": -1, "filename": "draftjs_exporter_markdown-0.1.0.tar.gz", "has_sig": false, "md5_digest": "9b4181de4817870834bc6316190d4412", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9521, "upload_time": "2018-03-02T12:13:44", "url": "https://files.pythonhosted.org/packages/6d/ba/be66147696d2a8bb72e7f23bbe55e0b8b923f412d152e13e46dfcdb28acc/draftjs_exporter_markdown-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "5b44da50f95396369256fc12d847536e", "sha256": "ec7b70d1869a941dd7ea2dd59b6608b043c32e48e52635d8f667281e70b81f16" }, "downloads": -1, "filename": "draftjs_exporter_markdown-0.2.0.tar.gz", "has_sig": false, "md5_digest": "5b44da50f95396369256fc12d847536e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9802, "upload_time": "2018-03-07T09:31:31", "url": "https://files.pythonhosted.org/packages/c1/9b/faeebf725e54915dbbcf1040530cc2b7b6387a713ad952e06fac79fb7480/draftjs_exporter_markdown-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "6504fb5a3d252d747d3cdd16494ede60", "sha256": "7392159732e51b4497684e2853a4218cd6fe4123a749383d2420cb575a0e8bd2" }, "downloads": -1, "filename": "draftjs_exporter_markdown-0.2.1.tar.gz", "has_sig": false, "md5_digest": "6504fb5a3d252d747d3cdd16494ede60", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9905, "upload_time": "2018-09-16T12:34:59", "url": "https://files.pythonhosted.org/packages/e6/fc/4598551a0139a75267a53e488078cd2643db02ade10cd3c2ea58f138db1f/draftjs_exporter_markdown-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6504fb5a3d252d747d3cdd16494ede60", "sha256": "7392159732e51b4497684e2853a4218cd6fe4123a749383d2420cb575a0e8bd2" }, "downloads": -1, "filename": "draftjs_exporter_markdown-0.2.1.tar.gz", "has_sig": false, "md5_digest": "6504fb5a3d252d747d3cdd16494ede60", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9905, "upload_time": "2018-09-16T12:34:59", "url": "https://files.pythonhosted.org/packages/e6/fc/4598551a0139a75267a53e488078cd2643db02ade10cd3c2ea58f138db1f/draftjs_exporter_markdown-0.2.1.tar.gz" } ] }