This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
path = "YourPath" | |
_ext = ".png" | |
for (dirpath, dirnames, filenames) in os.walk(path): | |
if '0000' + _ext in filenames: | |
print(f"{dirpath} has zero-based index") | |
for filename in list(reversed(filenames)): | |
if filename[4:] == _ext: | |
os.rename(os.path.join(dirpath, filename), os.path.join(dirpath, str(int(filename[:4]) + 1).zfill(4) + _ext)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Script for checking GND IDs. | |
# 1. Grab all GNDs from the beacon file | |
# 2. Check every GND by making a HEAD request and see whether the returned status code is 303 | |
import httplib | |
from urlparse import urlparse |