diff --git a/app.py b/app.py index eee0bae..b2c826b 100644 --- a/app.py +++ b/app.py @@ -329,7 +329,7 @@ def songpage(id): song_info = db.execute(''' select - name, name_jp + name, name_jp, location from song where diff --git a/build_clips.py b/build_clips.py index e3c49fb..39b3fab 100644 --- a/build_clips.py +++ b/build_clips.py @@ -37,7 +37,7 @@ for song, motif, start, duration, album, track in db.execute(''' # get clip filename - destination = f'static/clip/{song:04}-{motif:03}.flac' + destination = f'static/clip/{song:04}-{motif:03}.mp3' print(destination) diff --git a/build_db.py b/build_db.py index dc0951c..d9dc4c2 100644 --- a/build_db.py +++ b/build_db.py @@ -15,13 +15,13 @@ clipdata = pyexcel_odsr.get_data('reference_clips.ods', skip_empty_rows=True) # import song cur.executemany( - 'insert or ignore into song(id,name,name_jp) values(?, ?, ?)', - ((row[0],row[3],row[4]) for row in data['Song'][1:]) + 'insert or ignore into song(id,name,name_jp,location) values(?, ?, ?, ?)', + ((row[0],row[3],row[4],'' if len(row)<11 else row[10]) for row in data['Song'][1:]) ) # import album cur.executemany( - 'insert into album(id,name,date,code) values (?, ?, ?, ?)', + 'insert into album(id,name,date,code,description,updates) values (?, ?, ?, ?, ?, ?)', data['Album'][1:] ) diff --git a/db.sql b/db.sql index ccf6219..b8f2e16 100644 --- a/db.sql +++ b/db.sql @@ -4,13 +4,16 @@ create table song( id int primary key, name text not null, name_jp text not null, + location text not null, unique(name,name_jp) ); create table album( id int primary key, name text not null, - date date not null, + date date not null, + description text not null, + updates text not null, code char(3) not null ); diff --git a/reference.ods b/reference.ods index d30978e..1cfa82e 100644 Binary files a/reference.ods and b/reference.ods differ diff --git a/reference_clips.ods b/reference_clips.ods index 0a4056f..fa33ae4 100644 Binary files a/reference_clips.ods and b/reference_clips.ods differ diff --git a/static/style.css b/static/style.css index a93e242..26f0dfc 100644 --- a/static/style.css +++ b/static/style.css @@ -372,6 +372,7 @@ footer{ .sort-header{ border-style: solid; border-top: 0; border-left: 0; border-right: 0; border-width: 1px; border-color: var(--thin-border); + font-size: calc(1.1rem + .1vw); } .sort-header.album{ @@ -586,12 +587,14 @@ footer{ display: flex; flex-direction: column; width: 100%; justify-content: center; + margin-left: 1.2rem; margin-right: 1.2rem; } .song-location h2{ text-align: center; - margin-bottom: 1.2rem; } + + .entrypage-connections{ display: flex; flex-direction: column; width: 100%; diff --git a/templates/clipget.html b/templates/clipget.html index d88e5bc..c32f5ef 100644 --- a/templates/clipget.html +++ b/templates/clipget.html @@ -1,7 +1,7 @@
  • diff --git a/templates/home.html b/templates/home.html index 7001a14..7535168 100644 --- a/templates/home.html +++ b/templates/home.html @@ -9,7 +9,7 @@

    The Eorzea Songbook

    An unofficial library of motifs in the Final Fantasy XIV soundtrack.

    -

    Last updated: 26/06/2023

    +
    @@ -32,7 +32,7 @@
    Song Icon @@ -43,7 +43,7 @@
    Song Icon @@ -54,7 +54,7 @@
    Song Icon @@ -65,7 +65,7 @@
    Song Icon diff --git a/templates/motifpageclipget.html b/templates/motifpageclipget.html index af4f8e9..094bbcb 100644 --- a/templates/motifpageclipget.html +++ b/templates/motifpageclipget.html @@ -1,7 +1,7 @@
  • Song Icon diff --git a/templates/reference_clips.ods b/templates/reference_clips.ods new file mode 100644 index 0000000..1f1ce13 Binary files /dev/null and b/templates/reference_clips.ods differ diff --git a/templates/song.html b/templates/song.html index 8426e0c..431870b 100644 --- a/templates/song.html +++ b/templates/song.html @@ -1,6 +1,6 @@ {% extends "base.html" %} {% block title %} -{% for name, _ in song_info %}{{ name }}{% endfor %} +{% for name, _, _ in song_info %}{{ name }}{% endfor %} {% endblock %} {% set clipmode = "motif" %} @@ -11,7 +11,7 @@
    Song Icon - {% for name, name_jp in song_info %} + {% for name, name_jp, _ in song_info %}

    {{ name }}

    {% endfor %}

    @@ -20,7 +20,7 @@ {% endfor %}

    - {% for name, name_jp in song_info %} + {% for name, name_jp, _ in song_info %} {% if name_jp %}

    {{name_jp}}

    {% endif %} @@ -28,9 +28,9 @@
    -
    +

    Artist:

      @@ -60,13 +60,14 @@ - {% if description %} - -
      -

      Used In:

      -
      - - {% endif %} + {% for _, _, location in song_info %} + {% if location %} +
      +

      Appearances:

      +

      {{ location }}

      +
      + {% endif %} + {% endfor %}