Larvik commited on
Commit
99f08d1
·
verified ·
1 Parent(s): 41f47b1

Upload 6 files

Browse files
Files changed (6) hide show
  1. Kato_from_Chiba.png +0 -0
  2. app.py +3 -41
  3. hpgs.py +49 -0
  4. kato.png +0 -0
  5. kato_eng.png +0 -0
  6. scriptext.csv +1 -1
Kato_from_Chiba.png ADDED
app.py CHANGED
@@ -1,50 +1,11 @@
1
  import gradio as gr
2
  import sys,os
3
  sys.path.append(os.getcwd())
 
4
  from ogtxt import txt
5
  from ogtxtJ2 import txt as j2
6
  from desptxt import desp, nalz
7
 
8
- homepg='''
9
- <h2>Show JA DebugRoom text if available<br>table of Lines: Index_Jpn_Eng</h2>
10
- <u id='0pshow.htm'>html version</u><br>
11
- <u id='scriptext.csv'>Extra script text</u><br>
12
- <u id='fontall.htm'>Zangan Kanji Table</u><br>
13
- Tools<br>
14
- <u id='jpegjoin.htm'>jpegjoin js ver.</u><br>
15
-
16
- <script>
17
- const fmain='https://huggingface.co/spaces/Larvik/FF7ogLookup/resolve/main/';
18
-
19
- async function loadipy(durl) {
20
- try {
21
- const response = await fetch(fmain+durl);
22
- if (!response.ok) { throw new Error(`Response status: ${response.status}`);}
23
-
24
- var tx=await response.text();
25
- var nw = window.open('');
26
- nw.document.open();
27
- nw.document.write(tx);
28
- nw.document.close();
29
-
30
- } catch (error) {console.error(error.message);}
31
- }
32
-
33
- function lnkclk(){loadipy(this.id);}
34
-
35
- function addlnk()
36
- {
37
- var lnkz=document.getElementsByTagName('u');
38
- var ll=lnkz.length;
39
- for(var i=0;i<ll;i++)
40
- {
41
- lnkz[i].onclick=lnkclk;
42
- }
43
- }
44
- addlnk();
45
- </script>
46
- '''
47
-
48
  imgurl='https://raw.githubusercontent.com/picklejar76/kujata-data/master/metadata/makou-reactor/backgrounds/'
49
  imgext='.png'
50
 
@@ -97,7 +58,7 @@ def tblmaker(ky):
97
  def on_select(data: gr.SelectData):
98
  return tblmaker(data.value['caption'])
99
 
100
- statement = gr.HTML(homepg)
101
  with gr.Blocks() as demo:
102
  with gr.Row():
103
  for na in nalz:
@@ -106,5 +67,6 @@ with gr.Blocks() as demo:
106
  gallery = gr.Gallery(gengali(ymg),columns=4,allow_preview=False)
107
  gallery.select(on_select, None, statement)
108
  statement.render()
 
109
 
110
  demo.launch(allowed_paths=['.'])
 
1
  import gradio as gr
2
  import sys,os
3
  sys.path.append(os.getcwd())
4
+ from hpgs import homepg
5
  from ogtxt import txt
6
  from ogtxtJ2 import txt as j2
7
  from desptxt import desp, nalz
8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  imgurl='https://raw.githubusercontent.com/picklejar76/kujata-data/master/metadata/makou-reactor/backgrounds/'
10
  imgext='.png'
11
 
 
58
  def on_select(data: gr.SelectData):
59
  return tblmaker(data.value['caption'])
60
 
61
+ statement = gr.HTML(homepg[0])
62
  with gr.Blocks() as demo:
63
  with gr.Row():
64
  for na in nalz:
 
67
  gallery = gr.Gallery(gengali(ymg),columns=4,allow_preview=False)
68
  gallery.select(on_select, None, statement)
69
  statement.render()
70
+ katoshit = gr.HTML(homepg[1])
71
 
72
  demo.launch(allowed_paths=['.'])
