index.html

250 lines · 15795 bytes

  1<!DOCTYPE HTML>
  2<html lang="en" class="sidebar-visible no-js ayu">
  3    <head>
  4        <!-- Book generated using mdBook -->
  5        <meta charset="UTF-8">
  6        <title>Overview - YouTube TUI User Manual</title>
  7        <!-- Custom HTML head -->
  8        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  9        <meta name="description" content="The user manual, documentation and contribution guide for YouTube TUI">
 10        <meta name="viewport" content="width=device-width, initial-scale=1">
 11        <meta name="theme-color" content="#ffffff" />
 12
 13        <link rel="icon" href="favicon.svg">
 14        <link rel="shortcut icon" href="favicon.png">
 15        <link rel="stylesheet" href="css/variables.css">
 16        <link rel="stylesheet" href="css/general.css">
 17        <link rel="stylesheet" href="css/chrome.css">
 18        <link rel="stylesheet" href="css/print.css" media="print">
 19        <!-- Fonts -->
 20        <link rel="stylesheet" href="FontAwesome/css/font-awesome.css">
 21        <link rel="stylesheet" href="fonts/fonts.css">
 22        <!-- Highlight.js Stylesheets -->
 23        <link rel="stylesheet" href="highlight.css">
 24        <link rel="stylesheet" href="tomorrow-night.css">
 25        <link rel="stylesheet" href="ayu-highlight.css">
 26
 27        <!-- Custom theme stylesheets -->
 28    </head>
 29    <body>
 30        <!-- Provide site root to javascript -->
 31        <script type="text/javascript">
 32            var path_to_root = "";
 33            var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "ayu";
 34        </script>
 35
 36        <!-- Work around some values being stored in localStorage wrapped in quotes -->
 37        <script type="text/javascript">
 38            try {
 39                var theme = localStorage.getItem('mdbook-theme');
 40                var sidebar = localStorage.getItem('mdbook-sidebar');
 41
 42                if (theme.startsWith('"') && theme.endsWith('"')) {
 43                    localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
 44                }
 45
 46                if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
 47                    localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
 48                }
 49            } catch (e) { }
 50        </script>
 51
 52        <!-- Set the theme before any content is loaded, prevents flash -->
 53        <script type="text/javascript">
 54            var theme;
 55            try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
 56            if (theme === null || theme === undefined) { theme = default_theme; }
 57            var html = document.querySelector('html');
 58            html.classList.remove('no-js')
 59            html.classList.remove('ayu')
 60            html.classList.add(theme);
 61            html.classList.add('js');
 62        </script>
 63
 64        <!-- Hide / unhide sidebar before it is displayed -->
 65        <script type="text/javascript">
 66            var html = document.querySelector('html');
 67            var sidebar = 'hidden';
 68            if (document.body.clientWidth >= 1080) {
 69                try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
 70                sidebar = sidebar || 'visible';
 71            }
 72            html.classList.remove('sidebar-visible');
 73            html.classList.add("sidebar-" + sidebar);
 74        </script>
 75
 76        <nav id="sidebar" class="sidebar" aria-label="Table of contents">
 77            <div class="sidebar-scrollbox">
 78                <ol class="chapter"><li class="chapter-item expanded "><a href="../../index.html" class="active"><strong aria-hidden="true">1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="installation.html"><strong aria-hidden="true">2.</strong> Installation</a></li><li class="chapter-item expanded "><a href="basic_usage.html"><strong aria-hidden="true">3.</strong> Basic usage</a></li><li class="chapter-item expanded affix "><li class="part-title">Customisation guide</li><li class="chapter-item expanded "><a href="config/index.html"><strong aria-hidden="true">4.</strong> Config files</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="config/main.html"><strong aria-hidden="true">4.1.</strong> main</a></li><li class="chapter-item expanded "><a href="config/commands.html"><strong aria-hidden="true">4.2.</strong> commands</a></li><li class="chapter-item expanded "><a href="config/keybindings.html"><strong aria-hidden="true">4.3.</strong> keybindings</a></li><li class="chapter-item expanded "><a href="config/pages.html"><strong aria-hidden="true">4.4.</strong> pages</a></li><li class="chapter-item expanded "><a href="config/appearance.html"><strong aria-hidden="true">4.5.</strong> appearance</a></li><li class="chapter-item expanded "><a href="config/search.html"><strong aria-hidden="true">4.6.</strong> search</a></li></ol></li><li class="chapter-item expanded "><li class="part-title">Contributing</li><li class="chapter-item expanded "><div><strong aria-hidden="true">5.</strong> How it works</div></li><li><ol class="section"><li class="chapter-item expanded "><div><strong aria-hidden="true">5.1.</strong> Framework</div></li><li class="chapter-item expanded "><div><strong aria-hidden="true">5.2.</strong> Invidious API</div></li><li class="chapter-item expanded "><div><strong aria-hidden="true">5.3.</strong> Individual items</div></li></ol></li><li class="chapter-item expanded "><div><strong aria-hidden="true">6.</strong> Contribution guide</div></li><li class="chapter-item expanded "><a href="changelogs.html"><strong aria-hidden="true">7.</strong> Changelogs</a></li><li class="chapter-item expanded "><a href="contributors.html"><strong aria-hidden="true">8.</strong> Contributors</a></li></ol>
 79            </div>
 80            <div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
 81        </nav>
 82
 83        <div id="page-wrapper" class="page-wrapper">
 84
 85            <div class="page">
 86                <div id="menu-bar-hover-placeholder"></div>
 87                <div id="menu-bar" class="menu-bar sticky bordered">
 88                    <div class="left-buttons">
 89                        <button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
 90                            <i class="fa fa-bars"></i>
 91                        </button>
 92                        <button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
 93                            <i class="fa fa-paint-brush"></i>
 94                        </button>
 95                        <ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
 96                            <li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
 97                            <li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
 98                            <li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
 99                            <li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
