-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlive_makehtml.bat
211 lines (178 loc) · 9.99 KB
/
live_makehtml.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
@rem Scripts and rips by Josh (Lotte) gh:@lottehime t:@lotte_hime
@echo off
title ACNH Pattern Dump Index Site Generator
setlocal enableextensions enabledelayedexpansion
call:audieASCII
:mainFunc
set /a count = 0
set /a cntpat = 0
set /a cntpro = 0
set /a countother = -1
set "patdir=files\simple"
set "prodir=files\pro"
set "index=files\table"
set "top=files\top"
set "bot=files\bot"
set "indexout=index"
echo.
echo Removing old files . . .
echo.
echo Deleting index HTML files . . .
del !index!.html
del !indexout!.html
timeout 1 >nul
echo.
echo Getting file totals . . .
for %%a in ("!patdir!\*.nhd") do ( set /a cntpat += 1 )
for %%b in ("!prodir!\*.nhpd") do ( set /a cntpro += 1 )
echo Simple Patterns^: !cntpat!
echo PRO Patterns^: !cntpro!
timeout 1 >nul
echo.
echo Generating index HTML . . .
timeout 1 >nul
for %%i in ("!patdir!\*.nhd") do (
set /a count += 1
set "str=%%i"
set str=!str:~0,-4!
set "pngstr=!str!.png"
set "txtstr=!str!.txt"
set "qrstr=!str!.QR.png"
set "acnlstr=!str!.acnl"
echo ^<tr^> >> !index!.html
echo ^<td^> >> !index!.html
echo ^<div class="tooltip-item"^>^<a href="#"^>^<img src="" data-src="!pngstr!" width="64" height="64"^>^</a^>^</div^> >> !index!.html
echo ^</td^> >> !index!.html
echo ^<td^> >> !index!.html
echo ^<div class="tooltip-item"^>^<a href="#"^>^<img src="" data-src="!qrstr!" width="64" height="64"^>^</a^>^</div^> >> !index!.html
echo ^</td^> >> !index!.html
echo ^<td^> >> !index!.html
echo ^<a href="%%i"^>^<img src="img/download-outline.svg" width="16" height="16"^> .nh[p]d^</a^>^<br^> >> !index!.html
echo ^<a download='file' href="!qrstr!"^>^<img src="img/download-outline.svg" width="16" height="16"^> .png QR^</a^>^<br^> >> !index!.html
echo ^<a href="!acnlstr!"^>^<img src="img/download-outline.svg" width="16" height="16"^> .acnl^</a^> >> !index!.html
echo ^</td^> >> !index!.html
for /F "usebackq delims=:" %%x in ("!txtstr!") do (
echo ^<td^>%%x^</td^> >> !index!.html
)
echo ^</tr^> >> !index!.html
echo Adding simple pattern^: !count! of !cntpat!
)
set /a count = 0
for %%p in ("!prodir!\*.nhpd") do (
set /a count += 1
set "str=%%p"
set str=!str:~0,-5!
set "pngstr=!str!.png"
set "txtstr=!str!.txt"
set "qrstr=!str!.QR.png"
set "acnlstr=!str!.acnl"
echo ^<tr^> >> !index!.html
echo ^<td^> >> !index!.html
echo ^<div class="tooltip-item"^>^<a href="#"^>^<img src="" data-src="!pngstr!" width="64" height="64"^>^</a^>^</div^> >> !index!.html
echo ^</td^> >> !index!.html
echo ^<td^> >> !index!.html
echo ^<div class="tooltip-item"^>^<a href="#"^>^<img src="" data-src="!qrstr!" width="64" height="64"^>^</a^>^</div^> >> !index!.html
echo ^</td^> >> !index!.html
echo ^<td^> >> !index!.html
echo ^<a href="%%p"^>^<img src="img/download-outline.svg" width="16" height="16"^> .nh[p]d^</a^>^<br^> >> !index!.html
echo ^<a download='file' href="!qrstr!"^>^<img src="img/download-outline.svg" width="16" height="16"^> .png QR^</a^>^<br^> >> !index!.html
echo ^<a href="!acnlstr!"^>^<img src="img/download-outline.svg" width="16" height="16"^> .acnl^</a^> >> !index!.html
echo ^</td^> >> !index!.html
for /F "usebackq delims=:" %%x in ("!txtstr!") do (
echo ^<td^>%%x^</td^> >> !index!.html
)
echo ^</tr^> >> !index!.html
echo Adding PRO pattern^: !count! of !cntpro!
)
echo.
copy /b !top!.html +!index!.html +!bot!.html !indexout!.html
echo.
echo Launching page . . .
timeout 2 >nul
start !indexout!.html
goto:endFunc
:audieASCII
for /F %%a in ('echo prompt $E ^| cmd') do (
set "ESC=%%a"
)
echo.
echo !ESC![93m ##- !ESC![0m
echo !ESC![93m #+ #+#+ ACNH Pattern Dump Index Site Generator !ESC![0m
echo !ESC![93m #+#. +#+++ !ESC![0m
echo !ESC![93m -#++# +#++##. by Josh (lotte) !ESC![0m
echo !ESC![93m #+++#+ +#+++##. GitHub:@lottehime T:@lotte_hime !ESC![0m
echo !ESC![93m -#++++#####++.+-.#+ !ESC![0m
echo !ESC![93m #++-.+####+...+##-+. !ESC![0m
echo !ESC![93m -#+..+..##### .###-+ !ESC![0m
echo !ESC![93m +#+++.-######. .-#. !ESC![0m
echo !ESC![93m .#+++++++- . ...+# !ESC![0m
echo !ESC![93m +#++++++++++++--.....-+-+ !ESC![0m
echo !ESC![93m .#+++++++++-. ..++++++++-#. !ESC![0m
echo !ESC![93m +#+++++++#######+..-++++++### !ESC![0m
echo !ESC![93m .#+++++++++++++++- -#++++. .+# !ESC![0m
echo !ESC![93m .######++++++++++-----++++ ++ !ESC![0m
echo !ESC![93m ##+++++++++.. ..++- .#- !ESC![0m
echo !ESC![93m .#++++++++++. .-+++ !ESC![0m
echo !ESC![93m +#+++++++++++- .####. !ESC![0m
echo !ESC![93m ###############+-. . .. .++ !ESC![0m
echo !ESC![93m .--++#+#+ . ..+- !ESC![0m
echo !ESC![93m .+##+##- !ESC![0m
echo.
echo Beginning generation . . .
timeout 2 >nul
cls
echo.
echo !ESC![93m + .. !ESC![0m
echo !ESC![93m +++ ++#. ACNH Pattern Dump Index Site Generator !ESC![0m
echo !ESC![93m #+++ +++++ !ESC![0m
echo !ESC![93m #+++++ ++++++ by Josh (lotte) !ESC![0m
echo !ESC![93m .+++++# .++++++ GitHub:@lottehime T:@lotte_hime !ESC![0m
echo !ESC![93m ++++++++++..++++++# !ESC![0m
echo !ESC![93m ++ +######. ++##.+ !ESC![0m
echo !ESC![93m #+..++++++#+...+++#++ !ESC![0m
echo !ESC![93m +++++.+++++........+.+ !ESC![0m
echo !ESC![93m .++++++++....+++++++.++++ !ESC![0m
echo !ESC![93m +++++++#######.++++++++++++ !ESC![0m
echo !ESC![93m .#++++++++.+++. ++++++++++++# !ESC![0m
echo !ESC![93m .#+++++++++++.++ .+++ .+++ !ESC![0m
echo !ESC![93m ++++++++++++++++----- ++ !ESC![0m
echo !ESC![93m .+++++##++++++. .#++#++ !ESC![0m
echo !ESC![93m +++++++++ . . .+ !ESC![0m
echo !ESC![93m .++++++++++. ++ !ESC![0m
echo !ESC![93m .+++++++++++++. ++++++++++.++ !ESC![0m
echo !ESC![93m +++++++++++++++++. +++++++++. -Foxtrot !ESC![0m
echo !ESC![93m .++++++++. .+++++++. !ESC![0m
echo !ESC![93m +#+....#+ !ESC![0m
echo.
echo Beginning generation . . .
timeout 2 >nul
cls
echo.
echo !ESC![93m ##- !ESC![0m
echo !ESC![93m #+ #+#+ ACNH Pattern Dump Index Site Generator !ESC![0m
echo !ESC![93m #+#. +#+++ !ESC![0m
echo !ESC![93m -#++# +#++##. by Josh (lotte) !ESC![0m
echo !ESC![93m #+++#+ +#+++##. GitHub:@lottehime T:@lotte_hime !ESC![0m
echo !ESC![93m -#++++#####++.+-.#+ !ESC![0m
echo !ESC![93m #++-.+####+...+##-+. !ESC![0m
echo !ESC![93m -#+..+..##### .###-+ !ESC![0m
echo !ESC![93m +#+++.-######. .-#. !ESC![0m
echo !ESC![93m .#+++++++- . ...+# !ESC![0m
echo !ESC![93m +#++++++++++++--.....-+-+ !ESC![0m
echo !ESC![93m .#+++++++++-. ..++++++++-#. !ESC![0m
echo !ESC![93m +#+++++++#######+..-++++++### !ESC![0m
echo !ESC![93m .#+++++++++++++++- -#++++. .+# !ESC![0m
echo !ESC![93m .######++++++++++-----++++ ++ !ESC![0m
echo !ESC![93m ##+++++++++.. ..++- .#- !ESC![0m
echo !ESC![93m .#++++++++++. .-+++ !ESC![0m
echo !ESC![93m +#+++++++++++- .####. !ESC![0m
echo !ESC![93m ###############+-. . .. .++ !ESC![0m
echo !ESC![93m .--++#+#+ . ..+- !ESC![0m
echo !ESC![93m .+##+##- !ESC![0m
echo.
echo Beginning generation . . .
echo.
timeout 2 >nul
goto:mainFunc
:endFunc
exit