hpgs.py ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ homepg=[
2
+ '''
3
+ <h2>Show JA DebugRoom text if available<br>table of Lines: Index_Jpn_Eng</h2>
4
+ <u id='0pshow.htm'>html version</u><br>
5
+ <a href='https://huggingface.co/spaces/Larvik/FF7ogLookup/raw/main/scriptext.csv'>Extra script text</a><br>
6
+ <u id='fontall.htm'>Zangan Kanji Table</u><br>
7
+ Tools<br>
8
+ <u id='jpegjoin.htm'>jpegjoin js ver.</u><br>
9
+
10
+ <script>
11
+ const fmain='https://huggingface.co/spaces/Larvik/FF7ogLookup/resolve/main/';
12
+
13
+ async function loadipy(durl) {
14
+ try {
15
+ const response = await fetch(fmain+durl);
16
+ if (!response.ok) { throw new Error(`Response status: ${response.status}`);}
17
+
18
+ var tx=await response.text();
19
+ var nw = window.open('');
20
+ nw.document.open();
21
+ nw.document.write(tx);
22
+ nw.document.close();
23
+
24
+ } catch (error) {console.error(error.message);}
25
+ }
26
+
27
+ function lnkclk(){loadipy(this.id);}
28
+
29
+ function addlnk()
30
+ {
31
+ var lnkz=document.getElementsByTagName('u');
32
+ var ll=lnkz.length;
33
+ for(var i=0;i<ll;i++)
34
+ {
35
+ lnkz[i].onclick=lnkclk;
36
+ }
37
+ }
38
+ addlnk();
39
+ </script>
40
+ ''','''
41
+ <h1>Masato Kato</h1>
42
+ <img src='https://huggingface.co/spaces/Larvik/FF7ogLookup/resolve/main/kato.png'><br>
43
+ <img src='https://huggingface.co/spaces/Larvik/FF7ogLookup/resolve/main/kato_eng.png'>
44
+ https://ja.wikipedia.org/wiki/加藤正人_(ゲームクリエイター)<br>
45
+ <h3>ファイナルファンタジーVII(1997年)(PlayStation): 企画・演出(ヘルプとしての飛び入り参加)</h3><br>
46
+ Most of his scripts inherited from Chiba's, including similar joke nicknames in their Debug Rooms, and only these two use "Cait" instead of "Ketcy".
47
+ <img src='https://huggingface.co/spaces/Larvik/FF7ogLookup/resolve/main/Kato_from_Chiba.png'><br>
48
+ '''
49
+ ]
kato.png ADDED
kato_eng.png ADDED
scriptext.csv CHANGED
@@ -11,7 +11,7 @@ fship_3: nojima fship_3 produce bunki evt_d evt1 cloud tifa ba red yufi ket vin
11
  fship_4: nojima fship_4 produce direct direct door door1 door2 jump k_jump evt1 evt2 cloud tifa ba red yufi ket vin cid crew boo PATH LFLG SW
12
  fship_42: kyonen fship_4 drctr ad ladd1 cloud ballet tifa red cid yufi ketcy vincent crew1 crew2 crew3
13
  fship_5: nojima fship_5 produce direct cloud tifa cid cho crew food ov_lp color water
14
- hill: masa hill dic cloud tifa black black2 black2 sky HILL PROP 445LD
15
  zz1: hiroki zz1 dic cloud tifa cid m1 l1 LIGHT
16
  zz2: hiroki zz2 dic cloud tifa cid m l1 l2 l3 door door
17
  zz3: hiroki zz3 dic cloud tifa cid m1 choko kawari kawari2 mat FIRE LIGHT
 
11
  fship_4: nojima fship_4 produce direct direct door door1 door2 jump k_jump evt1 evt2 cloud tifa ba red yufi ket vin cid crew boo PATH LFLG SW
12
  fship_42: kyonen fship_4 drctr ad ladd1 cloud ballet tifa red cid yufi ketcy vincent crew1 crew2 crew3
13
  fship_5: nojima fship_5 produce direct cloud tifa cid cho crew food ov_lp color water
14
+ hill: masa hill dic cloud tifa black black2 black2 sky HILL PROP
15
  zz1: hiroki zz1 dic cloud tifa cid m1 l1 LIGHT
16
  zz2: hiroki zz2 dic cloud tifa cid m l1 l2 l3 door door
17
  zz3: hiroki zz3 dic cloud tifa cid m1 choko kawari kawari2 mat FIRE LIGHT