Use flac instead of opus as source file format

Using opus was a workaround when I still used drone for deployments.
Since it now is deployed from my local machine, having FLACs in the
repository is not that problematic.
This commit is contained in:
Simon Bruder 2021-12-17 15:30:25 +01:00
parent 2c314bc3b9
commit 14ff4a39a6
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
7 changed files with 7 additions and 16 deletions

2
.gitattributes vendored
View file

@ -1,5 +1,5 @@
*.jpg filter=lfs diff=lfs merge=lfs -text *.jpg filter=lfs diff=lfs merge=lfs -text
content/*.opus filter=lfs diff=lfs merge=lfs -text content/*.flac filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text *.png filter=lfs diff=lfs merge=lfs -text
content/imprint-email.svg filter=lfs diff=lfs merge=lfs -text content/imprint-email.svg filter=lfs diff=lfs merge=lfs -text
static/favicon.ico filter=lfs diff=lfs merge=lfs -text static/favicon.ico filter=lfs diff=lfs merge=lfs -text

View file

@ -1,6 +1,6 @@
from subprocess import run
import json import json
import time import time
from subprocess import run
ACRONYM = "sch" ACRONYM = "sch"
@ -22,14 +22,11 @@ FORMATS = {
def path_to_episode(name, format): def path_to_episode(name, format):
if format in ["original", "txt", "md"]: if format in ["flac", "md"]:
base = "content" base = "content"
else: else:
base = "static/episodes" base = "static/episodes"
if format == "original":
format = "opus"
return f"{base}/{name}.{format}" return f"{base}/{name}.{format}"

View file

@ -2,8 +2,8 @@ base_url = "https://schulischer-schabernack.de"
compile_sass = true compile_sass = true
default_language = "de" default_language = "de"
feed_filename = "rss.xml" feed_filename = "rss.xml"
# source opus files are not published # source files are not published
ignored_content = ["sch???-*.opus", "sch???-*.txt"] ignored_content = ["sch???-*.flac"]
title = "Schulischer Schabernack" title = "Schulischer Schabernack"
description = ''' description = '''

Binary file not shown.

BIN
content/sch002-noch-mehr-boilerplate.opus (Stored with Git LFS)

Binary file not shown.

View file

@ -18,7 +18,7 @@ import common
def encode_episode(podcast, episode, format): def encode_episode(podcast, episode, format):
format, options = format format, options = format
infile = common.path_to_episode(episode["file_base"], "original") infile = common.path_to_episode(episode["file_base"], "flac")
outfile = common.path_to_episode(episode["file_base"], format) outfile = common.path_to_episode(episode["file_base"], format)
content_file = common.path_to_episode(episode["file_base"], "md") content_file = common.path_to_episode(episode["file_base"], "md")

View file

@ -40,7 +40,7 @@ for file in sorted(glob(f"content/{common.ACRONYM}*.md")):
metadata[episode] = {} metadata[episode] = {}
metadata[episode]["duration"] = common.sexagesimal( metadata[episode]["duration"] = common.sexagesimal(
float(common.get_episode_info(episode, "original")["duration"]) float(common.get_episode_info(episode, "flac")["duration"])
) )
metadata[episode]["formats"] = {} metadata[episode]["formats"] = {}