generate_realworld_opml.sh - sfeed_tests - sfeed tests and RSS and Atom files | |
git clone git://git.codemadness.org/sfeed_tests | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
generate_realworld_opml.sh (564B) | |
--- | |
1 #!/bin/sh | |
2 # generate OPML feed from "realworld" XML file. Could be useful for | |
3 # testing with other RSS clients etc. | |
4 # | |
5 # usage: $0 [prefix] | |
6 | |
7 prefix="$1" | |
8 | |
9 cat <<! | |
10 <?xml version="1.0" encoding="UTF-8"?> | |
11 <opml version="1.0"> | |
12 <head> | |
13 <title>OPML export from sfeed</title> | |
14 </head> | |
15 <body> | |
16 ! | |
17 | |
18 for f in input/sfeed/realworld/*; do | |
19 n="${f##*/}" | |
20 url="$prefix$n" | |
21 | |
22 # I don't care unescaped filenames could mess up this XML: | |
23 # just make sure to use sane filenames ;) | |
24 echo " <outline type=\"rss\" title=\"$n\" text=\"$n\" xml… | |
25 done | |
26 | |
27 cat <<! | |
28 </body> | |
29 </opml> | |
30 ! |