amsehili / genRSS

genRSS generates an RSS 2.0 feed from media files in a directory
https://github.com/amsehili/genRSS
MIT License
123 stars 41 forks source link

FR: Specify a leading path #48

Open Jwink3101 opened 3 months ago

Jwink3101 commented 3 months ago

Right now, if I run it with something like:

genRSS -d /a/long/path/to/my/directory/

I get items like:

      <item>
         <guid>http://localhost:8080//a/long/path/to/my/directory/file1.mp3</guid>
         <link>http://localhost:8080//a/long/path/to/my/directory/file1.mp3</link>
         <title>file1</title>
         <description>file1</description>
         <pubDate>Fri, 29 Mar 2024 22:45:08 +0000</pubDate>
         <enclosure url="http://localhost:8080//a/long/path/to/my/directory/file1.mp3" type="audio/mpeg" length="79127804"/>
         <itunes:duration>3955</itunes:duration>
      </item>

This is as it says on the tin but if I want to use a different path to publish this, I now need to find/replace all "/a/long/path/to/my/directory/" to the desired actual path.

Being able to specify the leading path would be helpful.

amsehili commented 2 months ago

Hello, We keep this open for implementation. For now, if you're on a Linux-like system, you can use the following command to quickly replace the path:

sed -i 's@/a/long/path/to/my/directory/@/actual/path/on/host/@g' feed.rss