podsync
podsync copied to clipboard
Add xsl stylesheet to xml files
For use stylesheet need add tag inside xml file:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="./feed-stylesheet.xsl"?> <------ that tag
<rss version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
<channel>
...
I looked at the mxpv/podcast packages, that need refactoring for implementation the stylesheet feature. They look outdated.
Do you want merge some updates into https://github.com/mxpv/podcast and i make refactoring after that?
We probably want to get rid of the fork and go back to the reference implementation
62b64b689e29828b0f717b4fd4f460ae4c9fe50a
just for history.
i was try to patch podcast packages but it need to make craphack over internal api or making complexity refactoring.
at now i just create bash script for patching existing xml files. it looks bad but it work and i was spend about 5 minutes. may be sometime i found motivation for do it the righ way.
grep -L "xml-stylesheet" ./data/*.xml | xargs sed -i 's/<?xml version="1.0" encoding="UTF-8"?>/<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text\/xsl" href=".\/feed-stylesheet.xsl"?>/g'