Commit 456bfbc7 by murtaugh

fixlink

parent 180c60b2
......@@ -58,6 +58,7 @@ if __name__ == "__main__":
ap.add_argument("--password", default="3ap1p11k33snual7hr2m9nldvg1jo0si")
ap.add_argument("--page", default=None, help="fix just the page with the given name (otherwise default is to use Category:Pages with broken file links)")
ap.add_argument("--phpimportimages", default=None, help="optional: path to mw/maintenance/importImages.php. Default is to upload via the API")
ap.add_argument("--catname", default="Pages avec des liens de fichiers brisés")
args = ap.parse_args()
wiki = Site((args.wikiprotocol, args.wikihost), path=args.wikipath)
......@@ -67,4 +68,5 @@ if __name__ == "__main__":
if args.page:
fixlinks(wiki.pages[args.page], wiki, phpuploader=args.phpimportimages, user=args.user)
for page in wiki.categories["Pages with broken file links"]:
print (page.name, file=sys.stderr)
fixlinks(page, wiki, phpuploader=args.phpimportimages, user=args.user)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment