add link validation checker, which removes invalid entries

This commit is contained in:
2024-07-22 11:50:52 +02:00
parent 0870255544
commit dd60c722d8
2 changed files with 31 additions and 1 deletions

View File

@@ -37,6 +37,7 @@ def parse(**kwargs):
# parser.add_argument("--help",help = "print help")
parser.add_argument("--login",nargs=3,help = "login by specifing login and passwor by a given url",metavar=('USERNAME','PASSWORD','URL'))
parser.add_argument("--createnwview",help = "Create a VIEW for the Region Nordwest Schweiz",action="store_true")
parser.add_argument("-VC","--ValidationCheck",help = "Check if links are still valid, if not remove them",action="store_true")
args = parser.parse_args()
if args.test:
@@ -55,7 +56,8 @@ def parse(**kwargs):
login_loop(args.config,False,worker)
if args.createnwview:
createnwview("../db/sqlite3.db")
if args.ValidationCheck:
isStillValid("../db/sqlite3.db")
if len(kwargs)>0:
print("no sysargs fiven, running as a module")
vconfig = kwargs.get('config')