aboutsummaryrefslogtreecommitdiff
path: root/scripts/atom.js
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2019-04-28 13:18:49 +0000
committerEuAndreh <eu@euandre.org>2019-04-28 13:18:49 +0000
commit4a73dca595e57751448899053cddb958c17fe75c (patch)
tree8c1a0b9d997fc4a0531559f6b7e8102deae25f74 /scripts/atom.js
parentUpdate os-installation.sh (diff)
parentSplit vagrant cmds. (diff)
downloaddotfiles-4a73dca595e57751448899053cddb958c17fe75c.tar.gz
dotfiles-4a73dca595e57751448899053cddb958c17fe75c.tar.xz
Merge remote-tracking branch 'srht/master'
Diffstat (limited to 'scripts/atom.js')
-rw-r--r--scripts/atom.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/atom.js b/scripts/atom.js
new file mode 100644
index 0000000..878df05
--- /dev/null
+++ b/scripts/atom.js
@@ -0,0 +1,22 @@
+const RSS = require('rss');
+
+const feedName = process.argv[2];
+const feedSrc = process.argv[3];
+
+const feed = new RSS({
+ title: `Buku feed tag for '${feedName}'.`,
+ description: `Buku feed tag for ${feedName}`,
+});
+
+const items = require(feedSrc);
+items.forEach(({ title, description, uri }) => {
+ feed.item({
+ title,
+ description,
+ url: uri
+ });
+});
+
+const xml = feed.xml({indent: true});
+
+console.log(xml);