YouTube subscription manager and browser, Pacman inspired and NewPipe compatible

Oliver Galvin de816f3f0b fix debuild errors 5 years ago
docs 89db042869 tidy scripts and ditch boilerplate file 5 years ago
gtk 13eba187db Update copyrights 5 years ago
po b10fb14639 update po/.gitignore 5 years ago
scripts de816f3f0b fix debuild errors 5 years ago
src b80759a031 fix bug in getdata 5 years ago
testing 2b39b4603b more ci fixes 5 years ago
.gitattributes e393d7b880 use macros to add compiler options, add gitattributes, update gitignore 5 years ago
.gitignore d50d51dafa tidy and add uncrustify rule 5 years ago
.gitlab-ci.yml 552e2a4f30 add build-essential as deb build dependency 5 years ago
AUTHORS edc657e403 update AUTHORS/README to replace parson and add tubeman.h 5 years ago
COPYING 170bc26471 syncing 5 years ago
ChangeLog c220277adb debian fixes 5 years ago
HACKING.md 08d3f595a2 fix minor typos in docs 5 years ago
NEWS ab90a115bd create NEWS 5 years ago
README.md 4ac3d26695 tidy README, fix headers, remove sqlcipher, update copyright 5 years ago
TODO b92b8f5e01 tidy/typo 5 years ago
aclocal.m4 e70f945e4f update aclocal.m4 5 years ago
bootstrap b0bdc0eebd fix ci 5 years ago
configure.ac d19b6973cd fix configure.ac and remove unnecessary stuff 5 years ago
makefile.am 2845772c2b updates for new gtk stuff 5 years ago

README.md

              _______    _          __  __
             |__   __|  | |        |  \/  |
                | |_   _| |__   ___| \  / | __ _ _ __
                | | | | | '_ \ / _ \ |\/| |/ _' | '_ \
                | | |_| | |_) |  __/ |  | | (_| | | | |
                |_|\__,_|_.__/ \___|_|  |_|\__,_|_| |_|

Please note TubeMan is not yet complete and so is unusable currently.
This README describes both planned and implemented features.

TubeMan Icon

Summary

A lightweight YouTube subscription manager and browser, with a NewPipe compatible database and pacman style command line interface. Follow channels and watch videos without needing the YouTube API, a Google account, or a bloated nonfree website. Stores your data locally, is configurable, and includes optional text based and graphical frontends.

Goals

  • Enable the user to browse and subscribe to channels using only free software, without sacrificing privacy
  • Have a pacman-style command line interface, and an optional GUI
  • To be small, efficient, written in portable C, and use minimal dependencies
  • Do not require a Google account, allowing users to safely store data locally
  • Use a database compatible with NewPipe
  • Obey XDG directory guidelines

Description

TubeMan is a Youtube subscription manager and video browser written in portable C code, so should run on virtually any system. Partially inspired by NewPipe, a free Android program allowing you to view videos and subscribe to channels locally, TubeMan aims to have a compatible database and use similar concepts in a clean terminal based interface.

By storing a subscription database locally (which can be backed up however you wish), you avoid needing a Google account, for increased privacy and not having to trust Google with your data and letting them build a profile of your interests. It also avoids the need for using their website and any proprietary Javascript or Flash, instead using a familiar and simpler native command line or graphical interface, free formats like WebM, VP9 video and Ogg audio, and free software players like mpv or VLC.

TubeMan looks for the configuration file in the following places, from first to last:

  • $XDG_CONFIG_HOME/tubeman/config
  • ~/.config/tubeman/config
  • /etc/tubeman/config

The database location is set in the configuration or it is $XDG_DATA_HOME/tubeman/subscriptions.db by default.
When run, TubeMan will generate a subscription database if one is not found.
Optionally, you can import your existing database from an Android device running NewPipe.

See tubeman --help or man tubeman for usage information.
See the default config file for descriptions of the config options.
Running TubeMan with no options starts interactive mode.

You can import your supscriptions from youtube.com by downloading an OPML file from Youtube by visiting https://youtube.com/subscription_manager?action_takeout=1 while signed in, then import it with the --import option. You can add channels individually, the OPML file is an optional way to add your subscriptions. See the man page for more details.

Displaying Thumbnails

Displaying thumbnails in the terminal is an optional feature in the ncurses interface. The following methods are supported:

  • w3m - this works only with: urxvt, xterm and st
  • tycat - this works only in terminology
  • iterm2 - this works only in iTerm2 on macOS

Dependencies

Optional

Build dependencies

Building

As TubeMan is in its early stages there are no prebuilt binaries yet, so you need to compile from source. Other than the dependencies, you should only need standard tools like a C compiler and make to build.

On Arch based GNU/Linux distros use the PKGBUILD in the AUR, on macOS use Homebrew.
Otherwise, use one of the following commands to get what you need:

apt-get install build-essential gettext libsqlite3-0 libncurses5 libcurl3

dnf install gcc make gettext sqlite3 ncurses-libs curl

brew install gcc make gettext sqlite ncurses curl

Then get the code by cloning this git repo, then build and install by running:

./bootstrap
./configure
make
sudo make install

HACKING.md has more information on building and configure options.

Credits

Libraries

These are the libraries that TubeMan depends on.

Project Purpose License
SQLite Managing databases Public Domain
libcurl Downloading data X11
GNU ncurses Interactive mode X11
GNU gettext Internationalisation GPLv2+
w3m Displaying images Expat

Included

These are small libraries included with TubeMan. They may have small changes but are written by their respective authors.
See the AUTHORS file.

  • jsmn, for tokenising JSON data - Expat
  • inih, for parsing .ini files - Modified BSD
  • ya_getopt, alternative option parser - FreeBSD

Test Tube icon by Peter van Driel from the Noun Project, released under the CC BY license.

Prior Art

No code is used from these projects, but they inspired certain features.

  • NewPipe - a Youtube app for Android that does not use the Youtube API and can store local subscriptions
  • ranger - a terminal based file manager, for its ncurses interface and image preview functionality
  • pacman - a package manager for Arch Linux, uses similar command line options
  • newsboat - an active fork of newsbeuter, an ncurses-based feed reader

Author

Copyright (C) Oliver Galvin, 2017-2019
TubeMan is free software, released under the terms of the GNU General Public License, either version 3 of the License, or any later version. See the COPYING file for the full license text.

Email: odg at riseup dot net
PGP: 491E 0D9E E7AA 9E15 D089 950A 7879 6625 7046 CC21