1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
|
## fair-viewer
A lightweight application (fork of [youtube-viewer](https://github.com/trizen/youtube-viewer))
for searching and streaming videos from YouTube, using the Invidious API and
[hypervideo](https://git.conocimientoslibres.ga/software/hypervideo.git) support.
This fork parses the YouTube website directly and relies on the invidious instances only as a fallback method.
### fair-viewer
* command-line interface to YouTube.

### gtk-fair-viewer
* GTK+ interface to YouTube.

### VIDEO REVIEWS
* [EN] fair-viewer and YouTube-Viewer -- Search Youtube via Terminal - Linux CLI
* https://www.youtube.com/watch?v=I4tfHUmklWo
* [TW] fair-viewer!有史以來最佳的 YouTube 體驗就在這裡~
* https://wiwi.video/videos/watch/798d38cd-9d10-4f8a-ac1f-f776c6d0aa2c
### TRY
For trying the latest commit of `fair-viewer`, without installing it, execute the following commands:
```console
cd /tmp
wget http://git.conocimientoslibres.ga/software/fair-viewer.git/snapshot/fair-viewer-1.0.6.zip -O fair-viewer-1.0.6.zip
unzip -n fair-viewer-1.0.6.zip
cd fair-viewer-1.0.6/bin
./fair-viewer
```
### INSTALLATION
To install `fair-viewer`, run:
```console
perl Build.PL
sudo ./Build installdeps
sudo ./Build install
```
To install `gtk-fair-viewer` along with `fair-viewer`, run:
```console
perl Build.PL --gtk
sudo ./Build installdeps
sudo ./Build install
```
### CONFIGURATIONS
for `fair-viewer`, run:
```console
nano -w "$HOME/.config/fair-viewer/fair-viewer.conf"
```
for `gtk-fair-viewer`, run:
```console
nano -w "$HOME/.config/fair-viewer/gtk-fair-viewer.conf"
```
### DEPENDENCIES
#### For fair-viewer:
* [libwww-perl](https://metacpan.org/release/libwww-perl)
* [LWP::Protocol::https](https://metacpan.org/release/LWP-Protocol-https)
* [Data::Dump](https://metacpan.org/release/Data-Dump)
* [JSON](https://metacpan.org/release/JSON)
#### For gtk-fair-viewer:
* [Gtk3](https://metacpan.org/release/Gtk3)
* [File::ShareDir](https://metacpan.org/release/File-ShareDir)
* \+ the dependencies required by fair-viewer.
#### Build dependencies:
* [Module::Build](https://metacpan.org/pod/Module::Build)
#### Optional dependencies:
* Local cache support: [LWP::UserAgent::Cached](https://metacpan.org/release/LWP-UserAgent-Cached)
* Better STDIN support (+history): [Term::ReadLine::Gnu](https://metacpan.org/release/Term-ReadLine-Gnu)
* Faster JSON deserialization: [JSON::XS](https://metacpan.org/release/JSON-XS)
* Fixed-width formatting: [Unicode::LineBreak](https://metacpan.org/release/Unicode-LineBreak) or [Text::CharWidth](https://metacpan.org/release/Text-CharWidth)
### PACKAGING
To package this application, run the following commands:
```console
perl Build.PL --destdir "/my/package/path" --installdirs vendor [--gtk]
./Build test
./Build install --install_path script=/usr/bin
```
### INVIDIOUS INSTANCES
To use a specific invidious instance, like [invidious.snopyta.org](https://invidious.snopyta.org/), we have (see also the [--invidious](https://github.com/trizen/fair-viewer/commit/17fb2136f3f3d8ee6dacac05beabcc15082f699d) option):
```console
fair-viewer --api=invidious.snopyta.org
```
To make the change permanent, set in the configuration file:
```perl
api_host => "invidious.snopyta.org",
```
By default, `fair-viewer` picks a random invidious instance from [api.invidious.io](https://api.invidious.io/) on-demand.
### SUPPORT AND DOCUMENTATION
After installing, you can find documentation with the following commands:
```console
man fair-viewer
perldoc WWW::FairViewer
```
### LICENSE AND COPYRIGHT
Copyright (C) 2012-2021 Trizen
Copyright (C) 2020 Jesus
This program is free software; you can redistribute it and/or modify it
under the terms of either: the [GNU General Public License](LICENSE) as published
by the Free Software Foundation; or the [Artistic License](Artistic-2.0.txt).
See http://dev.perl.org/licenses/ for more information.
|