Show HN: Photon – RSS reader as light as a photon with terminal and sixel
Advertisement

#photon

photon logo

photon is a RSS/Atom reader with the purpose of curiosity on tempo, usability and somewhat of unix philosophy.

photon screenshot

With possibly the most contemporary say of rss readers, which are light, or exercise electron for rendering, photon needs to ship a “recent locate” internal terminal, with pictures!

#Installation

You will need a sixel supporting terminal emulator (I exercise foot)

Advertisement

#linux

$ chase install git.sr.ht/~ghost08/photon@most contemporary

AUR: photon-rss-git

$ yay -S photon-rss-git

#Complications

File bugs and TODOs thru the say tracker or ship an e-mail
to ~ghost08/photon@todo.sr.ht. For traditional discussion, exercise the
mailing checklist: ~ghost08/photon@lists.sr.ht.

#Utilization

photon’s philosophy is to be a some extra or less rss viewer. So it doesn’t beget aspects love including or managing feeds. photon may possibly possibly possibly possibly moreover also be started with a checklist of urls:

$ photon https://static.fsf.org/fsforg/rss/info.xml https://itsfoss.com/feed/ https://weblog.golang.org/feed.atom?structure=xml

Or it can possibly possibly possibly moreover also be instantly fed with the feed info:

$ wget -O - https://www.reddit.com/r/pics.rss | photon -

Or the exercise of ratt and playing magnet links instantly with mpv:

$ ratt auto https://1337x.to/top-100 | photon -

Or browsing youtube the exercise of ratt:

$ ratt auto https://www.youtube.com/outcomes --info-urlencode="search_query=MyQuery" | photon -

Or it may possibly parse a file with feed urls separated by new line (and feedback too):

$ echo "#youtube - LunusTechTips" > mychannels.txt
$ echo "https://www.youtube.com/feeds/videos.xml?user=LinusTechTips" > mychannels.txt
$ echo "#youtube - Engage Braxman Tech" > mychannels.txt
$ echo "https://www.youtube.com/feeds/videos.xml?channel_id=UCYVU6rModlGxvJbszCclGGw" > mychannels.txt
$ echo "#odysee - Lunduke on Tech" > mychannels.txt
$ echo "https://lbryfeed.melroy.org/channel/odysee/@Lunduke:e" >> mychannels.txt
$ photon mychannels.txt

Or it may possibly call a exterior expose, should be specified with the cmd:// prefix:

$ echo "cmd://ratt auto https://videoportal.joj.sk/slovania" >> mychannels.txt
$ photon mychannels.txt

By default running photon and not using a arguments will try to read ~/.config/photon/config (on windows it is C:Users.configphotonconfig).

So the feed management is up to the user with arguments, text info and developing scripts love:

$ cat photon-reddit.sh
photon mysubreddits.conf
$ cat mysubreddits.conf
https://www.reddit.com/r/standard.rss
https://www.reddit.com/r/info.rss
https://www.reddit.com/r/humorous.rss
https://www.reddit.com/r/memes.rss

Because photon is a “viewer” (love an image viewer, video player, …) it doesn’t beget a refresh feature. photon ethical reveals the contents of the feed(s).

#Aspects

Always one card is highlighted, we call it ‘selectedCard’. To navigate to other card it is possible you’ll possibly possibly possibly moreover exercise h,j,okay,l (which implies: left, down, up, correct).

CTRL+d – scroll half video display screen down

CTRL+u – scroll half video display screen up

CTRL+f – scroll full video display screen down

CTRL+b – scroll full video display screen up

gg – chase to the first line

G – chase to the final line

yy – replica card hyperlink to clipboard

yi – replica the card image

dm – bag media

dl – bag hyperlink convey material

di – bag image

All downloads are saved robotically to the default downloads folder $HOME/Downloads. This is at probability of be modified with the --bag-dir argument.

Any keybinding may possibly possibly possibly possibly moreover also be prepended with a numeric impress, love in vim. So that it is possible you’ll possibly possibly possibly moreover form 10j and the selectedCard will switch 10 rows down.

#opinion

By pressing ENTER, photon will video display the article opinion, where it scraps the card’s hyperlink and extracts the title, top image and main text convey material.

article view

ALT+ENTER will inaugurate the card’s hyperlink within the default net browser (or default application).

When the article is opened:

j will scroll the article down.
okay will scroll the article up.
gg scroll the article to the tip.
G scroll the article to the bottom.
q or Esc will end the article.

#cards

CTRL+- will decrease the different of columns of cards.

CTRL+= will build better the different of columns of cards.

Procuring is accomplished with pressing / after which typing the question. photon will filter the visible cards by finding the question in both the card’s title, description, feed’s title.

p will play the media hyperlink

photon is designed strongly for media viewing/playing, this may possibly possibly possibly possibly try to extract the bid media hyperlink of the card. By following the unix philosophy, Acquire One Ingredient and Acquire It Effectively, photon desire’s to be ethical a feed viewer, so media extraction is accomplished by exterior tools. By default yt-dlp is aged. This is at probability of be modified with the --extractor argument or PHOTON_EXTRACTOR ambiance variable.

By the convey material form of the media, photon will bustle it in both a video player (default mpv) or a image viewer (default imv).

If the hyperlink is a magnet hyperlink, or a torrent file, photon will bustle it in a torrent downloader/player (default mpv with the webtorrent-mpv-hook script).

So that it is possible you’ll possibly possibly possibly moreover play torrent videos right far off from photon. Strive: photon https://nyaa.si/?net page=rss (and install the webtorrent-mpv-hook it be abundant!).

--image-cmd, --video-cmd and --torrent-cmd arguments, or PHOTON_IMAGECMD, PHOTON_VIDEOCMD and PHOTON_TORRENTCMD ambiance variables, are aged to substitute the default behavior.

#Lua plugins

photon will robotically load lua scripts from ~/.config/photon/plugins/*.lua (on windows it is C:Users.configphotonplugins*.lua).

These plugins serve to elongate the functionality and build photon stop regardless of the user wants (for now it be ethical ‘beta’). Lua plugins can subscribe for events or register new keybindings and adjust the say. Rob a locate at some user scripts.

instance plugin:

--import the photon events module for subscribing on events
events = require("photon.events")

--subscribe to the Init tournament
events.subscribe(events.Init, characteristic()
	print("Hey photon!")
kill)

#HTTP Settings

Infrequently you need a little cookie to assemble the records that you just if reality be told desire 😛

For this photon has some http environment for each question that will almost definitely be ship:

--cookie="KEY=VALUE;KEY=VALUE;..." for environment cookies for all outgoing http requests

--header="KEY=VALUE;KEY=VALUE;..." for environment headers for all outgoing http requests

--user-agent="myphoton" for environment the User-Agent header for all outgoing http requests

--anxious ignore the ssl cert

Contribution of all model is welcome 🙂

Be half of the pack! Be half of 8000+ others registered customers, and collect chat, build teams, put up updates and build mates round the enviornment!
www.knowasiak.com/register/

Advertisement

1 Comment