Skip to content

Commit

Permalink
force folder order
Browse files Browse the repository at this point in the history
  • Loading branch information
yceballost committed Apr 17, 2024
1 parent 5d9f159 commit 509d53e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 14 deletions.
Binary file modified .github/md-generator/__pycache__/generate_graph.cpython-311.pyc
Binary file not shown.
11 changes: 8 additions & 3 deletions .github/md-generator/generate_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,14 @@ def create_bar_representation(unique_counts, equivalence_percentages, all_equiva


def icons_equivalence_data_table(root_folder):
folders = [os.path.join(root_folder, folder) for folder in os.listdir(root_folder) if os.path.isdir(os.path.join(root_folder, folder))]
labels = [os.path.basename(folder) for folder in folders]
# Define the desired order of folders
desired_order = ["telefonica", "o2", "vivo-new", "blau"] # Add more folders as needed

# Create full paths for the folders in the desired order
folders = [os.path.join(root_folder, folder) for folder in desired_order]

# Extract labels from folder names
labels = desired_order

unique_counts = [count_unique_icons(folder) for folder in folders]
equivalent_counts = [count_equivalent_icons(folder, folders) for folder in folders]
Expand Down Expand Up @@ -139,4 +145,3 @@ def icons_equivalence_data_table(root_folder):
markdown_table += "---"

return markdown_table

14 changes: 10 additions & 4 deletions .github/md-generator/generate_markdown.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
# generate_markdown.py

import os
import sys
from generate_icon_table import generate_icon_table
from generate_graph import create_bar_representation, icons_equivalence_data_table, count_total_icons, count_unique_icons, count_equivalent_icons, count_all_equivalent_icons

def generate_bar_representation(icons_folder):
folders = [os.path.join(icons_folder, folder) for folder in os.listdir(icons_folder) if os.path.isdir(os.path.join(icons_folder, folder))]
labels = [os.path.basename(folder) for folder in folders]
# Define the desired order of folders
desired_order = ["telefonica", "o2", "vivo-new", "blau"] # Add more folders as needed

# Create full paths for the folders in the desired order
folders = [os.path.join(icons_folder, folder) for folder in desired_order]

# Extract labels from folder names
labels = desired_order

total_counts = [count_total_icons(folder) for folder in folders]
unique_counts = [count_unique_icons(folder) for folder in folders]
equivalence_percentages = [count_equivalent_icons(folder, folders) for folder in folders]
Expand All @@ -24,6 +29,7 @@ def generate_bar_representation(icons_folder):

return bar_content


def main():
BREAK = "\n"

Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,26 @@ Use Mística icons library in Figma!

## Equivalence status

telefonica
![](https://dummyimage.com/4x8/0066FF/000000?text=+)![](https://dummyimage.com/190x8/EAC344/000000?text=+)![](https://dummyimage.com/93x8/59C2C9/000000?text=+)![](https://dummyimage.com/213x8/D1D5E4/000000?text=+)

o2
![](https://dummyimage.com/6x8/0066FF/000000?text=+)![](https://dummyimage.com/249x8/EAC344/000000?text=+)![](https://dummyimage.com/67x8/59C2C9/000000?text=+)![](https://dummyimage.com/178x8/D1D5E4/000000?text=+)

blau
![](https://dummyimage.com/24x8/0066FF/000000?text=+)![](https://dummyimage.com/459x8/EAC344/000000?text=+)![](https://dummyimage.com/12x8/59C2C9/000000?text=+)![](https://dummyimage.com/5x8/D1D5E4/000000?text=+)

vivo-new
![](https://dummyimage.com/59x8/0066FF/000000?text=+)![](https://dummyimage.com/241x8/EAC344/000000?text=+)![](https://dummyimage.com/11x8/59C2C9/000000?text=+)![](https://dummyimage.com/189x8/D1D5E4/000000?text=+)

telefonica
![](https://dummyimage.com/4x8/0066FF/000000?text=+)![](https://dummyimage.com/190x8/EAC344/000000?text=+)![](https://dummyimage.com/93x8/59C2C9/000000?text=+)![](https://dummyimage.com/213x8/D1D5E4/000000?text=+)
blau
![](https://dummyimage.com/24x8/0066FF/000000?text=+)![](https://dummyimage.com/459x8/EAC344/000000?text=+)![](https://dummyimage.com/12x8/59C2C9/000000?text=+)![](https://dummyimage.com/5x8/D1D5E4/000000?text=+)

<br/>

| Icon Set | Icon Concepts | Total Icons | Icons with All Equivalence | Icons with Equivalence | Unique Icons | Remaining |
|:--------|-------------:|--------------:|----------:|------------------------:|---------------------------:|-------------:|
| telefonica | 420 | 1193 | 0.9% | 38.1% | 18.7% | 42.3% |
| o2 | 302 | 894 | 1.2% | 49.9% | 13.5% | 35.4% |
| blau | 57 | 61 | 4.9% | 91.8% | 2.5% | 0.7% |
| vivo-new | 50 | 93 | 11.8% | 48.4% | 2.2% | 37.6% |
| telefonica | 420 | 1193 | 0.9% | 38.1% | 18.7% | 42.3% |
| blau | 57 | 61 | 4.9% | 91.8% | 2.5% | 0.7% |

<sub>**Icon Set:** The name of the brand or folder being analyzed.</sub>
<sub>**Icon Concepts:** The number of unique icons in the set, i.e., those icons whose names do not repeat within the same brand.</sub>
Expand Down

0 comments on commit 509d53e

Please sign in to comment.