Coder Social home page Coder Social logo

myos-archlinux / vids Goto Github PK

View Code? Open in Web Editor NEW
12.0 5.0 1.0 57 KB

๐Ÿ” ๐Ÿ”˜ โฏ๏ธ ๐Ÿ” - search for videos to play from youtube.com and other platforms...

License: MIT License

Shell 100.00%
fzf dmenu rofi linux youtube mpv peertube tedtalk lbry bitchute shell-scripts posix-sh youtube-dl privacy-tools privacy piped cli terminal posix vids

vids's Introduction

vids

A POSIX script that helps you search videos platforms (YouTube , PeerTube , BitChute, LBRY and TED Talks) with command line easily.

Requirements

  • fzf / dmenu / rofi - menu & input
  • jq - JSON parsing
  • awk - text processing
  • mpv - video player
  • youtube-dl

Installation

git clone https://github.com/MyOS-ArchLinux/vids
cd vids/
sudo install -m755 vids /usr/local/bin/vids

Usage

Usage:   vids [OPTIONS] query

Options:
  General Options:
    -h, --help                Print this help text and exit.
    -v, --version             Print program version and exit.

  Search:
    -p, --platform            
        ytrending             Youtbe Trending
        youtube               Youtbe
        peertube              PeerTube
        bitchute              BitChute
        lbry                  LBRY
        tedtalk               TED Talks

    -ytr, --ytrending         An alias for -p ytrending
    -yt, --youtube            An alias for -p youtube
    -pt, --peertube           An alias for -p peertube
    -bc, --bitchute           An alias for -p bitchute
    -ted, --tedtalk           An alias for -p tedtalk
    -lb, --lbry, --odysee     An alias for -p lbry

    --piped                   Use Piped; a privacy-friendly YouTube frontend.
    --no-piped                Do not use Piped.

    --nsfw                    Include nsfw videos. (WIP)
    --no-nsfw                 Do not include nsfw videos. (WIP)

  Menu Options:
    -m, --menu MENU          
        fzf                  supports multi-select with tab/shift-tab.
        dmenu                doesn't supports multi-select.
        rofi                 supports multi-select with shift-enter.

    --fzf                    An alias for --menu fzf
    --dmenu                  An alias for --menu dmenu
    --rofi                   An alias for --menu rofi

  Player Options:
    -P, --player COMMAND     Player to feed urls to.
    -a, --player-args ARGS   Customize the arguments which are put together with the value of --player to create a command to execute.
    -e, --exit               don't prompt selector again after the player close

  Scripting Options:
    --print-json             print results json to stdout and exit.
    --print-link             print results links to stdout and exit.
    --print                  print results to stdout and exit.

  Environment variables:
    VIDS_DEFAULT_MENU        Default menu to use. (default: rofi -> dmenu -> fzf)
    VIDS_DEFAULT_PLATFORM    Default platform to use. (default: youtube)
    VIDS_DEFAULT_PLAYER      Default video player to use. (default: mpv)
    VIDS_DEFAULT_PLAYER_ARGS Default arguments which are passed to the player. (default: empty)
    VIDS_SHOW_NSFW           Always include NSFW videos (default: false)
    VIDS_YOUTUBE_PIPED       Use Piped; the privacy-friendly YouTube frontend. (default: false )
    VIDS_PIPEDAPI_URL        Piped Instance API URL. (default: https://pipedapi.kavin.rocks )
    VIDS_PEERTUBE_URL        PeerTube Instance URL. (default: https://sepiasearch.org )

  Improve me on GitHub:
    https://github.com/MyOS-ArchLinux/vids

Examples

  • Search Youtube With fzf menu

    vids --platform youtube --fzf Music

  • Search LBRY and print results to stdout

    vids --lbry --print Music

  • Get a list of trending videos on youtube but don't expose your ip to youtube. (Use Piped)

    vids --ytrending --piped

  • Scripting : Search PeerTube and extract titles

    vids --peertube --print-json music | awk '{if (NR!=1) {print}}' | jq -r ".[]|.title"

Note

You may want to install mpv-youtube-quality to change video quality on the fly , and mpv_sponsorblock or mpv_sponsorblock_minimal to skip sponsored segments of YouTube videos automatically.

vids's People

Contributors

odnar-dev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

odnar-dev

vids's Issues

love the idea

can you add :

  • NSFW filter
  • Live status
  • History
  • option to set default platform, menu, player

Support for some xxx sites?

So yeah, I'm just wondering if you might consider implementing support for pornhub? >______<

Aside from that, are thumbnails supported using sxiv?

U+200E symbol breaks alignment with column

Steps to reproduce:

$ printf "foo | 2021\nfoo bar | 2022\n" | column -t -s '|'
foo        2021
foo bar    2022
$ printf "foo | 2021\nfoo \u200e bar | 2022\n" | column -t -s '|'
foo         2021
foo โ€Ž bar     2022

And since some goddamn uploaders :) sometimes accidentally put these marks in their titles, then, probably, before envoking column, it's worth a try to remove those <200e> (and may be others?) with tr or something else?

Not that it happens often, of course... :)

Naming ?

the rewrite is almost done ๐Ÿ™๐Ÿป

i am thinking of changing the LICENSE to GNU GPLv3

and i am also thinking of changing the name to sspr which stand for search select play repeat (๐Ÿ” ๐Ÿ”˜ โฏ๏ธ ๐Ÿ”)

Invidious support?

So there is this thing called invidious. Which is a client to youtube. It has allowed me to literally block youtube and never use it again. Another advantage of it is that there loads of instances setup. So if one instance fails you just switch to another one. Also the biggest advantage being that you don't have to use youtube ๐Ÿคฎ

There is already another project I found which can be used for reference when putting invidious into (vids - maybe yibopt in the future)

https://notabug.org/mybeansarebaked/ytui

Best Regards,
Zera

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.