mirror of
https://gitlab.com/parroquia-san-leandro/cancionero-web.git
synced 2024-12-22 08:43:33 +01:00
Create pretty-named songs and added navigation bar
This commit is contained in:
parent
ae5e6b6cf0
commit
8528131948
2 changed files with 15 additions and 0 deletions
|
@ -9,6 +9,13 @@
|
|||
<body>
|
||||
<header>
|
||||
<h1>Cancionero San Leandro</h1>
|
||||
<nav class="nav">
|
||||
<ul>
|
||||
<li><a href="https://sanleandro-obispo.net/">Parroquia San Leandro</a></li>
|
||||
<li><a href="https://nube.sanleandro-obispo.net/s/X23Jzz5A6dpCfr2">Grabaciones</a></li>
|
||||
<li><a href="https://sanleandro-obispo.net/cancionero/">Cancionero en PDF</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
<main>
|
||||
%s
|
||||
|
|
|
@ -124,6 +124,14 @@ class SongLoader:
|
|||
memorizing = False
|
||||
replay_index = 0
|
||||
for a in find_audios(self.index):
|
||||
a_split = a.audio_file.split("/")
|
||||
renamed_dir = join(join(".", "audios"), "Canciones")
|
||||
new_name = "%03d %s - %s - %s.mp3" % (
|
||||
current_song.number,
|
||||
current_song.name,
|
||||
current_song.author if current_song.author else "-",
|
||||
a.date.strftime("%Y-%m-%d"))
|
||||
shutil.copy2("/".join(a_split[1:]), join(renamed_dir, new_name))
|
||||
current_song.add_audio(a)
|
||||
continue
|
||||
if re.match(r"\\endsong", remain):
|
||||
|
|
Loading…
Reference in a new issue