From c156a1612ec8a379d209f5926e7941d5dcfe8e90 Mon Sep 17 00:00:00 2001 From: Clemens Neudecker <952378+cneud@users.noreply.github.com> Date: Tue, 3 Sep 2024 20:03:44 +0200 Subject: [PATCH] Exclude `run_image_extraction_over_ppn_lists.py` from merge --- run_image_extraction_over_ppn_lists.py | 33 -------------------------- 1 file changed, 33 deletions(-) delete mode 100644 run_image_extraction_over_ppn_lists.py diff --git a/run_image_extraction_over_ppn_lists.py b/run_image_extraction_over_ppn_lists.py deleted file mode 100644 index a890022..0000000 --- a/run_image_extraction_over_ppn_lists.py +++ /dev/null @@ -1,33 +0,0 @@ -import os -import sys - -dir_ppn = '/home/vahid/Documents/eynollah/ppn_list.txt' - - -with open(dir_ppn) as f: - ppn_list = f.readlines() - - -ppn_list = [ind.split('\n')[0] for ind in ppn_list] - -url_main = 'https://content.staatsbibliothek-berlin.de/dc/download/zip?ppn=PPN' - -out_result = './new_results_ppns2' - - -for ppn_ind in ppn_list: - url = url_main + ppn_ind - #curl -o ./ppn.zip "https://content.staatsbibliothek-berlin.de/dc/download/zip?ppn=PPN1762638355" - os.system("curl -o "+"./PPN_"+ppn_ind+".zip"+" "+url) - os.system("unzip "+"PPN_"+ppn_ind+".zip"+ " -d "+"PPN_"+ppn_ind) - os.system("rm -rf "+"PPN_"+ppn_ind+"/*.txt") - - os.system("mkdir "+out_result+'/'+"PPN_"+ppn_ind+"_out") - os.system("mkdir "+out_result+'/'+"PPN_"+ppn_ind+"_out_images") - command_eynollah = "eynollah -m /home/vahid/Downloads/models_eynollah_renamed_savedmodel -di "+"PPN_"+ppn_ind+" "+"-o "+out_result+'/'+"PPN_"+ppn_ind+"_out "+"-eoi "+"-ep -si "+out_result+'/'+"PPN_"+ppn_ind+"_out_images" - os.system(command_eynollah) - - os.system("rm -rf "+"PPN_"+ppn_ind+".zip") - os.system("rm -rf "+"PPN_"+ppn_ind) - #sys.exit() -