Skip to content

dufferzafar/Python-Scripts

Repository files navigation

Python-Scripts

After some initial reluctance, I've finally begun to code in Python.

Here are some of the scripts I've managed to write. Most of them are 'quick-and-dirty' and were created for a very specific use-case, so they may not be of much use as-is. But you are free to edit any of them to suit your needs.

List of scripts

0xMirror

A script to create a zero-byte mirror of an entire hard disk.

Tech: scandir

Batch Edit MP3 Metadata

Use Mutagen to modify artist tag of multiple mp3 files.

Tech: Mutagen.

Find Untagged MP3s

Find all songs in the current directory that have not been tagged with MusicBrainz IDs and optionally move them to a separate folder.

Tech: Mutagen. MBIDs.

Geeks for Geeks Scraper

Create nice PDFs from posts on Geeks for Geeks.

Tech: BeautifulSoup, Printing html to pdf using QTextDocument.

Github Contributions

Fetch all previous year contributions from Github (issues, pull requests etc.)

Tech: Basic Web Scraping using Beautiful Soup.

Goodreads Quotes

A script to download all the quotes I've liked on Goodreads. The plan was to create a offline database that I could edit.

Couldn't decide how/what to do. So this is just half-done.

Tech: BeautifulSoup to parse the webpage downloaded.

Last.fm Backup

A script to backup my last.fm scrobbles, loved/banned tracks.

Tech: XML. CSV. sqlite.

Last.fm Plays

I am an avid user of the last.fm service. These scripts interact with last.fm's API.

TopTracks.py

Creates a local playlist from Top 20 tracks of an artist.

Useful when you have a huge collection of songs and you can't decide what to listen to.

ScrobblesToday.py

View the number of songs you have listened to today.

Tech: Parse XML responses from the API. os.Walk() to find mp3 files matching the criteria.

MITx Solutions

Set of solutions to the 6.00.1x course from EdX.

https://courses.edx.org/courses/MITx/6.00.1x/3T2013/courseware/

I left the course in between, as I often do.

MusicBrainz IRC Chatlogs Downloader

Script used to download IRC Chatlogs of #musicbrainz and #musicbrainz-devel.

Tech: urllib

Networx XML Parser

Parses Networx backup XMLs and outputs the data in js format.

Tech: datetime module. XML parsing.

This script has been moved to a new repository - Internet-Usage.

Network Usage Analyst

I have a cron job setup that dumps my network usage to files.

This script reads in those files and outputs data such as data downloaded this month, data left and suggested usage.

Sphinx Linkfix

Uses the linkcheck's output file to fix links in docs.

Originally created for this issue.

Sublime Text 3 Plugins

Small Plugins that I've written/copied for sublime text.

WP XML to Octopress MD

I used this script to shift my blog from Wordpress to Octopress.

It creates individual blog posts in markdown format from a wordpress export file (XML).

Tech: XML Parsing. Namespace Dictionaries.

Releases

No releases published

Packages

No packages published

Languages