purdy


Namepurdy JSON
Version 1.13.2 PyPI version JSON
download
home_pagehttps://github.com/cltrudeau/purdy
SummaryTerminal based code snippet display tool
upload_time2024-04-11 22:30:27
maintainerNone
docs_urlNone
authorChristopher Trudeau
requires_pythonNone
licenseMIT
keywords code display
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            *****
Purdy
*****


During talks or screencasts I don't want to be typing code, it is too error
prone and too likely to mess up my speaking flow. **Purdy** is both a set of
programs and a library to display colourized code in a series of animations.

The ``purdy`` command takes one of a Python program, a Python REPL console file
or a Bash console file. Source code is presented to the screen as if typing.
For console files, the typing pauses at a prompt, waiting for interaction. 
Prompts are:  

* ``>>>`` or ``...`` for Python REPL
* ``$`` for Bash console

If the program is paused at a prompt, pressing the **right** arrow will
continue. Typing animation can be skipped over by pressing the letter "s"
instead. Animation can be undone by pressing the **left** arrow. More info on
keys can be found in the help dialog, viewed by pressing "?".

Example Usage:

.. code-block:: bash

    $ purdy code-snippet.py

The result looks like this:

.. image:: screenshot.gif

Once the code has been displayed, further key presses are ignored. At any time
you can press "q" to quit.


Purdy Programs
##############


The following programs come with the `purdy` library:

* ``purdy`` -- Animated display that looks like a program is being typed to the
  screen.
* ``pat`` -- "purdy cat", prints ANSI colourized source.
* ``prat`` -- "purdy RTF cat", prints colourized source in RTF document format.
  Particularly useful for copying to a clipboard and pasting full colourized
  source into a document. On OS X `prat <filename> | pbcopy` will put the
  output directly to the clipboard.
* ``subpurdy`` -- Full set of commands to control Purdy. Sub-commands dictate 
  behaviour. Does a variety of code presentation. Includes ANSI, RTF, HTML
  output as well as the typewriter animations.

More information can be found in the Command Line Program Documentation.


Purdy TUI Controls
##################

The following keys help you to control the TUI purdy programs:

* ``?`` -- Help screen
* ``<RIGHT>`` -- next animation step
* ``<LEFT>`` -- previous animation step
* ``s`` -- go to the next step, skipping any animation

For custom made code using the purdy library, the following controls will also
work:

* ``S`` -- go to the next section, skipping any animation. 
* ``<TAB>`` -- focus next window area in a multi Screen display
* ``<SHIFT><TAB>`` -- focus previous window area in a multi Screen display

Additionally the ``s``, ``S``, and ``<LEFT>`` commands all support skipping
multiple steps by specifying a number first. For example the sequence ``12s``
would skip past the next 12 steps.


Purdy Library
#############

The ``purdy`` script is fairly simple. You can create more complex animations
by writing programs using the purdy library. Custom programs can have split
screens, highlighting lines, slide transitions and more.  More information can
be found in the Library Documentation.


Installation
############

.. code-block:: bash

    $ pip install purdy


Supports
########

Purdy has been tested with Python 3.7 through 3.11. Terminal control is done
with the `Urwid <http://urwid.org/>`_ library. Parsing and tokenization is
done through `Pygments <https://pygments.org/>`_. Both libraries are
execellent and I'm grateful they're publically available.


Docs & Source
#############

Docs: http://purdy.readthedocs.io/en/latest/

