pttk rss PATH_TO_SITE
pttk rss OPTIONS PATH_TO_SITE
The rss renders an RSS file based on the content found in the directory tree provided. If it encounters a “blog.json” file then base of that tree it’ll use that file to generate feed content any sub directories found otherwise it’ll generate a feed based on Markdown front matter encountered in Markdown documents with corresponding html files.
pttk rss walks the file system to generate a RSS2 file. It assumes that the directory for htdocs is the base directory containing sub directories in the form of /YYYY/MM/DD/ARTICLE_HTML where YYYY/MM/DD (Year, Month, Day) corresponds to the publication date of ARTICLE_HTML.
If our htdocs folder is our document root and out blog is htdocs/myblog.
pttk rss \
-atom-link="http://blog.example.org/rss.xml" \
-base-url="http://blog.example.org" \
-channel-title="This Great Beyond" \
-channel-description="Blog to save the world" \
-channel-link="http://blog.example.org" \
htdocs >htdocs/rss.xml
This would build an RSS 2 file in htdocs/rss.xml from the articles in htdocs/myblog/YYYY/MM/DD.
What follows is are the options supported by the rss verb.
^[B|b]y\\s+(\\w|\\s|.)+[0-9][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9]$
”)
2006-01-02 15:04:05 -0700
)
2006-01-02 15:04:05 -0700
)
[0-9][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9]
”)
^#\\s+(\\w|\\s|.)+$
”)
Here’s an example for generating an RSS feed for a blog managed with “blogit” in a directory called blog.
pttk rss -channel-title="My Blog" \
-atom-link="https://blog.example.org/rss.xml" \
-base-url="https://blog.example.org" \
-channel-description="My blog, lots-O-rott" \
-channel-link="https://blog.example.org/blog" \
blog >rss.xml