{ "info": { "author": "Joakim Myrvoll Johansen", "author_email": "joakimmyrvoll@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Text Processing :: Markup" ], "description": "[![app-badge]][PyPI-md-tangle] ![Version] ![License] ![Format] ![PyVer] ![Downloads]\n\n# [md-tangle][PyPI-md-tangle]\nThis project is a result of wanting config and setup files to be part of a document \nexplaining my setup. I originally used [Org-mode][1] and [org-babel-tangle][2] in \n[Emacs][3] to achieve this. I really like Org-mode and Emacs, but I'm not fond of\nbeing dependent on one editor. This is the reason I wanted a [CLI][4], and a more \nwidely used document [markup language][5].\n\nThis way of programming is called [literate programming][6]. This programming paradigm \nwas introduced by Donald Knuth. The idea is to write a program as an explanation of the\nprogram logic in a natural language interspersed with snippets of traditional source code.\nThe source code can then be generated (\"tangled\") by using some tool.\n\nAs [Markdown][7] is used by most programmers, I saw that language fit for the task.\nMarkdown is a plaintext-ish format popular with programmers. It's simple, easy and \nalready has support for embedding code blocks using ``` or ~~~~, mostly \nfor the purposes of syntax highlighting in documentation.\n\n## Installing\nThis CLI tool can easily be utilized by adding `md-tangle` to your `PATH`, or by installing the package with `pip`.\n\nSee the package on [pypi.org][PyPI-md-tangle], or just install with `pip install md-tangle`.\n\n## Command\nBy adding the keyword `tangle:`, this tool will tangle tagged code\nblocks to given file. Supports `~` for home directory.\n\nOne can tangle the code block to multiple files by separating the files with chosen separator (default: `,`).\n\nIf the file already exists, the user will be prompted with the option to overwrite,\nunless the `-f`/`--force` flag is added.\n\n### Flags\n\n* `-h`/`--help`: Show help message and exit\n* `--version`: Show installed version\n* `-f`/`--force`: Force overwrite of files if the already exists\n* `-v`/`--verbose`: Show output\n* `-d`/`--destination`: Overwrite output destination\n* `-s`/`--separator`: Separator for tangle destinations (default=',')\n\n## Usage\n\nTake the following example:\n\n`HelloWorld.md`\n```markdown\n# Some title\nDescribing the following code... bla bla.\n\n~~~~javascript tangle:helloWorld.js\nconsole.log(\"Hello, \");\nconsole.log(\"world\");\n~~~~\n\n## Styling\nAdding header for my css files:\n\n~~~~css tangle:styles/button.css,styles/input.css\n/* Styling for mye awesome app */\n~~~~\n\nBy adding some css ... \n\n~~~~css tangle:styles/button.css\n#button1 {\n border: none;\n}\n~~~~\n\n~~~~css tangle:styles/input.css\n#button1 {\n border: none;\n}\n~~~~\n```\n\nBy installing `md-tangle` with `pip`, one could simply produce files from this file by executing:\n\n```bash\n$ md-tangle -v HelloWorld.md \nhelloWorld.js 2 lines\nstyles/button.css 4 lines\nstyles/input.css 4 lines\n$ ls \nhelloWorld.js HelloWorld.md styles\n```\n\n## Documentation\n\nThe [documentation][8] for `md-tangle` is of course written in Markdown, and tangles to the source\ncode.\n\n\n[1]: https://en.wikipedia.org/wiki/Org-mode\n[2]: https://orgmode.org/manual/Extracting-source-code.html\n[3]: https://www.gnu.org/software/emacs/\n[4]: https://en.wikipedia.org/wiki/Command-line_interface\n[5]: https://en.wikipedia.org/wiki/Markup_language\n[6]: https://en.wikipedia.org/wiki/Literate_programming\n[7]: https://en.wikipedia.org/wiki/Markdown\n[8]: https://github.com/joakimmj/md-tangle/blob/master/DOCS.md\n\n[app-badge]: https://img.shields.io/badge/md--tangle-PyPI-orange.svg\n[PyPI-md-tangle]: https://pypi.org/project/md-tangle\n[Version]: https://img.shields.io/github/tag/joakimmj/md-tangle.svg?label=version\n[License]: https://img.shields.io/github/license/joakimmj/md-tangle.svg\n[Format]: https://img.shields.io/pypi/format/md_tangle.svg\n[PyVer]: https://img.shields.io/pypi/pyversions/md-tangle.svg\n[Downloads]: https://img.shields.io/pypi/dm/md-tangle.svg\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/joakimmj/md-tangle", "keywords": "markdown,tangle,literate programming", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "md-tangle", "package_url": "https://pypi.org/project/md-tangle/", "platform": "any", "project_url": "https://pypi.org/project/md-tangle/", "project_urls": { "Homepage": "https://github.com/joakimmj/md-tangle" }, "release_url": "https://pypi.org/project/md-tangle/1.3.0/", "requires_dist": null, "requires_python": "", "summary": "Generates ('tangles') source code from Markdown documents", "version": "1.3.0" }, "last_serial": 5221740, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "85c2a92443d58419350f54ffdff4b51c", "sha256": "db20788e08ee7f2e082ca0c9ace7e78d140f146c4c46744c4ca53ffb6424fcd7" }, "downloads": -1, "filename": "md_tangle-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "85c2a92443d58419350f54ffdff4b51c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4490, "upload_time": "2019-03-07T22:22:23", "url": "https://files.pythonhosted.org/packages/e7/a9/8e2d03790100c27912da9eb2c7eb1fd90aa997a373db9a6a94c92e5599ad/md_tangle-1.0.0-py3-none-any.whl" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "d4145eef7ad4719eb71daf398e2ea9c8", "sha256": "af89206edc459ff300fa15f0d00a493821839d9bdb92565f5c3a3b3f29b315ad" }, "downloads": -1, "filename": "md_tangle-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "d4145eef7ad4719eb71daf398e2ea9c8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4476, "upload_time": "2019-03-09T17:01:27", "url": "https://files.pythonhosted.org/packages/d4/dd/53cdc25fd99ffdbb7eeb35c95a96a81e2a9b076080498000978f7862e131/md_tangle-1.0.1-py3-none-any.whl" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "4ff2be718fdddc04758168ea109eeb85", "sha256": "37fa95d3868cf894a34def58c161edb0df671a3b5faf39354f8a182c27e62325" }, "downloads": -1, "filename": "md_tangle-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "4ff2be718fdddc04758168ea109eeb85", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4649, "upload_time": "2019-03-09T21:48:35", "url": "https://files.pythonhosted.org/packages/81/02/27b9860966ac6d220bb994f1df66d16555ebb2a99fb3e1adc8692b2a68ac/md_tangle-1.1.0-py3-none-any.whl" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "78077b4bd6f32ad39a3e6981a245bf01", "sha256": "a79ed26ac3b6904d291a6705174d9b79c850592b5257942afa1ae735450ad57a" }, "downloads": -1, "filename": "md_tangle-1.2.0-py2-none-any.whl", "has_sig": false, "md5_digest": "78077b4bd6f32ad39a3e6981a245bf01", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6266, "upload_time": "2019-03-11T18:13:11", "url": "https://files.pythonhosted.org/packages/e1/1f/cbaefb7789fd7b2de9cba2e366674b02fb5c63f53d3b692f3d8279097fbe/md_tangle-1.2.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4d9070d0f41e6654c8aabb157d1d1555", "sha256": "7bae7449fc8ddcb1ff1ede506d0cb8bdea204a51dec5f7a7db81dbf752d97781" }, "downloads": -1, "filename": "md_tangle-1.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "4d9070d0f41e6654c8aabb157d1d1555", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6267, "upload_time": "2019-03-11T18:13:12", "url": "https://files.pythonhosted.org/packages/94/53/a7a0e0b90b1dedd9eae59950f8d5969c7146f491de5efb2ad71c7e1c9391/md_tangle-1.2.0-py3-none-any.whl" } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "59f16c7a130adcd36f89b2808e857f08", "sha256": "a796ba0fda95164e8f5e953be5ecba4d9ab25571543423838b677e1880d62aa8" }, "downloads": -1, "filename": "md_tangle-1.3.0-py2-none-any.whl", "has_sig": false, "md5_digest": "59f16c7a130adcd36f89b2808e857f08", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6364, "upload_time": "2019-05-03T12:57:32", "url": "https://files.pythonhosted.org/packages/66/a1/874a0803abe6094b97b5cdc7232cfa8d9c38b375f6060fd6fa68fe5f261c/md_tangle-1.3.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f7dfa03626e543483fee6f2692a5aa1f", "sha256": "4885f22fd92d9b707f1d9f2b4aaa14845e3f0c8ab974331a7a3fddf442d78932" }, "downloads": -1, "filename": "md_tangle-1.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "f7dfa03626e543483fee6f2692a5aa1f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6365, "upload_time": "2019-05-03T12:57:34", "url": "https://files.pythonhosted.org/packages/b7/fa/252564a0f61ed834c9429ae28934a7113f6a7e550c461c84e5637707b847/md_tangle-1.3.0-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "59f16c7a130adcd36f89b2808e857f08", "sha256": "a796ba0fda95164e8f5e953be5ecba4d9ab25571543423838b677e1880d62aa8" }, "downloads": -1, "filename": "md_tangle-1.3.0-py2-none-any.whl", "has_sig": false, "md5_digest": "59f16c7a130adcd36f89b2808e857f08", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6364, "upload_time": "2019-05-03T12:57:32", "url": "https://files.pythonhosted.org/packages/66/a1/874a0803abe6094b97b5cdc7232cfa8d9c38b375f6060fd6fa68fe5f261c/md_tangle-1.3.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f7dfa03626e543483fee6f2692a5aa1f", "sha256": "4885f22fd92d9b707f1d9f2b4aaa14845e3f0c8ab974331a7a3fddf442d78932" }, "downloads": -1, "filename": "md_tangle-1.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "f7dfa03626e543483fee6f2692a5aa1f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6365, "upload_time": "2019-05-03T12:57:34", "url": "https://files.pythonhosted.org/packages/b7/fa/252564a0f61ed834c9429ae28934a7113f6a7e550c461c84e5637707b847/md_tangle-1.3.0-py3-none-any.whl" } ] }