Were you able to get this to work, or are you still having trouble?

On Wednesday, September 18, 2013 8:12:22 AM UTC-4, dwrh wrote:
>
> Thanks, this looks very useful Andy, but I get:
> ===
> /Library/Application Support/BBEdit/Text Filters/Tidy PHP.sh: line 2: 
> orig: Permission denied
> /Library/Application Support/BBEdit/Text Filters/Tidy PHP.sh: line 3: 
> output: Permission denied
> cat: orig: No such file or directory
> rm: orig: No such file or directory
> rm: output: No such file or directory
> ===
> I have put -rwxrwxrwx on this file, but to no avail...
> Any guidance?
>
> Cheers,
> David
>
> On Friday, September 28, 2012 8:50:13 PM UTC-7, Andy Guzman wrote:
>>
>> Mophilly -
>>
>> I know you posted over a month ago, but I was just trying to sort out the 
>> same thing so I'll leave a note here of what I did in case you still need 
>> it or anyone else comes across this post. The solution is actually spread 
>> across a few of the comments in the post that was linked.
>>
>> 1. Download and uncompress the phptidy library as linked in that post. 
>> There also appears to be an updated but more Wordpress specific version 
>> here: https://github.com/scribu/wp-phptidy
>> 2. Navigate to your BBEdit "Application Support" directory (either in 
>> ~/Library or ~/Dropbox depending on your preference).
>> 3. Copy the Tidy PHP.sh file to the "Text Filters" folder.
>> 4. Copy the phptidy.php file to the "Unix Support" folder.
>> 5. Open up the Tidy PHP.sh file in BBEdit and replace the content with 
>> the following code:
>>
>> #!/bin/sh
>> cat /dev/stdin >orig
>> ../Unix\ Support/phptidy.php source orig > output
>> if [[ -s output ]]; then
>> cat output;
>> else
>> cat orig;
>> fi
>> rm orig;
>> rm output;
>>
>>  
>> 5a. If you decided to grab the wp-phptidy you'll want to change line 3 
>> slightly
>> 6. Now try to run the text filter within BBEdit from the Text>Apply Text 
>> Filter>Tidy PHP menu item.
>> 7. Success! (hopefully)
>>
>> There also may be a potential issue if you're running Mountain Lion - but 
>> I'm not 100% sure. I know that a lot of previously built in command line 
>> tools seemed to disappear in 10.8 but are re-installed with Xcode. Not sure 
>> if anything for these steps could be amongst the missing tools, but 
>> something to consider if you're troubleshooting.
>>
>> On Sunday, August 19, 2012 10:49:34 AM UTC-7, Mophilly wrote:
>>>
>>> I have not tried to add a Text Filter to BBEdit before.
>>>
>>> I am having a bit of trouble getting this to work with BBEdit 10.1.2. I 
>>> followed the instructions at post referenced above, "Tidy and format your 
>>> PHP and meet WordPress standards on Coda and TextWrangler".
>>>
>>> First try I put the wp-phptidy.php file in /usr/bin/, and "Tidy PHP.sh" 
>>> in Text Filters. I got an error 32 trying to "apply text filter". Then I 
>>> put both files into the Text Filters directory. I got an error 32 trying to 
>>> "apply text filter" with Tidy PHP.sh or wp-phptidy.php.
>>>
>>> In both cases applied  chmod to the php file, and relaunched BBEdit 
>>> before attempting to invoke the script.
>>>
>>> Can someone point me to a "how to" or similar?
>>>
>>

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.

Reply via email to