In the last hackweeks and my free time, I've been developing several tools to various degrees of completion. The purpose of this hackweek is to finish three of them, publish them on github and create openSUSE packages.

  • finddupmusic

    • What it already does:
      • It's a python3 script that iterates over some directories searching for music files and stores all information (path, duration, bitrate, checksum) and tags (title, artist, album, year, cover art) on a sqlite database.
    • What I want to do:
      • Currently the script uses ffmpeg to extract tags. I want to change it to use mutagen.
      • Use pyacoustid to also extract a Chromaprint acoustic fingerprinting which in theory would be able to identify duplicate music independently of the file format/bitrate.
      • Put it on github and package it
  • watchfilesmover

    • What it already does:
      • It's a python3 script that watches (using inotify) a directory. When a new file is written, watchfilesmover moves it to another directory based on regular expressions matching the file name and the target directory. I currently use it for my media center so when I upload a file named "Whatever S02E01.mkv" to a ~/incoming directory, it's automatically moved to /media/series/Whatever/Season 2/Whatever S02E01.mkv" and even the parent directories are created if necessary. The main part of a basic configuration is a list of (pattern, targetdir, actionlist) tuples like:
    • patterns = [
      ( Module('kodi_series'),
        ('scan_library', 'rename_subtitle')
      ),
      ( '[Ww]hatever.*[ -\.][Ss](?P<season>[0-9][0-9])[Ee](?P<episode>[0-9][0-9])[ -\.].*' ,
        '/media/series/Whatever/Season \g<season_nopadding>/' ,
        ('scan_library', 'rename_subtitle')
      ),
      ( '[Ss]ome.[Oo]ther.[Ww]hatever.*[ -\.]S(?P<season>[0-9][0-9])E(?P<episode>[0-9][0-9])[ -\.].*' ,
        '/media/series/Some Other Whatever/Season \g<season_nopadding>/' ,
        ('scan_library', 'rename_subtitle')
      ),
      

      ...

    • so group regular expressions can be named and later used in the target directory. The Module('kodi_series') entry is special, because it adds a plugin which adds dynamic patterns generated from kodi's database (so the two other patterns are not really necessary, but are there only for documentation purposes). The action list is a list of action commands that are executed after the file has been moved, with the file location as a parameter (in the example, 'scanlibrary' executes a small script which does a jsonrpc call to kodi to scan the video library and 'renamesubtitle' is another small script which renames a subtitle srt file to match its associated video file).

    • What I want to do:

      • watchfilesmover is already very useful and works great, but the first copy of the file is a bit of wasted time for large files which are going to be read again and moved right away, so I want to add a mode in which the script simply creates a fuse filesystem (instead of using inotify) which would write new files directly to the target directory thus saving a copy. The directory would always appear as empty.
      • I'd like to also add some documentation, publish it in github and package it
  • imwriter

    • What it already does:
      • Drag & drop an image to an usb device
      • Update the usb devices view as usb sticks are plugged/unplugged into the system
      • Downloads disk image & write it to usb disk on-the-fly . Faster than dd!
      • Downloads checksum file from the distribution site
      • Calculates the checksum of written data, also on-the-fly
      • Checks if the PGP signature of the downloaded checksum file is valid (if present)
      • Progress percentage (on stdout)
      • All reports of checksum and pgp validity are reported on stdout
      • Downloads the list of available images from an xml file in the distribution site although by default uses a local one that gets installed (and currently the source code has to be modified if you want it to download the xml file)
    • What I want to do:

Comments

Be the first to comment!

Similar Projects

This project is one of its kind!