Skip to content

Instantly share code, notes, and snippets.

@mmond
Created December 24, 2008 05:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mmond/39597 to your computer and use it in GitHub Desktop.
Save mmond/39597 to your computer and use it in GitHub Desktop.
#!/bin/bash
FILENUMBER=0
printf '<?xml version="1.0" encoding="utf-8"?>
<playlist version="1" xmlns="http://xspf.org/ns/0/">
<trackList>
' > playlist.xml
for PIC in `ls | grep -i .jpg`; do
printf '
<track>
<title>&nbsp;</title>
<location>./'$PIC'</location>
</track>
' >> playlist.xml
num=$(($FILENUMBER + 1))
done
printf '
</trackList>
</playlist>
' >> playlist.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment