Skip to content

Commit

Permalink
Modernize
Browse files Browse the repository at this point in the history
- Remove gui because PySide only worked on 3.4.
- Pin specific versions of dependencies.
- Restructure folders.
- Replace optparse with argparse.
- Add type hints.
- Add more explanation in comments.
- Use namedtuples for readability.
- Added different images.
- Use the black linter.
  • Loading branch information
ProfOak committed Nov 27, 2020
1 parent 2453b06 commit 83b8824
Show file tree
Hide file tree
Showing 14 changed files with 291 additions and 649 deletions.
Binary file modified Media/after.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Media/before.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Media/density.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Media/terminal.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 17 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,42 @@

Makin some pictures

Ascii py requires the use of Python 3.3 or greater because of [an addition made to the shutil ibrary](https://docs.python.org/3/library/shutil.html#querying-the-size-of-the-output-terminal).

Install instructions
---

Using pip:
Using pip
---

`python3 -m pip install ascii_py`
```
python3 -m pip install ascii_py
```

Manually:
From source
---

```
git clone https://github.com/profoak/ascii_py
cd ascii_py
python3 setup.py install
```

If you want to use the gui component: `python3 setup_gui.py install`

This library requires the Pillow and colorama libraries. If you use the above install methods, these will automagically be installed.

`python3 -m pip install -U Pillow colorama`

To use the gui you need PySide

`python3 -m pip install -U PySide`

At the time of this commit PySide can only be installed on Python versions 2.6, 2.7, 3.3, 3.4. If you wish to use the GUI you must have installed versions 3.3 or 3.4. You can read more about it here https://github.com/PySide/pyside-setup/issues/53

Usage
---

```
Usage: ascii_py [options]
usage: ascii_py [-h] [-o OUT] [-w WORDS] [-s STEP] [-d] [-t] input_file
Options:
positional arguments:
input_file Input file to convert from.
optional arguments:
-h, --help show this help message and exit
-o FILENAME, --out=FILENAME
The filename you want your final image saved as
-w WORDS, --words=WORDS
Use words to create your image
-s STEP, --step=STEP Choose the distance of your characters
-d, --density Adding the flag converts the image based on visual
density
-t, --terminal Print ascii image to terminal
-o OUT, --out OUT The filename you want your final image saved as.
-w WORDS, --words WORDS
Use words to create your image.
-s STEP, --step STEP Choose the distance of your characters.
-d, --density Adding the flag converts the image based on visual density.
-t, --terminal Print ascii image to terminal.
```

Example images
Expand Down
189 changes: 0 additions & 189 deletions ascii_py/ascii.py

This file was deleted.

0 comments on commit 83b8824

Please sign in to comment.