-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add metadata saving support to SVG. #17221
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
Conversation
dba191e
to
df57609
Compare
Scanning, it looks reasonable, but I know zip about svg. Do we have an svg expert we can call on for a review? |
Do you want to add a test-only dependency on something like https://en.wikipedia.org/wiki/RDFLib to check that the metadata is correct? Otherwise it feels a bit hard to actually check that the implementation is correct, as I don't really want to read the RDF/Dublin Core specs either :) PS: Looks like rdflib (which I just found from a quick goole search) may be one of the few python libs that is both older than matplotlib (it dates back to 2002) and still actively developed :) (I guess the winner there maybe PIL(low), which dates back to 1995, dunno if there's anything else?) |
I tried this, but rdflib won't even read the RDF from Inkscape. |
Let's perhaps consider another approach to testing to move this forward: if you write xpath queries (https://docs.python.org/3.8/library/xml.etree.elementtree.html#elementtree-xpath) testing that you can retrieve the correct metadata entries, I guess that I could be willing to believe you that the xpath queries themselves correspond to what the specs say. |
PR Summary
Reading RDF specifications is a pain, so this is somewhat reverse-engineered from what Inkscape does, and confirmed that the Matplotlib svg loads metadata in Inkscape.
PR Checklist