This episode covers how I keep track of what I'm listening to
I almost never produced this podcast as I discovered part way through that I had covered it in my show "Describing how I listen to podcasts PART 2" (HPR 2889). I'm conscious I have a tendency to repeat myself in real life, I think this is because I have such a terrible memory. Despite this I decided to continue with the episode but will go into subject in a bit more detail.
These ideas slowly evolved over time and I think some of them may now be redundant. I think I need to do some tidying.
As I've previously mention I used cordless headphones to listen to my podcasts and audiobooks. The headphones come with base transmitter which was originally plugged into my old Compaq home server. This server was generally turned on when I came home from work and turned off before going to bed. Each night I had to remember which track I was on and where about in the track. I often forgot and had to try and find the place again. This quickly became a tiresome task.
My first solution was to use some bash Kung Fu jiggery pokery to create list of files which I placed in each podcast folder. In the process I learned a bit about using bash commands.
Command used to create index
id3v2 -l *.mp3 | grep 'TIT2' | cut -c44- >> readme.txt
id3v2 -l *.mp3 | grep 'TIT2' | cut -c44- | egrep 'HPR[01][9][7-9]' >> readme.txt
id3v2 -l *.mp3 | grep 'TIT2' | cut -c44- | egrep 'HPR[1-9]' |less >> readme.txt
========================================================
========================================================
Example output
epr0006.mp3 - dosman complete
hpr0010.mp3 - linux boot process, part 1 complete
hpr0012.mp3 - zen virtulization complete
hpr0018.mp3 - book review complete
The downside of this was that at the end of each night I had to remember to update my file lists recording what I had listened to and what position I was in within the track. From time to time I had to update this list by appending the latest episodes sitting on my server using the previous id3v2 command.
As you can imagine this took up a fair amount of time and became very tiresome, I would sometimes forget to do it this would cause me a headache next time I started listening to my podcasts.
My next solution involved creating a bash script that attempted to persuade my music player moc to find the track I was previously listening to.
The script sometimes worked but it was a bit flaky and didn't always work.
My final solution is in multiple parts
The 1st part consists of a bash script and a log file, it's a handy way of checking the last podcast episode and last position, this information is recorded to the log file when the front end of moc is exited by hitting Q. Of course this doesn't work if mocp closes for any other reason ie if I forgot to hit Q or my Pi crashed.
First script
~/scripts/podcasts
quick lash up of script created 29/12/12 (DD/MM/YY)
Created to keep track of last position of listened podcast
Script displays last 4 lines of logfile "podcasts.txt"
The four lines consist of a Dashed line separator, the last recorded Track
Title, last recorded Filename and the last recorded track position.
The script then pauses and displays a message saying
press any key to continue.
Runs mocp
When the frontend of mocp exits
The script gets the current track filename
If the result is empty ie no filename then
exit with error saying (moc was not playing anything)
if not empty
append a dashed line separator, the current track title, the current
filename, the current track position to logfile it then display last 4 lines
of logfile and exits the script
So in essence I get