From 92845a6ad74257e6602ca1d95daedd378bc484fb Mon Sep 17 00:00:00 2001 From: Tykayn Date: Mon, 8 Aug 2022 22:10:36 +0200 Subject: [PATCH] fetch recent blog posts as json in makefile --- Makefile | 9 ++++-- assets/documents/elements_carto_osm.html | 41 ++++++++++++------------ {routes => helpers}/postQzine.js | 0 helpers/tkblogPost.js | 4 +-- 4 files changed, 27 insertions(+), 27 deletions(-) rename {routes => helpers}/postQzine.js (100%) diff --git a/Makefile b/Makefile index 757fcfd..1670f2f 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,10 @@ fetchAll: wget 'https://www.cipherbliss.com/feed' -O assets/documents/cipherbliss_blog.rss wget 'https://www.cipherbliss.com/wp-json/wp/v2/posts' -O assets/documents/cipherbliss_blog.json -# wget 'https://peertube.openstreetmap.fr/feeds/videos.xml?sort=-publishedAt&isLocal=true' -O assets/documents/peertube_osm.rss -# wget 'https://wiki.openstreetmap.org/wiki/Category:FR:Traduction_incompl%C3%A8te' -O assets/documents/wiki_traductions_incompletes.html -# wget 'https://wiki.openstreetmap.org/wiki/FR:%C3%89l%C3%A9ments_cartographiques' -O assets/documents/elements_carto_osm.html + wget 'https://tykayn.fr/wp-json/wp/v2/posts' -O assets/documents/tykayn_blog_recent.json + wget 'https://qzine.fr/wp-json/wp/v2/posts' -O assets/documents/qzine_blog_recent.json + wget 'https://www.cil-gometz.org/wp-json/wp/v2/posts' -O assets/documents/qzine_blog_recent.json + wget 'https://peertube.openstreetmap.fr/feeds/videos.xml?sort=-publishedAt&isLocal=true' -O assets/documents/peertube_osm.rss + wget 'https://wiki.openstreetmap.org/wiki/Category:FR:Traduction_incompl%C3%A8te' -O assets/documents/wiki_traductions_incompletes.html + wget 'https://wiki.openstreetmap.org/wiki/FR:%C3%89l%C3%A9ments_cartographiques' -O assets/documents/elements_carto_osm.html diff --git a/assets/documents/elements_carto_osm.html b/assets/documents/elements_carto_osm.html index fe312cb..df16170 100644 --- a/assets/documents/elements_carto_osm.html +++ b/assets/documents/elements_carto_osm.html @@ -3,7 +3,7 @@ FR:Éléments cartographiques - OpenStreetMap Wiki - + \ No newline at end of file diff --git a/routes/postQzine.js b/helpers/postQzine.js similarity index 100% rename from routes/postQzine.js rename to helpers/postQzine.js diff --git a/helpers/tkblogPost.js b/helpers/tkblogPost.js index 03275fc..0a27d7e 100644 --- a/helpers/tkblogPost.js +++ b/helpers/tkblogPost.js @@ -1,6 +1,4 @@ -// import fetch from "node-fetch" -// import rp from "request-promise"; -// import $ from "cheerio"; + import fs from "fs"; import path from 'path'; import {sendPostMastodon} from './utils.js'