summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile13
-rw-r--r--deps.mk18
-rwxr-xr-xmkdeps.sh25
-rw-r--r--src/content/en/podcasts/2020/12/19/test-entry.flac.torrentbin0 -> 544 bytes
-rw-r--r--src/content/en/podcasts/2020/12/19/test-entry.oggbin0 -> 97060 bytes
-rw-r--r--src/content/en/podcasts/2020/12/19/test-entry.ogg.torrent1
-rw-r--r--src/content/en/screencasts/2021/02/07/autoqemu.webm.torrentbin0 -> 7646 bytes
-rw-r--r--src/symlinks.txt6
8 files changed, 55 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index ae9ace0..d9b2f82 100644
--- a/Makefile
+++ b/Makefile
@@ -20,13 +20,15 @@ EXEC = ./
DESTDIR =
LDLIBS =
PUBURL = public.asc.txt
+FFMFLAGS = -y -hide_banner -loglevel warning
+BASEURL = /
.SUFFIXES:
.SUFFIXES: .adoc .conf .snippets .indexentry .feedentry .sortdata .xml .txt
.SUFFIXES: .htmlbody .htmlheader .htmlfooter .htmllisting .html .links .caslinks
-.SUFFIXES: .categorydata .gz
+.SUFFIXES: .categorydata .gz .torrent .flac .ogg
.adoc.conf:
mkwb conf src/global.conf $< > $@
@@ -66,6 +68,9 @@ PUBURL = public.asc.txt
printf "%s\n" "_" | sha256sum | \
printf "%s\t%s\n" "`cut -d" " -f1`" "_"' > $@
+.flac.ogg:
+ ffmpeg $(FFMFLAGS) -i $< -ar 48000 -vn -c:a libvorbis -b:a 320k $@
+
all:
@@ -93,6 +98,7 @@ categories.htmllisting = $(categories.adoc:.adoc=.htmllisting)
categories.txt = $(categories.adoc:.adoc=.txt)
categories.xml = $(categories.adoc:.adoc=.xml)
categories.xml.gz = $(categories.adoc:.adoc=.xml.gz)
+sources.media.torrent = $(sources.media:=.torrent)
sources = \
$(sources.adoc) \
@@ -189,6 +195,7 @@ captured-assets = \
src/content/$(PUBURL) \
src/content/favicon.ico \
src/content/favicon.png \
+ $(sources.media.torrent) \
side-assets = \
src/collections/*/*/*/*/*.html.*.txt \
@@ -276,6 +283,10 @@ src/content/favicon.ico: src/content/img/favicon.svg
src/content/favicon.png: src/content/img/favicon.svg
convert src/content/img/favicon.svg $@
+$(sources.media.torrent):
+ F="`printf '%s\n' $* | cut -d/ -f3-`" && \
+ mktorrent -xfd -n $(*F) -o $@ -w "https://$(NAME)$(BASEURL)$${F}" $*
+
email.txt: meta.json
jq -r '.email' < meta.json > $@
diff --git a/deps.mk b/deps.mk
index 2ae1186..cbf049b 100644
--- a/deps.mk
+++ b/deps.mk
@@ -102,6 +102,19 @@ images.svg = \
src/content/img/logo/dark.svg \
src/content/img/logo/light.svg \
+sources.media = \
+ src/content/en/podcasts/2020/12/19/test-entry.flac \
+ src/content/en/podcasts/2020/12/19/test-entry.ogg \
+ src/content/en/screencasts/2021/02/07/autoqemu.webm \
+
+sources.tarballs = \
+ src/content/en/blog/2020/10/05/cargo2nix-demo.tar.gz \
+ src/content/en/blog/2020/10/05/cargo2nix.tar.gz \
+ src/content/en/blog/2020/10/05/swift2nix-demo.tar.gz \
+ src/content/en/blog/2020/10/05/swift2nix.tar.gz \
+ src/content/en/blog/2021/02/17/fallible.tar.gz \
+ src/content/en/screencasts/2021/02/07/autoqemu.tar.gz \
+
sources.extras = \
src/content/en/blog/2020/10/05/cargo2nix-demo.tar.gz \
src/content/en/blog/2020/10/05/cargo2nix.tar.gz \
@@ -109,6 +122,7 @@ sources.extras = \
src/content/en/blog/2020/10/05/swift2nix.tar.gz \
src/content/en/blog/2021/02/17/fallible.tar.gz \
src/content/en/podcasts/2020/12/19/test-entry.flac \
+ src/content/en/podcasts/2020/12/19/test-entry.ogg \
src/content/en/screencasts/2021/02/07/autoqemu.tar.gz \
src/content/en/screencasts/2021/02/07/autoqemu.webm \
@@ -891,6 +905,10 @@ src/content/en/podcasts/categories.html: src/content/en/podcasts/categories.html
src/content/en/screencasts/categories.html: src/content/en/screencasts/categories.htmllisting src/content/en/screencasts/categories.htmlbody
src/content/en/tils/categories.html: src/content/en/tils/categories.htmllisting src/content/en/tils/categories.htmlbody
+src/content/en/podcasts/2020/12/19/test-entry.flac.torrent: src/content/en/podcasts/2020/12/19/test-entry.flac
+src/content/en/podcasts/2020/12/19/test-entry.ogg.torrent: src/content/en/podcasts/2020/12/19/test-entry.ogg
+src/content/en/screencasts/2021/02/07/autoqemu.webm.torrent: src/content/en/screencasts/2021/02/07/autoqemu.webm
+
articles.blog.adoc = \
diff --git a/mkdeps.sh b/mkdeps.sh
index 96fb138..5a9ae5d 100755
--- a/mkdeps.sh
+++ b/mkdeps.sh
@@ -24,11 +24,23 @@ categories() {
find src/collections/*/categories.adoc | normalize
}
+media() {
+ find src/content/ \( -type f -and \! -type l \) -and \( \
+ -name '*.flac' -or \
+ -name '*.ogg' -or \
+ -name '*.webm' \
+ \)
+}
+
+tarballs() {
+ find src/content/ \( -type f -and \! -type l \) -and \( \
+ -name '*.tar.gz' \
+ \)
+}
+
extras() {
- find src/content/ -type f \
- -name '*.flac' -or \
- -name '*.webm' -or \
- -name '*.tar.gz'
+ media
+ tarballs
}
listings() {
@@ -49,6 +61,8 @@ categories | varlist 'categories.adoc'
indexes | varlist 'indexes.adoc'
indexes | sed 's|/index\.adoc$|/feed.xml|' | varlist 'feeds.xml'
find src/content/img/ -name '*.svg' | varlist 'images.svg'
+media | varlist 'sources.media'
+tarballs | varlist 'sources.tarballs'
extras | varlist 'sources.extras'
@@ -80,6 +94,9 @@ listings | sed 's/^\(.*\)\.adoc$/\1.html:\t\1.htmlheader\t\1.htmlfooter/'
listings | sed 's/^\(.*\)\.adoc$/\1.html:\t\1.htmllisting\t\1.htmlbody/'
printf '\n'
+media | sed 's/\(.*\)$/\1.torrent:\t\1/'
+printf '\n'
+
for colllink in src/collections/*; do
c="$(printf '%s' "$colllink" | normalize)"
diff --git a/src/content/en/podcasts/2020/12/19/test-entry.flac.torrent b/src/content/en/podcasts/2020/12/19/test-entry.flac.torrent
new file mode 100644
index 0000000..519fb2f
--- /dev/null
+++ b/src/content/en/podcasts/2020/12/19/test-entry.flac.torrent
Binary files differ
diff --git a/src/content/en/podcasts/2020/12/19/test-entry.ogg b/src/content/en/podcasts/2020/12/19/test-entry.ogg
new file mode 100644
index 0000000..9bf5500
--- /dev/null
+++ b/src/content/en/podcasts/2020/12/19/test-entry.ogg
Binary files differ
diff --git a/src/content/en/podcasts/2020/12/19/test-entry.ogg.torrent b/src/content/en/podcasts/2020/12/19/test-entry.ogg.torrent
new file mode 100644
index 0000000..901eac3
--- /dev/null
+++ b/src/content/en/podcasts/2020/12/19/test-entry.ogg.torrent
@@ -0,0 +1 @@
+d10:created by13:mktorrent 1.14:infod6:lengthi97060e12:x_cross_seed42:mktorrent-9934A4BD4BF787E1BD685FCE62C6057A4:name14:test-entry.ogg12:piece lengthi32768e6:pieces60:dTÝK«f^”Q_eõù]O´ðI}PúG“+'wgäË/É2áýÒ¤¢«þ³p_yæ¯_ü£6Ó!ÇSè<e8:url-list57:https://euandre.org/en/podcasts/2020/12/19/test-entry.ogge \ No newline at end of file
diff --git a/src/content/en/screencasts/2021/02/07/autoqemu.webm.torrent b/src/content/en/screencasts/2021/02/07/autoqemu.webm.torrent
new file mode 100644
index 0000000..24bfe73
--- /dev/null
+++ b/src/content/en/screencasts/2021/02/07/autoqemu.webm.torrent
Binary files differ
diff --git a/src/symlinks.txt b/src/symlinks.txt
index 84eb014..c8bac6b 100644
--- a/src/symlinks.txt
+++ b/src/symlinks.txt
@@ -38,10 +38,10 @@ static/lord-favicon.png favicon.png
static/lord-favicon.svg img/favicon.svg
resources/podcasts/2020-12-19-a-test-entry.flac en/podcasts/2020/12/19/test-entry.flac
-# resources/podcasts/2020-12-19-a-test-entry.flac.torrent en/podcasts/2020/12/19/test-entry.flac.torrent
-# resources/podcasts/2020-12-19-a-test-entry.ogg en/podcasts/2020/12/19/test-entry.ogg
+resources/podcasts/2020-12-19-a-test-entry.flac.torrent en/podcasts/2020/12/19/test-entry.flac.torrent
+resources/podcasts/2020-12-19-a-test-entry.ogg en/podcasts/2020/12/19/test-entry.ogg
resources/screencasts/2021-02-07-autoqemu-automate-installation-and-ssh-setup-of-iso-os-images.webm en/screencasts/2021/02/07/autoqemu.webm
-# resources/screencasts/2021-02-07-autoqemu-automate-installation-and-ssh-setup-of-iso-os-images.webm.torrent en/screencasts/2021/02/07/autoqemu.webm.torrent
+resources/screencasts/2021-02-07-autoqemu-automate-installation-and-ssh-setup-of-iso-os-images.webm.torrent en/screencasts/2021/02/07/autoqemu.webm.torrent
til.html en/tils/index.html