Source: https://github.com/cltrudeau/purdy

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/cltrudeau/purdy",
    "name": "purdy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "code display",
    "author": "Christopher Trudeau",
    "author_email": "ctrudeau+pypi@arsensa.com",
    "download_url": "https://files.pythonhosted.org/packages/f0/63/6bee7013982726d36a7ed7e9c44771ec44d4d8bfc6081339f34e81bf3925/purdy-1.13.2.tar.gz",
    "platform": null,
    "description": "*****\nPurdy\n*****\n\n\nDuring talks or screencasts I don't want to be typing code, it is too error\nprone and too likely to mess up my speaking flow. **Purdy** is both a set of\nprograms and a library to display colourized code in a series of animations.\n\nThe ``purdy`` command takes one of a Python program, a Python REPL console file\nor a Bash console file. Source code is presented to the screen as if typing.\nFor console files, the typing pauses at a prompt, waiting for interaction. \nPrompts are:  \n\n* ``>>>`` or ``...`` for Python REPL\n* ``$`` for Bash console\n\nIf the program is paused at a prompt, pressing the **right** arrow will\ncontinue. Typing animation can be skipped over by pressing the letter \"s\"\ninstead. Animation can be undone by pressing the **left** arrow. More info on\nkeys can be found in the help dialog, viewed by pressing \"?\".\n\nExample Usage:\n\n.. code-block:: bash\n\n    $ purdy code-snippet.py\n\nThe result looks like this:\n\n.. image:: screenshot.gif\n\nOnce the code has been displayed, further key presses are ignored. At any time\nyou can press \"q\" to quit.\n\n\nPurdy Programs\n##############\n\n\nThe following programs come with the `purdy` library:\n\n* ``purdy`` -- Animated display that looks like a program is being typed to the\n  screen.\n* ``pat`` -- \"purdy cat\", prints ANSI colourized source.\n* ``prat`` -- \"purdy RTF cat\", prints colourized source in RTF document format.\n  Particularly useful for copying to a clipboard and pasting full colourized\n  source into a document. On OS X `prat <filename> | pbcopy` will put the\n  output directly to the clipboard.\n* ``subpurdy`` -- Full set of commands to control Purdy. Sub-commands dictate \n  behaviour. Does a variety of code presentation. Includes ANSI, RTF, HTML\n  output as well as the typewriter animations.\n\nMore information can be found in the Command Line Program Documentation.\n\n\nPurdy TUI Controls\n##################\n\nThe following keys help you to control the TUI purdy programs:\n\n* ``?`` -- Help screen\n* ``<RIGHT>`` -- next animation step\n* ``<LEFT>`` -- previous animation step\n* ``s`` -- go to the next step, skipping any animation\n\nFor custom made code using the purdy library, the following controls will also\nwork:\n\n* ``S`` -- go to the next section, skipping any animation. \n* ``<TAB>`` -- focus next window area in a multi Screen display\n* ``<SHIFT><TAB>`` -- focus previous window area in a multi Screen display\n\nAdditionally the ``s``, ``S``, and ``<LEFT>`` commands all support skipping\nmultiple steps by specifying a number first. For example the sequence ``12s``\nwould skip past the next 12 steps.\n\n\nPurdy Library\n#############\n\nThe ``purdy`` script is fairly simple. You can create more complex animations\nby writing programs using the purdy library. Custom programs can have split\nscreens, highlighting lines, slide transitions and more.  More information can\nbe found in the Library Documentation.\n\n\nInstallation\n############\n\n.. code-block:: bash\n\n    $ pip install purdy\n\n\nSupports\n########\n\nPurdy has been tested with Python 3.7 through 3.11. Terminal control is done\nwith the `Urwid <http://urwid.org/>`_ library. Parsing and tokenization is\ndone through `Pygments <https://pygments.org/>`_. Both libraries are\nexecellent and I'm grateful they're publically available.\n\n\nDocs & Source\n#############\n\nDocs: http://purdy.readthedocs.io/en/latest/\n\nSource: https://github.com/cltrudeau/purdy\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Terminal based code snippet display tool",
    "version": "1.13.2",
    "project_urls": {
        "Homepage": "https://github.com/cltrudeau/purdy"
    },
    "split_keywords": [
        "code",
        "display"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ac407470234a4d8370dc8ae433d9838a9b3387e5b45f3bc001d406f760c6121e",
                "md5": "de507520325f2855209aac89c21b8d6b",
                "sha256": "ffadf43cd00026750a456351dc2fdd79f3aa6719857ba02ff9ecd13caa3fbcf8"
            },
            "downloads": -1,
            "filename": "purdy-1.13.2-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "de507520325f2855209aac89c21b8d6b",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 65797,
            "upload_time": "2024-04-11T22:30:25",
            "upload_time_iso_8601": "2024-04-11T22:30:25.602359Z",
            "url": "https://files.pythonhosted.org/packages/ac/40/7470234a4d8370dc8ae433d9838a9b3387e5b45f3bc001d406f760c6121e/purdy-1.13.2-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f0636bee7013982726d36a7ed7e9c44771ec44d4d8bfc6081339f34e81bf3925",
                "md5": "bb983e97d5a236ac416619736082f206",
                "sha256": "350ce6fcbe2f31d25f448fa4bf2f879a18698844d8154f368af4a2676cd0ed7c"
            },
            "downloads": -1,
            "filename": "purdy-1.13.2.tar.gz",
            "has_sig": false,
            "md5_digest": "bb983e97d5a236ac416619736082f206",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 53559,
            "upload_time": "2024-04-11T22:30:27",
            "upload_time_iso_8601": "2024-04-11T22:30:27.583990Z",
            "url": "https://files.pythonhosted.org/packages/f0/63/6bee7013982726d36a7ed7e9c44771ec44d4d8bfc6081339f34e81bf3925/purdy-1.13.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-11 22:30:27",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cltrudeau",
    "github_project": "purdy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "tox": true,
    "lcname": "purdy"
}
        
Elapsed time: 0.22232s