Howdy;
I like many of ya'll switched from BBedit to textMate, and love it, I can really use some help getting 'SmartyPants' and Markdown runnning (I got HTML Tidy going) how exactly do I get a PERL script running?
any help would be hugely appreciated..
On Feb 16, 2005, at 1:31 AM, saul rosenbaum wrote:
Howdy;
I like many of ya'll switched from BBedit to textMate, and love it, I can really use some help getting 'SmartyPants' and Markdown runnning (I got HTML Tidy going) how exactly do I get a PERL script running?
Saul,
+ Select the Markdown/Smarty Pants text want to convert, or (if it's the whole document) skip this step + Hit Option+Shift+R to launch the "Filter Through Command..." dialogue + Place the path to your markdown.pl or SmartyPants.pl in the "Command" field/pull-down (mine's in "/usr/local/bin/markdown.pl") + Choose "Selection" or "Document" for Input + Choose your Output option. I usually do "Replace selection," "Replace document" or "Place on clipboard" + Make sure you have your safety goggles on :) + Click "Execute"
Hope this helps. This could easily be made into a Macro as well.
OT: how did you get HTMLtidy working?
-t
Hmm.. I get back a line that says -- permission denied..
On Feb 16, 2005, at 4:01 PM, Tim Martens wrote:
On Feb 16, 2005, at 1:31 AM, saul rosenbaum wrote:
Howdy;
I like many of ya'll switched from BBedit to textMate, and love it, I can really use some help getting 'SmartyPants' and Markdown runnning (I got HTML Tidy going) how exactly do I get a PERL script running?
Saul,
- Select the Markdown/Smarty Pants text want to convert, or (if it's
the whole document) skip this step
- Hit Option+Shift+R to launch the "Filter Through Command..." dialogue
- Place the path to your markdown.pl or SmartyPants.pl in the
"Command" field/pull-down (mine's in "/usr/local/bin/markdown.pl")
- Choose "Selection" or "Document" for Input
- Choose your Output option. I usually do "Replace selection,"
"Replace document" or "Place on clipboard"
- Make sure you have your safety goggles on :)
- Click "Execute"
Hope this helps. This could easily be made into a Macro as well.
OT: how did you get HTMLtidy working?
-t
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Are you logged in as administrator?
On Feb 16, 2005, at 12:29 PM, saul rosenbaum wrote:
Hmm.. I get back a line that says -- permission denied..
On Feb 16, 2005, at 4:01 PM, Tim Martens wrote:
On Feb 16, 2005, at 1:31 AM, saul rosenbaum wrote:
Howdy;
I like many of ya'll switched from BBedit to textMate, and love it, I can really use some help getting 'SmartyPants' and Markdown runnning (I got HTML Tidy going) how exactly do I get a PERL script running?
Saul,
- Select the Markdown/Smarty Pants text want to convert, or (if it's
the whole document) skip this step
- Hit Option+Shift+R to launch the "Filter Through Command..."
dialogue
- Place the path to your markdown.pl or SmartyPants.pl in the
"Command" field/pull-down (mine's in "/usr/local/bin/markdown.pl")
- Choose "Selection" or "Document" for Input
- Choose your Output option. I usually do "Replace selection,"
"Replace document" or "Place on clipboard"
- Make sure you have your safety goggles on :)
- Click "Execute"
Hope this helps. This could easily be made into a Macro as well.
OT: how did you get HTMLtidy working?
-t
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Yes, I only have the one account on the machine... very odd, I have no such issue with TidyHTML perhaps because it's an executable..
On Feb 16, 2005, at 7:25 PM, Tim Martens wrote:
Are you logged in as administrator?
On Feb 16, 2005, at 12:29 PM, saul rosenbaum wrote:
Hmm.. I get back a line that says -- permission denied..
On Feb 16, 2005, at 4:01 PM, Tim Martens wrote:
On Feb 16, 2005, at 1:31 AM, saul rosenbaum wrote:
Howdy;
I like many of ya'll switched from BBedit to textMate, and love it, I can really use some help getting 'SmartyPants' and Markdown runnning (I got HTML Tidy going) how exactly do I get a PERL script running?
Saul,
- Select the Markdown/Smarty Pants text want to convert, or (if it's
the whole document) skip this step
- Hit Option+Shift+R to launch the "Filter Through Command..."
dialogue
- Place the path to your markdown.pl or SmartyPants.pl in the
"Command" field/pull-down (mine's in "/usr/local/bin/markdown.pl")
- Choose "Selection" or "Document" for Input
- Choose your Output option. I usually do "Replace selection,"
"Replace document" or "Place on clipboard"
- Make sure you have your safety goggles on :)
- Click "Execute"
Hope this helps. This could easily be made into a Macro as well.
OT: how did you get HTMLtidy working?
-t
_ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
At 12:49 AM -0500 2/17/05, saul rosenbaum wrote:
- Place the path to your markdown.pl or SmartyPants.pl in the
"Command" field/pull-down (mine's in "/usr/local/bin/markdown.pl")
Hmm.. I get back a line that says -- permission denied.. very odd, I have no such issue with TidyHTML perhaps because it's an executable.
Forgive the dumb suggestion, but did you chmod +x the perl script? Can you run the script using the same command format from the command prompt?
- Eric
Not such a dumb suggestion -- cause I have no idea how to do that... have a step by step?
On Feb 17, 2005, at 12:56 AM, Eric Hsu wrote:
At 12:49 AM -0500 2/17/05, saul rosenbaum wrote:
- Place the path to your markdown.pl or SmartyPants.pl in the
"Command" field/pull-down (mine's in "/usr/local/bin/markdown.pl")
Hmm.. I get back a line that says -- permission denied.. very odd, I have no such issue with TidyHTML perhaps because it's an executable.
Forgive the dumb suggestion, but did you chmod +x the perl script? Can you run the script using the same command format from the command prompt?
- Eric
-- Eric Hsu, Assistant Professor of Mathematics San Francisco State University erichsu@math.sfsu.edu http://math.sfsu.edu/hsu ______________________________________________________________________ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
At 1:03 AM -0500 2/17/05, saul rosenbaum wrote:
Not such a dumb suggestion -- cause I have no idea how to do that... have a step by step?
If your markdown.pl lives at (say) /usr/local/bin/markdown.pl, you need to run
chmod +x /usr/local/bin/markdown.pl
The +x sets the 'execute' flag so the shell knows to try to run what looks like a text file. Otherwise, you need to run it with "perl /usr/local/bin/markdown.pl".
You can check if you did it right by running
/usr/local/bin/markdown.pl -v
from the shell. If you get a version, you should be okay from TM. If you get the permission denied thing, you probably messed up the chmod +x. You can check the file flags with
ls -l /usr/local/bin/markdown.pl
which should give you some r,w,x and - signs all grouped at the front. If there are some x's then you set the flags correctly. For instance, mine looks like "-rwxr-xr-x".
Hope that's helpful. - Eric
ROCK ON! -- it works
thank you so much everyone -- and I learned a few things (like where my /usr/local/bin) directory was
Thanks ERIC for the shell lesson
At 11:01 AM -1000 2/16/05, Tim Martens wrote:
OT: how did you get HTMLtidy working?
I got TM to play with HTML Tidy as described here: http://one.textdrive.com/pipermail/textmate/2004-December/001673.html
best, Eric
On Feb 16, 2005, at 22:01, Tim Martens wrote:
- Hit Option+Shift+R to launch the "Filter Through Command..."
dialogue [...] This could easily be made into a Macro as well.
You can also create a command instead of having a macro do “Filter Through Command…”. This makes it easier to later change the shell command executed.
Howdy; anyone have a command to strip HTML markup? for selected text?
TIA
saul
On Feb 18, 2005, at 23:08, Tim Martens wrote:
On Feb 18, 2005, at 10:15 AM, Xavier Noria wrote:
lynx -stdin -dump
/bin/bash: line 1: lynx: command not found
It does not come with the system, you can install it with Fink, DarwinPorts, or compile the sources from
http://lynx.isc.org/current/lynx-cur.tgz
-- fxn
On Feb 18, 2005, at 3:00 PM, saul rosenbaum wrote:
anyone have a command to strip HTML markup? for selected text?
This little sed ditty will probably do most of what you specified: sed -e 's#<[^>]*>##g'
On 18 Feb 2005, at 20:00, saul rosenbaum wrote:
anyone have a command to strip HTML markup? for selected text?
if you have PHP installed then you can just use the following command:
php -r 'echo strip_tags( $_ENV["TM_SELECTED_TEXT"] );'
if you want to keep all <p> tags, then you would just create a copy of the command with
php -r 'echo strip_tags( $_ENV["TM_SELECTED_TEXT"], "<p>" );'
and so on, more info on the PHP site.
Don't have PHP, well there's an easy 1 minute install option at http://www.entropy.ch/software/macosx/php/
Kind regards,
Mats
---- "TextMate, coding with an incredible sense of joy and ease" - www.macromates.com -