| Server IP : 121.121.20.254 / Your IP : 216.73.216.202 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Program Files/Git/usr/bin/ |
Upload File : |
#!/bin/sh -e # minimalistic replacement for `run-mailcap --action=cat <file>` if test "$#" != 1 ; then echo "Usage: astextplain <file>" 1>&2 exit 1 fi # XXX output encoding (UTF-8) hardcoded case "$(file --brief --mime-type "$1")" in application/vnd.oasis.opendocument.spreadsheet | application/vnd.oasis.opendocument.formula | application/vnd.oasis.opendocument.text) odt2txt "$1" || cat "$1" ;; application/msword) out=$(antiword -m UTF-8 "$1") && sed "s/\^M$//" <<<$out || cat "$1" ;; application/vnd.openxmlformats-officedocument.wordprocessingml.* | application/vnd.ms-word.*.macroenabled.12) docx2txt.pl "$1" - || cat "$1" ;; application/pdf) out=$(pdftotext -q -layout -enc UTF-8 "$1" -) && sed "s/(\^M$)|(^\^L)//" <<<$out || cat "$1" ;; # TODO add rtf support application/rtf | text/rtf | text/plain | inode/x-empty) cat "$1" ;; *) echo "E: unsupported filetype $1" 1>&2 exit 1 ;; esac exit 0