FOSSPicks
Spotitube
What this little tool does may be legally ambitious, depending on where you're located, but it's such a clever idea that it's worth covering. Spotitube can be asked to parse a Spotify playlist and look for each and every track from that playlist on YouTube. It then uses the awesome youtube-dl script to grab a copy of that track before then transcoding it into an audio format that you can use locally on your Linux machine. Of course, this process could well involve copyright infringement if the music isn't licensed to allow this format shifting, but it also takes into account the reality of how many people use YouTube, especially for old, rare, or unavailable material.
What's most interesting, however, is that this script can be used to legitimately bypass the lock-in you often experience with services like Spotify. If, for example, you've used Spotify for a number of years, it's likely you'll have built complex and infinitely edited playlists and collections to access from within the application itself. This is one of Spotify's best features, as is the ability to subscribe to and follow playlists created and curated by other people, often skilled musicians themselves. This script helps you extract these playlists and use them however you see fit, hopefully rebuilding the playlist with the specific tracks you buy from a DRM-free service. The script also offers lots of control over how the conversion takes place, including optional normalization, embedded lyrics, and the generation of an M3U playlist file. Perhaps its cleverest trick is being able to select the correct song on YouTube, using nothing more than the keywords it has learned from Spotify and its own algorithm (and your own Spotify account).
Project Website
https://github.com/streambinder/spotitube
Environment switcher
Environment Modules 4
With many of us now working from the same terminal in lots of different environments, one local configuration no longer fits all use cases. You might want a local build environment, for example, using environment variables, configuration files, and paths tailored for a specific version of GCC targeting a specific architecture, or you might work with lots of virtual machines locally before taking your scripts and applications to a high-performance computing platform. If you want to use your local configuration on these systems, you need some way to change the environment quickly. One option is to create different users for each of these, to copy all your configuration files back and forth before relogging into the same account, or to source each file before every switch. Environment Modules is a better way.
As implied by its name, Environment Modules enable you to create blocks of environmental variables and aliases and make them easily applicable and changeable. You could create one for the GCC example mentioned earlier, or for paths pointing to your local set of scripts. Because each would be a separate module, Environment Modules lets you pick and choose which parts to activate when you need to use them. You could start the session with GCC and a local bin
in the path, for instance, before switching the latter module to point at a bin
on a remote machine or network. Also worth noting is the excellent man page that tells you everything you need to know to get started, which could be confusing after installation, because the module
command won't be in your path until you've configured your system. All it takes is a few commands and a little time to split up your current configuration, and you'll be able to add and remove environment configuration options dynamically and atomically, as and when you need to.
Project Website
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
So Long Neofetch and Thanks for the Info
Today is a day that every Linux user who enjoys bragging about their system(s) will mourn, as Neofetch has come to an end.
-
Ubuntu 24.04 Comes with a “Flaw"
If you're thinking you might want to upgrade from your current Ubuntu release to the latest, there's something you might want to consider before doing so.
-
Canonical Releases Ubuntu 24.04
After a brief pause because of the XZ vulnerability, Ubuntu 24.04 is now available for install.
-
Linux Servers Targeted by Akira Ransomware
A group of bad actors who have already extorted $42 million have their sights set on the Linux platform.
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.
-
Kodi 21.0 Open-Source Entertainment Hub Released
After a year of development, the award-winning Kodi cross-platform, media center software is now available with many new additions and improvements.
-
Linux Usage Increases in Two Key Areas
If market share is your thing, you'll be happy to know that Linux is on the rise in two areas that, if they keep climbing, could have serious meaning for Linux's future.
-
Vulnerability Discovered in xz Libraries
An urgent alert for Fedora 40 has been posted and users should pay attention.