Skip to content

Instantly share code, notes, and snippets.

@raine
Created December 6, 2018 09:32
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 raine/6a7c1cb751ccbd46dabbeee8065166da to your computer and use it in GitHub Desktop.
Save raine/6a7c1cb751ccbd46dabbeee8065166da to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -euo pipefail
murobbs() {
curl -s 'https://murobbs.muropaketti.com/forums/naeytoet-tulostimet-ja-muut-lisaelaitteet.207/index.rss?prefix_id=8' |\
xml2json |\
ramda '.rss.channel.item' 'project [\title, \pubDate, \link]' 'map assoc \source \murobbs'
}
iotech() {
curl -s 'https://bbs.io-tech.fi/forums/naeytoet-ja-videotykit.31/index.rss?prefix_id=1' |\
xml2json |\
ramda '.rss.channel.item' 'project [\title, \pubDate, \link]' 'map assoc \source \iotech'
}
(murobbs && iotech) |\
ramda --slurp unnest 'sort descend (x) -> new Date(x.pubDate)' |\
html-table \
--col.title.filterable \
--col.title.cell '<a href="${link}">${title}</a>' \
--cols 'title,source,pubDate'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment