Metadata-Version: 2.4
Name: nudatus
Version: 0.0.5
Summary: Strip comments from scripts, intended for use with MicroPython and other storage constrained environments
Home-page: https://github.com/zanderbrown/nudatus
Author: Zander Brown
License: MIT
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3.5
Requires-Python: >=3.5
License-File: LICENSE
License-File: AUTHORS
Provides-Extra: tests
Requires-Dist: black; extra == "tests"
Requires-Dist: coverage; extra == "tests"
Requires-Dist: pytest-cov; extra == "tests"
Requires-Dist: pytest-faulthandler; extra == "tests"
Requires-Dist: pytest-random-order>=1.0.0; extra == "tests"
Requires-Dist: pytest>=4.6; extra == "tests"
Provides-Extra: package
Requires-Dist: twine; extra == "package"
Requires-Dist: wheel; extra == "package"
Provides-Extra: dev
Requires-Dist: black; extra == "dev"
Requires-Dist: coverage; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: pytest-faulthandler; extra == "dev"
Requires-Dist: pytest-random-order>=1.0.0; extra == "dev"
Requires-Dist: pytest>=4.6; extra == "dev"
Requires-Dist: twine; extra == "dev"
Requires-Dist: wheel; extra == "dev"
Provides-Extra: all
Requires-Dist: black; extra == "all"
Requires-Dist: coverage; extra == "all"
Requires-Dist: pytest-cov; extra == "all"
Requires-Dist: pytest-faulthandler; extra == "all"
Requires-Dist: pytest-random-order>=1.0.0; extra == "all"
Requires-Dist: pytest>=4.6; extra == "all"
Requires-Dist: twine; extra == "all"
Requires-Dist: wheel; extra == "all"
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-python
Dynamic: summary

Nudatus
=======

Nudatus is a tool to remove comments from Python scripts.

It was created for use in uflash_ to help squeeze longer programs onto the micro:bit but it should be suitable for various environments with restricted storage.

*Note* Nudatus uses the tokenizer built into Python so only supports the syntax of the version it's running on, but it's extremely unlikely this will cause you any issues (print is handled fine).

Personally I pronounce nudatus as new-dat-us which I appreciate is probably 'wrong'.

Usage
--------

Nudatus is designed to be embedded within a greater tool (like uflash_ or Mu_ by ntoll_) but also provides a CLI tool:


.. code:: text

    nudatus [-h] [--version] [input] [output]


An input file must be specified but if output is omitted the result will be printed on stdout.

Calling from a Python script is quite simple:

.. code:: python

    import nudatus
    source = '' # Input script
    result = nudatus.mangle(source) # Result as str

.. _uflash: https://github.com/ntoll/uflash
.. _Mu: http://codewith.mu/
.. _ntoll: http://ntoll.org/


0.0.5
-----

* Drop support for everything below Python 3.5
* Format with black
* Add type annotations (not that there is much to type)

0.0.2
-----

* Respect the contents of lists and dicts

0.0.1
-----

* Initial release.
