Releases: pystardust/ytfzf
V2.6.2 !FINAL
IMPORTANT
This will likely be the last update I make regarding features and bug fixes for this project,
because this is just no longer the project that I work on
If anyone wants to maintain a fork, create an issue, I don't have admin rights in this repo, so the best i can do is link the readme to your fork.
Thank you to everyone for following the project and giving me inspiration to work on it for so long.
Additions
-cs
as an alias for-cS
-csi
as an alias for-cSI
selection_meta_key
for a way to change all ytfzfalt-*
shortcuts toctrl-*
easilyaction_meta_key
for a way to change all ytfzfctrl-*
shortcuts toalt-*
easily$preview_window_width
to specify how big the preview window should be
Fixes
- When scraping subscriptions, the whitespace in the channel url is not trimmed properly sometimes
- The last variable when setting previously exported variables is not used
--preview-side
could be something ytfzf can't handle, such asbottom
, when it should bedown
trim_blank
did not, in fact, trim the blanks, this is a feat of engineering- Fix: #717, thumbnails dont load when scraping new page
Addons
yt-music
Fixes
- #714, utf-8 not kept intact
2.6.1
Additions
- support ueberzugpp sway, and wlroots image output methods
- the
yt
scraper has been readded to scrape youtube directly from-cache
scraper, to scrape from ytfzf's cache.- to save to cache use
--keep-cache
- to save to cache use
--force-invidious
to make it use the chosen invidious instance instead of converting to youtube links- a file called
created-at
is kept in all cache directories to keep track of when it was created
Fixes
--keep-cache
does not keep cacheM
scraper does not work (#683 @gardockt)--channel-url
does not work withhttps://www.youtube.com/channel/@channel
- use
wayland
instead ofwlroots
to align with ueberzugpp - Fix syntax errors on macos (#662 @readmemyrights)
- Export FZF_DEFAULT_OPTS (#656 @jellelicht)
- Subscriptions trim_blank url #677 (#692 @calbrecht)
- next_page tabular tui did not know about COLUMNS AND LINES (#693 @calbrecht)
Code
- remove unused
remove_quotes_on_var_value
function
V2.6.0
Changes
- ueberzugpp is now the main version of ueberzug that is recommended to use
ueberzug
should still work
Features
-
sixel
thumbnail viewer- requires
ueberzugpp
- only works in terminals with
sixel
support, eg:wezterm
,foot
- requires
-
kitty
thumbnail viewer- yes this was removed last update, however it now also requires
ueberzugpp
- only works in terminals with
kitty
support, eg:kitty
- yes this was removed last update, however it now also requires
-
iterm2
thumbnail viewer- requires
ueberzugpp
- only works in terminals with
iterm2
support, eg:wezterm
,iterm2
- requires
-
when
-d
fails to download, a notification will be sent if notify_playing is 1
Addons
Extensions
-
comments
: detects if a video is playing in ytfzf and will scrape the comments for that video.- to use:
- have a ytfzf instance playing a video
ytfzf -e comments
- to use:
-
auto-thumb
: basic kitty/sixel/iterm2 detection support (just checks which terminal you are using)
Fixes
-
thumbnail viewer not carried into submenu
-
ytdl_opts
does not work -
--sort
does not work (is_sort=1
does) -
#699, thumbnails not downloading properly when quality is
high
-
-s
, instead of asking for new search, it used the old search -
$enable_hist
and$enable_search_hist
variables do nothing (@futureisfoss #673) -
-a/-r/-S are now compatible with -D and other interfaces
-
In ksh there is an error that says
.../var-fifo [Interrupted system call]
-
in some shells, it complains that there is a syntax error
-
In the
playlists
extension,--rfp
and--atp
do not work
Code
- interface_scripting is now longer a thing, and has been replaced with an initial call to
auto_select
, then torun_interface
ifauto_select
fails
V2.5.5
For Package Maintainers
- the Makefile will now take care of changing the default
YTFZF_SYSTEM_ADDON_DIR
if it doesn't matchPREFIX
Removed
kitty
thumbnail viewer is no longer builtin due to it not working withfzf
inkitty
version 0.27+ (see #636), it will remain an addon in case you have an older version ofkitty
.
Features
- add timezone for search history timestamp (@jpgichw #630)
- streams, and playlist tabs can be scraped with
invidious-channel
--disable-actions
- Puts a blanket disable on all actions, including submenus, and the back button
--sort=<name>
- An easier way to load a sort name.
--sort=<0|1>
will still turn sorting on/off
Addons
Interfaces
sixel
- Opens a very basic menu written in python but uses sixel to display thumbnails
kitty
- Opens the same menu as sixel, but uses the kitty protocol for thumbnails
- both
sixel
, andkitty
require thesixel-menu
folder.
Extensions
smart-thumb-download
- Instead of downloading thumbnails into that current process' cache directory, save thumbnails in
$YTFZF_CUSTOM_THUMBNAILS_DIR
, that way when the same results are loaded again there is no need to download the thumbnails again.
- Instead of downloading thumbnails into that current process' cache directory, save thumbnails in
auto-thumb
- Automatically picks a thumbnail viewer based on the terminal, and current xdg session (wayland/X11/tty)
Scrapers
video-info
gets information on a youtube video when provided a link.
Changes
-
A warning will no longer be printed for a non-absolute channel link such as:
@pewdiepie
-
By default
$YTFZF_LOGFILE
is empty instead of/dev/stderr
-
-q
sets$search_source
tohist
instead ofhist:$search_source
, essentially it will not prompt you if nothign is selected from history -
url_handler_opts is handled with eval instead of pure word splitting
- this allows for quoting strings.
-
Video descriptions are no longer folded to fit on half the width.
-
Changed how
SI
scrapes subscriptions
Fixes
invidious-channel
scraper, also used in-cSI
.- ueberzug thumbnail viewer is broken
ctrl-p
on busybox- When running
make install
with a custom prefix, the defaultYTFZF_SYSTEM_ADDON_DIR
is not changed, this is an unecessary burden on the packager and end user. -s
does not use$search_source
, always uses prompt-f
with--format-selection=normal
withyoutube-dl
is broken- Only one missing dependency could be shown at a time
- Kitty thumbnail causing problems (@greenfoo #628)
ard
extension scraper
Code
- Remove the unused ueberzug fd 3
V2.5.4
Features
-
on_open_url_handler
- Event function that is run right before the url handler is opened.
- Takes in the urls that were opened as function arguments.
-
Added much more information to
ytfzf --help
Addons
Extensions
subscription-manager
, adds 2 options,--add-sub
, and--remove-sub
to help manage thesubscriptions
file.
Scrapers
picture
scraper, scrapes$XDG_PICTURES_HOME
or if a search is given, will scrape that instead.- If
:w
or:wallpaper
is given as the search, it will search possible wallpaper folders. - Export
YTFZF_PICTURES_WALLPAPER_PATH
with different paths separated by:
to change this.- By default, it will search:
/usr/share/wallpapers
/usr/share/backgrounds
~/.local/share/wallpapers
~/.local/share/backgrounds
- By default, it will search:
- If
Thumbnail Viewers
- Added foot thumbnail viewer
- Extremely basic, does not try to position itself in a correct location
Changes
- ytfzf instance information is stored in $YTFZF_TEMP_DIR instead of $cache_dir
- $cache_dir is now only used if $keep_cache is 1, and for files such as search history.
- $YTFZF_TEMP_DIR defaults to
/tmp/ytfzf-$user-id
alt-p
is nowctrl-p
and it doesn't leave the menu.- if you want it to be
alt-p
again set,next_page_action_shortcut="alt-p"
in your config file.
- if you want it to be
Technical Changes
sort_video_data_fn
no longer takes in the old ytfzf line format, instead it takes in jsonl of videos.- Same goes for
video_info_text
- Same goes for
- The way previews work in
fzf
has been refactored completely to enable more possibilities withfzf
- search history is now a fake extension
- history is also a fake extension
Fixes
-
long standing bug where
-l
doesn't save position infzf
-
some @channel youtube links dont find the correct uuid.
-
some addons didn't have dependancy checks.
-
Preview doesn't work when selecting multiple videos (#612)
-
-s
,--search-again
is broken (#613)
Plans For Next Update
- Scraping shorts from a youtube channel
- making an addon to make
--sort
work with busybox (possibly using perl or another scripting language) - viewed date for history (#626)
V2.5.3
Features
-
With the
youtube-channel
scraper, if the first word in the search is:videos
,:streams
, or:playlists
it will scrape that tab from the channel.--type=live
,--type=playlist
,--type=video
, and--type=all
also all work
-
the
youtube-channel
, andinvidious-channel
scrapers now accept @user channel links -
swayimg-hyprland
thumbnail viewer, forces swayimg to work on hyprland- is a little hacky and will mess up rules you have for swayimg
Documentation
- The documentation misleadingly stated to set addon variables directly instead of using the load_* counterpart.
- for example: the docs said to use
url_handler=handler
instead ofload_url_handler "handler"
- for example: the docs said to use
Changes
Technical
- Make the internal
_get_request
function a general utility function
Fixes
Bold = big fix.
-
-c S
-cSI
may still be broken depending on whether the invidious instance has updated to the newest version of invidious.
-
Thumbnails did not take into account how many text lines were produced (this is especially noticeable if the video has a description)
-
--preview-side
was broken withswayimg
-
--pages
and--pages-start
were broken with-c invidious-playlist
-
Thumbnails don't load in busybox
-
Playlists are out of order
-
Custom keypress functions not returning correct exit code
-
-c R
does not work -
If
$YTFZF_SYSTEM_ADDON_DIR
does not exist, and--list-addons
is used, an unnecessary error is printed.
Addons
Scrapers
ani-category
- works again! in conjunction with tthe new scraper, ani-gogohd-link
Known issues
--pages
no longer works with-cinvidious-channel
, use-c invidious-playlist --pages=x https://www.youtube.com/playlist?list=<channel-id>
instead
V2.5.2
V2.5.1
Additions
Options
--available-inv-instances
- prints available invidious instances and exists
--thumbnail-log
- The file to print thumbnail viewer debug info to.
Docs
- Add the utility functions to the documentation.
Changes
-
breaking change:
on_search_<extention_name>
has been renamed toext_on_search_<extention_name>
to avoid clashes withon_search_<search>
-
Running
make all
does nothing for consistency with how make works (@brauliohms #577) -
Running
make
with gnu make will installdoc
and run the maininstall
(@mathisto #586) -
Thumbnail viewers now print all non-thumbnail related information to
$thumbnail_debug_log
, which by default is/dev/null
-
Internal change to the
title_str
internal function to not usedd
(@mathisto #591)
Fixes
(bolded = noticeable issue)
swayimg
doesn't kill previous windowsswayimg
steals focus for a split second.- Sometimes invidious instances without api are picked
- If
$cache_dir
is missing,ytfzf
throws an error. - interface does not carry to submenu
$session_cache_dir
and$session_temp_dir
are unset in thumbnail viewers- Typos in
ytfzf(1)
andytfzf(5)
(@brauliohms #575) --fullscreen
andis_fullscreen
mentioned in docs despite not existing.
V2.5.0
Additions
- Invidious instances are picked at random to avoid everyone using the same server (@BSGalvan #571)
scrape_next_page
aka the (alt-p
) shortcut has been implemented forscrape_invidious_search
which is the main search function.- If
--notify-playing
is enabled, after downloading a video with-d
, there will be a notification saying download complete u
scraper, similar toU
scraper, but doesn't automatically play the video and exit.get_search_from_<src>
: ifsearch_source
or--search-source
is set to<src>
the function will be run. It is supposed to set the variable_search
to a search querydisplay_text_<interface>
andinfo_wait_prompt_<interface>
- This way interfaces can decide how the user picks the option for
info_wait
, and how to display text in a copyable way.
- This way interfaces can decide how the user picks the option for
Addons
Extensions
-
playlists
: manage local playlists- requires that the
rfp
andatp
url handlers are put in either$YTFZF_SYSTEM_ADDON_DIR/url-handlers
or~/.config/ytfzf/url-handlers
- This addon is intended to always be loaded, ie: add
load_extension playlists
to your config file. - create a playlist with
--create-playlist=name
- play a playlist with
--playlist=name
- add to a playlist with
--atp=name search query
- remove something from a playlist with
--rfp=name
- delete a playlist with
--del-playlist=name
- list playlists with
--list-playlists
- list items in a playlist with
--list-titles
- requires that the
-
bsm
, integrates bash with ytfzf's search prompt (only works if /bin/sh points to bash), this allows for- bash's history expansion syntax in the search prompt, (eg:
!!
to mean last search) - pressing up/down to cycle through search history
- ctrl-r to do history search
- bash's history expansion syntax in the search prompt, (eg:
Url Handlers
rfp
: required for theplaylists
extension, removes items from a playlist.atp
: required for theplaylists
extension, adds items to a playlist.
Interfaces
- implemented
display_text
andinfo_wait_prompt
to the gui interface- this way a gui interface shows for text to be coppied instead of it being printed, and you dont have to type q/Q/m/Enter to continue.
Options
-i
same as--interface
-u
same as--url-handler
-T
same as--thumb-viewer
-e
same as--ext
--search-source
: sets the source for search query- A list of sources include:
args
: commandline argumentsprompt
: search prompthist
: search historynext
: used internally whenmulti_search
is enabledfn-args
: used internally to mean the arguments passed to the function.
--version-all
: get the version ofytfzf
and required dependencies.
Changes
-IVJ
now puts everything into 1 array.
Fixes
-IVJ
and-IR
should now be significantly faster- url handlers in
$YTFZF_SYSTEM_ADDON_DIR/url-handlers
are not loaded. - checking if a selected url has an associated action is too loose.
- no error is printed if
odysee_video_count
> 50 hist_file
andsearch_hist_file
ignorecache_dir
if it was set in the config file
Deprecated
use_search_hist=1
, usesearch_source=hist
insteaduse_search_hist=0
does nothing
Technical
- Large refactor to how ytfzf handles scrapers,
- there are no longer any builtin special cases to reduce code complexity.
handle_scrape_error
occures for every scrape instead of at the end
- Large refactor to how searching works.
- search query comes from a "source" now, by default that is the argumentspassed to the program, if no arguments are passed it uses the
prompt
source.
- search query comes from a "source" now, by default that is the argumentspassed to the program, if no arguments are passed it uses the
- Refactor to how -I, -L, and --info-wait work.
- Interfaces are no longer responsible for running
handle_keypress
, that now happens in the main loop after the interface is run.
Plans for Next Update
on_search_<ext>
will be changed to<ext>_on_search
to prevent clashes withon_search_<search_query>
V2.4.1
Additions
- A generic error for when a scraper fails
- When using
-h
, any extensions that haveprint_help_<ext-name>()
, will also print help load_interface
a command to load an interface the correct way instead of setting the intereface variable directly.load_thumbnail_viewer
same asload_interface
but for thumbnail viewersload_url_handler
same asload_interface
but for url handlerspost_scrape()
a function that happens after everything is scrapedprint_help_<ext-name>()
an extension can print it's own help textYTFZF_CHECK_VARS_EXISTS
can now be used instead ofcheck_vars_exists
Addons
Extensions
buttons
- adds extra buttons that when clicked do things such as:- enable audio only
- enable/disable detach
- ...
ipc
- allows getting variables fromipc_file
which is located in the session's cache dir, see$HOME/.cache/ytfzf
- example usage:
echo "get is_audio_only" > ipc_file
cat "ipc_file.is_audio_only
yeah it's a bit clunky but working with sockets would be worse
Changes
w3m
thumbnail preview is now an addon- in
interface_text
if tput is not found, default to$COLUMNS
, then 80 columns instead of defaulting to 80 immediately - info wait uses
quick_menu
instead of theread
command. handle_actions
is much more efficient when handling many selections
Documentation
- Added example subscriptions file
- Added exit codes to ytfzf.1
Fixes
- curl adds a \r character causing weirdness when using --channel-link (issue: #557)
get_missing_thumbnails
always says all thumbnails are missing, causing them to be redownloaded every time the menu is loaded with the-l
option enabled.remove_ansi_escapes
removed more than just ansi escapes causing[
to be missing from text.- Using new lines in exported variables or variables set before running ytfzf would cause errors (#552 @HoffsMH).
- line 163 unexpected operator when dependancy is not installed.
custom_shortcut_binds
not doing anything.__is_submenu
does not save it's state when interface opens.- Writing watch history uses the jq command less, and should be slightly faster, more so if many videos are selected.
ytfzf
assumescustom_info_wait_action_$info_wait_action
exists.- Makefile creates and deletes a file called
${PROG}.bak
(issue: #556) - the wrong invidious instance was used in the
multi
scraper.
Technical
- The codebase is shellcheck compliant (with many disable comments)
- refactor loading addons, such as interfaces, url_handlers, etc.. so that addons, or the user can just use
load_<addon-type> addon-name
.
Plans for next update
- resolving #379 by adding a margin on the side
- implementing
next_page
or thealt-p
shortcut in the invidious_search scraper