{ "info": { "author": "Awes Mubarak", "author_email": "awes.mubarak@awesmubarak.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Text Processing :: Markup" ], "description": "========================\nMarkdown_strings package\n========================\n\nMarkdown is a markup language with plain text formatting syntax. This package\nallows the creation of markdown-compliant strings. The following is a summary\nof features with usage examples.\n\nNote: asterisk and underscores are escaped for all functions that do not format\nto code (inline_code and code_block).\n\nStandard markdown features\n==========================\n\nHeader\n------\n\nReturn a header of specified level.\n\nKeyword arguments:\n style -- Specifies the header style (default atx). The \"atx\" style uses\n hash signs, and has 6 levels. The \"setext\" style uses dashes or equals\n signs for headers of levels 1 and 2 respectively, and is limited to\n those two levels.\n\nSpecifying a level outside of the style's range results in a ValueError.\n::\n\n >>> header(\"Main Title\", 1)\n '# Main Title'\n >>> header(\"Smaller subtitle\", 4)\n '#### Smaller subtitle'\n >>> header(\"Setext style\", 2, \"setext\")\n 'Setext style\\n---'\n\n\nItalics\n-------\n\nReturn italics formatted text.\n::\n\n >>> italics(\"This text is italics\")\n '_This text is italics_'\n\n\nBold\n----\n\nReturn bold formatted text.\n::\n\n >>> bold(\"This text is bold\")\n '**This text is bold**'\n\n\nInline code\n-----------\n\nReturn formatted inline code.\n::\n\n >>> inline_code(\"This text is code\")\n '`This text is code`'\n\n\nCode block\n----------\n\nReturn a code block.\n\nIf a language is specified a fenced code block is produced, otherwise the\nblock is indented by four spaces.\n\nKeyword arguments:\n language -- Specifies the language to fence the code in (default blank).\n::\n\n >>> code_block(\"This is a simple codeblock.\")\n ' This is a simple codeblock.'\n >>> code_block(\"This is a simple codeblock.\\\\nBut it has a linebreak!\")\n ' This is a simple codeblock.\\\\n But it has a linebreak!'\n >>> code_block(\"This block of code has a specified language.\", \"python\")\n '```python\\\\nThis block of code has a specified language.\\\\n```'\n >>> code_block(\"So\\\\nmany\\\\nlinebreaks.\", \"python\")\n '```python\\\\nSo\\\\nmany\\\\nlinebreaks.\\\\n```'\n\n\nLink\n----\n\nReturn an inline link.\n::\n\n >>> link (\"This is a link\", \"https://github.com/abactel/markdown_strings\")\n '[This is a link](https://github.com/abactel/markdown_strings)'\n\n\nImage\n-----\n\nReturn an inline image.\n\nKeyword arguments:\n title -- Specify the title of the image, as seen when hovering over it.\n::\n\n >>> image(\"This is an image\", \"https://tinyurl.com/bright-green-tree\")\n '![This is an image](https://tinyurl.com/bright-green-tree)'\n >>> image(\"This is an image\", \"https://tinyurl.com/bright-green-tree\", \"tree\")\n '![This is an image](https://tinyurl.com/bright-green-tree) \"tree\"'\n\n\nUnordered list\n--------------\n\nReturn an unordered list from an array.\n::\n\n >>> unordered_list([\"first\", \"second\", \"third\", \"fourth\"])\n '- first\\\\n- second\\\\n- third\\\\n- fourth'\n >>> unordered_list([1, 2, 3, 4, 5])\n '- 1\\\\n- 2\\\\n- 3\\\\n- 4\\\\n- 5'\n\n\nOrdered list\n------------\n\nReturn an ordered list from an array.\n::\n\n >>> ordered_list([\"first\", \"second\", \"third\", \"fourth\"])\n '1. first\\\\n2. second\\\\n3. third\\\\n4. fourth'\n\n\nBlockquote\n----------\n\nReturn a blockquote.\n::\n\n >>> blockquote(\"A simple blockquote\")\n '> A simple blockquote'\n\n\nHorizontal rule\n---------------\n\nReturn a horizontal rule.\n\nKeyword arguments:\n length -- Specifies the length of the rule (default 79, minimum 3).\n\n style -- Character used for the rule (may be either \"_\" or \"*\").\n\nIf the length is too low, or the style is invalid, a ValueError is raised.\n::\n\n >>> horizontal_rule()\n '_______________________________________________________________________________'\n >>> horizontal_rule(length=5, style=\"*\")\n '***'\n \"\"\"\n\n\nNon-standard markdown\n=====================\n\nStrikethrough\n-------------\n\nReturn text with strike-through formatting.\n::\n\n >>> strikethrough(\"This is a lie\")\n '~This is a lie~'\n\n\nTask list\n---------\n\nReturn a task list.\n\nThe task_array should be 2-dimensional; the first item should be the task\ntext, and the second the boolean completion state.\n::\n\n >>> task_list([[\"Be born\", True], [\"Be dead\", False]])\n '- [X] Be born\\\\n- [ ] Be dead'\n\nWhen displayed using `print`, this will appear as:\n::\n\n - [X] Be born\n - [ ] Be dead\n\n\nTable row\n---------\n\nReturn a single table row.\n\nKeyword arguments:\n\n pad -- The pad should be an array of the same size as the input text array.\n It will be used to format the row's padding.\n::\n\n >>> table_row([\"First column\", \"Second\", \"Third\"])\n '| First column | Second | Third |'\n >>> table_row([\"First column\", \"Second\", \"Third\"], [10, 10, 10])\n '| First column | Second | Third |'\n\n\nDelimiter row\n-------------\n\nReturn a delimiter row for use in a table.\n::\n\n >>> table_delimiter_row(3)\n '| --- | --- | --- |'\n\n\nTable from columns\n------------------\n\nReturn a formatted table, generated from arrays representing columns.\n\nThe function requires a 2-dimensional array, where each array is a column\nof the table. This will be used to generate a formatted table in string\nformat. The number of items in each columns does not need to be consitent.\n::\n\n >>> table_from_columns([[\"Name\", \"abactel\", \"Bob\"], [\"User\", \"4b4c73l\", \"\"]])\n '| Name | User |\\\\n| ------- | ------- |\\\\n| abactel | 4b4c73l |\\\\n| Bob | |'\n\nWhen displayed using `print`, this will appear as:\n::\n\n | Name | User |\n | ------- | ------- |\n | abactel | 4b4c73l |\n | Bob | |\n\n\nHelper functions\n================\n\nReturn text with formatting escaped\n\nMarkdown requires a backslash before literal inderscores or asterisk, to avoid\nformatting to bold or italics.\n::\n\n >>> esc_format(\"Normal text\")\n 'Normal text'\n >>> esc_format(\"Text with **bold**\")\n 'Text with \\\\\\*\\\\\\*bold\\\\\\*\\\\\\*'\n >>> esc_format(\"Text with _italics_\")\n 'Text with \\\\\\_italics\\\\\\_'\n >>> esc_format(\"Text with _**complicated** formatting_\")\n 'Text with \\\\\\_\\\\\\*\\\\\\*complicated\\\\\\*\\\\\\* formatting\\\\\\_'\n \"\"\"\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/awesmubarak/markdown_strings", "keywords": "markdown md", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "markdown-strings", "package_url": "https://pypi.org/project/markdown-strings/", "platform": "", "project_url": "https://pypi.org/project/markdown-strings/", "project_urls": { "Homepage": "https://github.com/awesmubarak/markdown_strings" }, "release_url": "https://pypi.org/project/markdown-strings/3.1.1/", "requires_dist": null, "requires_python": "", "summary": "Create markdown formatted text", "version": "3.1.1" }, "last_serial": 4275462, "releases": { "2.1.2": [ { "comment_text": "", "digests": { "md5": "e1e2fb0aba28e2ed1cae23223e7e5719", "sha256": "ddb7f449c708941f8bd36bebc0752c31c4fcd516b21d1532f5de36421521d501" }, "downloads": -1, "filename": "markdown_strings-2.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e1e2fb0aba28e2ed1cae23223e7e5719", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8357, "upload_time": "2017-11-12T09:48:46", "url": "https://files.pythonhosted.org/packages/11/b4/99a4ef78de87cec4bab1ca27d88858acd3322be43f41efc6cd4f4c6ca7b8/markdown_strings-2.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5a70ff7e861964be851036df65738bb5", "sha256": "cedb91d4306bbc6ef487b06310d834ce880459ac0154d38ee78a92ad89114bcc" }, "downloads": -1, "filename": "markdown_strings-2.1.2.tar.gz", "has_sig": true, "md5_digest": "5a70ff7e861964be851036df65738bb5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5758, "upload_time": "2017-11-12T09:48:47", "url": "https://files.pythonhosted.org/packages/c0/b3/1b4b98b950cb2a710bab2c147b21c62c63e31d8fef59d9eaa14df0b7ca9f/markdown_strings-2.1.2.tar.gz" } ], "2.1.3": [ { "comment_text": "", "digests": { "md5": "48a66fd18f7ad14fddc837a336beb917", "sha256": "26a42d24ad12c9c48f293fe50fd71a6e6d8f19a49cbec05494bf423595b7f64f" }, "downloads": -1, "filename": "markdown_strings-2.1.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "48a66fd18f7ad14fddc837a336beb917", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8355, "upload_time": "2017-12-04T20:53:50", "url": "https://files.pythonhosted.org/packages/ee/72/492dca5cc63d07ff312e23fa54cd7599f2b0c4f9d6c27f9058c802ffaf13/markdown_strings-2.1.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b4626d2506515bd1c2c494ccde2b6263", "sha256": "323a10c798e6a585812a17bd7263516860738ad9ee248c585596b4932cd9d82f" }, "downloads": -1, "filename": "markdown_strings-2.1.3.tar.gz", "has_sig": true, "md5_digest": "b4626d2506515bd1c2c494ccde2b6263", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5750, "upload_time": "2017-12-04T20:53:51", "url": "https://files.pythonhosted.org/packages/3f/47/5be649177309f3ae34face21029c6322453f6d86b73a76a00282d2888c07/markdown_strings-2.1.3.tar.gz" } ], "3.1.0": [ { "comment_text": "", "digests": { "md5": "63e1b7168aa013a2cbb2f19ba8fb4190", "sha256": "ba537bb31ceefff8ef47d5f253265457cdd46034031cd10a1c14f6c8099a6e1e" }, "downloads": -1, "filename": "markdown_strings-3.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "63e1b7168aa013a2cbb2f19ba8fb4190", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9441, "upload_time": "2017-12-17T10:41:52", "url": "https://files.pythonhosted.org/packages/6a/15/bb79b0ec17eba244124764c2f286719524c3acf92bbe77907a0003122651/markdown_strings-3.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3bb00b69198d4d501fc91f03aa8e8d2b", "sha256": "b5110e9227878d971abfd2bcdfa558b9f035b3dc0532e187f22bb2cbf93dd1a9" }, "downloads": -1, "filename": "markdown_strings-3.1.0.tar.gz", "has_sig": true, "md5_digest": "3bb00b69198d4d501fc91f03aa8e8d2b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6425, "upload_time": "2017-12-17T10:41:54", "url": "https://files.pythonhosted.org/packages/52/96/7e9e6c20793338e1b80fcdec1212fc47a87aef20adf1c05f6c769cf9817c/markdown_strings-3.1.0.tar.gz" } ], "3.1.1": [ { "comment_text": "", "digests": { "md5": "9fc572196c3ce3d2dd67d29626862474", "sha256": "21bfc2ff1e6eec1209bb5835f090f9576cec46de38fb1991f57a422bb5efcf6f" }, "downloads": -1, "filename": "markdown_strings-3.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9fc572196c3ce3d2dd67d29626862474", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9442, "upload_time": "2018-09-15T19:52:00", "url": "https://files.pythonhosted.org/packages/13/87/f95db4d36496af59b32cdf0bd078c914e1463b57f126ca9533edec5d1c2d/markdown_strings-3.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "45d0e90129ef5ff9d52c778957f6e136", "sha256": "141e55d48742d6c19b09500bb71760f3aa04b6532c5d7725b9a030ce90663708" }, "downloads": -1, "filename": "markdown_strings-3.1.1.tar.gz", "has_sig": true, "md5_digest": "45d0e90129ef5ff9d52c778957f6e136", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6411, "upload_time": "2018-09-15T19:52:02", "url": "https://files.pythonhosted.org/packages/19/51/9af07a554244fbc1975dd8aeea9388063fae93ab5dadd7c42cc2c4132944/markdown_strings-3.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9fc572196c3ce3d2dd67d29626862474", "sha256": "21bfc2ff1e6eec1209bb5835f090f9576cec46de38fb1991f57a422bb5efcf6f" }, "downloads": -1, "filename": "markdown_strings-3.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9fc572196c3ce3d2dd67d29626862474", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9442, "upload_time": "2018-09-15T19:52:00", "url": "https://files.pythonhosted.org/packages/13/87/f95db4d36496af59b32cdf0bd078c914e1463b57f126ca9533edec5d1c2d/markdown_strings-3.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "45d0e90129ef5ff9d52c778957f6e136", "sha256": "141e55d48742d6c19b09500bb71760f3aa04b6532c5d7725b9a030ce90663708" }, "downloads": -1, "filename": "markdown_strings-3.1.1.tar.gz", "has_sig": true, "md5_digest": "45d0e90129ef5ff9d52c778957f6e136", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6411, "upload_time": "2018-09-15T19:52:02", "url": "https://files.pythonhosted.org/packages/19/51/9af07a554244fbc1975dd8aeea9388063fae93ab5dadd7c42cc2c4132944/markdown_strings-3.1.1.tar.gz" } ] }