Skip to content

cli tool for converting youtube video to mp3, save it locally and share it among devices

Notifications You must be signed in to change notification settings

Efabien/hack-a-song

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hack-a-song

Description

This week-end project is a cli tool for converting YouTube video to MP3, downloading it and making it available for sharing to devices connected on the same network by generating a downloadable link. The generated link is shared via telegram by using a telegram bot

Telegram integration

First you need to create a telegram bot. Create a telegram account if you don't have on yet and dm @BotFather. Follow the instruction and at the end of the process he will provide you a secret token, used for interacting with the telegram APIs. To obtain your chat ID, dm your bot and check out your console.

Configuration

Edit the file config/index so as to provide the following configuration values :

  • outputPath // Output file location (default: the home directory)
  • ENCRYPTION_KEY //for encrypting the dowloadable link
  • PORT // port of the sharing server
  • TELEGRAM_TOKEN // token required for using telegram API
  • TELEGRAM_CHAT_ID // telegram chat id where to receive notifications

Go to the project folder and install it globally :

npm install -g

Make sure to run the server :

node server.js

A better approache is to run the server as a service

Usage

For converting and downloading a video from youtube :

yds -u <youtube-url>

For generating a downloadable link of an already stored mp3 file, so as to share it with a device on the same network :

yds -g <part-of-the-file-name>

For getting the list of available songs

yds -l

About

cli tool for converting youtube video to mp3, save it locally and share it among devices

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published