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
#!/bin/bash | |
# Reads EXIF creation date from all .JPG files in the | |
# current directory and moves them carefully under | |
# | |
# $BASEDIR/YYYY/YYYY-MM/YYYY-MM-DD/ | |
# | |
# ...where 'carefully' means that it does not overwrite | |
# differing files if they already exist and will not delete | |
# the original file if copying fails for some reason. |
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
from mcstatus import MinecraftServer | |
with open('serverlist.txt') as f: | |
for line in f: | |
# If you know the host and port, you may skip this and use MinecraftServer("example.org", 1234) | |
server = MinecraftServer.lookup(line) | |
try: | |
# 'status' is supported by all Minecraft servers that are version 1.7 or higher. | |
status = server.status() |
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
from mcstatus import MinecraftServer | |
with open('serverlist.txt') as f: | |
for line in f: | |
# If you know the host and port, you may skip this and use MinecraftServer("example.org", 1234) | |
server = MinecraftServer.lookup(line) | |
try: | |
# 'status' is supported by all Minecraft servers that are version 1.7 or higher. | |
status = server.status() |