Pedro Valentini
2005-May-16 19:57 UTC
Run a PHP Script and get the result, by Shell Command ?
Hi, We think in use RedCloth but we use in all documents other markdown rules, and have this conde in PHP. How can I run a php script and get the result in rails?? Can I do this? If don''t have any way I can try call the php script by shell, so what is the ruby command to execute shell commands and get the results?? Thank you -- Pedro C. Valentini pedro-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org +55 (21) 8708-8035
Ioan Bizau jr.
2005-May-16 20:10 UTC
Re: Run a PHP Script and get the result, by Shell Command ?
On Monday 16 May 2005 10:57 pm, Pedro Valentini wrote:> what is the ruby command to execute shell commands and get the > results??`command` -- Ioan Bizau jr. http://ib.stalker.ro _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Pedro Valentini
2005-May-16 21:42 UTC
Re: Run a PHP Script and get the result, by Shell Command ?
Ioan Bizau jr. escreveu:>On Monday 16 May 2005 10:57 pm, Pedro Valentini wrote: > > >> what is the ruby command to execute shell commands and get the >>results?? >> >> > >`command` > >Thank you, but how I get a value from this command?? warn `php ./lib/markdown test.txt` Work''s with: warn `php ./lib/markdown test.txt > test.htm` but not with the first command line. -- Pedro C. Valentini pedro-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org +55 (21) 8708-8035
Stephen Waits
2005-May-16 21:49 UTC
Re: Run a PHP Script and get the result, by Shell Command ?
On Mon, 16 May 2005, Pedro Valentini wrote:> Thank you, but how I get a value from this command??Have your command output to stdout. Or, if you''re just trying to render Markdown text to HTML, just do it natively in Ruby via one of the modules commonly used to do this. --Steve
Pedro Valentini
2005-May-16 22:17 UTC
Re: Run a PHP Script and get the result, by Shell Command ?
Stephen Waits escreveu:> > On Mon, 16 May 2005, Pedro Valentini wrote: > >> Thank you, but how I get a value from this command?? > > > Have your command output to stdout. > > Or, if you''re just trying to render Markdown text to HTML, just do it > natively in Ruby via one of the modules commonly used to do this. > > --SteveYes, I''m trying this but we use markdown from http://www.michelf.com/projects/php-markdown/ that is based in http://daringfireball.net/projects/markdown/ format RedCloth use other format, have a module that use the format that I use? If have please what is the name? Thank you -- Pedro C. Valentini pedro-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org +55 (21) 8708-8035
Jason Foreman
2005-May-16 22:22 UTC
Re: Run a PHP Script and get the result, by Shell Command ?
On 5/16/05, Pedro Valentini <pedro-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org> wrote:> > Stephen Waits escreveu: > > > > > On Mon, 16 May 2005, Pedro Valentini wrote: > > > >> Thank you, but how I get a value from this command?? > > > > > > Have your command output to stdout. > > > > Or, if you''re just trying to render Markdown text to HTML, just do it > > natively in Ruby via one of the modules commonly used to do this. > > > > --Steve > > Yes, I''m trying this but we use markdown from > http://www.michelf.com/projects/php-markdown/ > that is based in http://daringfireball.net/projects/markdown/ format > RedCloth use other format, have a module that use the format that I use? > If have please what is the name? > > Thank you > > -- > > Pedro C. Valentini > pedro-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org > +55 (21) 8708-8035 > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >I believe BlueCloth [1] is a better markdown implementation. RedCloth is great for textile. Jason [1] http://bluecloth.rubyforge.org/
Bill Guindon
2005-May-16 22:22 UTC
Re: Run a PHP Script and get the result, by Shell Command ?
On 5/16/05, Pedro Valentini <pedro-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org> wrote:> > Stephen Waits escreveu: > > > > > On Mon, 16 May 2005, Pedro Valentini wrote: > > > >> Thank you, but how I get a value from this command?? > > > > > > Have your command output to stdout. > > > > Or, if you''re just trying to render Markdown text to HTML, just do it > > natively in Ruby via one of the modules commonly used to do this. > > > > --Steve > > Yes, I''m trying this but we use markdown from > http://www.michelf.com/projects/php-markdown/ > that is based in http://daringfireball.net/projects/markdown/ format > RedCloth use other format, have a module that use the format that I use? > If have please what is the name?Bluecloth? http://bluecloth.rubyforge.org/> Thank you > > -- > > Pedro C. Valentini > pedro-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org > +55 (21) 8708-8035 > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Bill Guindon (aka aGorilla)