My build of nnn with minor changes
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

pdfview 615 B

123456789101112131415161718192021222324
  1. #!/usr/bin/env sh
  2. # Description: View a PDF file in pager
  3. #
  4. # Notes:
  5. # - $PAGER must be 'less -R' or 'most'
  6. # - To use mutool, uncomment the relevant lines and comment the pdftotext line
  7. #
  8. # Shell: POSIX compliant
  9. # Author: Arun Prakash Jana
  10. if ! [ -z "$1" ]; then
  11. if [ "$(head -c 4 "$1")" = "%PDF" ]; then
  12. # Convert using pdftotext
  13. pdftotext -nopgbrk -layout "$1" - | sed 's/\xe2\x80\x8b//g' | $PAGER
  14. # Convert using mutool
  15. # file=`basename "$1"`
  16. # txt=/tmp/"$file".txt
  17. # mutool convert -o "$txt" "$1"
  18. # eval $PAGER $txt
  19. # rm "$txt"
  20. fi
  21. fi