-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Searchable HTML overview of existing icons #29
Comments
Hi @tfc, this is awesome. Please open a PR so that the maintainers can review and merge it. |
btw: please tag me in the PR so I can also contribute / improve if I see anything. Also, I suggest the following diff to also show the macro to be used: diff --git a/genicons.py b/genicons.py
index 095d14b..9a35f7e 100644
--- a/genicons.py
+++ b/genicons.py
@@ -1,5 +1,13 @@
for name in names:
+ with open(folder+"/"+name+".puml", 'r') as searchfile:
+ for line in searchfile:
+ r=re.search('.*!define (.*?)\((.*)',line)
+ macro=""
+ if r:
+ macro = r.group(1)
+ break
+
print(
f"""
<article class="card">
@@ -8,7 +16,10 @@
<h2>{name}</h2>
<pre>
!include common.puml
-!include {folder}/{name}.puml</pre>
+!include {folder}/{name}.puml
+"""+ macro +
+"""
+</pre>
</div>
</article>
""" Result: |
Usage: python3 genicons.py > index.html && firefox index.html See: tupadr3#29
Oh, interesting. What do i need the macros for? I just use the titles of these items in my plantum descriptions (i.e. |
@tfc I integrated it into the project. Take a look at index.html |
Hi,
in order to have it easier selecting icons from this great plantuml icon font sprites library, i created myself a nice little HTML overview of all items that are available in this runner:
The overview is generated with a python script that can be rerun anytime if the icon collection is extended
It might be a nice addition to this library/github repo if the generated output would be shared online (e.g. github pages feature).
I can help doing that but i wanted to ask if there is interest in this at all.
The python script:
The text was updated successfully, but these errors were encountered: