Skip to main content
Logo

Wipe Clean

Clear your terminal in a fun way. Works on Windows, Linux and macOS. 0-dependency.

made-with-python PyPI - Python Version Maintainability

PyPI PyPI - Status PyPI - Downloads

Linux Mac OS Windows

Install • Usages • Advanced usages • Roadmap • Related projects

demo


Install

Install with pip:

pip install wipe-clean

wipe-clean currently requires Python 3.6.1 and above. Note that Python 3.6.0 is not supported due to lack of NamedTuples typing.

Usages

Just:

wipe-clean

Use -h, --help to show all available options

wipe-clean -h

Advanced usages

1. Use API

You can use wipe-clean inside your project.

from wipe_clean.main import cli as wc_cli

wc_cli()
# Or with arguments
wc_cli('--frame-interval=0.005', '--min-frame-delay=0')

2. Customization

It's possible to design your own brush shape and animation.

Example brush

To create a new brush type, implement the Brush interface, e.g.

from wipe_clean.brush import Brush, ScreenPointDrawing, ScreenPoint as P

class Wipe2x2(Brush):
    def get_points(self, x, y, angle) -> List[ScreenPointDrawing]:
        return [
            ScreenPointDrawing(P(x    , y    ), '#'),  # noqa: E202,E203
            ScreenPointDrawing(P(x + 1, y    ), '#'),  # noqa: E202,E203
            ScreenPointDrawing(P(x    , y + 1), '#'),  # noqa: E202,E203
            ScreenPointDrawing(P(x + 1, y + 1), '#'),
        ]

This will define a brush like this:

##
##

Example path

Similarly, you can implement the Path interface to create a new brush path.

import math
from wipe_clean.path import Path, PathPoint, ScreenPoint as P

class MySimplePath(Path):
    def get_points(self) -> Iterable[PathPoint]:
        return [
            PathPoint(P(10, 10), math.radians(45)),
            PathPoint(P(20,  5), math.radians(0)),
            PathPoint(P(40, 20), math.radians(90)),
        ]

Roadmap

See DEVELOPMENT.md

Related projects

  • JeanJouliaCode/wipeclean - JavaScript version

    The first brush type (BrushWipe) and path animations (PathZigZag, PathRectEdge) are direct ports of JeanJouliaCode/wipeclean. Credits go to JeanJouliaCode!

  • Textualize/rich - An inspiring textual UI library

Release files for wipe-clean 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wipe-clean 0.3.1
File Size Uploaded
wipe-clean-0.3.1.tar.gz 16.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wipe-clean 0.3.1
File Interpreter ABI Platform
wipe_clean-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 30.6 kB

Release files / wipe-clean-0.3.1.tar.gz

Download URL wipe-clean-0.3.1.tar.gz
Size 16.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4e6298178b32ef350e6b7d5954275e2079483ef98cfff5f784cb57025d6839ff
BLAKE2b-256 checksum
How to use checksums
2eb2b4b54d7e664a9206febe197aab02e576549be44b1917c0efd80d2fd698db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.12 CPython/3.10.2 Windows/10

Release files / wipe_clean-0.3.1-py3-none-any.whl

Download URL wipe_clean-0.3.1-py3-none-any.whl
Size 13.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6eb31080da99b717aa63a035366ed6ed629270659a3107431f26f4f51edf5bd3
BLAKE2b-256 checksum
How to use checksums
49e25275334c795b7e61080b42548a9bb80e2eda4254b2c1f5e965545a3659d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.12 CPython/3.10.2 Windows/10

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page