From 594d645e259083b217518ef0507edfe5395711af Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Fri, 22 Nov 2019 17:51:13 +0530 Subject: Rename plugins, group related ones --- plugins/readit | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100755 plugins/readit (limited to 'plugins/readit') diff --git a/plugins/readit b/plugins/readit deleted file mode 100755 index 4f47992..0000000 --- a/plugins/readit +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env sh - -# Description: Read a text or PDF file in British English -# -# Shell: POSIX compliant -# Author: Arun Prakash Jana - -if ! [ -z "$1" ]; then - tmpf="$(basename "$1")" - tmpf="${TMPDIR:-/tmp}"/"${tmpf%.*}" - - if [ "$(head -c 4 "$1")" = "%PDF" ]; then - # Convert using pdftotext - pdftotext -nopgbrk -layout "$1" - | sed 's/\xe2\x80\x8b//g' > "$tmpf".txt - - pico2wave -w "$tmpf".wav -l en-GB "$(tr '\n' ' ' < "$tmpf".txt)" - - rm "$tmpf".txt - else - pico2wave -w "$tmpf".wav -l en-GB "$(tr '\n' ' ' < "$1")" - fi - - # to jump around and note the time - mpv "$tmpf".wav - - # flat read but better quality - # play -qV0 "$tmpf".wav treble 2 gain -l 2 - - rm "$tmpf".wav -fi -- cgit v1.2.3-70-g09d2