diff --git a/publish.py b/publish.py
index 3636141..051ea25 100644
--- a/publish.py
+++ b/publish.py
@@ -3,6 +3,7 @@ import re
import markdown
import yaml
import shutil
+import subprocess
htmltemplate = """
@@ -76,9 +77,19 @@ for folderinfo in index['folders']:
htmlhome += "
{}".format(filename.replace('.md', '.html'), filetitle)
gmihome += "\n=> {} {}".format(filename.replace('.md', '.gmi').replace(' ', '%20'), filetitle)
- else:
+ elif fileextension == ".wav" or fileextension == ".3gp":
# sounds
+ # todo: add a property for dest file (to remove accents)
+
+ # todo use builtin library
+ subprocess.run(["ffmpeg",
+ "-i",
+ os.path.join(folderinfo['folder'], filename),
+ os.path.join('out/html', fileroot + ".mp3")])
+ htmlhome += "{}".format(filetitle, filename)
+
+ elif fileextension == ".mp3":
shutil.copy(os.path.join(folderinfo['folder'], filename), 'out/html')
htmlhome += "{}".format(filetitle, filename)