{"id":166,"date":"2014-06-24T12:01:58","date_gmt":"2014-06-24T12:01:58","guid":{"rendered":"http:\/\/tastaturkind.ch\/?p=166"},"modified":"2014-06-24T12:01:58","modified_gmt":"2014-06-24T12:01:58","slug":"lessfilter","status":"publish","type":"post","link":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/2014\/06\/24\/lessfilter\/","title":{"rendered":"lessfilter"},"content":{"rendered":"<p><code><br \/>\n#!\/bin\/sh<br \/>\ncase \"$1\" in<br \/>\n    *.e)<br \/>\n enscript --color --language=ansi --highlight=eiffel -o - -q \"$1\"<br \/>\n ;;<br \/>\n    *akefile | *akefile.in | *akefile.am)<br \/>\n enscript --color --language=ansi --highlight=makefile -o - -q \"$1\"<br \/>\n ;;<br \/>\n    *.cc | *.C | *.hh | *.hxx | *.cpp | *.hpp | *.yy | *.ll)<br \/>\n enscript --color --language=ansi --highlight=cpp -o - -q \"$1\"<br \/>\n ;;<br \/>\n    *.c | *.h | *.y | *.l | *.php)<br \/>\n enscript --color --language=ansi --highlight=c -o - -q \"$1\"<br \/>\n ;;<br \/>\n    *.sh)<br \/>\n enscript --color --language=ansi --highlight=sh -o - -q \"$1\"<br \/>\n ;;<br \/>\n    *.tex)<br \/>\n enscript --color --language=ansi --highlight=tex -o - -q \"$1\"<br \/>\n ;;<br \/>\n    *.el)<br \/>\n enscript --color --language=ansi --highlight=elisp -o - -q \"$1\"<br \/>\n ;;<br \/>\n    *.pl | *.pm)<br \/>\n enscript --color --language=ansi --highlight=perl -o - -q \"$1\"<br \/>\n ;;<br \/>\n    *.ada | *.ads | *.adb)<br \/>\n enscript --color --language=ansi --highlight=ada -o - -q \"$1\"<br \/>\n ;;<br \/>\n    *.m | *.mi)<br \/>\n enscript --color --language=ansi --highlight=objc -o - -q \"$1\"<br \/>\n ;;<br \/>\n    *.idl)<br \/>\n enscript --color --language=ansi --highlight=idl -o - -q \"$1\"<br \/>\n ;;<br \/>\n    *.inf)<br \/>\n enscript --color --language=ansi --highlight=inf -o - -q \"$1\"<br \/>\n ;;<br \/>\n    *.awk)<br \/>\n enscript --color --language=ansi --highlight=awk -o - -q \"$1\"<br \/>\n ;;<br \/>\n    *.bash)<br \/>\n enscript --color --language=ansi --highlight=bash -o - -q \"$1\"<br \/>\n ;;<br \/>\n    *.csh)<br \/>\n enscript --color --language=ansi --highlight=csh -o - -q \"$1\"<br \/>\n ;;<br \/>\n    *.ksh)<br \/>\n enscript --color --language=ansi --highlight=ksh -o - -q \"$1\"<br \/>\n ;;<br \/>\n    *.sql)<br \/>\n enscript --color --language=ansi --highlight=sql -o - -q \"$1\"<br \/>\n ;;<br \/>\n    *.pas | *.dpk | *.pce)<br \/>\n enscript --color --language=ansi --highlight=delphi -o - -q \"$1\"<br \/>\n ;;<br \/>\n    *.java)<br \/>\n enscript --color --language=ansi --highlight=java -o - -q \"$1\"<br \/>\n ;;<br \/>\n    *.f | *.for | *.FOR | *.F | *.fpp | *.FPP)<br \/>\n enscript --color --language=ansi --highlight=fortran -o - -q \"$1\"<br \/>\n ;;<br \/>\n    *.lhs | *.hs)<br \/>\n enscript --color --language=ansi --highlight=haskell -o - -q \"$1\"<br \/>\n ;;<br \/>\n    *.m4)<br \/>\n enscript --color --language=ansi --highlight=m4 -o - -q \"$1\"<br \/>\n ;;<br \/>\n    *.js)<br \/>\n enscript --color --language=ansi --highlight=javascript -o - -q \"$1\"<br \/>\n ;;<br \/>\n    *.vhdl)<br \/>\n enscript --color --language=ansi --highlight=vhdl -o - -q \"$1\"<br \/>\n ;;<br \/>\n    *.vrml)<br \/>\n enscript --color --language=ansi --highlight=vrml -o - -q \"$1\"<br \/>\n ;;<br \/>\n    Changelog)<br \/>\n enscript --color --language=ansi --highlight=changelog -o - -q \"$1\"<br \/>\n ;;<br \/>\n    *.html | *.htm)<br \/>\n html2text \"$1\"<br \/>\n ;;<br \/>\n    *.ps | *.pdf)<br \/>\n pstotext \"$1\"<br \/>\n ;;<br \/>\n    *.patch.gz | *.diff.gz)<br \/>\n gunzip -c \"$1\" | enscript --color --language=ansi --highlight=diff -o - -q -<br \/>\n ;;<br \/>\n    *.patch | *.diff)<br \/>\n enscript --color --language=ansi --highlight=diff -o - -q \"$1\"<br \/>\n ;;<br \/>\n    *) # We don't handle this format.<br \/>\n exit 1<br \/>\n ;;<br \/>\nesac<br \/>\n# No further processing by lesspipe necessary<br \/>\nexit 0<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>#!\/bin\/sh case &#8222;$1&#8220; in *.e) enscript &#8211;color &#8211;language=ansi &#8211;highlight=eiffel -o &#8211; -q &#8222;$1&#8220; ;; *akefile | *akefile.in | *akefile.am) enscript &#8211;color &#8211;language=ansi &#8211;highlight=makefile -o &#8211; -q &#8222;$1&#8220; ;; *.cc | *.C | *.hh | *.hxx | *.cpp | *.hpp | &hellip; <a href=\"https:\/\/oliver-frick.ch\/wordpress\/index.php\/2014\/06\/24\/lessfilter\/\">Weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-166","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/166","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=166"}],"version-history":[{"count":0,"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/166\/revisions"}],"wp:attachment":[{"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}