diff --git a/README.md b/README.md index 7f4b40f1..64eebdcd 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ +# NOTICE + +This project is no longer actively maintained, it should still work for the foreseeable future + +--- +


@@ -26,14 +32,14 @@ # Table Of Contents -* [`Dependencies`](#Dependencies) -* [`Install`](#Install) -* [`Features`](#Features) -* [`Examples`](#Examples) -* [`Configuration`](#Configuration) -* [`Bugs`](#Bugs) -* [`Contributing`](#Contributing) -* [`Credits`](#Credits) +- [`Dependencies`](#Dependencies) +- [`Install`](#Install) +- [`Features`](#Features) +- [`Examples`](#Examples) +- [`Configuration`](#Configuration) +- [`Bugs`](#Bugs) +- [`Contributing`](#Contributing) +- [`Credits`](#Credits) --- @@ -43,40 +49,40 @@ There are only 2 required dependencies, however the rest require some configurat ## Required dependencies -* [`jq`](https://github.com/stedolan/jq) -* [`curl`](https://github.com/curl/curl) +- [`jq`](https://github.com/stedolan/jq) +- [`curl`](https://github.com/curl/curl) ## Recommended dependencies -* [`mpv`](https://github.com/mpv-player/mpv) (the default video and audio player) -* [`fzf`](https://github.com/junegunn/fzf) (the default menu selection screen) +- [`mpv`](https://github.com/mpv-player/mpv) (the default video and audio player) +- [`fzf`](https://github.com/junegunn/fzf) (the default menu selection screen) ## Optional dependencies -* [`yt-dlp`](https://github.com/yt-dlp/yt-dlp) (for downloading) -* [`dmenu`](https://tools.suckless.org/dmenu/) (only if using the -D option) -* [`ueberzugpp`](https://github.com/jstkdng/ueberzugpp) - * needed for the following thumbnail viewers: - * `kitty`, `iterm2`, `sixel`, and `ueberzug` - * the original [`ueberzug`](https://github.com/seebye/ueberzug) or any fork may be used if you only want to use the `ueberzug` viewer. +- [`yt-dlp`](https://github.com/yt-dlp/yt-dlp) (for downloading) +- [`dmenu`](https://tools.suckless.org/dmenu/) (only if using the -D option) +- [`ueberzugpp`](https://github.com/jstkdng/ueberzugpp) + - needed for the following thumbnail viewers: + - `kitty`, `iterm2`, `sixel`, and `ueberzug` + - the original [`ueberzug`](https://github.com/seebye/ueberzug) or any fork may be used if you only want to use the `ueberzug` viewer. ### Thumbnail Viewers -* **To use a thumbnail viewer include `-T ` in the command when running ytfzf** - -| Program | Wayland Support | -| :-- | :-- | -| [`kitty`](https://github.com/kovidgoyal/kitty) (requires `ueberzugpp`) | ✅ | -| `iterm2` (requires `ueberzugpp`) | ✅ | -| `sixel` (requires `ueberzugpp`) | ✅ | -| `sway` (requires `ueberzugpp`) | &9989; (only on sway)| -| `wayland` (requires `ueberzugpp`) | &9989; | -| [`chafa`](https://github.com/hpjansson/chafa) | ✅ | -| [`catimg`](https://github.com/posva/catimg) | ✅ | -| [`imv`](https://git.sr.ht/~exec64/imv) | ✅ | -| [`mpv`](https://github.com/mpv-player/mpv) | ✅ | -| [`swayimg`](https://github.com/artemsen/swayimg) | only on `sway` | -| [`swayimg`](https://github.com/artemsen/swayimg) (-T swayimg-hyprland) | only on `hyprland` | +- **To use a thumbnail viewer include `-T ` in the command when running ytfzf** + +| Program | Wayland Support | +| :--------------------------------------------------------------------- | :--------------------- | +| [`kitty`](https://github.com/kovidgoyal/kitty) (requires `ueberzugpp`) | ✅ | +| `iterm2` (requires `ueberzugpp`) | ✅ | +| `sixel` (requires `ueberzugpp`) | ✅ | +| `sway` (requires `ueberzugpp`) | ✅ (only on sway) | +| `wayland` (requires `ueberzugpp`) | ✅ | +| [`chafa`](https://github.com/hpjansson/chafa) | ✅ | +| [`catimg`](https://github.com/posva/catimg) | ✅ | +| [`imv`](https://git.sr.ht/~exec64/imv) | ✅ | +| [`mpv`](https://github.com/mpv-player/mpv) | ✅ | +| [`swayimg`](https://github.com/artemsen/swayimg) | only on `sway` | +| [`swayimg`](https://github.com/artemsen/swayimg) (-T swayimg-hyprland) | only on `hyprland` | # Install @@ -88,19 +94,21 @@ There are only 2 required dependencies, however the rest require some configurat 1. Install the dependencies listed [above](#Dependencies) 2. Run the following commands + ```sh git clone https://github.com/pystardust/ytfzf cd ytfzf sudo make install doc ``` -* If you wish to not install documentation (highly unrecommended) run `sudo make install` instead. +- If you wish to not install documentation (highly unrecommended) run `sudo make install` instead. + +- If you wish to install addons, run `sudo make addons` -* If you wish to install addons, run `sudo make addons` - * `YTFZF_SYSTEM_ADDONS_DIR` will point to `/usr/local/share/ytfzf/addons` even if you set `PREFIX` to something else - * If you use a different prefix, it would be smart to export `YTFZF_SYSTEM_ADDONS_DIR` to `$PREFIX/share/ytfzf/addons` in a shell startup file. + - `YTFZF_SYSTEM_ADDONS_DIR` will point to `/usr/local/share/ytfzf/addons` even if you set `PREFIX` to something else + - If you use a different prefix, it would be smart to export `YTFZF_SYSTEM_ADDONS_DIR` to `$PREFIX/share/ytfzf/addons` in a shell startup file. -* You may also install `ytfzf` through your package manager, as listed on the side. +- You may also install `ytfzf` through your package manager, as listed on the side. ## Addons @@ -128,14 +136,14 @@ To use an extension addon run `ytfzf -e ...` # Features -* Subscriptions -* Thumbnails -* Watch history -* Search History -* Downloading -* Queueing multiple videos -* Custom menus, and scrapers -* Addon support +- Subscriptions +- Thumbnails +- Watch history +- Search History +- Downloading +- Queueing multiple videos +- Custom menus, and scrapers +- Addon support --- @@ -165,7 +173,7 @@ ytfzf -L ytfzf -cO ``` -> Use the chafa thumbnail viewer, pass --vo=sixel, and --quiet to mpv, scrape odysee with the search *odysee search*, youtube with the search: *youtube search*, and also scrape subscriptions +> Use the chafa thumbnail viewer, pass --vo=sixel, and --quiet to mpv, scrape odysee with the search _odysee search_, youtube with the search: _youtube search_, and also scrape subscriptions ```sh ytfzf -t -T chafa --url-handler-opts='--vo=sixel --quiet' -cO,Y,SI --multi-search odysee search,youtube search @@ -187,9 +195,9 @@ For more information, see `ytfzf(5)` which should be installed, if it's not see # Bugs -* *dwm with swallow patch: Images don't render with ueberzug when looped (ie, option `-l`)* -* *if thumbnails are not working `.Xauthority` might be causing it. Try deleting it and relogging into your computer.* -* When fzf is not set to 100% height, thumbnails may appear in the wrong position +- _dwm with swallow patch: Images don't render with ueberzug when looped (ie, option `-l`)_ +- _if thumbnails are not working `.Xauthority` might be causing it. Try deleting it and relogging into your computer._ +- When fzf is not set to 100% height, thumbnails may appear in the wrong position # Contributing @@ -197,14 +205,13 @@ Feel free to contribute, and add your name to the credits, please use the develo # Credits -| User | Contributions | Donate| -| :--- | :--- | :--- | -| Pystardust | [contributions](credits/pystardust.md) || -| Euro20179 | [contributions](credits/euro20179.md) || -| Simonhughxyz | [contributions](credits/simonhughxyz.md) || -| Jac-Zac | [contributions](credits/jac-zac.md) || -| Mudskipper875 | [contributions](credits/mudskipper875.md) || -| Gardockt | [contributions](credits/gardockt.md)|| -| qoheniac | [contributions](credits/qoheniac.md)|| -| mathisto | [contributions](credits/mathisto.md)|| - +| User | Contributions | Donate | +| :------------ | :---------------------------------------- | :----- | +| Pystardust | [contributions](credits/pystardust.md) | | +| Euro20179 | [contributions](credits/euro20179.md) | | +| Simonhughxyz | [contributions](credits/simonhughxyz.md) | | +| Jac-Zac | [contributions](credits/jac-zac.md) | | +| Mudskipper875 | [contributions](credits/mudskipper875.md) | | +| Gardockt | [contributions](credits/gardockt.md) | | +| qoheniac | [contributions](credits/qoheniac.md) | | +| mathisto | [contributions](credits/mathisto.md) | | diff --git a/addons/scrapers/yt-music-utils/convert-ascii-escape.pl b/addons/scrapers/yt-music-utils/convert-ascii-escape.pl index cb334974..a1f54d55 100755 --- a/addons/scrapers/yt-music-utils/convert-ascii-escape.pl +++ b/addons/scrapers/yt-music-utils/convert-ascii-escape.pl @@ -3,8 +3,6 @@ use strict; use warnings; -binmode(STDOUT, 'utf8'); - while(<>){ s/\\x([0-9a-fA-F]{2})/chr(hex($1))/eg; print; diff --git a/docs/man/ytfzf.5 b/docs/man/ytfzf.5 index c6cc7c32..d760b500 100644 --- a/docs/man/ytfzf.5 +++ b/docs/man/ytfzf.5 @@ -254,6 +254,12 @@ Valid options: .IR default: " left" .RE +.TP +.RB $ preview_window_width +The amount of space to use for the fzf preview +.br +.IR default: " 50%" + .TP .RB $ thumbnail_viewer The program to display images for thumbnail previews @@ -457,67 +463,79 @@ Whether or not to make another search after fzf is closed. .br .IR default: " 0" +.TP +.RB $ selection_meta_key +The meta key for shortcuts that select a video. +.br +.IR default: " alt" + .TP .RB $ download_shortcut The shortcut to download the selected videos. .br -.IR default: " alt-d" +.IR default: " $selection_meta_key-d" .TP .RB $ video_shortcut The shortcut to watch the selected videos. .br -.IR default: " alt-v" +.IR default: " $selection_meta_key-v" .TP .RB $ audio_shortcut The shortcut to listen to the selected videos. .br -.IR default: " alt-m" +.IR default: " $selection_meta_key-m" .TP .RB $ detach_shortcut The shortcut to use the detach player. .br -.IR default: " alt-e" +.IR default: " $selection_meta_key-e" .TP .RB $ print_link_shortcut The shortcut to use to print the link. .br -.IR default: " alt-l" +.IR default: " $selection_meta_key-l" .TP .RB $ show_formats_shortcut The shortcut to show formats before playing the video. .br -.IR default: " alt-f" +.IR default: " $selection_meta_key-f" .TP .RB $ info_shortcut The shortcut to get all info about the selected video. .br -.IR default: " alt-i" +.IR default: " $selection_meta_key-i" .TP .RB $ search_again_shortcut The shortcut to make another search. .br -.IR default: " alt-s" +.IR default: " $selection_meta_key-s" .TP -.RB $ shortcut_binds -The keys to listen for in fzf. +.RB $ action_meta_key +The meta key for shorcuts that do something .br -.IR default: " Enter,double-click,$download_shortcut, -$video_shortcut,$detach_shortcut,$print_link_shortcut,$show_formats_shortcut, -$info_shortcut,$search_again_shortcut,$custom_shortcut_binds" +.IR default: " ctrl" .TP .RB next_page_action_shortcut The shortcut to scrape the next page. .br -.IR default: " ctrl-p" +.IR default: " $action_meta_key-p" + +.TP +.RB $ shortcut_binds +The keys to listen for in fzf. +.br +.IR default: " Enter,double-click,$download_shortcut, +$video_shortcut,$detach_shortcut,$print_link_shortcut,$show_formats_shortcut, +$info_shortcut,$search_again_shortcut,$custom_shortcut_binds" .TP .RB $ custom_shortcut_binds @@ -745,6 +763,11 @@ Misc .RS +.TP +.RB $ gap_space +The amount of space after the title in the thumbnail viewer menu. +.IR default: "' '" + .TP .RB $ scrape_search_exclude The scrapers to not ask for a search query. diff --git a/ytfzf b/ytfzf index 9b96e8e1..b84a0cb8 100755 --- a/ytfzf +++ b/ytfzf @@ -5,7 +5,7 @@ # versioning system: # major.minor.bugs -YTFZF_VERSION="2.6.1" +YTFZF_VERSION="git-2051.a67ba26" #ENVIRONMENT VARIABLES {{{ : "${YTFZF_CONFIG_DIR:=${XDG_CONFIG_HOME:-$HOME/.config}/ytfzf}" @@ -26,9 +26,9 @@ YTFZF_VERSION="2.6.1" : "${YTFZF_LOGFILE:=}" if [ "$YTFZF_LOGFILE" ] && { [ "$__is_fzf_preview" -eq 1 ] || [ "$__is_submenu" -eq 1 ]; }; then - printf "[%s]\n==============\nSubmenu: %d\nFzf Preview: %d\n==============\n" "$(date)" "$__is_submenu" "$__is_fzf_preview" >> "${YTFZF_LOGFILE}" + printf "[%s]\n==============\nSubmenu: %d\nFzf Preview: %d\n==============\n" "$(date)" "$__is_submenu" "$__is_fzf_preview" >>"${YTFZF_LOGFILE}" elif [ "${YTFZF_LOGFILE}" ]; then - : > "${YTFZF_LOGFILE}" + : >"${YTFZF_LOGFILE}" fi ! [ -d "$YTFZF_TEMP_DIR" ] && mkdir -p "${YTFZF_TEMP_DIR}" @@ -282,7 +282,7 @@ print_help___ytfzf__() { month year - --video-duration=