[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 <http://twitter.com/#!/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
On 14 March 2011 12:33, laurent laffont <laurent.laffont@gmail.com> 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
every time i see things like that i want vomit :)
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.
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: laurent.laffont@gmail.com Date: Mon, 14 Mar 2011 12:33:30 +0100 To: pharo-project@lists.gforge.inria.fr 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 <abarreau.dev@live.fr>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 :).
OK, I put this on my things-to-try list :) Laurent
Adrien.
------------------------------ From: laurent.laffont@gmail.com Date: Mon, 14 Mar 2011 12:33:30 +0100 To: pharo-project@lists.gforge.inria.fr 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 <http://twitter.com/#%21/lolgzs>
Pharo Smalltalk Screencasts: http://www.pharocasts.com/ Blog: http://magaloma.blogspot.com/ Developer group: http://cara74.seasidehosting.st
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: laurent.laffont@gmail.com Date: Mon, 14 Mar 2011 12:33:30 +0100 To: pharo-project@lists.gforge.inria.fr 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: laurent.laffont@gmail.com Date: Mon, 14 Mar 2011 12:33:30 +0100 To: pharo-project@lists.gforge.inria.fr 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
participants (5)
-
Adrien BARREAU -
David T. Lewis -
Igor Stasenko -
laurent laffont -
Stéphane Ducasse