{ "info": { "author": "Peter Odding", "author_email": "peter@peterodding.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Environment :: Web Environment", "Framework :: Flask", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Documentation", "Topic :: Internet :: WWW/HTTP :: Browsers", "Topic :: Software Development :: Documentation", "Topic :: Text Processing", "Topic :: Text Processing :: Filters", "Topic :: Text Processing :: Markup :: HTML", "Topic :: Utilities" ], "description": "preview-markup: Live preview Markdown and reStructuredText files\n================================================================\n\nThe `preview-markup` program takes a text file with lightweight markup\n(Markdown_ and reStructuredText_ are supported) and shows a live preview of the\nmarkup rendered to HTML in your web browser. When you save your text file the\npreview is automatically updated within a couple of seconds. That's all there\nis to it!\n\n.. contents::\n :local:\n\nInstallation\n------------\n\nThe `preview-markup` program is written in Python and is available on PyPI_\nwhich means installation should be as simple as:\n\n.. code-block:: sh\n\n $ pip install preview-markup\n\nThere's actually a multitude of ways to install Python packages (e.g. the `per\nuser site-packages directory`_, `virtual environments`_ or just installing\nsystem wide) and I have no intention of getting into that discussion here, so\nif this intimidates you then read up on your options before returning to these\ninstructions ;-).\n\nRequired system packages\n~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe `preview-markup` program uses the Misaka_ package for Markdown parsing\nbecause it's compatible with GitHub Flavored Markdown. This may require you to\nensure that the libffi development files are installed before you attempt to\ninstall `preview-markup`. On Debian and Ubuntu based systems this can be\naccomplished as follows:\n\n.. code-block:: sh\n\n $ sudo apt-get install libffi-dev\n\nGetting started\n---------------\n\nTo get started you simply run the command ``preview-markup``. If you give it a\nfilename as an argument then that file will be previewed, otherwise the\n``README.md`` or ``README.rst`` file in the current working directory is\npreviewed.\n\nIf you want to run `preview-markup` in the background then you probably won't\nappreciate the logging to the terminal that is enabled by default. In this case\nI suggest you use the following command line:\n\n.. code-block:: sh\n\n $ preview-markup -q &\n\nThe ``-q`` is short for ``--quiet`` and the ``&`` instructs your shell to run\nthe program in the background. If you want to kill the program later on just\nrun the ``fg`` command (this will bring the program back to the foreground) and\nthen press Control-C (this will kill the program).\n\nFuture improvements\n-------------------\n\nSome random ideas for future improvements (I may implement these as time\npermits or when I feel like programming but don't feel like picking up one of\nmy many other projects):\n\nAutomatically close orphaned windows\n When the command line program is terminated the browser window or tab page\n that was previously opened should be closed automatically. This can probably\n be implemented using a JavaScript call to the server to check if the server is\n still alive, if not then just call ``window.close()``.\n\nInstant updates instead of meta refresh\n Right now there's a hard coded 10 second meta refresh in the HTML template. It\n would be a lot more elegant if the server used inotify or something similar to\n instantly detect changes and push those to the browser client. For now the\n meta refresh achieves the main goal though :-).\n\nWhy this project?\n-----------------\n\nDifferent variations of `preview-markup` have lived in my private dotfiles\nrepository for years now (I track ``~/bin`` in my dotfiles repository). Over\nthose years the program has had several names and very similar yet slightly\ndifferent purposes. By the time I decided to clean up these \"variations on a\nsimilar theme\" I was using several different shell and Python scripts working\ntogether to do the same things that `preview-markup` now does. I decided to\nmerge, cleanup, document and publish that mess of Python and shell scripts for\nmultiple reasons:\n\n1. I wanted to merge all of the features that I'd grown to appreciate into a\n single coherent piece of software that was easy and intuitive to use (and\n written in Python so I could more easily maintain it :-).\n\n2. I wanted to manage the installation of that software as a Python package\n with properly specified dependencies where a single ``pip install`` was\n enough to get things going.\n\n3. Last but not least: Given the effort I'd already put into it, it seemed a\n shame not to share my work with the world.\n\nSimilar projects\n~~~~~~~~~~~~~~~~\n\nI created `preview-markup` because I couldn't find a tool that provided live\npreviews of Markdown_ *and* reStructuredText_ markup and just because it was\nfun to work on, however *this is clearly an itch that dozens of developers have\nscratched over the years* :-). Here are some similar projects that I've run\ninto and/or used in the past:\n\n`restview `_\n Live preview of reStructuredText_ files. A personal favorite of mine, simple\n and sweet, does exactly what is promises. Written in Python.\n\n`grip `_\n Provides local previews of Markdown files exactly as GitHub renders them by\n using the GitHub API to render the Markdown to HTML. Written in Python.\n\n`markdown-live `_\n Live preview of Markdown files. Written in JavaScript (using Node.js).\n\n`github-markdown-preview `_\n Live preview of Markdown files. Makes it an explicit goal to render things\n just like GitHub does. Written in Ruby.\n\nContact\n-------\n\nThe latest version of `preview-markup` is available on PyPI_ and GitHub_. For\nbug reports please create an issue on GitHub_. If you have questions,\nsuggestions, etc. feel free to send me an e-mail at `peter@peterodding.com`_.\n\nLicense\n-------\n\nThis software is licensed under the `MIT license`_.\n\n\u00a9 2018 Peter Odding.\n\n.. External references:\n.. _GitHub: https://github.com/xolox/python-preview-markup\n.. _Markdown: http://en.wikipedia.org/wiki/Markdown\n.. _Misaka: https://pypi.python.org/pypi/misaka\n.. _MIT license: http://en.wikipedia.org/wiki/MIT_License\n.. _per user site-packages directory: https://www.python.org/dev/peps/pep-0370/\n.. _peter@peterodding.com: peter@peterodding.com\n.. _PyPI: https://pypi.python.org/pypi/preview-markup\n.. _reStructuredText: http://en.wikipedia.org/wiki/ReStructuredText\n.. _virtual environments: http://docs.python-guide.org/en/latest/dev/virtualenvs/\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/xolox/python-preview-markup", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "preview-markup", "package_url": "https://pypi.org/project/preview-markup/", "platform": "", "project_url": "https://pypi.org/project/preview-markup/", "project_urls": { "Homepage": "https://github.com/xolox/python-preview-markup" }, "release_url": "https://pypi.org/project/preview-markup/0.3.3/", "requires_dist": null, "requires_python": "", "summary": "Live preview Markdown and reStructuredText files as HTML in a web browser", "version": "0.3.3" }, "last_serial": 3757584, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "d95ef9f89ee6e3562ba3263e1323ea9e", "sha256": "b55f1af04926b060f17a797031df3595028759d127e1ed4486c4c128124edb42" }, "downloads": -1, "filename": "preview-markup-0.1.tar.gz", "has_sig": false, "md5_digest": "d95ef9f89ee6e3562ba3263e1323ea9e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10300, "upload_time": "2015-03-10T20:07:45", "url": "https://files.pythonhosted.org/packages/22/0d/95f4d3fd4b323786467584b5dc58f1f682742b24287e6cedf181624dcf04/preview-markup-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "5398885a5aca6f413564fcec9fa3a685", "sha256": "98e13fec7346e5dede2a6bc4e25199a8c748b7648e92ccc0160ee823f321614c" }, "downloads": -1, "filename": "preview-markup-0.2.tar.gz", "has_sig": false, "md5_digest": "5398885a5aca6f413564fcec9fa3a685", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10429, "upload_time": "2015-03-10T20:47:46", "url": "https://files.pythonhosted.org/packages/7f/e1/638dec0b6da013cdbe314a80108cf29e951e434ed7ebcdc2933b1232adee/preview-markup-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "a250a7d2bbf299d51d62d799e63e57e5", "sha256": "f5ce90f6407e8b6d0deeea5c8130df6508b3f69ef2157454c0ebf09b624a3c39" }, "downloads": -1, "filename": "preview-markup-0.3.tar.gz", "has_sig": false, "md5_digest": "a250a7d2bbf299d51d62d799e63e57e5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10993, "upload_time": "2015-04-03T20:56:38", "url": "https://files.pythonhosted.org/packages/69/2a/7d88cbb1a467ad856b8c720cb9f499f166fd279621e38fac86d7a2a9ac9f/preview-markup-0.3.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "05b70a5c6f6a6c52b4172f21a1bb4362", "sha256": "38c86a1919749a3c4460df72b33ad8983219a479b6035fbb08af1e1b446d5f7f" }, "downloads": -1, "filename": "preview-markup-0.3.1.tar.gz", "has_sig": false, "md5_digest": "05b70a5c6f6a6c52b4172f21a1bb4362", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11165, "upload_time": "2018-01-21T02:00:31", "url": "https://files.pythonhosted.org/packages/dc/1b/3f6fb3863dbf97a569b6182ddc428d6cdd5f0831cefaa65ab0aa16a905ee/preview-markup-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "88fade40a9ef3921586441a983d9f17d", "sha256": "c363f61fb8150f8558dbedc8788b01bf61dbcf3db316644a485e8723299809eb" }, "downloads": -1, "filename": "preview-markup-0.3.2.tar.gz", "has_sig": false, "md5_digest": "88fade40a9ef3921586441a983d9f17d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11422, "upload_time": "2018-01-22T21:37:29", "url": "https://files.pythonhosted.org/packages/4f/7d/3d4514638b7b8fb9aadb50cbbf8cf96b60c974b3bad9ec8181672d2a52b1/preview-markup-0.3.2.tar.gz" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "fe030c130b7188416ab23f1dc4f946af", "sha256": "af77397fcdd483bce10526bd1b707afe95630f16a757835c8f1b08440dceeeba" }, "downloads": -1, "filename": "preview-markup-0.3.3.tar.gz", "has_sig": false, "md5_digest": "fe030c130b7188416ab23f1dc4f946af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11537, "upload_time": "2018-04-12T05:55:15", "url": "https://files.pythonhosted.org/packages/e1/5b/4c657bcb8cb2aa325e886523eb36ea4db9b7135cad448f7bf79a4ff2372e/preview-markup-0.3.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fe030c130b7188416ab23f1dc4f946af", "sha256": "af77397fcdd483bce10526bd1b707afe95630f16a757835c8f1b08440dceeeba" }, "downloads": -1, "filename": "preview-markup-0.3.3.tar.gz", "has_sig": false, "md5_digest": "fe030c130b7188416ab23f1dc4f946af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11537, "upload_time": "2018-04-12T05:55:15", "url": "https://files.pythonhosted.org/packages/e1/5b/4c657bcb8cb2aa325e886523eb36ea4db9b7135cad448f7bf79a4ff2372e/preview-markup-0.3.3.tar.gz" } ] }