Wednesday, November 1, 2017

Dumping PDF form fields in Linux

To see form fields in a fillable PDF:
pdftk pdf-file dump_data_fields

Note the operator (dump_data_fields) comes after the PDF file name.

Monday, March 6, 2017

How to dump your Ipod

A long time ago, in a galaxy nearby, I bought into the Apple-Unix fusion. Apple scrapped their weak OS and gave birth to OS X, essentially FreeBSD with a nice GUI. And it was good. Most of my Linux command line skills directly transferred, and I could manage Macs as easily as Red Hat boxen. But then time happened. Services started collapsing into Apple proprietary services. Config files and dot files morphed into XML registries with binary fields. Apple started fixing Unix until it was broken. I got off the bandwagon.

I always kept my data in neutral formats. Text, PDF, mp3. It was easy for me to transfer my data to a new system and pick up new programs, or crusty old programs. The one clinger was an ipod nano. I used my ipod in my Toyota mainly to run playlists and be able to play music when I was out of service for streaming. I spend a lot of time in the back country so being out of service is a common thing. Despite my disillusionment with Tim Cook and his wonder watch, the ipod was and is a state of the art music player. Itunes on the other hand, followed the same degrading path as OS X, becoming less usable, unfriendly, and more buggy with each new version. This became a real problem when the 5 year old ipod started to fail. Rebuilding it from scratch would not fix the issues with it and it was time to look for a new solution. Replacing that symbiotic ecosystem was not easy as I found out.

Where are all the ipod competitors? There are a few Chinese knock offs, but the big players have all given up. Microsoft dumped the Zune. Samsung stopped making their ipod competitor. A replacement required a hardware and software combo solution. After some trial and error, including trying one of the knock offs, I settled on Music Monkey (free) and a low profile USB flash drive. I bought a 32 GB SanDisk Cruzer Fit for $11.95 on Amazon.

I do development on Linux, but I have a Win10 machine for home use and game play. Media Monkey easily imported my music files and could dump them onto the Cruzer without problems. I had everything in a single flat directory. But things were not that simple. The Toyota music head (2015) would only index up to 999 files in a directory before giving up. This meant that even through my music was all on the USB flash drive, the car did not see it all. I went back and manually organized the files into directories by artist. This improved the situation, but the car created it's index not based on the physical layout (other than the 999 file restriction), but based on MP3 metadata tags. It was able to index more of the music but not everything. The work around for that was to clean up my metadata. Not an insignificant amount of work.

The final hurdle was to get playlists working. The car did not understand the standard playlist format from Media Monkey. What I did instead was use Genre. The Genre tag is so arbitrary that it is otherwise useless. When I want to change a playlist, I first create a true playlist in media monkey, select all the files and assign the playlist name to the Genre of all the files. Boom, done! A bonus hack is start all the Genre names with AA* so they all appear in the same place at the top of the genre index. For example, AABeatles for a Beatles playlist. It took some trial and error, but I have a better, cheaper solution for offline music and have abandoned the last vestiges of the company with the flying saucer HQ.