aly / recursive_checksum.py
0 likes
0 forks
1 files
Last active
A tool to generate checksums for all files in current directory and notify when mismatches with an existing file are found
| 1 | #!/usr/bin/env python |
| 2 | |
| 3 | import os |
| 4 | import json |
| 5 | from hashlib import md5 |
| 6 | |
| 7 | rootdir = os.getcwd() |
| 8 | |
| 9 | CHECKSUMS = "checksums.json" |
aly / getvideourl.py
0 likes
0 forks
1 files
Last active
A script that loads the given (list of) urls, waits for there to be a video tag on the page, then starts downloading the video using the page url as a filename (e.g http://example.com/my-show/episode-1 will produce my-show.episode-1.mp4)
| 1 | #!/usr/bin/env python3 |
| 2 | # pip install selenium, you probably want firefox as well or it won't work so good |
| 3 | |
| 4 | import contextlib |
| 5 | from selenium import webdriver |
| 6 | from selenium.webdriver.support.ui import WebDriverWait |
| 7 | from selenium.webdriver.support import expected_conditions as EC |
| 8 | from selenium.common.exceptions import TimeoutException |
| 9 | from subprocess import Popen |
| 10 | from sys import argv, stderr, stdin |
aly / start_weechat.py
0 likes
0 forks
1 files
Last active
A flask web server to start/stop weechat for a Glowing Bear connection. Intended for people who have push notifications set up in their bouncer that only come through when no clients are connected
| 1 | from flask import * |
| 2 | from subprocess import check_output, CalledProcessError |
| 3 | |
| 4 | app = Flask(__name__) |
| 5 | |
| 6 | @app.route('/') |
| 7 | def index(): |
| 8 | if request.args.get("pw", None) and request.args["pw"] == "somepassword": |
| 9 | if "start" in request.args: |
| 10 | try: |