Skip to content

Instantly share code, notes, and snippets.

View unixben's full-sized avatar

Ben unixben

View GitHub Profile
@vladignatyev
vladignatyev / progress.py
Last active March 31, 2024 22:54
Python command line progress bar in less than 10 lines of code.
# The MIT License (MIT)
# Copyright (c) 2016 Vladimir Ignatev
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the Software
# is furnished to do so, subject to the following conditions:
#
@groves
groves / add_to_itunes.py
Created November 20, 2010 23:41
Transcodes shows downloaded with sickbeard into a format usable on iOS and AppleTV with HandBrakeCLI and fills in their metadata with AtomicParsley
#!/usr/bin/env python
import os, re, subprocess, sys
from xml.etree import ElementTree
retag = sys.argv[1] == "retag"
if retag:
del sys.argv[1]
source = os.path.abspath(sys.argv[1])
extensionless = '.'.join(source.split('.')[:-1])