TSEC NEWS: 06.05.21 Cron-Job Fehlerhaft nach PHP Update + PWA mobile + Desktop / 04.05.21 - Android App von TSECURITY 28.04.21 - NEUER SERVER // 26.04.21 ++ Download the Electron-App für tsecurity.de // Über 550 Feed-Quellen


❈ HPR3132: Keeping track of where I am

Podcasts hackerpublicradio.org

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 a reminder of the track and position I'm listening to
every time a start or stop the front end of moc

The logfile located at /home/pi/scripts/podcast.txt
podcasts.txt as of 4th October 2019 is 168KB in size and currently has 4904
lines as each entry has 4 lines this means it currently contains 1226 entries.

The 2nd script I use runs as a cron job every night at 11.01pm. This script keeps track of all the files copied to the MP3 directory of my raspberry pi, this is where I put my podcasts that I want to listen to. I can then grep the log file to see the latest version of a particular episodes that's been copied to my mp3 directory as from time to time I delete the episodes I've listened to before copying new ones in.

~/scripts/update-podcast-episode-log
 Below are the comments taken directly from my script
Created to keep track of the latest podcast episode I've
listened to it does this by logging the contents
of the mp3 directory on the raspberry pi.
The script checks the logfile exists, then checks the
podcast (mp3) directory exists, it then use the find
command to list the files in the mp3 directory and send the  listing to a log
file, a date stamp is added at the beginning of the listing.
V1 11 July 2015

Logfile located at /home/pi/files/logs/podcast-episodes.log
As of the 4th October 2019 the log file is an impressive 688Kb containing
a whopping 28,158 lines, the first entry was dated  15th July 2013

The 3rd script is also runs as a cron job every every night at 11.00pm

/home/pi/scripts/update-podcast-position-log
Below are the comments taken directly from my script
Created to log current position of current podcast
The script checks the logfile exists, then checks that mocp  is installed on
the system it then writes a timestamp, and track position information to
a logfile using moc with -Q flag to get current track position, track title
& file name
V1 Created by MrX 11th July 2015

Logfile located at /home/pi/files/logs/podcast-position.log
Size is 148Kb as of 4th October 2019 currently has a 1495 lines, the first
entry was dated 15th July 2013

Example logfile output

15:09:06:23:01 | 01:12 | Dave Morriss - HPR1811: Life and Times of a Geek part 2 (Hacker Public Radio) | hpr1811.mp3

YY:MM:DD:HH:MM | Track position (MM:SS) | ID3 track title | Filename

The 4th script is identical to the previous script but is used to update the current audiobook position to a log file, like the previous script it runs as a cron job every night.

/home/pi/scripts/update-audiobook-position-log

The 5th and final script

home/pi/scripts/logs

Was created to easily view podcast and audiobook logs The script first checks that the logfiles exists, then displays the last three lines of my podcasts and audiobooks logs so I can quickly see the most recent episode positions that were stored by the cron jobs at 11pm.

Logs are:-

/home/pi/files/logs/podcast-position.log
/home/pi/files/logs/audiobook-position.log

V1 Created by MrX 13th July 2015

V2 Updated by MrX 8th August 2015

This added an option to seach for a string in my episodes position logs to easily find out what the last episode I listened to of a particular book or podcast, the output is piped to less as numerous lines can be returned.

if more than one argument is given then it displays an error and usage message

V3 Updated by MrX 21st Jul 2017

If a single argument is given now jumps to end of list rather than beginning, this was achieved by using the +G flag with less command.

The script displays contents of logfiles

/home/pi/files/logs/podcast-position.log
/home/pi/files/logs/audiobook-position.log

Links

...


Kompletten Artikel lesen (externe Quelle: http://hackerpublicradio.org/eps.php?id=3132)

Zur Startseite

➤ Weitere Beiträge von Team Security | IT Sicherheit (tsecurity.de)

HPR3132: Keeping track of where I am

vom 559.68 Punkte
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 tendenc

Sharing Pixelopolis, a self-driving car demo from Google I/O built with TF-Lite

vom 136.43 Punkte
Posted by Miguel de Andrés-Clavera, Product Manager, Google PIIn this post, I’d like to share with you a demo we built for (and had planned to show at) Google I/O this year with TensorFlow Lite. I wish we had the opportunity to meet in person, but

HPR3161: How I manage podcast listening

vom 106.24 Punkte
Introduction I have spoken in the past about the podcast management system I have created, but have never gone into much detail about how I manage the playing of episodes. Prompted by MrX’s HPR episode hpr3132, “Keeping track of where I am” I

I/O 2017: Everything new in the Google Play Console

vom 89.15 Punkte
Posted by Vineet Buch, Director of Product Management, Google Play Apps & Games Read this in العَرَبِيَّة‎‎, Bahasa Indonesia, Deutsch, español (Latinoamérica), le français, português do Brasil, tiếng Việt,

ZombieTrackerGPS version 1.03 released: GPS and fitness tracking for Linux

vom 83.2 Punkte
Version 1.03 of ZombieTrackerGPS has been released. ZTGPS is a Linux+KDE native PIM application satisfying the same purpose as Garmin's "BaseCamp" software, which does not run on Linux. ZTGPS provides sophisticated query and sorting capabilities for GPS

HPR2963: A walk through my PifaceCAD Python code – Part 3

vom 77.26 Punkte
Code The script being discussed in this show is available for download with the previous show: cad-menu.py Functions def button0(event): Play / Pause Button Print message to lcd and toggle between play and pause for podcasts, then runs init_display to display

'Do Not Track,' the Privacy Tool Used By Millions of People, Doesn't Do Anything

vom 72.61 Punkte
An anonymous reader quotes a report from Gizmodo: When you go into the privacy settings on your browser, there's a little option there to turn on the "Do Not Track" function, which will send an invisible request on your behalf to all the websites you

Reference: TaoSecurity News

vom 72.61 Punkte
I started speaking publicly about digital security in 2000. I used to provide this information on my Web site, but since I don't keep that page up-to-date anymore, I decided to publish it here.2017 Mr. Bejtlich led a podcast titled Threat Hunting

AA20-302A: Ransomware Activity Targeting the Healthcare and Public Health Sector

vom 71.32 Punkte
Original release date: October 28, 2020SummaryThis advisory uses the MITRE Adversarial Tactics, Techniques, and Common Knowledge (ATT&CK®) version 7 framework. See the ATT&CK for Enterprise version 7 for all referenced threat actor tactics and techniques. This joint cybersecurity

ZombieTrackerGPS 1.07 released: privacy-friendly sports and fitness tracking for Linux

vom 65.37 Punkte
Version 1.07 of ZombieTrackerGPS has been released. ZTGPS is a Linux+KDE native PIM application satisfying the same purpose as Garmin's "BaseCamp" software, which does not run on Linux. ZTGPS provides sophisticated query and sorting capabilities for GPS t

How to Track Someone Live Location Using Mobile Number

vom 59.43 Punkte
Privacy is the biggest concern of everyone in today’s era. Especially when we are talking about the live location; which can be useful for someone sometime but sometimes it is very dangerous for someone. If you want to know how you can track some

ZombieTrackerGPS 1.09 released: privacy-friendly fitness and GPS tracking for Linux

vom 59.43 Punkte
Version 1.09 of ZombieTrackerGPS released. ZTGPS is a Linux+KDE native PIM application satisfying the same purpose as Garmin's "BaseCamp" software, which does not run on Linux. ZTGPS provides sophisticated query and sorting capabilities for GPS tracks.

Team Security Diskussion über HPR3132: Keeping track of where I am