Have a look at the chapter about command handler in Deep into Pharo
because you have all you need You can script the loading and execution of expressions easily. People like julien, damien at Pharodays started to resume a better DSL for command descriptions. Le 13/4/16 19:48, Alistair Grant a écrit : > On Wed, Apr 13, 2016 at 05:55:22PM +0200, stepharo wrote: >>> I'd be happy to, thanks. Please let me know what I need to do to get >>> involved (and remember that this is my hobby and I don't get as much >>> time as I'd like, so my responses won't always be as fast as we'd like). >> - start to see if you can write the scripts you want. >> - identify missing functionality >> - use OSSubprocess > Sure... > > While the existing "st" handler has some uses, I think it will be a bit > limited as I expect that most of the scripts I would write would end up > being: > > 1. Load required packages > 2. Maybe do some initialisation > 3. Send (basically) a single message to start the real work > > Which means that I have to maintain a separate file that adds little > value. > > As implied above, I'd like the "script" to be distributable as either > one or two files and take advantage of: > > * OO design > * Pharo's excellent development environment > * SUnit > > I've hacked together a quick framework in which a "script" is actually a > a Monticello package. The package name is supplied on the command line > along with some pre-defined options and anything else required by the > script. The package is loaded and a message sent to the class of the > same name. E.g.: > > pharo script.image cliscript WorkedHours Hours.xlsx > > would load ConfigurationOfWorkedHours, load the package, and > send WorkedHours>>runWithHandler: theCliHandler. (The example script > then reads the Hours spreadsheet and calculates the total hours worked). > > Current help text... > >> ./pharo script.image cliscript --help > CliScript enables running "Monticello" scripts. > > The script is identified by its package name. CliScript looks for a > configuration package with the same name in the local package cache, > loads it, and sends the runWithHandler: message to the class with the > same name. > > Command line parameters: > > packageName The package to load and execute. > > Command line options: > > --debug Halt at the start of the message > --log-transcript Redirect transcript output to transcript.log > > > > I haven't had to use OSSubprocess yet, next steps include: > > * Read XSLX spreadsheets instead of having to export to CSV. > The script mostly does date and time calculations, I need to confirm > that they are working properly in Tabular. > * Add logging (I haven't looked for any logging capability yet). > * Ideally, implement the ODS support in the Tabular package (stretch > goal :-)). > > > Thanks! > Alistair > > |
In reply to this post by Damien Pollet-2
Le 14/4/16 01:52, Damien Pollet a
écrit :
Yes it would be really nice.
|
In reply to this post by stepharo
On Thu, Apr 14, 2016 at 08:37:39AM +0200, stepharo wrote:
> Have a look at the chapter about command handler in Deep into Pharo > because you have all you need > > You can script the loading and execution of expressions easily. > > People like julien, damien at Pharodays started to resume a better DSL for > command descriptions. Thanks. I had started reading Pharo by Example, but it looks like Deep into Pharo is more up to date. Thanks again, Alistair |
On Saturday, 16 April 2016, Alistair Grant <[hidden email]> wrote:
A new version of PBE is almost ready. You can find it at https://ci.inria.fr/pharo-contribution/view/Books/job/UpdatedPharoByExample/lastSuccessfulBuild/artifact/book-result/UpdatedPharoByExample.pdf . Other formats https://ci.inria.fr/pharo-contribution/view/Books/job/UpdatedPharoByExample/lastSuccessfulBuild/artifact/book-result Thanks again, From my phone~~ -- Cheers Cyril Ferlicot |
On Sat, Apr 16, 2016 at 01:43:29PM +0200, Cyril Ferlicot wrote:
> A new version of PBE is almost ready. You can find it at https://ci.inria.fr/ > pharo-contribution/view/Books/job/UpdatedPharoByExample/lastSuccessfulBuild/ > artifact/book-result/UpdatedPharoByExample.pdf . > Other formats https://ci.inria.fr/pharo-contribution/view/Books/job/ > UpdatedPharoByExample/lastSuccessfulBuild/artifact/book-result Are you looking for feedback? Thanks, Alistair |
Le 17/4/16 10:01, Alistair Grant a écrit : > On Sat, Apr 16, 2016 at 01:43:29PM +0200, Cyril Ferlicot wrote: >> A new version of PBE is almost ready. You can find it at https://ci.inria.fr/ >> pharo-contribution/view/Books/job/UpdatedPharoByExample/lastSuccessfulBuild/ >> artifact/book-result/UpdatedPharoByExample.pdf . >> Other formats https://ci.inria.fr/pharo-contribution/view/Books/job/ >> UpdatedPharoByExample/lastSuccessfulBuild/artifact/book-result > Are you looking for feedback? Yes but mainly english typos because I do not have the energy to do more and the book should get out. By the end of the month. Stef > > Thanks, > Alistair > > > |
On Sun, Apr 17, 2016 at 09:53:55PM +0200, stepharo wrote:
> > > Le 17/4/16 10:01, Alistair Grant a écrit : > > On Sat, Apr 16, 2016 at 01:43:29PM +0200, Cyril Ferlicot wrote: > > > A new version of PBE is almost ready. You can find it at https://ci.inria.fr/ > > > pharo-contribution/view/Books/job/UpdatedPharoByExample/lastSuccessfulBuild/ > > > artifact/book-result/UpdatedPharoByExample.pdf . > > > Other formats https://ci.inria.fr/pharo-contribution/view/Books/job/ > > > UpdatedPharoByExample/lastSuccessfulBuild/artifact/book-result > > Are you looking for feedback? > > Yes but mainly english typos because I do not have the energy to do more and > the book should get out. > By the end of the month. OK, I'll look at this first (with limited time) and if I happen to see anything will report back. Thanks, Alistair |
Free forum by Nabble | Edit this page |