Skip to content
/ reddit Public

bash script for showing headlines with a function

Notifications You must be signed in to change notification settings

gas/reddit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

reddit

Simple bash function for showing reddit headlines

image

What it does

Display headlines from any r/subreddit (default r/bash) and show comments for each one if desired.

Usage:

  • reddit, show last headline from r/bash (default)
  • reddit commandline, show 1 headline from r/commandline
  • reddit bash 10, show 10 from r/bash
  • reddit zsh 7 show, get 7 headlines from r/zsh, displays comments within fzf preview

Dependencies:

curl

Preview dependencies:

gum, fzf, html-xml-utils, bat

Notes

If your system has a html-xml-utils version prior to 8.0, then previews will just show author and comments, nor date. That's because hxselect included with package managers is too old and doesn't allow selection of more than 2 html tags. You might want to download and install a newer one from https://www.w3.org/Tools/HTML-XML-utils.

$ reddit | cowsay
 _______________________
< set -x is your friend >
 -----------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

About

bash script for showing headlines with a function

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages