fix/news-podcasts #5400

Merged
tobiasd merged 7 commits from fix/news-podcasts into master 2025-11-18 13:59:06 +00:00
Member

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.

Should close https://git.fsfe.org/FSFE/fsfe-website/issues/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](https://test.fsfe.org), so feel free to take a look there.
delliott added 4 commits 2025-10-12 16:08:22 +00:00
nushell sed command used:
```nu
for year in 2019..2025 {sed -i $'s/podcast\/transcript\//podcast\/transcript\/($year)\//g' ($'./($year)/e*.xhtml' | into glob) }
```
feat: add rewrite rules to redirect old podcast links
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
c52a565afd
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"
```
delliott requested review from bonnie 2025-10-12 16:08:29 +00:00
delliott requested review from tobiasd 2025-10-12 16:08:29 +00:00
delliott added the buildtext labels 2025-10-12 16:08:41 +00:00
tobiasd approved these changes 2025-10-13 06:05:02 +00:00
Dismissed
tobiasd left a comment
Owner

from the technical part - LGTM

from the technical part - LGTM
delliott added 1 commit 2025-10-13 12:23:24 +00:00
feat: add rewrite rules to redirect old podcast links
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
c52a565afd
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"
```
Member

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.

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.
bonnie approved these changes 2025-10-30 13:10:27 +00:00
tobiasd approved these changes 2025-11-03 08:58:27 +00:00
Dismissed
Owner

@delliott there are merge problems

@delliott there are merge problems
Author
Member

Yes, I saw that. I am fixing them now.

I was also waiting for feedback from Fritjof, just in case.

Yes, I saw that. I am fixing them now. I was also waiting for feedback from Fritjof, just in case.
delliott force-pushed fix/news-podcasts from 7e5a7cb3c9 to 2b54c4b176 2025-11-14 12:28:53 +00:00 Compare
delliott force-pushed fix/news-podcasts from 2b54c4b176 to cbffe16d6d 2025-11-17 09:12:05 +00:00 Compare
delliott changed title from WIP: fix/news-podcasts to fix/news-podcasts 2025-11-17 09:28:57 +00:00
Author
Member

Typing 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.

Typing error that should be resolved by the ruff run I did in https://git.fsfe.org/FSFE/fsfe-website/pulls/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.
Member

fritjof here to give 100% thumbs up :) 👍

fritjof here to give 100% thumbs up :) 👍
delliott force-pushed fix/news-podcasts from cbffe16d6d to b84a8af5db 2025-11-18 10:11:21 +00:00 Compare
delliott force-pushed fix/news-podcasts from b84a8af5db to aa3b77a165 2025-11-18 10:12:40 +00:00 Compare
tobiasd approved these changes 2025-11-18 13:57:07 +00:00
tobiasd merged commit 0f5dd4e558 into master 2025-11-18 13:59:06 +00:00
tobiasd deleted branch fix/news-podcasts 2025-11-18 13:59:08 +00:00
tobiasd referenced this issue from a commit 2025-11-18 13:59:09 +00:00
Sign in to join this conversation.