Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
bbadc75
chore: rename project to Encoderize for package upload
DrWheelicus Apr 26, 2025
43999b1
feat: add issue and pull request templates
DrWheelicus Apr 26, 2025
1ca3b7a
chore: remove issue and pull request templates from GitHub workflows
DrWheelicus Apr 26, 2025
e94521b
chore: update GitHub Actions workflow
DrWheelicus Apr 26, 2025
0716fe0
chore: enhance GitHub Actions workflow for Python CI
DrWheelicus Apr 26, 2025
01fe1b8
chore: update GitHub Actions workflow to allow all branch pushes to t…
DrWheelicus Apr 26, 2025
07bd919
docs: update README to include badges for Codecov, PyPI, and downloads
DrWheelicus Apr 26, 2025
545c5b6
chore: update GitHub Actions workflow to use Codecov v5 and improve c…
DrWheelicus Apr 26, 2025
6821f4f
docs: update Codecov badge in README to include token for improved tr…
DrWheelicus Apr 26, 2025
ad987d8
chore: update Python version matrix in GitHub Actions workflow
DrWheelicus Apr 26, 2025
d1bb969
chore: update setuptools version constraints in pyproject.toml
DrWheelicus Apr 26, 2025
6a066a4
Restricts push branch and adds license classifier
DrWheelicus Apr 26, 2025
583eabb
chore: update Python version matrix in GitHub Actions workflow to inc…
DrWheelicus Apr 26, 2025
1b93a3e
chore: update dependencies in requirements.txt and GitHub Actions wor…
DrWheelicus Apr 27, 2025
ef8a564
chore: adjust coverage dependency versions in requirements.txt for Py…
DrWheelicus Apr 27, 2025
65e1fc6
chore: adjust docutils dependency versions in requirements.txt for Py…
DrWheelicus Apr 27, 2025
d27f9db
chore: adjust keyring dependency versions in requirements.txt for Pyt…
DrWheelicus Apr 27, 2025
a9d5152
chore: adjust pillow dependency versions in requirements.txt for Pyth…
DrWheelicus Apr 27, 2025
7a0bbb9
chore: add linting and testing job to CI
DrWheelicus Apr 27, 2025
b525e9d
chore: adjust treepoem dependency versions in requirements.txt for Py…
DrWheelicus Apr 27, 2025
3b87e77
chore: reorganize CI workflow for improved linting and testing
DrWheelicus Apr 27, 2025
eb0174f
chore: update Python version in CI workflow to 3.13
DrWheelicus Apr 27, 2025
b96adfd
chore: add CONTRIBUTING.md and update README for clarity and structure
DrWheelicus Apr 30, 2025
76c65e5
chore: simplify README layout by removing unnecessary div tags
DrWheelicus Apr 30, 2025
999789e
Merge branch 'main' into dev
DrWheelicus May 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Contributing to Encoderize

First off, thank you for considering contributing to Encoderize! It's people like you that make Encoderize such a great tool.

## How Can I Contribute?

### Reporting Bugs

This section guides you through submitting a bug report for Encoderize.

- **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/DrWheelicus/encoderize/issues).
- If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/DrWheelicus/encoderize/issues/new). Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring.

### Suggesting Enhancements

This section guides you through submitting an enhancement suggestion for Encoderize, including completely new features and minor improvements to existing functionality.

