Bump version and update changelog
[nimcoon.git] / README.md
CommitLineData
f7735b43 1# NimCoon
726cf1a7 2
3e3ba843 3Play videos from YouTube and PeerTube from the
44978125
JN
4command line using your preferred desktop media player.
5
a6c167a7
JN
6This application is implemented in [Nim language](https://nim-lang.org) using
7only the standard library.
8
3c20e75c 9![nimcoon screenshot with search term 'baby yoda'](screenshot.png)
44978125
JN
10
11## Features
12
13- [x] Search for videos using keywords
763f653f 14- [x] Stream videos and music from YouTube
52ecc638 15- [x] Play direct links from YouTube and PeerTube
763f653f 16- [x] Stream video and music from magnet links
e9f0c7d0 17- [x] Download music
d2ebe4d2 18- [x] Download video
44978125
JN
19- [ ] Configuration options
20
3f6de5cb 21## Installation
44978125 22
3c20e75c 23Nim Coon depends on the following:
7d08d1af
JN
24- youtube-dl
25- mpv (recommended) or vlc
52ecc638 26- peerflix (for magnet links)
7d08d1af 27
88a5646a
JN
28Install VLC or MPV using your distribution's package manager.
29
30Install YouTube-dl
31``` sh
32pip3 install --user youtube-dl
33```
34
35Install PeerFlix
36```sh
37npm install --global peerflix
38```
39
af9a966f
JN
40### Installing using Nimble
41
42NimCoon can be installed from Nimble repositories:
43
44``` sh
45nimble install nimcoon
46```
47
48You can also install from source by running the following command:
44978125 49
c4aeb618 50```sh
af9a966f 51nimble install
c4aeb618
JN
52```
53
af9a966f 54### Installing binary
44978125 55
af9a966f 56Download the latest build from GitlabCI (amd64 GNU/Linux only).
44978125 57
3f6de5cb 58```sh
af9a966f
JN
59wget https://gitlab.com/njoseph/nimcoon/-/jobs/artifacts/master/download?job=compile -O artifacts.zip
60unzip artifacts.zip
44978125
JN
61```
62
af9a966f
JN
63Copy the binary to somewhere on your path like /usr/local/bin
64
3f6de5cb 65## Usage
44978125
JN
66
67```sh
763f653f 68nimcoon "emacs"
44978125 69
c4aeb618 70# If your search query has multiple words, use quotes
763f653f 71nimcoon "nim lang"
f135dfc7 72
763f653f 73# Play audio of the first search result
3c20e75c 74nimcoon -m -l "counting stars"
763f653f
JN
75
76# Download audio of the first search result
77nimcoon -mld "counting stars"
78
79# Play direct video link
80nimcoon https://www.youtube.com/watch?v=QOEMv0S8AcA
81
82# Add -d to download or -m to select only audio or both
83nimcoon -md https://www.youtube.com/watch?v=hT_nvWreIhg
44978125 84```
c4aeb618 85
763f653f
JN
86After the search results are displayed, you can enter a number to play one
87result, "all" to play all the results or "q" to quit the program.
88
89If a number is entered, after the selected search result is played, the results
90are redisplayed, so that you can play the other results without having to search
91again.
92
93### Command line arguments
4827df7a 94
3c20e75c
JN
95| **Arguments** | **Explanation** |
96|-------------------|--------------------------------------------|
97| -m, --music | Play Music only, no video |
98| -l, --lucky | Try your luck with the first search result |
99| -f, --full-screen | Play video in full screen |
e9f0c7d0 100| -d, --download | Download video or music |
4827df7a 101
763f653f
JN
102Feel free to use these options in any combination. NimCoon will show a helpful
103error message if you pick incompatible options.
104
3f6de5cb
JN
105## Development
106
107One-liner for compiling and running
c4aeb618
JN
108
109```sh
763f653f 110nim c -d:ssl -r src/nimcoon.nim 'nim lang'
68fd8100 111```