commit d3b37866b49fc145dbdd389fe0af9635d0f2e154
parent 61ad6aa81e564862ace97550306889e7682df584
Author: Oscar Benedito <oscar@oscarbenedito.com>
Date:   Thu, 16 Jul 2020 15:47:10 +0200

Update blogroll and add script to generate it

Diffstat:
Acreate-blogroll.py | 36++++++++++++++++++++++++++++++++++++
Mdata/blogroll.json | 116+++++++++++++++++++++----------------------------------------------------------
2 files changed, 67 insertions(+), 85 deletions(-)

diff --git a/create-blogroll.py b/create-blogroll.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python3 +# +# Create Blogroll: creates the JSON for a blogroll's page from an OMPL file. +# +# Copyright (C) 2020 Oscar Benedito +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. + +import sys +import re +import json + +entries = re.compile(r'.*<outline text=\"Blogroll\">(.*?)</outline>.*', re.DOTALL) +entry = re.compile(r'<outline type=\"rss\" text=\"(.*)\" xmlUrl=\"(.*)\" htmlUrl=\"(.*)\"/>') + +with open(sys.argv[1], 'r') as f: + inp = f.read() + +lines = re.match(entries, inp).group(1) + +out = [] +for (name, feed, html) in re.findall(entry, lines): + out.append({ "name": name, "url": html, "feed": feed }) + +print(json.dumps(out, indent=2, sort_keys=True, ensure_ascii=False)) diff --git a/data/blogroll.json b/data/blogroll.json @@ -1,126 +1,72 @@ [ { - "name": "blacklight447", - "url": "https://write.privacytools.io/my-thoughts-on-security/", - "feed": "https://write.privacytools.io/my-thoughts-on-security/feed/" - }, - { + "feed": "https://brendan.abolivier.bzh/index.xml", "name": "Brendan Abolivier", - "url": "https://brendan.abolivier.bzh/", - "feed": "https://brendan.abolivier.bzh/index.xml" + "url": "https://brendan.abolivier.bzh" }, { + "feed": "https://www.codesections.com/rss.xml", "name": "Codesections", - "url": "https://www.codesections.com/blog/", - "feed": "https://www.codesections.com/rss.xml" - }, - { - "name": "Ctrl blog", - "url": "https://www.ctrl.blog/", - "feed": "https://feed.ctrl.blog/latest.atom" - }, - { - "name": "davd.io", - "url": "https://www.davd.io/", - "feed": "https://www.davd.io/index.xml" + "url": "https://www.codesections.com/blog/" }, { - "name": "Dave Lane", - "url": "https://davelane.nz/blog", - "feed": "https://davelane.nz/rss.xml" + "feed": "https://www.davd.io/index.xml", + "name": "David Prandzioch", + "url": "https://www.davd.io" }, { + "feed": "https://desmondrivet.com/feeds/blog.rss", "name": "Desmond Rivet", - "url": "https://desmondrivet.com/blog/", - "feed": "https://desmondrivet.com/feeds/blog.rss" + "url": "https://desmondrivet.com/blog/" }, { + "feed": "https://emanuelpina.pt/index.xml", "name": "Emanuel Pina", - "url": "https://emanuelpina.pt/", - "feed": "https://emanuelpina.pt/index.xml" + "url": "https://emanuelpina.pt" }, { + "feed": "https://hacdias.com/articles/feed.xml", "name": "Henrique Dias", - "url": "https://hacdias.com/blog/", - "feed": "https://hacdias.com/blog/feed.xml" + "url": "https://hacdias.com/articles/" }, { - "name": "InfoSec Handbook", - "url": "https://infosec-handbook.eu/blog/", - "feed": "https://infosec-handbook.eu/blog/index.xml" + "feed": "https://www.paritybit.ca/feeds/sitewide-feed.xml", + "name": "Jake Bauer", + "url": "https://www.paritybit.ca/blog" }, { + "feed": "https://jlelse.blog/index.xml", "name": "Jan-Lukas Else", - "url": "https://jlelse.blog/", - "feed": "https://jlelse.blog/index.xml" - }, - { - "name": "Justin Vollmer", - "url": "https://www.justinvollmer.com/", - "feed": "https://www.justinvollmer.com/feed/" + "url": "https://jlelse.blog" }, { + "feed": "https://kevq.uk/feed", "name": "Kev Quirk", - "url": "https://kevq.uk/", - "feed": "https://kevq.uk/feed" - }, - { - "name": "Marko Saric", - "url": "https://markosaric.com/blog/", - "feed": "https://markosaric.com/blog/feed/" - }, - { - "name": "Matthias Ott", - "url": "https://matthiasott.com/", - "feed": "https://matthiasott.com/rss" + "url": "https://kevq.uk" }, { + "feed": "https://mcol.xyz/rss.xml", "name": "mcol", - "url": "https://mcol.xyz/", - "feed": "https://mcol.xyz/rss.xml" + "url": "https://mcol.xyz" }, { + "feed": "https://mikebabb.com/feed.xml", "name": "Mike Babb", - "url": "https://mikebabb.com/blog/", - "feed": "https://mikebabb.com/feed.xml" + "url": "https://mikebabb.com/blog/" }, { - "name": "NCSC Guidance Feed", - "feed": "https://www.ncsc.gov.uk/feeds/guidance.xml" + "feed": "https://mikestone.me/feed/", + "name": "Mike Stone", + "url": "https://mikestone.me" }, { + "feed": "https://blog.polynom.me/atom.xml", "name": "PapaTutuWawa", - "url": "https://blog.polynom.me/", - "feed": "https://blog.polynom.me/atom.xml" - }, - { - "name": "PINE64", - "url": "https://www.pine64.org/blog/", - "feed": "https://www.pine64.org/feed/" - }, - { - "name": "Privacy International", - "url": "https://privacyinternational.org/", - "feed": "https://privacyinternational.org/rss.xml" - }, - { - "name": "privacytools.io", - "url": "https://blog.privacytools.io/", - "feed": "https://blog.privacytools.io/rss/" + "url": "https://blog.polynom.me" }, { + "feed": "https://shivering-isles.com/feed.xml", "name": "Sheogorath", - "url": "https://shivering-isles.com/#blog", - "feed": "https://shivering-isles.com/feed.xml" - }, - { - "name": "The New Oil", - "url": "https://write.as/thenewoil/", - "feed": "https://write.as/thenewoil/feed/" - }, - { - "name": "Tutanota", - "url": "https://tutanota.com/blog/", - "feed": "https://tutanota.com/blog/feed.xml" + "url": "https://shivering-isles.com/#blog" } ]