- **Perform a cursory search** to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
- If you cannot find an existing issue that describes your enhancement, [open a new issue](https://github.com/DrWheelicus/encoderize/issues/new).
- Provide a **clear and descriptive title** and include as many details as possible about the enhancement, explaining **why** it would be useful.

### Pull Requests

1. Fork the repository and create your branch from `main`.
2. If you've added code that should be tested, add tests.
3. Ensure the test suite passes (`pytest`).
4. Make sure your code lints (`flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics`).
5. Issue that pull request!

## Style Guides

### Git Commit Messages

- Use the present tense ("Add feature" not "Added feature").
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...").
- Limit the first line to 72 characters or less.
- Reference issues and pull requests liberally after the first line.
- Consider using [Conventional Commits](https://www.conventionalcommits.org/) for structured commit messages (e.g., `feat: Add new visualization type`).

### Python Style Guide

- Follow [PEP 8](https://www.python.org/dev/peps/pep-0008/).
- Use `black` for code formatting.
- Use `flake8` for linting.

## Any questions?

Feel free to reach out if you have questions about contributing.
177 changes: 68 additions & 109 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Encoderize
[![codecov](https://codecov.io/gh/DrWheelicus/encoderize/graph/badge.svg?token=QPQMGU1G01)](https://codecov.io/gh/DrWheelicus/encoderize) [![PyPI](https://badge.fury.io/py/encoderize.svg)](https://badge.fury.io/py/encoderize) [![Downloads](https://pepy.tech/badge/encoderize)](https://pepy.tech/project/encoderize)

[![codecov](https://codecov.io/gh/DrWheelicus/encoderize/graph/badge.svg?token=QPQMGU1G01)](https://codecov.io/gh/DrWheelicus/encoderize)
[![PyPI version](https://badge.fury.io/py/encoderize.svg?icon=si%3Apython)](https://badge.fury.io/py/encoderize)
[![Downloads](https://pepy.tech/badge/encoderize)](https://pepy.tech/project/encoderize)
<h1 align="center">
Encoderize
</h1>

<p align="center">
A Python package for generating various visual representations of text in SVG format.
</p>

## Installation

Expand All @@ -20,148 +22,105 @@ pip install -e .

## Features

Generates SVG visualizations of text using various encoding methods:
- Binary Stripe
- Morse Code Band
- Circuit Trace Silhouette
- Dot Grid Steganography
- Semaphore Flags
- A1Z26 Numeric Stripe
- Code128 Barcode
- Waveform Stripe
- Chevron Stripe
- Braille Stripe
Generates SVG visualizations of text using 10 distinct encoding methods:

1. **Binary Stripe**: Binary bar code representation
2. **Morse Code Band**: Dots and dashes visualization
3. **Circuit Trace Silhouette**: Circuit board-like pattern (5x7 grid per character)
4. **Dot Grid Steganography**: Grid with highlighted letters
5. **Semaphore Flags**: Flag position visualization
6. **A1Z26 Numeric Stripe**: Numeric representation of letters (A=1, Z=26)
7. **Code128 Barcode**: Standard Code128 barcode format
8. **Waveform Stripe**: Waveform visualization based on character ASCII values
9. **Chevron Stripe**: Chevron pattern based on binary representation
10. **Braille Stripe**: Visual representation of Braille characters

## Usage

```bash
encoderize --text "HELLO" --output-dir output
```

Options:
- `--text`, `-t`: Text to visualize (required)
- `--output-dir`, `-o`: Output directory (default: 'output')
- `--dark`: Generate dark mode versions
- `--light`: Generate light mode versions
**Options:**

## Development
* `--text`, `-t`: Text to visualize (required)
* `--output-dir`, `-o`: Output directory (default: 'output')
* `--dark`: Generate dark mode versions (white on black)
* `--light`: Generate light mode versions (black on white)

Install development dependencies:
```bash
pip install -e ".[dev]"
```

Run tests:
```bash
pytest
```
If neither `--dark` nor `--light` is specified, both versions will be generated.

## Available Visualizations
## Example Visualizations

1. **Binary Stripe** - Binary bar code representation
2. **Morse Code Band** - Dots and dashes visualization
3. **Circuit Trace Silhouette** - Circuit board-like pattern
4. **Dot Grid Steganography** - Grid with highlighted letters
5. **Semaphore Flags** - Flag position visualization
6. **A1Z26 Numeric Stripe** - Numeric representation of letters
7. **Code128 Barcode** - Standard barcode format
8. **Waveform Stripe** - Waveform visualization
9. **Chevron Stripe** - Chevron pattern visualization
10. **Braille Stripe** - Braille representation

## Requirements

- Python 3.8 or higher
- svgwrite
- treepoem
*WIP*

## Output Structure

For input text "example", the output structure will be:
For input text like `"HELLO"`, the output structure will be:

```
output/
└── example/
└── HELLO/
├── light/
│ ├── binary_stripe_example.svg
│ ├── morse_code_band_example.svg
│ └── ...
│ ├── binary_stripe_HELLO.svg
│ ├── morse_code_band_HELLO.svg
│ ├── circuit_trace_silhouette_HELLO.svg
│ ├── dot_grid_steganography_HELLO.svg
│ ├── semaphore_flags_HELLO.svg
│ ├── a1z26_stripe_HELLO.svg
│ ├── code128_barcode_HELLO.svg
│ ├── waveform_stripe_HELLO.svg
│ ├── chevron_stripe_HELLO.svg
│ └── braille_stripe_HELLO.svg
└── dark/
├── binary_stripe_example.svg
├── morse_code_band_example.svg
└── ...
├── binary_stripe_HELLO.svg
├── morse_code_band_HELLO.svg
└── ... (and so on for all 10 types)
```

## Customization

Each visualization function accepts various parameters to customize the appearance:

- Colors
- Sizes
- Spacing
- Dimensions

See the function docstrings for detailed parameter information.

## License

MIT License

## Features

The tool generates 10 different visual encodings for any input text:

1. **Binary Pulse Stripe**: Converts text to binary and creates a visual stripe pattern
2. **Morse Code Band**: Creates a visual representation of Morse code
3. **Circuit Trace Silhouette**: Generates a 5x7 circuit-like pattern
4. **Steganographic Dot-Grid Pattern**: Creates a grid with highlighted dots representing letters
5. **Semaphore Flags**: Visual representation of semaphore flag positions
6. **A1Z26 Numeric Stripe**: Converts letters to their position in the alphabet
7. **Code128 Barcode**: Generates a standard barcode
8. **Waveform Stripe**: Creates a waveform pattern based on character values
9. **Chevron Stripe**: Binary-based chevron pattern
10. **Braille Stripe**: Visual representation of Braille characters

## Dependencies
Each visualization function in `encoderize/visualizers.py` accepts optional parameters to customize the appearance (e.g., colors, sizes, spacing, dimensions).

- svgwrite: For SVG file generation
- pillow: For image processing
- treepoem: For barcode generation
See the function docstrings within `encoderize/visualizers.py` for detailed parameter information.

## Output Structure
## Development

For input text "example", the output structure will be:
Install development dependencies:
```bash
pip install -e ".[dev]"
```

Run tests:
```bash
pytest
```
output_example/
├── light/
│ ├── binary_stripe_example.svg
│ ├── morse_code_band_example.svg
│ └── ...
└── dark/
├── binary_stripe_example.svg
├── morse_code_band_example.svg
└── ...

Run linters (e.g., flake8, black):
```bash
# Example using flake8
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# Example using black
black . --check
```

## Customization
## Requirements

The script includes various parameters that can be modified to adjust the visual appearance of the encodings, such as:
* Python 3.8 or higher
* `svgwrite`
* `treepoem` (and its dependency Ghostscript for barcode generation)

- Colors
- Sizes
- Spacing
- Dimensions
## License

To modify these parameters, edit the corresponding function parameters in `encoding-names.py`.
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Contact
## Contributing

For questions or feedback, please contact me at [haydenpmac@gmail.com](mailto:haydenpmac@gmail.com)
Contributions are welcome! Please see the [CONTRIBUTING.md](CONTRIBUTING.md) file for details on how to report bugs, suggest features, and submit pull requests.

## Contributing
## Contact

Contributions are welcome! Please open an issue or submit a pull request.
For questions or feedback, please contact Hayden MacDonald at [haydenpmac@gmail.com](mailto:haydenpmac@gmail.com).

## Contributors

Expand Down