Skip to content

Commit

Permalink
Updated README with latest functionalty
Browse files Browse the repository at this point in the history
  • Loading branch information
beveradb committed Mar 6, 2024
1 parent a24c73f commit 2e17d5b
Show file tree
Hide file tree
Showing 3 changed files with 160 additions and 150 deletions.
64 changes: 25 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,32 @@
# Ecosystem Diagram Generator
# Logo Diagram Generator 🎨

This tool allows you to generate SVG diagrams that visually represent an ecosystem of tools, complete with their logos, based on a YAML configuration file. It's particularly useful for visualizing the relationships and categories of various tools within a technology stack.
![PyPI - Version](https://img.shields.io/pypi/v/logo-diagram-generator)
![PyPI - License](https://img.shields.io/pypi/l/logo-diagram-generator)

This package, `logo-diagram-generator`, allows you to generate SVG diagrams that visually represent a technology ecosystem, including tool logos, based on a YAML configuration file. It's designed to help visualize the relationships and categories of tools within a technology stack, making it easier to understand at a glance.

## Example Output

Below is an example of what the generated diagram looks like, generated with from this example config:
Here's an example of a diagram generated using `logo-diagram-generator`, based on an example configuration:

`python generate_diagram.py -c examples/full.example.yml -o examples -n full.example`
```
pip install logo-diagram-generator
logo-diagram-generator -c examples/full.example.yml -o examples -n full.example
```

![Example Diagram](examples/full.example_logos.svg)

## Quick Start

1. **Clone the repository**
1. **Install the Package**

Start by cloning this repository to your local machine.
Ensure you have Python and pip installed on your system. Install `logo-diagram-generator` from PyPI:

```bash
git clone <repository-url>
cd <repository-directory>
pip install logo-diagram-generator
```

2. **Install Dependencies**

Ensure you have Python installed on your system. Then, install the required Python packages:

```bash
pip install -r requirements.txt
```

3. **Prepare Your Configuration**
2. **Prepare Your Configuration**

Create a `config.yml` file based on the provided `config.yml.example`. This file should list all the tools in your ecosystem, categorized appropriately. For example:

Expand All @@ -43,45 +40,34 @@ Below is an example of what the generated diagram looks like, generated with fro
- name: Rancher
```
If you know a particular tool has a different alias on VectorLogoZone (e.g. `helmsh` instead of just `helm`), set the `alias` value in the config.

If you know you want a logo to be downloaded from a specific URL, set the `svgURL` value in the config.

See `config.yml.example` for example configurations!

4. **Download Logos**

Run the `download_logos.py` script to automatically download SVG logos for the tools listed in your `config.yml`. The script attempts to fetch logos based on the tool's name, label, or alias, by default into a directory called `logos`.

```bash
python download_logos.py
```
If a tool has a different alias on VectorLogoZone or you want to download a logo from a specific URL, set the `alias` or `svgURL` value in the config respectively.

The config file path and logos directory path can be customised, add `--help` for available CLI params.
See `config.yml.example` for more configuration examples!

5. **Generate Diagram**
3. **Download Logos and Generate Diagram**

With the logos downloaded, you can now generate the ecosystem diagram by running the `generate_diagram.py` script.
With your configuration ready, use the `logo-diagram-generator` CLI to download logos and generate your ecosystem diagram:

```bash
python generate_diagram.py
logo-diagram-generator download-logos -c config.yml
logo-diagram-generator generate -c config.yml
```

This will produce an SVG file named `diagram_logos.svg` in your current directory.
This will download the necessary logos and produce an SVG file named `diagram_logos.svg` in your current directory.

The config file path, logos directory path and diagram name can be customised, add `--help` for available CLI params.
Both commands offer customization options for paths and output names, use `--help` to see all available CLI parameters.

## Customizing Your Diagram

- **Configuration File**: Modify `config.yml` to add, remove, or categorize tools as needed. Each tool can have a `name`, `label`, and optionally an `alias` or `svgURL` for custom logo URLs.
- **Logo Download**: If the automatic logo download doesn't find a logo for a tool, you can manually place an SVG file in the `logos` directory. The file name should match the tool's name in the configuration file.
- **Diagram Appearance**: Modify the `generate_diagram.py` script if you need to change the size, layout, or appearance of the generated diagram.
- **Diagram Appearance**: The appearance of the generated diagram can be customized by modifying the `config.yml` file or by using different CLI options.

## Troubleshooting

- **Missing Logos**: Ensure all tools in your `config.yml` have either a valid `svgURL` or a corresponding SVG file in the `logos` directory.
- **Script Errors**: Check the Python script logs for any error messages. Most issues can be resolved by ensuring the configuration file is correctly formatted and all dependencies are installed.
- **CLI Errors**: Check the output of the CLI commands for any error messages. Most issues can be resolved by ensuring the configuration file is correctly formatted and all dependencies are installed.

## Contributing

Contributions to improve the tool or add new features are welcome. Please submit a pull request or open an issue to discuss your ideas.
Contributions to improve `logo-diagram-generator` or add new features are welcome. Please submit a pull request or open an issue to discuss your ideas.
Loading

0 comments on commit 2e17d5b

Please sign in to comment.