Skip to content
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

feat: update svgporn from upstream - 200+ new logos #123

Merged
merged 2 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions plugins/svgporn/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
dist
logos-main
master.zip
20 changes: 10 additions & 10 deletions plugins/svgporn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,28 @@ https://github.com/gilbarbara/logos

## How to update

(This process is very awkard, I apologize. Automating it is possible but haven't had the time)

Fetch the latest logos from the `gilbarbara/logos` repo
```sh
wget https://github.com/gilbarbara/logos/archive/refs/heads/master.zip
unzip master.zip
rm -r logos
cp -r logos-master/logos .
cp logos-master/logos.json
rm -r src/logos
cp -r logos-main/logos src/
cp logos-main/logos.json src/
```

next run the gen-classes-json.js via node
Next, copy the hardcoded classes list from [./src/classes.ts](./src/classes.ts) into a `classes.json` file inside src/ (yes this is awkward to do. I use regex to format it).

Then run the `gen-classes-json.js` via node. This will generate a `new-classes.json` file based on what's in the logos.json and the pre-existing `classes.json`.
```
node gen-classes-json.js
```

**Important!** Make sure old IDs are still the same. Only new logos should have changed ids.
The above script should print how many old vs new classes were found and output a new file: `new-classes.json`

If the file looks ok
If the file looks ok, use the `new-classes.json` file to write a new `classes.ts` file.

```
mv new-classes.json classes.json
rm master.zip
```
remove any leftover files (e.g. master.zip), test that it works ok with old models still on your local instance, and commit!

test that it works ok with old models still on your local instance, and commit!
Loading
Loading