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 [hidden email] https://www.list.inf.unibe.ch/listinfo/moose-dev Screenshot 2017-08-02 19.28.51.png (441K) Download Attachment |
CONTENTS DELETED
The author has deleted this message.
|
In reply to this post by Luke Gorrie
Hi Luke,
On Thu, Aug 3, 2017 at 11:25 AM, Luke Gorrie <[hidden email]> wrote:
Looks really nice!
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.
I usually use pillar :). There are several extension for the inspector that you can use to edit pilar documents.
Quite nice! Cheers, Andrei
_______________________________________________ Moose-dev mailing list [hidden email] 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 <[hidden email]> wrote: > > Hi Luke, > > On Thu, Aug 3, 2017 at 11:25 AM, Luke Gorrie <[hidden email]> 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 > [hidden email] > https://www.list.inf.unibe.ch/listinfo/moose-dev > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > 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 [hidden email] https://www.list.inf.unibe.ch/listinfo/moose-dev |
Thanks all for the tips and words of encouragement. I'll give it a try :). On 3 August 2017 at 13:11, Tudor Girba <[hidden email]> wrote: Hi, _______________________________________________ Moose-dev mailing list [hidden email] https://www.list.inf.unibe.ch/listinfo/moose-dev |
In reply to this post by Tudor Girba-2
On 3 August 2017 at 13:11, Tudor Girba <[hidden email]> 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! _______________________________________________ Moose-dev mailing list [hidden email] https://www.list.inf.unibe.ch/listinfo/moose-dev |
In reply to this post by Andrei Chis
On 3 August 2017 at 12:23, Andrei Chis <[hidden email]> wrote:
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? _______________________________________________ Moose-dev mailing list [hidden email] https://www.list.inf.unibe.ch/listinfo/moose-dev |
On Mon, Aug 7, 2017 at 12:39 PM, Luke Gorrie <[hidden email]> wrote:
Nice!
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 [hidden email] https://www.list.inf.unibe.ch/listinfo/moose-dev |
In reply to this post by Luke Gorrie
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.html#a4958970 Offray On 03/08/17 04:25, Luke Gorrie wrote:
_______________________________________________ Moose-dev mailing list [hidden email] https://www.list.inf.unibe.ch/listinfo/moose-dev |
In reply to this post by Andrei Chis
On 7 August 2017 at 18:03, Andrei Chis <[hidden email]> wrote:
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 _______________________________________________ Moose-dev mailing list [hidden email] https://www.list.inf.unibe.ch/listinfo/moose-dev |
In reply to this post by Offray Vladimir Luna Cárdenas-2
Hi Offray,
On 7 August 2017 at 18:14, Offray Vladimir Luna Cárdenas <[hidden email]> wrote:
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: 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: 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 _______________________________________________ Moose-dev mailing list [hidden email] https://www.list.inf.unibe.ch/listinfo/moose-dev |
Free forum by Nabble | Edit this page |