How to Create a Spotify Playlist from a File - spotify

I have a text file I created using fb2k text tools; Artist Name - Song Name \n(new line)
This file includes my full music library, including 85k songs.
I'd like to somehow convert this to a single or multiple Spotify Playlists.
playlist-converter.net is doing one song per second, which means it is going to take roughly 24 hours to create this playlist on that site.
Is there any way i can do this locally using some github script or maybe a site that allows you to upload a file which will convert fairly quickly?
Thanks in advance

I dont know if exists a ready-to-use script for this, but you can do it yourself, its not that hard if you know some programming language.
You can use Spotify API
https://developer.spotify.com/
For each line, you will have to call API with the name of song and Artist
https://developer.spotify.com/web-api/search-item/
So will return an JSON object, with the id of song.
For each id you will have to call api again, to include the new song
https://developer.spotify.com/web-api/add-tracks-to-playlist/
Thats it, good luck !

Related

Alexa Skill Static Audio File implementation

I have been playing around with this project from git, and so far so good.
https://github.com/bespoken/streamer
I would like to enhance it to play a long form static audio file when the user asks for it. For example, if the user asks for "Ask Streamer to Play the National Anthem", I would like to just play just that file. Does anyone have a good idea on the best way to implement this simple thing?
I tried a few approaches and I am having trouble getting the end result. For one, I do not want the data of static file to be saved on dynamodb, but still want the podcast information to be saved.
I added an Intent for 'Anthem', and sample utterances for that intent. In the constants.js file, I added a new "STATIC_MODE", and tried to replicate how PLAY_MODE is implemented through out
Here is the issue I am running into, whenever I stop the Anthem file from playing, and later invoke the Podcast Player, it starts playing The Anthem, instead of podcasts.I tried commenting out the saveState in audioEventHandlers.js for the STATIC_MODE handler, yet, when I try to play podcast, it still plays the Anthem when I ask for play podcast.
Any help would be appreciated!
This is probably bad, but I have never coded in javascript, just tried to follow the git project to enhance the functionality to my liking.
I created the Streamer project that you reference. In the interest of providing a simpler example on how to use the Alexa AudioPlayer, I also created this project:
https://github.com/bespoken/super-simple-audio-player
I believe it happens to do exactly what you requested, which is it simply plays a single, static audio file. I created this because I wanted a have a less complicated example to show people how the AudioPlayer works. Hope you find it helpful!

Api Instagram, get New comments of any media (since parameter date or id)

How can I get recent comments in my media files from a date or id?
That is, I am interested in getting all the comments of any media file that have been published since a date or a comment id that I already have.
From what I've seen I should go through each media and go through all the comments it contains to find the new ones.
But this way does not seem right to me since I would have to make many calls going through the media and its comments again and again until I find a new one.
I have also seen that the subscriptions are not yet active for the media or comments, which would be great because it is what I seek to get the new comments, instead of having to go all the way through the same in search of some new.
Is there any way to do it?
There is no API currently to automatically get new comments from a bunch of media.
You have to get new comments from single media and compare manually for dates with code using this API:
https://api.instagram.com/v1/media/{media-id}/comments?access_token=ACCESS-TOKEN
Also note that this API only returns the latest 150 comments, so if the media is very popular and gets more that 150 comments, you have to time the API call at regular intervals and check dates so you dont miss out on some new comments

get newest additions to a youtube playlist using youtube-dl

I've got a collaborative youtube playlist with some friends that we use when we get together to play games. The problem is that the internet connection where we get together is quite bad. So I made a little script where people can send songs using bluetooth or by sending a youtube link (youtube-dl downloads the mp3 file of that video using a script that uses the currently selected (youtube) link). I wanted an easier method of adding videos to the offline playlist.
I want to use the collaborative playlist to determine which songs are to be downloaded but I only want the newest additions to the playlist (since the last check/download) is it possible to retrieve the latest youtube playlist items in linux bash?
Have a look at the video selection options. In particular, --download-archive can be used for this purpose.
Simply run youtube-dl --download-archive /path/to/the/archive/file playlist_url. This will download all new songs in the playlist. If your playlist is large, you can also use --playlist-end 42 to only consider the first 42 songs.

Getting xml for a playlist - custom spotify playlist

I am looking to create a custom spotify playlist rather than use the generator via the website. I need a way of grabbing this xml, rather like the lookup and search facilities that the webAPI provide. I have tried to use a playlist spotifyURI with the lookup functionality but it doesnt seem to work.
e.g.
http://ws.spotify.com/lookup/1/?uri=spotify:user:XXX:playlist:YYY
However, using this just gives me the following error :
"You hit the rate limit, wait 10 seconds and try again"
I don't think I have really hit the hitrate, I only tried it a few times.
If this isnt the way to go, what other options are there ? libSpotify ? This seems like rather a bigger solution for just getting some xml for a playlist.
Any help appreciated.
The web API doesn't support playlist lookup at all. If you want to find playlist data, you'd have to use libspotify.

What web photo gallery software meets all my pernickety requirements?

I have a collection of photographs (about 30,000) which I'd like to put online. I've tried doing this before, over the years, with static image galleries, applications such as Gallery2, and self-rolled scripts. None have worked that well, as my requirements are fiddly, but it still seems like this should be a solved problem.
My photos are currently organised into folders named YYYY-MM-DD short album title, using Digikam.
I need a system that:
Is Free software, is essentially feature-complete, and has an active developer community.
Allows new photos and albums to be added and updated automatically with little more manual intervention than rsyncing the source directory on my computer to the web server, and rescanning.
Allows visitors to leave comments
Allows re-captcha or equivalant spam filtering and bulk moderation of these comments.
Reads tags from the IPTC Keywords field.
If it finds a tag named "friends", requires the user to enter a password to view.
If it finds a tag named "family", requires the user to enter a different password to view.
If it finds a tag named "private", does not display the photo at all, or even better, does not upload it to the live web server.
Reads descriptions from the IPTC Caption field.
Creates sane permalinks, e.g. http://example.com/2009/03/28/shortalbumtitle/IMG_0001.jpg
I acknowledge that I may be asking for something that doesn't exist, but I hope it does.
I acknowledge that answers may be something like "use Django and code the bits that don't already exist yourself", in which case do you have any tips? :)
Thanks.
Use Django and code the bits that don't already exist yourself.
Seriously. I was going to write that and was tempted not to when I saw you'd written it yourself, but it really does make the most sense if you have any familiarity with it!
I'd start with django-photologue 2. Get a basic gallery with tagging and comments working. You'll need a couple of pl's optional dependencies.
Then I'd write a custom import wrapper that allows you to rsync to a dir and update your library.
Comments are handled internally (through photologue, I think) but if not, there are plenty of comment apps that "just work". There is a recaptcha script that works as just another form field.
PIL can read IPTC
The URL structure is up to you =)
I'm finally getting around to doing this. I'm using a local python script to extract image metadata (tags, captions and timestamp) using pyexiv2, then rotate the image according to its EXIF orientation tag if appropriate, using PIL, and export a hierarchy of files to a temporary directory, where rsync uploads it to my host, and a remote python script (actually a Django app) imports the metadata into a Django DB.

Resources