]> njoseph.me Git - nimcoon.git/blame - README.md
Update README with a progress report on features
[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
893b4f6c
JN
6NewPipe app offers similar features for Android.
7
a6c167a7
JN
8This application is implemented in [Nim language](https://nim-lang.org) using
9only the standard library.
10
3c20e75c 11![nimcoon screenshot with search term 'baby yoda'](screenshot.png)
44978125
JN
12
13## Features
14
15- [x] Search for videos using keywords
763f653f 16- [x] Stream videos and music from YouTube
52ecc638 17- [x] Play direct links from YouTube and PeerTube
d7688e97 18- [x] Stream video and music from magnet links and hyperlinks to torrent files
e9f0c7d0 19- [x] Download music
d2ebe4d2 20- [x] Download video
893b4f6c
JN
21- [x] Play YouTube playlists (MPV only)
22- [ ] Download YouTube playlists
c12cc641
JN
23- [x] Stream video from torrent file URLs
24- [x] BitTorrent is preferred for PeerTube video links
25- [ ] Search PeerTube (3.0 or later)
893b4f6c 26- [ ] YouTube Autoplay
44978125
JN
27- [ ] Configuration options
28
893b4f6c
JN
29| | YouTube | PeerTube (HTTP) | PeerTube (BitTorrent) | Direct Magnet Link |
30| -------- | -------- | -------- | -------- | -------- |
31| Music Streaming | ✅ | ✅ | ✅ | ✅ |
32| Video Streaming | ✅ | ✅ | ✅ | ✅ |
33| Music Download | ✅ | ✅ | | |
34| Video Download | ✅ | ✅ | | |
35
3f6de5cb 36## Installation
44978125 37
3c20e75c 38Nim Coon depends on the following:
7d08d1af
JN
39- youtube-dl
40- mpv (recommended) or vlc
8d06ad69 41- peerflix and webtorrent (for magnet links)
7d08d1af 42
8d06ad69 43Install MPV or VLC using your distribution's package manager.
88a5646a
JN
44
45Install YouTube-dl
46``` sh
47pip3 install --user youtube-dl
48```
49
8d06ad69 50Install PeerFlix and WebTorrent
88a5646a 51```sh
0c2f0385 52npm install --global peerflix webtorrent-cli
88a5646a
JN
53```
54
0c2f0385
JN
55(Optional) If you want your YouTube downloads to be faster, install `aria2` download manager.
56
af9a966f
JN
57### Installing using Nimble
58
59NimCoon can be installed from Nimble repositories:
60
61``` sh
62nimble install nimcoon
63```
64
65You can also install from source by running the following command:
44978125 66
c4aeb618 67```sh
af9a966f 68nimble install
c4aeb618
JN
69```
70
af9a966f 71### Installing binary
44978125 72
af9a966f 73Download the latest build from GitlabCI (amd64 GNU/Linux only).
44978125 74
3f6de5cb 75```sh
af9a966f
JN
76wget https://gitlab.com/njoseph/nimcoon/-/jobs/artifacts/master/download?job=compile -O artifacts.zip
77unzip artifacts.zip
44978125
JN
78```
79
af9a966f
JN
80Copy the binary to somewhere on your path like /usr/local/bin
81
3f6de5cb 82## Usage
44978125
JN
83
84```sh
763f653f 85nimcoon "emacs"
44978125 86
c4aeb618 87# If your search query has multiple words, use quotes
763f653f 88nimcoon "nim lang"
f135dfc7 89
763f653f 90# Play audio of the first search result
3c20e75c 91nimcoon -m -l "counting stars"
763f653f
JN
92
93# Download audio of the first search result
94nimcoon -mld "counting stars"
95
96# Play direct video link
97nimcoon https://www.youtube.com/watch?v=QOEMv0S8AcA
98
99# Add -d to download or -m to select only audio or both
100nimcoon -md https://www.youtube.com/watch?v=hT_nvWreIhg
44978125 101```
c4aeb618 102
763f653f
JN
103After the search results are displayed, you can enter a number to play one
104result, "all" to play all the results or "q" to quit the program.
105
106If a number is entered, after the selected search result is played, the results
107are redisplayed, so that you can play the other results without having to search
108again.
109
110### Command line arguments
4827df7a 111
3c20e75c
JN
112| **Arguments** | **Explanation** |
113|-------------------|--------------------------------------------|
114| -m, --music | Play Music only, no video |
115| -l, --lucky | Try your luck with the first search result |
116| -f, --full-screen | Play video in full screen |
e9f0c7d0 117| -d, --download | Download video or music |
4827df7a 118
763f653f
JN
119Feel free to use these options in any combination. NimCoon will show a helpful
120error message if you pick incompatible options.
121
3f6de5cb
JN
122## Development
123
124One-liner for compiling and running
c4aeb618
JN
125
126```sh
763f653f 127nim c -d:ssl -r src/nimcoon.nim 'nim lang'
68fd8100 128```
e26cfd93
JN
129
130## Privacy
131
132To avoid storing your nimcoon searches in `zsh` history, run this command
133
134```sh
135setopt histignorespace
136```
137
138Then, add a space before typing nimcoon in the shell, like " nimcoon"
139
140```sh
141 nimcoon "this is private"
142```
143
144The same can be achieved in `bash` by setting an environment variable
145```sh
146export HISTCONTROL=ignoreboth
147```