Find Jobs
Hire Freelancers

Linux playlist generator

$30-100 USD

Completed
Posted over 18 years ago

$30-100 USD

Paid on delivery
Hello, My problem is this one : I want to create a playlist via a cron job. Inside the playlist generated, I want to put full path to songs and insert full path to sweepers at defined interval. I do not want to use a browser interface or a database and here is how I imagine it to work : 1/ the cron job will create two files including the full path to the stored files, one file per line. It will delete the old playlist destination file. 2/ the playlist generator will be started provided the variables (see below), it puts its counters ($counternb and $countersongs) to 0 3/ it starts by creating a playlist destination file and put #EXTM3U as its first line 4/ it will randomly choose a line from the songs playlist and put it in the destination playlist as its last line. It deletes the choosen line from the songs playlist (anti repeating solution). 5/ it counts $counternb +1 and $countersongs +1 6/ it continues to choose files from the songs playlist still $counternb has reached a defined value by a variable 7/ when it reaches the counter ($counternb) value, it takes randomly a line from the sweepers playlist. As the sweepers playlist will have less number of lines than the songs playlist, its line won't be deleted and the reading must loop (random repeating allowed) 8/ the $counternb is set to 0 again 9/ the generator continues till the number of $countersongs hasen't reached a defined value 10/ when $countersongs has reached a defined value it must send a signal Variables : --------- Files : 1/ songs = full path to the file containing the path to the songs file. For example: /home/user/[login to view URL] 2/ sweepers = full path to the file containing the path to the sweepers file. For example: /home/user/[login to view URL] 3/ destfile = full path to the generated playlist. For example: /home/user/[login to view URL] Counters : 1/ nbsongs = number of songs to put inside a playlist 2/ interval = number of songs before a sweeper Signal : For example : killall -USR1 sc_trans ## Deliverables Script or binary Notes : ---- 1/ you can name the variables exactly as you want 2/ if you create a binary, it should be very usefull to provide the variables and their usage when from prompt calling ./binary --help 3/ if creating a binary, it could be very interesting to compile it as static to make it portable as possible 4/ some file names can have UTF-8 names (stressed letters) Usage : ----- I will use this system to operate a little web radio broadcasting Creative Commons. This is a personal use only and absolutely not commercial. ## Platform - Linux - you can use perl, python or C, still it can be started as a cron job. This is your choice.
Project ID: 3273962

About the project

4 proposals
Remote project
Active 18 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$34 USD in 7 days
5.0 (10 reviews)
4.0
4.0
4 freelancers are bidding on average $39 USD for this job
User Avatar
See private message.
$76.50 USD in 7 days
4.9 (18 reviews)
5.2
5.2
User Avatar
See private message.
$25.50 USD in 7 days
4.8 (9 reviews)
1.7
1.7
User Avatar
See private message.
$21.25 USD in 7 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of FRANCE
France
5.0
9
Member since Jan 30, 2004

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.