]> njoseph.me Git - nimcoon.git/blame - README.md
Update package management tasks and instructions
[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
af9a966f
JN
28### Installing using Nimble
29
30NimCoon can be installed from Nimble repositories:
31
32``` sh
33nimble install nimcoon
34```
35
36You can also install from source by running the following command:
44978125 37
c4aeb618 38```sh
af9a966f 39nimble install
c4aeb618
JN
40```
41
af9a966f 42### Installing binary
44978125 43
af9a966f 44Download the latest build from GitlabCI (amd64 GNU/Linux only).
44978125 45
3f6de5cb 46```sh
af9a966f
JN
47wget https://gitlab.com/njoseph/nimcoon/-/jobs/artifacts/master/download?job=compile -O artifacts.zip
48unzip artifacts.zip
44978125
JN
49```
50
af9a966f
JN
51Copy the binary to somewhere on your path like /usr/local/bin
52
3f6de5cb 53## Usage
44978125
JN
54
55```sh
763f653f 56nimcoon "emacs"
44978125 57
c4aeb618 58# If your search query has multiple words, use quotes
763f653f 59nimcoon "nim lang"
f135dfc7 60
763f653f 61# Play audio of the first search result
3c20e75c 62nimcoon -m -l "counting stars"
763f653f
JN
63
64# Download audio of the first search result
65nimcoon -mld "counting stars"
66
67# Play direct video link
68nimcoon https://www.youtube.com/watch?v=QOEMv0S8AcA
69
70# Add -d to download or -m to select only audio or both
71nimcoon -md https://www.youtube.com/watch?v=hT_nvWreIhg
44978125 72```
c4aeb618 73
763f653f
JN
74After the search results are displayed, you can enter a number to play one
75result, "all" to play all the results or "q" to quit the program.
76
77If a number is entered, after the selected search result is played, the results
78are redisplayed, so that you can play the other results without having to search
79again.
80
81### Command line arguments
4827df7a 82
3c20e75c
JN
83| **Arguments** | **Explanation** |
84|-------------------|--------------------------------------------|
85| -m, --music | Play Music only, no video |
86| -l, --lucky | Try your luck with the first search result |
87| -f, --full-screen | Play video in full screen |
e9f0c7d0 88| -d, --download | Download video or music |
4827df7a 89
763f653f
JN
90Feel free to use these options in any combination. NimCoon will show a helpful
91error message if you pick incompatible options.
92
3f6de5cb
JN
93## Development
94
95One-liner for compiling and running
c4aeb618
JN
96
97```sh
763f653f 98nim c -d:ssl -r src/nimcoon.nim 'nim lang'
68fd8100 99```