fix/news-podcasts #5400
Reference in New Issue
Block a user
Delete Branch "fix/news-podcasts"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Should close #2471
Move podcasts to a per year structure. This allows for them to be displayed in the archive properly and all that jazz.
This required some enhancements of the subdir script to properly handle more nesting levels, but that is all acceptable.
Also move the transcripts, to a year structure, for consistency.
I have added rewrite rules for the old locations of the podcast episodes, breakage should be minimal.
I am going to keep this as WIP until @bonnie approves it, as it is possible there are breaking issues with this I have failed to notice.
It is also deployed to test.fsfe.org, so feel free to take a look there.
nushell sed command used: ```nu for year in 2019..2025 {sed -i $'s/podcast\/transcript\//podcast\/transcript\/($year)\//g' ($'./($year)/e*.xhtml' | into glob) } ```done using ```nu glob ./news/podcast/*/*.xhtml | par-each { |file| let rel_file = $file | path relative-to $env.PWD let prev_path: string = $rel_file | sed -E "s|/[0-9]{4}/|/|g" | sed -E "s|\u{2E}[a-z]{2}\u{2E}xhtml|.html|g" let fixed_file: string = $rel_file | sed -E "s|\u{2E}[a-z]{2}\u{2E}xhtml|.html|g" $'RewriteRule ^($prev_path)$ ($fixed_file) [L,R=301]' } | uniq | sort | str join "\n" ```from the technical part - LGTM
done using ```nu glob ./news/podcast/*/*.xhtml | par-each { |file| let rel_file = $file | path relative-to $env.PWD let prev_path: string = $rel_file | sed -E "s|/[0-9]{4}/|/|g" | sed -E "s|\u{2E}[a-z]{2}\u{2E}xhtml|.html|g" let fixed_file: string = $rel_file | sed -E "s|\u{2E}[a-z]{2}\u{2E}xhtml|.html|g" $'RewriteRule ^($prev_path)$ ($fixed_file) [L,R=301]' } | uniq | sort | str join "\n" ```I cannot think of any breaking issues that come to my mind. However, I would be happy to get fritjof's feedback here as well.
@delliott there are merge problems
Yes, I saw that. I am fixing them now.
I was also waiting for feedback from Fritjof, just in case.
7e5a7cb3c9to2b54c4b1762b54c4b176tocbffe16d6dWIP: fix/news-podcaststo fix/news-podcastsTyping error that should be resolved by the ruff run I did in #5500
Do not want to run newer ruff on this pr until the other is merged, as doing so would be merge conflict hell.
This has now been approved by Fritjof, so it can be merged once passing CI.
fritjof here to give 100% thumbs up :) 👍
cbffe16d6dtob84a8af5dbb84a8af5dbtoaa3b77a165