Skip to content

Commit

Permalink
Cleanup (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
cariad authored Oct 5, 2021
1 parent 66d3826 commit c95fccd
Show file tree
Hide file tree
Showing 8 changed files with 172 additions and 187 deletions.
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name = "pypi"
[packages]

[dev-packages]
ansiscape = "==1.0.0a1"
ansiscape = "*"
black = "==21.9b0"
flake8 = "*"
isort = "*"
Expand Down
323 changes: 156 additions & 167 deletions Pipfile.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Full documentation is published at [naughtty.readthedocs.io](https://naughtty.re
pip install naughtty
```

**NaughTTY** requires the host operating system to support forking and pseudo-terminals. GNU/Linux is good. At the time of writing, Windows is not. No guarantees are made for any operating system.
**NaughTTY** requires the host operating system to support forking and pseudo-terminals. GNU/Linux is good. At the time of writing, Windows is not.

## Basic CLI usage

Expand Down
15 changes: 0 additions & 15 deletions docs/about.md

This file was deleted.

12 changes: 12 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,15 @@ And that's where NaughTTY comes in!
## The Solution: NaughTTY

NaughTTY is a CLI tool and Python package for running commands in a pseudo-terminal and capturing their output. This allows you to fool a command into emitting escape codes during redirection and piping when it normally wouldn't.

## Feedback

Please raise bugs, request features and ask questions at [github.com/cariad/naughtty/issues](https://github.com/cariad/naughtty/issues).

Mention if you're a [sponsor](https://github.com/sponsors/cariad) to ensure I respond as a priority. Thank you!

## Project

The source for `naughtty` is available at [github.com/cariad/naughtty](https://github.com/cariad/naughtty) under the MIT licence.

And, **hello!** I'm [Cariad Eccleston](https://cariad.io) and I'm an independent/freelance software engineer. If my work has value to you, please consider [sponsoring](https://github.com/sponsors/cariad/).
1 change: 0 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ nav:
- install.md
- cli.md
- python.md
- about.md
site_name: NaughTTY
theme:
name: readthedocs
2 changes: 1 addition & 1 deletion naughtty/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def make_response(cli_args: Optional[List[str]] = None) -> str:
# command's arguments:
add_help=False,
description="Executes a shell command in a pseudo-terminal and prints its output to stdout.",
epilog="For example: naughtty pipenv --help > out.txt",
epilog="Made with love by Cariad Eccleston: https://github.com/cariad/naughtty",
)

parser.add_argument("command", help="command", nargs="*")
Expand Down
2 changes: 1 addition & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def test_make_response__for_execution__with_help() -> None:
def test_make_response__for_help() -> None:
response = make_response(["--help"])
assert response.startswith("usage: ")
assert response.endswith("naughtty pipenv --help > out.txt\n")
assert response.endswith("Eccleston: https://github.com/cariad/naughtty\n")
assert "naughtty" in response


Expand Down

0 comments on commit c95fccd

Please sign in to comment.