Skip to content

Commit

Permalink
Update docs and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
loganmarchione committed Dec 20, 2022
1 parent e50558f commit 16b7d4c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 6 additions & 4 deletions WORKFLOW.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ When possible, icons should be sought from official sources first, only then fal
1. Open each file with Inkscape
1. Resize the document and viewbox to 48x48
1. Select all elements of the icon and create a group (this helps during resizing/alignment)
1. Resize the icon to 48x48px (ensuring to retain ratio)
1. Resize the icon to 48x48 (ensuring to retain ratio)
1. Center the icon on page both horizontally and vertically (the icon should be touching at least two sides of the document now)
1. Clean up document (`File--->Clean Up Document`)
1. Save the SVG file to the `assets` directory
Expand All @@ -63,7 +63,7 @@ When possible, icons should be sought from official sources first, only then fal
# 5. Name the icon

Each icon will have two names:
- A filename (e.q., `filename.svg`)
- A filename (e.g., `filename.svg`)
- A display name

Adhere to the following rules when choosing filenames:
Expand Down Expand Up @@ -126,7 +126,9 @@ Add the icon to the `icons.json` file. There are four lines for each icon:
1. Path: The path in the `assets` directory to the icon
1. Name: The display name that will be shown in the final markdown file
1. A link to the source where you found the SVG file
1. A link to the brand's guidelines, if any exist (otherwise leave blank)
1. A link to the brand's guidelines
- If none exist, leave blank
- The guidelines may be the same as the source
When adding to the `icons.json` file, use the following guidelines:
Expand Down Expand Up @@ -164,7 +166,7 @@ A full example is below:
1. Increment the version number in `package.json` to match a new git tag
1. Do git work
```
git add
git add .
git commit -m "Text goes here"
git push
git tag -a X.Y.Z -m "X.Y.Z - Text goes here"
Expand Down
3 changes: 1 addition & 2 deletions scripts/convert_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
with open("icons.json", "r") as json_file:
data = json.load(json_file)


# Setup the Markdown table
x = PrettyTable()
x.set_style(MARKDOWN)
Expand Down Expand Up @@ -69,7 +68,7 @@
print(x, file=md_output)
md_output.close()

# Print XML (their XML is actually just JSON wrapped in a single XML tag)
# Print XML (Diagram.net's XML is actually just JSON wrapped in a single XML tag)
with open("homelab-svg-assets.xml", "w") as xml_output:
print("<mxlibrary>"+json_dump+"</mxlibrary>", file=xml_output)
xml_output.close()

0 comments on commit 16b7d4c

Please sign in to comment.