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

Initial script for generating images using a python script instead of… #1184

Merged
merged 22 commits into from
Jun 16, 2023

Conversation

lpugin
Copy link
Member

@lpugin lpugin commented May 30, 2023

This PR adds a Python script offering an alternative to the node script for generating images with Verovio outside Docker.

The Python scripts dependencies are standard ones plus:

import verovio

Both can be installed with pip

The script can be run through a new ant a new target generate-images-py (guidelines should have been built beforehand):

ant generate-images-py

@github-actions github-actions bot added Component: Build changes to build.xml (assigned automatically) Component: Utils changes to utils/**/* (assigned automatically) labels May 30, 2023
Co-authored-by: Andrew Hankinson <andrew.hankinson@gmail.com>
utils/examples/generate-examples.py Outdated Show resolved Hide resolved
utils/examples/generate-examples.py Outdated Show resolved Hide resolved
utils/examples/generate-examples.py Outdated Show resolved Hide resolved
utils/examples/generate-examples.py Outdated Show resolved Hide resolved
utils/examples/generate-examples.py Outdated Show resolved Hide resolved
utils/examples/generate-examples.py Outdated Show resolved Hide resolved
utils/examples/generate-examples.py Outdated Show resolved Hide resolved
BUILD_COMMANDLINE.md Outdated Show resolved Hide resolved
lpugin and others added 10 commits May 30, 2023 11:24
Co-authored-by: Andrew Hankinson <andrew.hankinson@gmail.com>
Co-authored-by: Andrew Hankinson <andrew.hankinson@gmail.com>
Co-authored-by: Andrew Hankinson <andrew.hankinson@gmail.com>
Co-authored-by: Andrew Hankinson <andrew.hankinson@gmail.com>
Co-authored-by: Andrew Hankinson <andrew.hankinson@gmail.com>
Co-authored-by: Andrew Hankinson <andrew.hankinson@gmail.com>
Co-authored-by: Andrew Hankinson <andrew.hankinson@gmail.com>
Co-authored-by: Andrew Hankinson <andrew.hankinson@gmail.com>
* Since having local options is currently not used we can remove the lxml dependency for now
* The script will also fail if and example cannot be loaded or if the resulting SVG is empty
@ahankinson
Copy link
Member

@lpugin looks like there's a merge conflict now. Could you please resolve this?

…verovio-script

# Conflicts:
#	BUILD_COMMANDLINE.md
Copy link
Member

@musicEnfanthen musicEnfanthen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @lpugin. Tested locally and works great. Some minor suggestions below.

utils/examples/generate-examples.py Show resolved Hide resolved
build.xml Show resolved Hide resolved
lpugin and others added 2 commits May 30, 2023 19:24
Co-authored-by: Stefan Münnich <stefan.muennich@unibas.ch>
Co-authored-by: Stefan Münnich <stefan.muennich@unibas.ch>
@musicEnfanthen musicEnfanthen added this to the MEI 5.0 milestone May 30, 2023
utils/examples/generate-examples.py Outdated Show resolved Hide resolved
utils/examples/generate-examples.py Outdated Show resolved Hide resolved
utils/examples/generate-examples.py Outdated Show resolved Hide resolved
utils/examples/generate-examples.py Outdated Show resolved Hide resolved
utils/examples/generate-examples.py Show resolved Hide resolved
utils/examples/generate-examples.py Show resolved Hide resolved
utils/examples/generate-examples.py Show resolved Hide resolved
lpugin and others added 5 commits May 31, 2023 08:45
Co-authored-by: Andrew Hankinson <andrew.hankinson@gmail.com>
Co-authored-by: Andrew Hankinson <andrew.hankinson@gmail.com>
Co-authored-by: Andrew Hankinson <andrew.hankinson@gmail.com>
Co-authored-by: Andrew Hankinson <andrew.hankinson@gmail.com>
@bwbohl
Copy link
Member

bwbohl commented Jun 13, 2023

@musicEnfanthen is this also tested in the docker-mei container?

@musicEnfanthen
Copy link
Member

@bwbohl I was able to execute the target from within docker-mei, yes.

@musicEnfanthen
Copy link
Member

@ahankinson Are your requested changes addressed?

@bwbohl
Copy link
Member

bwbohl commented Jun 15, 2023

Many thanks for this I think it's much better to have a script for generating the images inside this repo and should even replace the other ant target and node.js method.

@bwbohl bwbohl merged commit b48d5cb into music-encoding:develop Jun 16, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Build changes to build.xml (assigned automatically) Component: Utils changes to utils/**/* (assigned automatically)
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants