pass index file to gallery/rss

(instead of trying to escape the strings inside in make & on the command
line)
This commit is contained in:
Rhiannon Morris 2020-08-04 02:25:59 +02:00
parent 161cb48d3a
commit 28fc9db3e0
6 changed files with 63 additions and 67 deletions

View file

@ -14,18 +14,16 @@ import System.FilePath (takeDirectory)
make :: Strict.Text -- ^ website root e.g. @https://gallery.niss.website@
-> Strict.Text -- ^ title
-> Strict.Text -- ^ description
-> FilePath -- ^ gallery prefix e.g. @main@
-> GalleryInfo
-> Maybe FilePath -- ^ output filename for self link
-> [(FilePath, Info)]
-> Lazy.Text
make root title desc prefix output infos =
toLazyText $ make' root title desc prefix output infos
make root ginfo output infos =
toLazyText $ make' root ginfo output infos
make' :: Strict.Text -> Strict.Text -> Strict.Text
-> FilePath -> Maybe FilePath -> [(FilePath, Info)] -> Builder
make' root title desc prefix output infos = [b|@0
make' :: Strict.Text -> GalleryInfo
-> Maybe FilePath -> [(FilePath, Info)] -> Builder
make' root (GalleryInfo {title, desc, prefix}) output infos = [b|@0
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>