Hi,
Is it possible today to write this using Coral ? find application library -type f \( -name "*.php" -o -name "*.phtml" \) -exec /usr/local/bin/xgettext -j -L PHP --from-code=utf-8 --keyword=traduire --keyword=_ -o library/translation/fr.pot {} \;
for i in `ls library/translation/*.po` do /usr/local/bin/msgmerge -s $i library/translation/fr.pot -o $i /usr/local/bin/msgfmt -o `echo $i|cut -d '.' -f1`.mo $i
done I need to write several scripts like this - would be cool to start with Coral. Laurent Laffont - @lolgzs
Pharo Smalltalk Screencasts: http://www.pharocasts.com/ Blog: http://magaloma.blogspot.com/
Developer group: http://cara74.seasidehosting.st
|
On Mar 14, 2011, at 12:33 PM, laurent laffont wrote: > Hi, > > Is it possible today to write this using Coral ? > > find application library -type f \( -name "*.php" -o -name "*.phtml" \) -exec /usr/local/bin/xgettext -j -L PHP --from-code=utf-8 --keyword=traduire --keyword=_ -o library/translation/fr.pot {} \; > for i in `ls library/translation/*.po` > do > /usr/local/bin/msgmerge -s $i library/translation/fr.pot -o $i > /usr/local/bin/msgfmt -o `echo $i|cut -d '.' -f1`.mo $i > done > > > > I need to write several scripts like this - would be cool to start with Coral. I would love that too. Can you give a try? Stef |
In reply to this post by laurent laffont
On 14 March 2011 12:33, laurent laffont <[hidden email]> wrote:
> Hi, > Is it possible today to write this using Coral ? > find application library -type f \( -name "*.php" -o -name "*.phtml" \) > -exec /usr/local/bin/xgettext -j -L PHP --from-code=utf-8 > --keyword=traduire --keyword=_ -o library/translation/fr.pot {} \; > for i in `ls library/translation/*.po` > do > /usr/local/bin/msgmerge -s $i library/translation/fr.pot -o $i > /usr/local/bin/msgfmt -o `echo $i|cut -d '.' -f1`.mo $i > done > > > I need to write several scripts like this - would be cool to start with > Coral. Yes. Definitely :) > > Laurent Laffont - @lolgzs > > Pharo Smalltalk Screencasts: http://www.pharocasts.com/ > Blog: http://magaloma.blogspot.com/ > Developer group: http://cara74.seasidehosting.st > -- Best regards, Igor Stasenko AKA sig. |
In reply to this post by laurent laffont
Hi Laurent,
I would say yes, because Coral can execute any piece of Smalltalk. So if you can do what that script does with OSProcess, there is no reason you can't put it in a Coral script. At that time, there is no Coral API to make your life easier on top on things like OSProcess, but perhaps I should write some things like that. If you have any ideas while trying, don't hesitate to tell me :). Adrien. From: [hidden email] Date: Mon, 14 Mar 2011 12:33:30 +0100 To: [hidden email] Subject: [Pharo-project] from bash to Coral Hi, Is it possible today to write this using Coral ? find application library -type f \( -name "*.php" -o -name "*.phtml" \) -exec /usr/local/bin/xgettext -j -L PHP --from-code=utf-8 --keyword=traduire --keyword=_ -o library/translation/fr.pot {} \;
for i in `ls library/translation/*.po` do /usr/local/bin/msgmerge -s $i library/translation/fr.pot -o $i /usr/local/bin/msgfmt -o `echo $i|cut -d '.' -f1`.mo $i
done I need to write several scripts like this - would be cool to start with Coral. Laurent Laffont - @lolgzs
Pharo Smalltalk Screencasts: http://www.pharocasts.com/ Blog: http://magaloma.blogspot.com/
Developer group: http://cara74.seasidehosting.st
|
On Mon, Mar 14, 2011 at 3:20 PM, Adrien BARREAU <[hidden email]> wrote:
OK, I put this on my things-to-try list :) Laurent
|
In reply to this post by Adrien BARREAU
FYI, rudimentary scripting on top of OSProcess/CommandShell is in class
CommandShell, method category "command scripting". Possibly the shell syntax parsing, file name globbing etc from CommandShell could be tied in with Coral, although I have not looked into this. Dave On Mon, Mar 14, 2011 at 03:20:06PM +0100, Adrien BARREAU wrote: > > Hi Laurent, > > I would say yes, because Coral can execute any piece of Smalltalk. > So if you can do what that script does with OSProcess, there is no reason you can't put it in a Coral script. > > At that time, there is no Coral API to make your life easier on top on things like OSProcess, but perhaps I should write some things like that. > If you have any ideas while trying, don't hesitate to tell me :). > > Adrien. > > From: [hidden email] > Date: Mon, 14 Mar 2011 12:33:30 +0100 > To: [hidden email] > Subject: [Pharo-project] from bash to Coral > > Hi, > Is it possible today to write this using Coral ? > find application library -type f \( -name "*.php" -o -name "*.phtml" \) -exec /usr/local/bin/xgettext -j -L PHP --from-code=utf-8 --keyword=traduire --keyword=_ -o library/translation/fr.pot {} \; > > for i in `ls library/translation/*.po`do /usr/local/bin/msgmerge -s $i library/translation/fr.pot -o $i /usr/local/bin/msgfmt -o `echo $i|cut -d '.' -f1`.mo $i > > done > > > I need to write several scripts like this - would be cool to start with Coral. > > Laurent Laffont - @lolgzs > > > > Pharo Smalltalk Screencasts: http://www.pharocasts.com/ > Blog: http://magaloma.blogspot.com/ > Developer group: http://cara74.seasidehosting.st > > > |
tx david.
> FYI, rudimentary scripting on top of OSProcess/CommandShell is in class > CommandShell, method category "command scripting". Possibly the shell > syntax parsing, file name globbing etc from CommandShell could be tied > in with Coral, although I have not looked into this. > > Dave > > On Mon, Mar 14, 2011 at 03:20:06PM +0100, Adrien BARREAU wrote: >> >> Hi Laurent, >> >> I would say yes, because Coral can execute any piece of Smalltalk. >> So if you can do what that script does with OSProcess, there is no reason you can't put it in a Coral script. >> >> At that time, there is no Coral API to make your life easier on top on things like OSProcess, but perhaps I should write some things like that. >> If you have any ideas while trying, don't hesitate to tell me :). >> >> Adrien. >> >> From: [hidden email] >> Date: Mon, 14 Mar 2011 12:33:30 +0100 >> To: [hidden email] >> Subject: [Pharo-project] from bash to Coral >> >> Hi, >> Is it possible today to write this using Coral ? >> find application library -type f \( -name "*.php" -o -name "*.phtml" \) -exec /usr/local/bin/xgettext -j -L PHP --from-code=utf-8 --keyword=traduire --keyword=_ -o library/translation/fr.pot {} \; >> >> for i in `ls library/translation/*.po`do /usr/local/bin/msgmerge -s $i library/translation/fr.pot -o $i /usr/local/bin/msgfmt -o `echo $i|cut -d '.' -f1`.mo $i >> >> done >> >> >> I need to write several scripts like this - would be cool to start with Coral. >> >> Laurent Laffont - @lolgzs >> >> >> >> Pharo Smalltalk Screencasts: http://www.pharocasts.com/ >> Blog: http://magaloma.blogspot.com/ >> Developer group: http://cara74.seasidehosting.st >> >> >> > |
Free forum by Nabble | Edit this page |