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

Sync system logos with es-theme-artbook-next #3

Merged
merged 1 commit into from Mar 12, 2022

Conversation

pkegg
Copy link
Collaborator

@pkegg pkegg commented Mar 11, 2022

Summary

System logos were pulled in ad hoc during development of the Web UI. Soon - we will be switching to the es-theme-art-boot-next theme (https://github.com/anthonycaccese/es-theme-art-book-next) across all 351ELEC devices. Ideally (at least default) ES system logos should be synced up with the web UI.

This PR adds all system logos from artbook-next. It uses a small conversion process due to some issues described below in loading directly from the artbook next installation within 351ELEC.

Issue Using Artbook SVG logos directly

Ideally, the web UI could actually load the logos directly from the artbook installation within 351ELEC and not duplicate svgs, however, there appears to be an issue. For some reason (I don't claim to be an svg expert), many of the existing artbook logos don't work properly when using in the browser with the web ui. Ex:
Screenshot from 2022-03-10 23-59-05

This is what it should look like:
Screenshot from 2022-03-11 00-00-19

Conversion Process

Manual Fix In inkscape - you can manually fix by: File->Document Properties->Resize Page To Content -> press Resize Page to drawing or selection and then save the svg file.

Automated Fix - Instead of trying to convert one by one, I came up with a very rough automated conversion process to bulk convert from artbook next using inkscape on linux. This is mostly for my reference or if anyone else wants to bulk fix these images for webui consumption.

  1. Tell inkspace to FitCanvasToDrawing for all images (https://github.com/anthonycaccese/es-theme-art-book-next/tree/main/_inc/images/systems/logos) you wish to convert.
    for img in $(ls *.svg) ; do inkscape --verb=FitCanvasToDrawing --verb=FileSave --verb=FileQuit $img ; done

  2. Use availble systems in es_systems to copy just the needed .svg files:
    cat /storage/.emulationstation/es_systems.cfg | grep -i "<name>" | sed "s/<name>//g" | sed "s|</name>|.svg|g" | awk '{$1=$1};1' | xargs -I '{}' mv '{}' ./all/

…s-theme-art-book-next

There is a small conversion process needed that can be automated using inkscape on linux to:
`for img in $(ls *.svg) ; do inkscape --verb=FitCanvasToDrawing --verb=FileSave --verb=FileQuit $img ; done`

Also - after converting you can use the available systems in es_systems to copy just the needed .svg files like this:
`cat /storage/.emulationstation/es_systems.cfg | grep -i "<name>" | sed "s/<name>//g" | sed "s|</name>|.svg|g" | awk '{$1=$1};1' | xargs -I '{}' mv '{}' ./all/`
@dhwz dhwz merged commit 0cb13df into AmberELEC:main Mar 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants