mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2025-01-13 07:33:53 +08:00
.
This commit is contained in:
parent
f77bf6c3ec
commit
20a1fc0556
@ -54,20 +54,14 @@ def calc_uid_times(inf):
|
||||
return everytimes
|
||||
|
||||
|
||||
def spliteverygameinmothon(yearinfos):
|
||||
allmonths = []
|
||||
for uid in yearinfos:
|
||||
everydays = split_range_into_days(yearinfos, uidx=uid)
|
||||
everymonth = group_by_month(everydays)
|
||||
|
||||
|
||||
def getthisyearinfo(allinfos):
|
||||
current_year = datetime.now().year
|
||||
current_year = datetime.now().year * 12 + datetime.now().month
|
||||
yearinfos = {}
|
||||
for uid, ls in allinfos.items():
|
||||
yearinfos[uid] = []
|
||||
for s, e in ls:
|
||||
if datetime.fromtimestamp(s).year == current_year:
|
||||
date = datetime.fromtimestamp(s)
|
||||
if date.year * 12 + date.month + 12 >= current_year:
|
||||
yearinfos[uid].append((s, e))
|
||||
if len(yearinfos[uid]) == 0:
|
||||
yearinfos.pop(uid)
|
||||
@ -122,11 +116,11 @@ def getuidimage_local(uid):
|
||||
if (main in savehook_new_data[uid]["imagepath_all"]) and os.path.exists(
|
||||
extradatas["localedpath"].get(main, main)
|
||||
):
|
||||
return os.path.abspath(main)
|
||||
return os.path.abspath(extradatas["localedpath"].get(main, main))
|
||||
else:
|
||||
for _ in savehook_new_data[uid]["imagepath_all"]:
|
||||
if os.path.exists(extradatas["localedpath"].get(_, _)):
|
||||
return os.path.abspath(_)
|
||||
return os.path.abspath(extradatas["localedpath"].get(_, _))
|
||||
|
||||
|
||||
def getuidimage(uid):
|
||||
|
@ -13,13 +13,18 @@
|
||||
.page {
|
||||
display: none;
|
||||
}
|
||||
.vboxlayout{
|
||||
display: flex; flex-direction: column;
|
||||
|
||||
.vboxlayout {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.hboxlayout{
|
||||
display: flex; flex-direction: row;
|
||||
|
||||
.hboxlayout {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
}
|
||||
|
||||
.active {
|
||||
display: block;
|
||||
}
|
||||
@ -114,7 +119,7 @@
|
||||
.imagecontainer {
|
||||
width: 20%;
|
||||
height: auto;
|
||||
aspect-ratio: 1 / 1.618;
|
||||
aspect-ratio: 1 / 1.5;
|
||||
}
|
||||
|
||||
.imagexx {
|
||||
@ -161,23 +166,32 @@
|
||||
</div>
|
||||
<div class="page bigbox" id="page2">
|
||||
<div class="vboxlayout" style="height: 100%;">
|
||||
<h1 style="text-align: center; flex:1">你所玩的游戏的标签</h1>
|
||||
<div style="flex:10;"><div id="wordcloud"></div></div></div>
|
||||
<h1 style="text-align: center; flex:1">你所玩的游戏的标签</h1>
|
||||
<div style="flex:10;">
|
||||
<div id="wordcloud"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page bigbox" id="page3">
|
||||
<div class="vboxlayout" style="height: 100%;">
|
||||
<h1 style="text-align: center; flex:1">你所玩的游戏的开发商</h1>
|
||||
<div style="flex:10;"><div id="wordcloud2"></div></div></div>
|
||||
<h1 style="text-align: center; flex:1">你所玩的游戏的开发商</h1>
|
||||
<div style="flex:10;">
|
||||
<div id="wordcloud2"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="buttons"> Next</div>
|
||||
<script>
|
||||
havedatamonth = []
|
||||
havedatamonth_v = []
|
||||
for (let i = 1; i <= 12; i += 1) {
|
||||
if (everymonth_time[i]) {
|
||||
havedatamonth.push(i)
|
||||
havedatamonth_v.push(everymonth_time[i] / 3600)
|
||||
let month = new Date().getMonth() + 1;
|
||||
for (let i = 0; i < 12; i += 1) {
|
||||
if (everymonth_time[month]) {
|
||||
havedatamonth.push(month)
|
||||
havedatamonth_v.push(everymonth_time[month] / 3600)
|
||||
}
|
||||
month -= 1;
|
||||
if (month == 0) month = 12;
|
||||
}
|
||||
var ctx = document.getElementById('everymonth').getContext('2d');
|
||||
let lastshowmonth = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user