gets everything settled up to the suggest page
This commit is contained in:
parent
3e3d318134
commit
297a20f3e0
2
app.py
2
app.py
@ -329,7 +329,7 @@ def songpage(id):
|
|||||||
|
|
||||||
song_info = db.execute('''
|
song_info = db.execute('''
|
||||||
select
|
select
|
||||||
name, name_jp
|
name, name_jp, location
|
||||||
from
|
from
|
||||||
song
|
song
|
||||||
where
|
where
|
||||||
|
|||||||
@ -37,7 +37,7 @@ for song, motif, start, duration, album, track in db.execute('''
|
|||||||
|
|
||||||
# get clip filename
|
# get clip filename
|
||||||
|
|
||||||
destination = f'static/clip/{song:04}-{motif:03}.flac'
|
destination = f'static/clip/{song:04}-{motif:03}.mp3'
|
||||||
|
|
||||||
print(destination)
|
print(destination)
|
||||||
|
|
||||||
|
|||||||
@ -15,13 +15,13 @@ clipdata = pyexcel_odsr.get_data('reference_clips.ods', skip_empty_rows=True)
|
|||||||
|
|
||||||
# import song
|
# import song
|
||||||
cur.executemany(
|
cur.executemany(
|
||||||
'insert or ignore into song(id,name,name_jp) values(?, ?, ?)',
|
'insert or ignore into song(id,name,name_jp,location) values(?, ?, ?, ?)',
|
||||||
((row[0],row[3],row[4]) for row in data['Song'][1:])
|
((row[0],row[3],row[4],'' if len(row)<11 else row[10]) for row in data['Song'][1:])
|
||||||
)
|
)
|
||||||
|
|
||||||
# import album
|
# import album
|
||||||
cur.executemany(
|
cur.executemany(
|
||||||
'insert into album(id,name,date,code) values (?, ?, ?, ?)',
|
'insert into album(id,name,date,code,description,updates) values (?, ?, ?, ?, ?, ?)',
|
||||||
data['Album'][1:]
|
data['Album'][1:]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
5
db.sql
5
db.sql
@ -4,13 +4,16 @@ create table song(
|
|||||||
id int primary key,
|
id int primary key,
|
||||||
name text not null,
|
name text not null,
|
||||||
name_jp text not null,
|
name_jp text not null,
|
||||||
|
location text not null,
|
||||||
unique(name,name_jp)
|
unique(name,name_jp)
|
||||||
);
|
);
|
||||||
|
|
||||||
create table album(
|
create table album(
|
||||||
id int primary key,
|
id int primary key,
|
||||||
name text not null,
|
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
|
code char(3) not null
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
BIN
reference.ods
BIN
reference.ods
Binary file not shown.
Binary file not shown.
@ -372,6 +372,7 @@ footer{
|
|||||||
|
|
||||||
.sort-header{
|
.sort-header{
|
||||||
border-style: solid; border-top: 0; border-left: 0; border-right: 0; border-width: 1px; border-color: var(--thin-border);
|
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{
|
.sort-header.album{
|
||||||
@ -586,12 +587,14 @@ footer{
|
|||||||
display: flex; flex-direction: column;
|
display: flex; flex-direction: column;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
margin-left: 1.2rem; margin-right: 1.2rem;
|
||||||
}
|
}
|
||||||
.song-location h2{
|
.song-location h2{
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 1.2rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.entrypage-connections{
|
.entrypage-connections{
|
||||||
display: flex; flex-direction: column;
|
display: flex; flex-direction: column;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<li class="entrypage-clip">
|
<li class="entrypage-clip">
|
||||||
<audio
|
<audio
|
||||||
controls
|
controls
|
||||||
src = "{{ url_for('static', filename='clip/') }}{{ '%04d' % song_id }}-{{ '%03d' % motif_id }}.flac" type="audio/flac">
|
src = "{{ url_for('static', filename='clip/') }}{{ '%04d' % song_id }}-{{ '%03d' % motif_id }}.mp3" type="audio/flac">
|
||||||
</audio>
|
</audio>
|
||||||
<span class="clip-pointer">
|
<span class="clip-pointer">
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
<hgroup class="home-title">
|
<hgroup class="home-title">
|
||||||
<h1>The Eorzea Songbook</h1>
|
<h1>The Eorzea Songbook</h1>
|
||||||
<h3>An unofficial library of motifs in the Final Fantasy XIV soundtrack.</h3>
|
<h3>An unofficial library of motifs in the Final Fantasy XIV soundtrack.</h3>
|
||||||
<p>Last updated: 26/06/2023</p>
|
<!-- <p>Last updated: 26/06/2023</p> -->
|
||||||
</hgroup>
|
</hgroup>
|
||||||
|
|
||||||
<div class="home-nav">
|
<div class="home-nav">
|
||||||
@ -32,7 +32,7 @@
|
|||||||
<div class="entrypage-clip">
|
<div class="entrypage-clip">
|
||||||
<audio
|
<audio
|
||||||
controls
|
controls
|
||||||
src = "{{ url_for('static', filename='clip/') }}0288-024.flac" type="audio/flac">
|
src = "{{ url_for('static', filename='clip/') }}0288-024.mp3" type="audio/flac">
|
||||||
</audio>
|
</audio>
|
||||||
<span class="clip-pointer">
|
<span class="clip-pointer">
|
||||||
<img src="{{ url_for('static', filename='songicon.png') }}" alt="Song Icon" class="connection-icon"/>
|
<img src="{{ url_for('static', filename='songicon.png') }}" alt="Song Icon" class="connection-icon"/>
|
||||||
@ -43,7 +43,7 @@
|
|||||||
<div class="entrypage-clip">
|
<div class="entrypage-clip">
|
||||||
<audio
|
<audio
|
||||||
controls
|
controls
|
||||||
src = "{{ url_for('static', filename='clip/') }}0317-024.flac" type="audio/flac">
|
src = "{{ url_for('static', filename='clip/') }}0317-024.mp3" type="audio/flac">
|
||||||
</audio>
|
</audio>
|
||||||
<span class="clip-pointer">
|
<span class="clip-pointer">
|
||||||
<img src="{{ url_for('static', filename='songicon.png') }}" alt="Song Icon" class="connection-icon"/>
|
<img src="{{ url_for('static', filename='songicon.png') }}" alt="Song Icon" class="connection-icon"/>
|
||||||
@ -54,7 +54,7 @@
|
|||||||
<div class="entrypage-clip">
|
<div class="entrypage-clip">
|
||||||
<audio
|
<audio
|
||||||
controls
|
controls
|
||||||
src = "{{ url_for('static', filename='clip/') }}0294-024.flac" type="audio/flac">
|
src = "{{ url_for('static', filename='clip/') }}0294-024.mp3" type="audio/flac">
|
||||||
</audio>
|
</audio>
|
||||||
<span class="clip-pointer">
|
<span class="clip-pointer">
|
||||||
<img src="{{ url_for('static', filename='songicon.png') }}" alt="Song Icon" class="connection-icon"/>
|
<img src="{{ url_for('static', filename='songicon.png') }}" alt="Song Icon" class="connection-icon"/>
|
||||||
@ -65,7 +65,7 @@
|
|||||||
<div class="entrypage-clip">
|
<div class="entrypage-clip">
|
||||||
<audio
|
<audio
|
||||||
controls
|
controls
|
||||||
src = "{{ url_for('static', filename='clip/') }}0337-024.flac" type="audio/flac">
|
src = "{{ url_for('static', filename='clip/') }}0337-024.mp3" type="audio/flac">
|
||||||
</audio>
|
</audio>
|
||||||
<span class="clip-pointer">
|
<span class="clip-pointer">
|
||||||
<img src="{{ url_for('static', filename='songicon.png') }}" alt="Song Icon" class="connection-icon"/>
|
<img src="{{ url_for('static', filename='songicon.png') }}" alt="Song Icon" class="connection-icon"/>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<li class="entrypage-clip">
|
<li class="entrypage-clip">
|
||||||
<audio
|
<audio
|
||||||
controls
|
controls
|
||||||
src = "{{ url_for('static', filename='clip/') }}{{ '%04d' % song_id }}-{{ '%03d' % motif_id }}.flac" type="audio/flac">
|
src = "{{ url_for('static', filename='clip/') }}{{ '%04d' % song_id }}-{{ '%03d' % motif_id }}.mp3" type="audio/flac">
|
||||||
</audio>
|
</audio>
|
||||||
<span class="clip-pointer">
|
<span class="clip-pointer">
|
||||||
<img src="{{ url_for('static', filename='songicon.png') }}" alt="Song Icon" class="connection-icon"/>
|
<img src="{{ url_for('static', filename='songicon.png') }}" alt="Song Icon" class="connection-icon"/>
|
||||||
|
|||||||
BIN
templates/reference_clips.ods
Normal file
BIN
templates/reference_clips.ods
Normal file
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% for name, _ in song_info %}{{ name }}{% endfor %}
|
{% for name, _, _ in song_info %}{{ name }}{% endfor %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% set clipmode = "motif" %}
|
{% set clipmode = "motif" %}
|
||||||
@ -11,7 +11,7 @@
|
|||||||
<hgroup class="title-box">
|
<hgroup class="title-box">
|
||||||
<div class="eng-title">
|
<div class="eng-title">
|
||||||
<img src="{{ url_for('static', filename='songicon.png') }}" alt="Song Icon" />
|
<img src="{{ url_for('static', filename='songicon.png') }}" alt="Song Icon" />
|
||||||
{% for name, name_jp in song_info %}
|
{% for name, name_jp, _ in song_info %}
|
||||||
<h1>{{ name }}</h1>
|
<h1>{{ name }}</h1>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<h3 class="title-album">
|
<h3 class="title-album">
|
||||||
@ -20,7 +20,7 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
{% for name, name_jp in song_info %}
|
{% for name, name_jp, _ in song_info %}
|
||||||
{% if name_jp %}
|
{% if name_jp %}
|
||||||
<h2 class="title-jp">{{name_jp}}</h2>
|
<h2 class="title-jp">{{name_jp}}</h2>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -28,9 +28,9 @@
|
|||||||
</hgroup>
|
</hgroup>
|
||||||
|
|
||||||
|
|
||||||
<!-- Artist info -->
|
|
||||||
|
|
||||||
<div class="track-info" >
|
<div class="track-info" >
|
||||||
|
<!-- Artist info -->
|
||||||
<div class="songpage-detail">
|
<div class="songpage-detail">
|
||||||
<h2 >Artist: </h2>
|
<h2 >Artist: </h2>
|
||||||
<ul>
|
<ul>
|
||||||
@ -60,13 +60,14 @@
|
|||||||
|
|
||||||
<!-- Location -->
|
<!-- Location -->
|
||||||
|
|
||||||
{% if description %}
|
{% for _, _, location in song_info %}
|
||||||
|
{% if location %}
|
||||||
<div class="song-location">
|
<div class="song-location">
|
||||||
<h2>Used In:</h2>
|
<h2>Appearances:</h2>
|
||||||
</div>
|
<p class="songpage-location">{{ location }}</p>
|
||||||
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
<!-- Motifs -->
|
<!-- Motifs -->
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user