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.
master
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
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
content/imprint-email.svg 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 time
from subprocess import run
ACRONYM = "sch"
@ -22,14 +22,11 @@ FORMATS = {
def path_to_episode(name, format):
if format in ["original", "txt", "md"]:
if format in ["flac", "md"]:
base = "content"
else:
base = "static/episodes"
if format == "original":
format = "opus"
return f"{base}/{name}.{format}"

View File

@ -2,8 +2,8 @@ base_url = "https://schulischer-schabernack.de"
compile_sass = true
default_language = "de"
feed_filename = "rss.xml"
# source opus files are not published
ignored_content = ["sch???-*.opus", "sch???-*.txt"]
# source files are not published
ignored_content = ["sch???-*.flac"]
title = "Schulischer Schabernack"
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):
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)
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]["duration"] = common.sexagesimal(
float(common.get_episode_info(episode, "original")["duration"])
float(common.get_episode_info(episode, "flac")["duration"])
)
metadata[episode]["formats"] = {}