Package: rtv
THIS PROJECT IS NO LONGER MAINTAINEDRTV Development is Shutting DownList of Alternative ProjectsReddit Terminal Viewer (RTV)A text-based interface (TUI) to view and interact with Reddit from your terminal.Table of ContentsDemoInstallationUsageSettingsThemesFAQContributingLicenseDemoYou can usetelnetorsshto try out a lite version of RTV directly in your terminal, without needing to install it:$ telnet redditbox.us$ ssh redditbox.usredditbox.usis an independent project by Alex JarmoszukInstallationPyPI packageRTV is available onPyPIand can be installed with pip:$pipinstallrtvNative packagesSeeRepologyfor an up-to-date list of supported distro packages:# macOS$brewinstallrtv# Arch$pacman-Srtv# Nix$nix-env-irtv# Debian$aptinstallrtv# FreeBSD$pkginstallrtvFrom source$gitclonehttps://github.com/michael-lazar/rtv.git
$cdrtv
$pythonsetup.pyinstallWindowsRTV is not supported on Windows, due to a lack of resources and interest. Sorry!UsageTo run the program, type:$rtv--helpControlsMove the cursor using either the arrow keys orVimstyle movement:Press▲and▼to scroll through submissionsPress▶to view the selected submission and◀to returnPressspace-barto expand/collapse commentsPressuto login (this requires a web browser forOAuth)Press?to open the help screenPress/to open the navigation prompt, where you can type things like:/front/r/commandprompt+linuxmasterrace/r/programming/controversial/u/me/u/multi-mod/m/art/domain/github.comSeeCONTROLSfor the full list of commands.SettingsConfiguration FileConfiguration files are stored in the{HOME}/.config/rtv/directory.Check outrtv.cfgfor the full list of configurable options. You can clone this file into your home directory by running:$rtv--copy-configViewing Media LinksYou can usemailcapto configure how RTV will open different types of links.A mailcap file allows you to associate different MIME media types, likeimage/jpegorvideo/mp4, with shell commands. This feature is disabled by default because it takes a few extra steps to configure. To get started, copy the default mailcap template to your home directory.$rtv--copy-mailcapThis template contains examples for common MIME types that work with popular reddit websites likeimgur,youtube, andgfycat. Open the mailcap template and follow theinstructionslisted inside.Once you've setup your mailcap file, enable it by launching rtv with thertv --enable-mediaflag (or set it in yourrtv.cfg)Environment VariablesThe default programs that RTV interacts with can be configured through environment variables:$RTV_EDITORA program used to compose text submissions and comments, e.g.vim,emacs,geditIf not specified, will fallback to $VISUAL and $EDITOR in that order.$RTV_BROWSERA program used to open links to external websites, e.g.firefox,google-chrome,w3m,lynxIf not specified, will fallback to $BROWSER, or your system's default browser.$RTV_URLVIEWERA tool used to extract hyperlinks from blocks of text, e.g.urlview,urlscanIf not specified, will fallback to urlview if it is installed.ClipboardRTV supports copying submission links to the OS clipboard. On macOS this is supported out of the box.
On Linux systems you will need to install eitherxselorxclip.ThemesThemes can be used to customize the look and feel of RTVSolarized DarkSolarized LightPapercolorMolokaiYou can list all installed themes with the--list-themescommand, and select one with--theme. You can save your choice permanently in yourrtv.cfgfile. You can also use theF2&F3keys inside of RTV to cycle through all available themes.For instructions on writing and installing your own themes, seeTHEMES.md.FAQWhy am I getting an error during installation/when launching rtv?If your distro ships with an older version of python 2.7 or python-requests,
you may experience SSL errors or other package incompatibilities. The
easiest way to fix this is to install rtv using python 3. If you
don't already have pip3, seehttp://stackoverflow.com/a/6587528for setup
instructions. Then do$sudopipuninstallrtv
$sudopip3install-UrtvWhy do I see garbled text likeM-b~@M-"or^@?This type of text usually shows up when python is unable to render
unicode properly.Try starting RTV in ascii-only mode withrtv --asciiMake sure that the terminal/font that you're using supports unicodeTrysetting the LOCALE to utf-8Your python may have been built against the wrong curses library,
seehereandherefor more informationHow do I run the code directly from the repository?This project is structured to be run as a pythonmodule. This means that
you need to launch it using python's-mflag. See the example below, which
assumes that you have cloned the repository into the directory~/rtv_project.$cd~/rtv_project
$python3-mrtvContributingAll feedback and suggestions are welcome, just post an issue!Before writing any code, please read theContributor Guidelines.LicenseThis project is distributed under theMITlicense.