100                            <li role="none"><button role="menuitem" class="theme" id="ayu">Ayu (default)</button></li>
101                        </ul>
102                        <button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
103                            <i class="fa fa-search"></i>
104                        </button>
105                    </div>
106
107                    <h1 class="menu-title">YouTube TUI User Manual</h1>
108
109                    <div class="right-buttons">
110                        <a href="print.html" title="Print this book" aria-label="Print this book">
111                            <i id="print-button" class="fa fa-print"></i>
112                        </a>
113                        <a href="https://github.com/siriusmart/youtube-tui/tree/master/docs" title="Git repository" aria-label="Git repository">
114                            <i id="git-repository-button" class="fa fa-github"></i>
115                        </a>
116                        <a href="https://github.com/siriusmart/youtube-tui/edit/master/docs/src/../../README.md" title="Suggest an edit" aria-label="Suggest an edit">
117                            <i id="git-edit-button" class="fa fa-edit"></i>
118                        </a>
119                    </div>
120                </div>
121
122                <div id="search-wrapper" class="hidden">
123                    <form id="searchbar-outer" class="searchbar-outer">
124                        <input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
125                    </form>
126                    <div id="searchresults-outer" class="searchresults-outer hidden">
127                        <div id="searchresults-header" class="searchresults-header"></div>
128                        <ul id="searchresults">
129                        </ul>
130                    </div>
131                </div>
132                <!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
133                <script type="text/javascript">
134                    document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
135                    document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
136                    Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
137                        link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
138                    });
139                </script>
140
141                <div id="content" class="content">
142                    <main>
143                        <p><img src="https://img.shields.io/github/languages/top/siriusmart/youtube-tui?label=rust" alt="" />
144<img src="https://shields.io/github/license/siriusmart/youtube-tui" alt="" />
145<a href="https://crates.io/crates/youtube-tui"><img src="https://img.shields.io/crates/d/youtube-tui?label=crates.io%20downloads" alt="" /></a>
146<a href="https://crates.io/crates/youtube-tui"><img src="https://img.shields.io/crates/v/youtube-tui?label=crates.io%20version" alt="" /></a>
147<img src="https://shields.io/github/stars/siriusmart/youtube-tui?style=social" alt="" /></p>
148<p><em><strong>Read more in the <a href="https://siriusmart.github.io/youtube-tui">user manual</a> (including installation gude and documentation).</strong></em></p>
149<h1 id="overview"><a class="header" href="#overview">Overview</a></h1>
150<p>Written in Rust, the <strong>YouTube TUI</strong> is a lightweight and user friendly TUI for browsing YouTube content from the terminal.</p>
151<p><img src="./docs/src/images/search-showcase.png" alt="" /></p>
152<p>It is like an <em>app launcher</em>, it launches other programs to do the heavy lifting (for example, <code>mpv</code> for playing videos).</p>
153<h2 id="customisable"><a class="header" href="#customisable">Customisable</a></h2>
154<p>The YouTube TUI can be customised through config files, they are located in <code>~/.config/youtube-tui</code> and are in the YAML format.</p>
155<p>Here's an example of the config file:</p>
156<pre><code class="language-yaml">invidious_instance: https://vid.puffyan.us
157max_watch_history: 50
158allow_unicode: false
159images: Sixels
160refresh_after_modifying_search_filters: true
161provider: YouTube
162env:
163  browser: firefox
164  video-player: mpv
165  youtube-downloader: yt-dlp
166  terminal-emulator: konsole -e
167
168</code></pre>
169<p>Anything from layouts to colours and keybindings can be customised, more on that later.</p>
170<h2 id="dependency-free"><a class="header" href="#dependency-free">Dependency-free</a></h2>
171<p>The YouTube TUI does not work on its own, it is instead like a <em>TUI frontend</em> for programs like <code>mpv</code> or <code>yt-dlp</code>/<code>youtube-dl</code>.</p>
172<p>However, the programs to launch can be changed, and therefore the YouTube TUI <u>does not rely on any specific dependencies</u> to run.</p>
173<p><img src="./images/custom-dependencies-showcase.png" alt="" /></p>
174<h2 id="powerful"><a class="header" href="#powerful">Powerful</a></h2>
175<p>The YouTube TUI allows you to browse YouTube with (almost) all of it's features, functions including:</p>
176<ul>
177<li>View popular/trending videos</li>
178<li>View information about channels, playlists and videos</li>
179<li>Use search filters to sort and filter search results</li>
180<li>Save browsing history</li>
181</ul>
182<h3 id="what-it-doesnt-have"><a class="header" href="#what-it-doesnt-have">What it doesn't have</a></h3>
183<ul>
184<li>Vim-like commands (first priority)</li>
185<li>Command line args (first priority)</li>
186<li>Bootleg Vimscript? (will implement)</li>
187<li>Channel search (will implement)</li>
188<li>Channel videos sorting (will implement)</li>
189<li>Subscriptions (will implement)</li>
190<li>Recommendations/comments (probably will not implement)</li>
191</ul>
192<h2 id="how-to-contribute"><a class="header" href="#how-to-contribute">How to contribute</a></h2>
193<p>You will need a <u>general knowledge</u> of the Rust programming language, and the ability to <em>understand my spaghetti</em>.</p>
194<ol>
195<li>Open an issue to make sure nobody else is working on the same feature</li>
196<li>Write code</li>
197<li>Open a pull request</li>
198<li>Get merged?</li>
199</ol>
200<p>Or just <em>fix that typo in README</em> -_-</p>
201
202                    </main>
203
204                    <nav class="nav-wrapper" aria-label="Page navigation">
205                        <!-- Mobile navigation buttons -->
206                            <a rel="next" href="installation.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
207                                <i class="fa fa-angle-right"></i>
208                            </a>
209                        <div style="clear: both"></div>
210                    </nav>
211                </div>
212            </div>
213
214            <nav class="nav-wide-wrapper" aria-label="Page navigation">
215                    <a rel="next" href="installation.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
216                        <i class="fa fa-angle-right"></i>
217                    </a>
218            </nav>
219
220        </div>
221
222        <!-- Livereload script (if served using the cli tool) -->
223        <script type="text/javascript">
224            const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
225            const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
226            const socket = new WebSocket(wsAddress);
227            socket.onmessage = function (event) {
228                if (event.data === "reload") {
229                    socket.close();
230                    location.reload();
231                }
232            };
233
234            window.onbeforeunload = function() {
235                socket.close();
236            }
237        </script>
238        <script type="text/javascript">
239            window.playground_copyable = true;
240        </script>
241        <script src="elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
242        <script src="mark.min.js" type="text/javascript" charset="utf-8"></script>
243        <script src="searcher.js" type="text/javascript" charset="utf-8"></script>
244        <script src="clipboard.min.js" type="text/javascript" charset="utf-8"></script>
245        <script src="highlight.js" type="text/javascript" charset="utf-8"></script>
246        <script src="book.js" type="text/javascript" charset="utf-8"></script>
247
248        <!-- Custom JS scripts -->
249    </body>
250</html>