I have built an application based on the GTInspector. Hurray!
Now I want to share it and I need to write documentation. I would like to include screenshots in the docs but I don't want to create them by hand.
So my question is: Is there an easy way to automatically generate screenshots for GTInspector extension methods? e.g. to specify an object and the name of a presentation and to get a PNG file of how that looks in the GTInspector.
Thanks!
P.S. References to how other people write their docs in general would be interesting.
P.P.S. Here is GTInspector browsing internal data structures of a JIT compiler :-)
Hi Luke,
I generate screenshots. I have GTInspector object and I search among World submorphs corresponding Morph.
morph := World submorphs detect: [ :e | e model class = GTInspector and: [ e model entity = self morphModel ] ] ifNone: nil morph imageForm
Then you can generate JPG, PNG…
Does it help?
Cheers, Juraj
El 03-08-2017, a las 11:25, Luke Gorrie luke@snabb.co escribió:
I have built an application based on the GTInspector. Hurray!
Now I want to share it and I need to write documentation. I would like to include screenshots in the docs but I don't want to create them by hand.
So my question is: Is there an easy way to automatically generate screenshots for GTInspector extension methods? e.g. to specify an object and the name of a presentation and to get a PNG file of how that looks in the GTInspector.
Thanks!
P.S. References to how other people write their docs in general would be interesting.
P.P.S. Here is GTInspector browsing internal data structures of a JIT compiler :-)
<Screenshot 2017-08-02 19.28.51.png>_______________________________________________ Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev
Hi Luke,
On Thu, Aug 3, 2017 at 11:25 AM, Luke Gorrie luke@snabb.co wrote:
I have built an application based on the GTInspector. Hurray!
Looks really nice!
Now I want to share it and I need to write documentation. I would like to include screenshots in the docs but I don't want to create them by hand.
So my question is: Is there an easy way to automatically generate screenshots for GTInspector extension methods? e.g. to specify an object and the name of a presentation and to get a PNG file of how that looks in the GTInspector.
To add to Juraj's email you can use something like the following:
inspectorWindow := GTInspector inspector: Morph new. inspector := inspectorWindow model.
inspectorsPresentations := inspector panes first presentations first cachedPresentation first. inspectorsPresentations pane lastActivePresentation: (inspectorsPresentations presentations detect: [ :each| each title = 'Morph']).
morph := inspectorWindow. "morph exportAsPNG." file := Smalltalk imageDirectory / morph externalName, '.png'. PNGReadWriter putForm: morph imageForm onFileNamed: file.
inspectorWindow close.
This opens an inspector, selects a certain presentation based on its title and then exports the entire inspector window as a png. If you want to export only certain parts of the inspector you can play with Morph>>#allMorphsDo: to locate within the inspector window for example only the morph showing a certain presentation.
Thanks!
P.S. References to how other people write their docs in general would be interesting.
I usually use pillar :). There are several extension for the inspector that you can use to edit pilar documents.
P.P.S. Here is GTInspector browsing internal data structures of a JIT compiler :-)
Quite nice!
Cheers, Andrei
Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev
Hi,
Great work, Luke!
This is very nice external validation that this whole theory with moldable environment and humane assessment actually works in practice :). And you did it alone!
Doru
On Aug 3, 2017, at 12:23 PM, Andrei Chis chisvasileandrei@gmail.com wrote:
Hi Luke,
On Thu, Aug 3, 2017 at 11:25 AM, Luke Gorrie luke@snabb.co wrote: I have built an application based on the GTInspector. Hurray!
Looks really nice!
Now I want to share it and I need to write documentation. I would like to include screenshots in the docs but I don't want to create them by hand.
So my question is: Is there an easy way to automatically generate screenshots for GTInspector extension methods? e.g. to specify an object and the name of a presentation and to get a PNG file of how that looks in the GTInspector.
To add to Juraj's email you can use something like the following:
inspectorWindow := GTInspector inspector: Morph new. inspector := inspectorWindow model.
inspectorsPresentations := inspector panes first presentations first cachedPresentation first. inspectorsPresentations pane lastActivePresentation: (inspectorsPresentations presentations detect: [ :each| each title = 'Morph']).
morph := inspectorWindow. "morph exportAsPNG." file := Smalltalk imageDirectory / morph externalName, '.png'. PNGReadWriter putForm: morph imageForm onFileNamed: file.
inspectorWindow close.
This opens an inspector, selects a certain presentation based on its title and then exports the entire inspector window as a png. If you want to export only certain parts of the inspector you can play with Morph>>#allMorphsDo: to locate within the inspector window for example only the morph showing a certain presentation.
Thanks!
P.S. References to how other people write their docs in general would be interesting.
I usually use pillar :). There are several extension for the inspector that you can use to edit pilar documents.
P.P.S. Here is GTInspector browsing internal data structures of a JIT compiler :-)
Quite nice!
Cheers, Andrei
Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev
Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev
-- www.tudorgirba.com www.feenk.com
"What is more important: To be happy, or to make happy?"
Thanks all for the tips and words of encouragement. I'll give it a try :).
On 3 August 2017 at 13:11, Tudor Girba tudor@tudorgirba.com wrote:
Hi,
Great work, Luke!
This is very nice external validation that this whole theory with moldable environment and humane assessment actually works in practice :). And you did it alone!
Doru
On Aug 3, 2017, at 12:23 PM, Andrei Chis chisvasileandrei@gmail.com
wrote:
Hi Luke,
On Thu, Aug 3, 2017 at 11:25 AM, Luke Gorrie luke@snabb.co wrote: I have built an application based on the GTInspector. Hurray!
Looks really nice!
Now I want to share it and I need to write documentation. I would like
to include screenshots in the docs but I don't want to create them by hand.
So my question is: Is there an easy way to automatically generate
screenshots for GTInspector extension methods? e.g. to specify an object and the name of a presentation and to get a PNG file of how that looks in the GTInspector.
To add to Juraj's email you can use something like the following:
inspectorWindow := GTInspector inspector: Morph new. inspector := inspectorWindow model.
inspectorsPresentations := inspector panes first presentations first
cachedPresentation first.
inspectorsPresentations pane lastActivePresentation:
(inspectorsPresentations presentations detect: [ :each|
each title = 'Morph']).
morph := inspectorWindow. "morph exportAsPNG." file := Smalltalk imageDirectory / morph externalName, '.png'. PNGReadWriter putForm: morph imageForm onFileNamed: file.
inspectorWindow close.
This opens an inspector, selects a certain presentation based on its
title and then exports the entire inspector window as a png.
If you want to export only certain parts of the inspector you can play
with Morph>>#allMorphsDo: to locate within the inspector window for example only the morph showing a certain presentation.
Thanks!
P.S. References to how other people write their docs in general would be
interesting.
I usually use pillar :). There are several extension for the inspector
that you can use to edit pilar documents.
P.P.S. Here is GTInspector browsing internal data structures of a JIT
compiler :-)
Quite nice!
Cheers, Andrei
Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev
Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev
-- www.tudorgirba.com www.feenk.com
"What is more important: To be happy, or to make happy?"
Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev
On 3 August 2017 at 13:11, Tudor Girba tudor@tudorgirba.com wrote:
This is very nice external validation that this whole theory with moldable environment and humane assessment actually works in practice :).
Yeah. I am sold on the moldable tools concept.
I have a "back to the future" feeling here. In the past I have often worked in environments where everybody was using Emacs and then it was straightforward to create domain-specific development tools and share them within a team. That was a long time ago though. Glamour is a big step forward both in terms of visual capabilities and being usable by people without any special background. Great work you are all doing :).
And you did it alone!
Had a lot of help on Discord actually. Thanks everybody for that!
On 3 August 2017 at 12:23, Andrei Chis chisvasileandrei@gmail.com wrote:
To add to Juraj's email you can use something like the following:
Thanks Andrei. I am using a variant of this now and I have a shell script where I can provide a Smalltalk expression and get a screenshot of inspecting the result of this expression.
Just one detail I am having a hard time working out. How can I choose a different "view" of the presentation? For example, in the screenshot here I see the "Items" tab but how would I programatically select (say) the "Raw" tab instead?
On Mon, Aug 7, 2017 at 12:39 PM, Luke Gorrie luke@snabb.co wrote:
On 3 August 2017 at 12:23, Andrei Chis chisvasileandrei@gmail.com wrote:
To add to Juraj's email you can use something like the following:
Thanks Andrei. I am using a variant of this now and I have a shell script where I can provide a Smalltalk expression and get a screenshot of inspecting the result of this expression.
Nice!
Just one detail I am having a hard time working out. How can I choose a different "view" of the presentation? For example, in the screenshot here I see the "Items" tab but how would I programatically select (say) the "Raw" tab instead?
The code that I send above should also contain this feature. It's the part setting the #lastActivePresentation: port. You'll need to iterate over the presentation and find the one with the right title. Let me know if it's working for you.
Cheers, Andrei
Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev
On 7 August 2017 at 18:03, Andrei Chis chisvasileandrei@gmail.com wrote:
The code that I send above should also contain this feature. It's the part setting the #lastActivePresentation: port. You'll need to iterate over the presentation and find the one with the right title. Let me know if it's working for you.
Thanks for the poke. This is working like a charm. Somehow my brain filtered out those particular lines at first, probably just because I didn't immediately recognize what they were doing :)
Cheers! -Luke
Hi Luke and congrats for your custom tool.
Regarding documentation experiences, recently I describe my approach on them [1], also using a moldable tool I create for that specific purpose. It could be helpful to you.
[1] http://forum.world.st/Best-Practices-for-Bundling-Documentation-td4958788.ht...
Cheers,
Offray
On 03/08/17 04:25, Luke Gorrie wrote:
I have built an application based on the GTInspector. Hurray!
Now I want to share it and I need to write documentation. I would like to include screenshots in the docs but I don't want to create them by hand.
So my question is: Is there an easy way to automatically generate screenshots for GTInspector extension methods? e.g. to specify an object and the name of a presentation and to get a PNG file of how that looks in the GTInspector.
Thanks!
P.S. References to how other people write their docs in general would be interesting.
P.P.S. Here is GTInspector browsing internal data structures of a JIT compiler :-)
Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev
Hi Offray,
On 7 August 2017 at 18:14, Offray Vladimir Luna Cárdenas < offray.luna@mutabit.com> wrote:
Regarding documentation experiences, recently I describe my approach on them [1], also using a moldable tool I create for that specific purpose. It could be helpful to you.
Thanks for this link. Grafoscopio looks really cool. I'm generally really happy to see another application using the moldable tools approach.
I have settled on an initial documentation strategy for now. On one side it's really simple: I write the manual in markdown and format it with pandoc. On the other side it's a bit fancer: the CI builds the manual and automatically generates screenshots for each of the visualizations. Hopefully it will be a nice kind of "WYSIWYG" to know that the code and documentation are always exactly synchronized.
Here is my early first draft, with the automatically generated screenshots being at the bottom:
https://hydra.snabb.co/job/lukego/studio-manual/studio-manual-html/latest/do...
I'm using Nix to build the screenshots. This way it can easily download and run some complex software dependencies (a JIT compiler) to generate the example data to source into the screenshots. Looks like this if anybody is curious:
https://github.com/lukego/studio/blob/manual/doc/screenshots.nix
One challenge you can see here is that I am trying to explain the Glamorous Toolkit interface from first principles. Is there a better approach? I worry that linking to the homepage will be a bit confusing because there is so much Smalltalk there and also the docs seem a bit fragmented between small blog entries and videos. I'll see how it goes as I start onboarding my initial users anyway.
Cheers! -Luke