This file contains hidden or 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
// ==UserScript== | |
// @icon https://gelbooru.com/favicon.ico | |
// @name Gelbooru Resize | |
// @namespace kannalo | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match *://gelbooru.com/index.php?page=post&s=view* | |
// @grant none |
This file contains hidden or 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 | |
import re | |
dir = os.getcwd() | |
for filename in os.listdir(dir): | |
match = re.search("\s\d{3}\s", filename) | |
if match: | |
num = int(match.group().strip(" ")) + 2 | |
if num < 100: | |
num = "0" + str(num) |
NewerOlder