socratools / socranop

Soundcraft Notepad mixer tools for Linux
MIT License
8 stars 2 forks source link

Encode images as data urls for pypi #52

Closed ndim closed 3 years ago

ndim commented 3 years ago

This encodes the screenshot images into data: URLs for the text/markdown long_description, which hopefully results in HTML showing the screenshot images on the pypi socranop page.

I am not sure whether this is a good idea for pypi, and whether this has adverse effects outside of pypi.

This is just an idea, which happens to be mergeable.

As it is, pypi shows

GUI Window   GUI Window with dropdown open

which does not look nice.

TODO: The above are actually broken image links to URLs like https://warehouse-camo.ingress.cmh1.psfhosted.org/6d92dda63c273069c857705f954cbc7535765782/6775692d73637265656e73686f742d776974682d64726f70646f776e2e706e67 which just return "Not Found". Is this to be expected, or can this be fixed?

Testing this would require another test release to pypi (or test-pypi) to find out how our changes actually change the pypi socranop page.

Alternatives:

lack commented 3 years ago

I have published a test release of this as https://pypi.org/project/socranop/0.4.92a3/

ndim commented 3 years ago

...and pypi converts those images with src="data:..." to <img> elements without any src attribute, i.e. this does not work, and we can drop this PR.

lack commented 3 years ago

It's a shame - I really liked the idea!