I hereby claim:
- I am patrickleweryharris on github.
- I am patrickharris (https://keybase.io/patrickharris) on keybase.
- I have a public key ASANTGdU4O7KRmtv-N7YRQOhVJjEOF3s02cILv4hgNrKBAo
To claim this, I am signing this object:
#!/usr/bin/env python | |
import argparse | |
import spotipy | |
import spotipy.util as util | |
""" | |
top_songs.py | |
See https://lewery.ca/automation/spotify-top-songs/ for detailed | |
instructions. |
alias vi='vim' | |
alias bim='vim' | |
# grep | |
alias g='grep -sr' | |
alias gg='grep -isr \!:1 *' | |
alias gx='grep -isr --exclude-dir=\!:! \!:2 *' | |
alias gp="grep --exclude='*[.py[~c]]" | |
# other |
set _document to theFile | |
-- Open a docx document in pages and auto export to PDF | |
tell application "Finder" | |
set _directory to get container of file _document | |
set _documentName to name of _document | |
-- Figure out document name without extension | |
if _documentName ends with ".docx" then ¬ | |
set _documentName to text 1 thru -6 of _documentName |
(*using terms from application "Mail" | |
on perform mail action with messages theMessages for rule theRule*) | |
-- Adapted from: http://www.markosx.com/thecocoaquest/automatically-save-attachments-in-mail-app/ | |
-- For usage instructions, see: https://lewery.ca/automation/autosave-email-attachments | |
set MainFolder to "Dropbox" -- After the current users home dir | |
set subFolder to "mail" | |
-- The folder to save the attachments in (must already exist) |
#!/usr/bin/env python | |
""" | |
Convert all saved Reddit links to Pinboard bookmarks | |
""" | |
import os | |
import argparse | |
import pinboard | |
import praw |
#!/usr/bin/env python | |
import argparse | |
import spotipy | |
import spotipy.util as util | |
""" | |
top_songs.py | |
This script requires spotipy: https://github.com/plamere/spotipy | |
Automates creation of a 'Top Songs' playlist on Spotify. |
#!/usr/bin/env python | |
import os | |
import re | |
import shutil | |
import argparse | |
""" | |
video-filer.py | |
Files TV shows in the format in the format | |
'$show$season$episode$garbage.$ext' to |
#!/bin/bash | |
# Find and open in vim (if more than one file vim will open each in it's own buffer | |
find . -iname "$1" -exec vim {} \; |
""" | |
Delete all saved posts / comments on your reddit account with PRAW. | |
See: https://lewery.ca/automation/delete-all-saved-reddit-links | |
Needs Python 3+ and Praw 5.3.0 | |
""" | |
import argparse | |
import praw |
I hereby claim:
To claim this, I am signing this object: