My build of nnn with minor changes
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 
 

25 lignes
613 B

  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 [ -n "$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