ytlofi
v1.1.2
Published
A command line that plays the most requested YT song.
Downloads
20
Maintainers
Readme
ytlofi
A Command Line Interface(CLI) that plays the most awesome YT song... Chill Study Beats - lofi hip hop mix [2018]
About
This is a history of one guy who sleep deprived tried to making some awesome game changer application that will revolutionize how the music indutry works!..
obs: just joking around with you. I wanted to create a CLI app that is also a npm package, this came as one idea in "what to do it."
Prerequisites
Since I've made all of it in a Linux enviroment I just know how to do it in it. Mac and Windows users must seek help for each particularity of attempting to do on those enviroments.
Install npm and Node.js into your machine, since Linux has many package managers, each one with it's particularity settup you must seek how to do it.
Disclaimer
Try to install Node through nvm, I had myself a problem when installing ytlofi through npm install -g ytlofi
with my previous settup were Node was installed through pacman/yaourt
-- I don't remeber quit as well wich one was it.
That is a know "issue" because in some packages, the ones that compile code in C/C++ or other languages, doesn't work quite as well in sudo
mode.
Installing
Most of Linux:
npm install -g ytlofi
Mac and some Linux:
sudo npm install -g ytlofi
Running
Simple as:
ytlofi
If you ran through some issues when running ytlofi after installing it, try to read Disclaimer section.
Running tests
Using Jest to run all of the testing. This project is some kind of "unique". Circle CI wasn't building the test and giving me no useful output about what was going down, then I've changend to Travis CI then the things started to get intresting. Easy to read docs and a active community I've found out that the missing part to run CI was to integrate the following pice of code in .travis.yml
:
before_install:
- sudo apt-get -qq update
- sudo apt-get install libasound2-dev
That ensures the dependecy need it to install the Spekear package and not breaking it during npm install
.
Breaking it down
To run yourself the tests you need to download this repository, open a terminal in a project folder then:
git clone https://github.com/Fazendaaa/ytlofi
The git
command should result in this:
Cloning into 'ytlofi'...
remote: Counting objects: 124, done.
remote: Compressing objects: 100% (89/89), done.
remote: Total 124 (delta 52), reused 95 (delta 29), pack-reused 0
Receiving objects: 100% (124/124), 91.21 KiB | 555.00 KiB/s, done.
Resolving deltas: 100% (52/52), done.
Then navigate to the ytlofi folder and run the tests:
npm test
Something like this should be expected:
PASS test/utils.test.ts (8.964s)
Testing the only function that this program has.
✓ Reading banner. (2ms)
----------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files | 62.5 | 0 | 50 | 62.5 | |
utils.ts | 62.5 | 0 | 50 | 62.5 | 10,11,13 |
----------|----------|----------|----------|----------|-------------------|
Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: 13.447s
Ran all test suites.
Coding styles
This project is made using TypeScript(TS) and TSLint, since there're a lot of TS availabe from the one used inside of Google to the one used in Airbnb, I myself use one that I've and still thourgh some progress tweaking things a lit bit, you can check it ou in the tslint.json
file.
Deployment
Github + Travis CI.
Build with
- youtube-audio-stream - Awesome library that does all of the heavy work.
Contributing
Still working to make one available.
Versoning
Curently using Node version - by the way, I've never used this thing before.
TODO
- Fix all unofficial typings errors;
- Adding watching video through terminal option;
- Releasing a fixed integration with the real Live stream when possible.
Authors
- Only me for now.
Acknowledgments
- Thanks to PurpleBooth and this great Readme template and hers Contributing template also;
- Also this freeCodeCamp blog at Medium helped me out when publishing this awesome project;
- And thanks to this blog helping out how to publish this project;
- Savior tutorial in how to use Travis CI.
- This tutorial help me out in setting Coverall badge, showed me that a simple entry in
.travis.yml
does the job.