{"id":446,"date":"1997-09-09T01:36:29","date_gmt":"1997-09-09T09:36:29","guid":{"rendered":"http:\/\/www.birdhouse.org\/betips\/?p=446"},"modified":"1997-09-09T01:36:29","modified_gmt":"1997-09-09T09:36:29","slug":"pe-integrate-html-tidy","status":"publish","type":"post","link":"https:\/\/www.betips.net\/?p=446","title":{"rendered":"Pe:\n Integrate HTML Tidy"},"content":{"rendered":"<p>If you use <a href=\"http:\/\/www.bebits.com\/app\/533\/\">HTML Tidy<\/a> to clean up your HTML, and <a href=\"http:\/\/www.hekkelman.com\/\">Pe<\/a> for your HTML editing needs, you can integrate the two by addinng an HTML Tidy entry to Pe&#8217;s Extensions menu, so you can call it as if it were part of the editor. To do this, you only need to create a simple two-line shell script and save it to Pe&#8217;s &#8222;Extensions&#8220; folder.<br \/>\nIn Pe (or another editor), type the following shell script:<\/p>\n<pre>\ntidy <\/pre>\n<p>If you normally run tidy with command line options, you can put them after the program&#8217;s name (for instance, <code>tidy -wrap 75<\/code>).<br \/>\nSave your new script in Pe&#8217;s extension folder (by default, this is <code>\/boot\/apps\/Hekkelman\/Extensions<\/code>). Give it the name <code>Tidy HTML<\/code>. (You can name it anything you want, but due to a quirk in Pe&#8217;s programming, shell script extensions can&#8217;t start with the word &#8222;HTML&#8220;.)<br \/>\nTo make the script appear in the Extensions menu, you must make it executable. Open a Terminal and type:<\/p>\n<pre>chmod a+x '\/boot\/apps\/edit\/Hekkelman\/Extensions\/Tidy HTML'<\/pre>\n<p>(you may have to tweak that path if Pe is installed in a different location).<br \/>\nTo use the program, select everything in your document (Cmd\/Alt-A) and then select &#8222;Tidy HTML&#8220; from Pe&#8217;s extensions menu. The cleaned-up version of the document will replace your text, and any errors Pe finds will be shown to you in a separate window.<br \/>\nNote that any shell script or program that reads and writes to standard input and output can be added to Pe&#8217;s Extensions menu in this way.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you use HTML Tidy to clean up your HTML, and Pe for your HTML editing needs, you can integrate the two by addinng an HTML Tidy entry to Pe&#8217;s Extensions menu, so you can call it as if it were part of the editor. To do this, you only need to create a simple [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[2],"class_list":["post-446","post","type-post","status-publish","format-standard","hentry","tag-applications"],"_links":{"self":[{"href":"https:\/\/www.betips.net\/index.php?rest_route=\/wp\/v2\/posts\/446","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.betips.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.betips.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.betips.net\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.betips.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=446"}],"version-history":[{"count":0,"href":"https:\/\/www.betips.net\/index.php?rest_route=\/wp\/v2\/posts\/446\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.betips.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=446"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.betips.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=446"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.betips.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=446"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}