Various shell scripts for use on the RTC server. Not your official RTC stuff!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

17 lines
589 B

#! /bin/bash
# Alternative library script for rawtext.club by samhunter
# Author: samhunter@rawtext.club
# https://git.rawtext.club/samhunter/rtc-shell-scripts
# Dependencies: epy
#
readonly PROGNAME="${0##/}"
readonly VERSION="1.0"
[ ${COLUMNS:-80} -lt 70 ] && PREVIEWOPTS="down,80%" || PREVIEWOPTS="right,66%"
EBOOK=$(find /home/*/books -type f -readable -iname "*.epub" 2>/dev/null |\
fzf \
--preview 'epy -d {} |fold -s |less' \
--preview-window "$PREVIEWOPTS" \
--bind 'left:preview-half-page-up' \
--bind 'right:preview-half-page-down' \
--color=dark) && epy "${EBOOK}"