From 8baa24eeb5ec859450b13dc95231ec94cbedd16d Mon Sep 17 00:00:00 2001 From: Chris Chinchilla Date: Mon, 20 Nov 2023 13:58:17 +0100 Subject: [PATCH] Try dependency updates again and remove rogue JS file This reverts commit e8cd9e04c4da25ce74e07f115b5788c382260dd4. --- package.json | 6 ++--- src/pages/courses.astro | 2 +- src/pages/podcast/convert.js | 50 ------------------------------------ 3 files changed, 4 insertions(+), 54 deletions(-) delete mode 100644 src/pages/podcast/convert.js diff --git a/package.json b/package.json index cc8e7cb6..3fb77d1b 100644 --- a/package.json +++ b/package.json @@ -6,14 +6,14 @@ "scripts": { "dev": "astro dev", "start": "astro dev", - "build": "astro build", + "build": "astro build --verbose", "preview": "astro preview", "astro": "astro", "format": "prettier -w .", "lint:eslint": "eslint . --ext .js,.ts,.astro" }, "dependencies": { - "@astropub/md": "https://gitpkg.now.sh/kizu/md/packages/md?astro-update", + "@astropub/md": "0.3.0", "@astrojs/react": "^3.0.5", "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", @@ -43,7 +43,7 @@ "astro": "^3.5.5", "astro-compress": "^2.2.3", "astro-icon": "^0.8.1", - "eslint": "^8.53.0", + "eslint": "^8.54.0", "eslint-plugin-astro": "^0.29.1", "eslint-plugin-jsx-a11y": "^6.8.0", "limax": "4.1.0", diff --git a/src/pages/courses.astro b/src/pages/courses.astro index afba6c96..786abef9 100644 --- a/src/pages/courses.astro +++ b/src/pages/courses.astro @@ -4,7 +4,7 @@ import Headline from '~/components/blog/Headline.astro'; import Course from '../components/Course.astro'; import { getCollection } from 'astro:content'; const courseAV = await getCollection('av', ({ data }) => { - return data.av_type !== 'course'; + return data.video_type !== 'course'; }); const meta = { title: 'Courses', diff --git a/src/pages/podcast/convert.js b/src/pages/podcast/convert.js deleted file mode 100644 index 941b033b..00000000 --- a/src/pages/podcast/convert.js +++ /dev/null @@ -1,50 +0,0 @@ -var fs = require('fs'); -const { XMLParser } = require('fast-xml-parser'); - -function slugify(str) { - str = str.replace(/^\s+|\s+$/g, ''); - - // Make the string lowercase - str = str.toLowerCase(); - - // Remove accents, swap ñ for n, etc - var from = 'ÁÄÂÀÃÅČÇĆĎÉĚËÈÊẼĔȆÍÌÎÏŇÑÓÖÒÔÕØŘŔŠŤÚŮÜÙÛÝŸŽáäâàãåčçćďéěëèêẽĕȇíìîïňñóöòôõøðřŕšťúůüùûýÿžþÞĐđßÆa·/_,:;'; - var to = 'AAAAAACCCDEEEEEEEEIIIINNOOOOOORRSTUUUUUYYZaaaaaacccdeeeeeeeeiiiinnooooooorrstuuuuuyyzbBDdBAa------'; - for (var i = 0, l = from.length; i < l; i++) { - str = str.replace(new RegExp(from.charAt(i), 'g'), to.charAt(i)); - } - - // Remove invalid chars - str = str - .replace(/[^a-z0-9 -]/g, '') - // Collapse whitespace and replace by - - .replace(/\s+/g, '-') - // Collapse dashes - .replace(/-+/g, '-'); - - return str; -} - -const options = { - ignoreAttributes: false, - stopNodes: ['root.itunes:title'], - attributeNamePrefix: 'att_', - removeNSPrefix: true, -}; -const parser = new XMLParser(options); - -fetch('https://feeds.zencastr.com/f/h5h0nhAi.rss') - .then((feedTest) => { - feedTest.text().then((rssFeedData) => { - let parsedFeed = parser.parse(rssFeedData); - const allEpisodes = parsedFeed.rss.channel.item; - allEpisodes.forEach((episode) => { - let episodeTitle = slugify(episode.title[0]); - let createStream = fs.createWriteStream(`${episodeTitle}.md`); - createStream.end(); - }); - }); - }) - .catch(function (err) { - console.log('Unable to fetch -', err); - });