add --no-images for ep3 cards.html generation
This commit is contained in:
+5
-2
@@ -1846,14 +1846,15 @@ Action a_show_ep3_cards(
|
|||||||
|
|
||||||
Action a_generate_ep3_cards_html(
|
Action a_generate_ep3_cards_html(
|
||||||
"generate-ep3-cards-html", "\
|
"generate-ep3-cards-html", "\
|
||||||
generate-ep3-cards-html [--ep3-nte] [--threads=N]\n\
|
generate-ep3-cards-html [--ep3-nte] [--threads=N] [--no-images]\n\
|
||||||
Generate an HTML file describing all Episode 3 card definitions from the\n\
|
Generate an HTML file describing all Episode 3 card definitions from the\n\
|
||||||
system/ep3 directory. If --ep3-nte is given, use the Trial Edition card\n\
|
system/ep3 directory. If --ep3-nte is given, use the Trial Edition card\n\
|
||||||
definitions instead.\n",
|
definitions instead. If --no-images is given, omit the card images.\n",
|
||||||
+[](phosg::Arguments& args) {
|
+[](phosg::Arguments& args) {
|
||||||
size_t num_threads = args.get<size_t>("threads", 0);
|
size_t num_threads = args.get<size_t>("threads", 0);
|
||||||
|
|
||||||
bool is_nte = (get_cli_version(args, Version::GC_EP3) == Version::GC_EP3_NTE);
|
bool is_nte = (get_cli_version(args, Version::GC_EP3) == Version::GC_EP3_NTE);
|
||||||
|
bool no_images = args.get<bool>("no-images");
|
||||||
|
|
||||||
auto s = make_shared<ServerState>(get_config_filename(args));
|
auto s = make_shared<ServerState>(get_config_filename(args));
|
||||||
s->load_patch_indexes(false);
|
s->load_patch_indexes(false);
|
||||||
@@ -1890,6 +1891,7 @@ Action a_generate_ep3_cards_html(
|
|||||||
bool show_large_column = false;
|
bool show_large_column = false;
|
||||||
bool show_medium_column = false;
|
bool show_medium_column = false;
|
||||||
bool show_small_column = false;
|
bool show_small_column = false;
|
||||||
|
if (!no_images) {
|
||||||
for (const auto& filename : phosg::list_directory_sorted("system/ep3/cardtex")) {
|
for (const auto& filename : phosg::list_directory_sorted("system/ep3/cardtex")) {
|
||||||
if ((filename[0] == 'C' || filename[0] == 'M' || filename[0] == 'L') && (filename[1] == '_')) {
|
if ((filename[0] == 'C' || filename[0] == 'M' || filename[0] == 'L') && (filename[1] == '_')) {
|
||||||
size_t card_id = stoull(filename.substr(2, 3), nullptr, 10);
|
size_t card_id = stoull(filename.substr(2, 3), nullptr, 10);
|
||||||
@@ -1909,6 +1911,7 @@ Action a_generate_ep3_cards_html(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
phosg::parallel_range<uint32_t>([&](uint32_t index, size_t) -> bool {
|
phosg::parallel_range<uint32_t>([&](uint32_t index, size_t) -> bool {
|
||||||
auto& info = infos[index];
|
auto& info = infos[index];
|
||||||
|
|||||||
Reference in New Issue
Block a user