Your scripts as a flowchart

David Bovill david.bovill at gmail.com
Fri Sep 22 08:10:01 EDT 2023


Hi Andreas, quick note - I've not read the full thread - but I have a code
graph browser that I have been using for a number of years - it is a big
piece of work - so not easy to distribute - and many of the parts should
probably be done better / differently. I would Love to make use /
integrate that work - rather than see it all stay on my laptop - but either
way I'd like to get involved. This is what I have / the current approach:

   - Script Indexing project - libraries to recursively crawl an object or
   a stacks script to find handlers, and calls from each type of handler
   - Experimental caching and database based versions to speed up graph
   analysis and reporting (currently dropped)
   - Integration with IDE / Script Editor (using behaviors attached to
   "Apply" button etc
   - Projects arranged more or less as Levure projects
   - SVG graph export with interactive browsing of handlers (using graphviz)
   - Native graph export creating native Livecode layouts of shapes from
   Graphviz or Mermai d(experimental)
   - Filtering, and processing of graphs (experimental)

What I'd like to do is:

   1. Finish integration with Levure
   2. Focus on Mermaid implementation
   3. Test and improve the code parsing and graph creation to ensure it
   works properly with different coding styles

Happy to demo / jump on a Zoom call and share ideas / discuss.

On Mon, 18 Sept 2023 at 13:11, Andreas Bergendal via use-livecode <
use-livecode at lists.runrev.com> wrote:

> Getting a full export is a tricky business, and I’m looking at various
> solutions.
>
> The easiest workaround is to launch the flowchart in a web browser and
> print to PDF from there.
> On Windows/Linux the flowchart is shown that way anyway, and on Mac you
> load it in a web browser by shift-clicking the Create flowchart button. The
> obvious downside of printing to pdf is that you get page breaks that split
> up the flowchart.
>
> Another workaround is to paste the Mermaid code into an online editor like
> https://mermaid.live and then export to PNG from there.
>
> What looks more promising for actually solving it in-stack though, is
> using the command-line interface (CLI) for Mermaid to generate an
> svg/png/pdf file:
> https://github.com/mermaid-js/mermaid-cli
>
> I’ll experiment with that and see what I can come up with. :)
>
> > As an aside, I don't know whether to be proud or horrified at the map
> > Navigator produces…
>
> Yeah, I know the feeling… :D
>
> /Andreas
>
>
> > 18 sep. 2023 kl. 03:38 skrev Geoff Canyon via use-livecode <
> use-livecode at lists.runrev.com>:
> >
> > Is there a way to export the entire flowchart, instead of just the
> portion
> > currently displayed?
> >
> > As an aside, I don't know whether to be proud or horrified at the map
> > Navigator produces...
> >
> > On Sat, Sep 16, 2023 at 8:04 PM Geoff Canyon <gcanyon at gmail.com> wrote:
> >
> >> Ah, okay, that explains it. In Navigator, *everything* is a script-only
> >> stack behavior. In a few of the substacks there are scripts for a few
> >> template objects or where script-only-stack behaviors were inconvenient
> (I
> >> don't remember why, honestly).
> >>
> >> That has it working, and the resulting diagram is nice. Navigator does a
> >> similar survey (without the visualization, that's a neat trick).
> >>
> >> Navigator reports:
> >>
> >> 302986 characters in
> >> 8092 lines in
> >> 112 scripts in
> >> 885 objects.
> >>
> >> ScriptDependencies reports:
> >>
> >> 341 unique handler names - 407 commands, 124 functions, 1 setProps
> >>
> >> regards,
> >>
> >> Geoff
> >>
> >> On Sat, Sep 16, 2023 at 6:24 PM Andreas Bergendal via use-livecode <
> >> use-livecode at lists.runrev.com> wrote:
> >>
> >>> As long as you include all the script-only stacks in the analysis, they
> >>> will be handled.
> >>> The tool will not look for behaviors and auto-include them. Every stack
> >>> that has relevant code must be included manually in the project pane.
> If
> >>> you have many SoSs, you can quickly add them all by adding the whole
> folder
> >>> they are in.
> >>>
> >>> How many handlers does the analysis find?
> >>>
> >>> /Andreas
> >>>
> >>>
> >>>> 16 sep. 2023 kl. 22:43 skrev Geoff Canyon via use-livecode <
> >>> use-livecode at lists.runrev.com>:
> >>>>
> >>>> I didn't change anything before generating, and the flow chart is
> >>> literally
> >>>> blank -- unless it:
> >>>>
> >>>> 1. scrolls invisibly
> >>>> 2. keeps returning the project name to the upper left while scrolling
> >>>> 3. has *at least* 30 screens' worth of blank space at the top?
> >>>>
> >>>> On Sat, Sep 16, 2023 at 1:35 PM J. Landman Gay via use-livecode <
> >>>> use-livecode at lists.runrev.com> wrote:
> >>>>
> >>>>> That happened to me too with a very long script. To keep everything
> in
> >>>>> view
> >>>>> there's a lot of white space. Keep scrolling. This happens only if
> you
> >>>>> have
> >>>>> set it to use unlimited sizing.
> >>>>> --
> >>>>> Jacqueline Landman Gay | jacque at hyperactivesw.com
> >>>>> HyperActive Software | http://www.hyperactivesw.com
> >>>>> On September 16, 2023 11:15:00 AM Geoff Canyon via use-livecode
> >>>>> <use-livecode at lists.runrev.com> wrote:
> >>>>>
> >>>>>> Does it not handle script-only stack behaviors? I get a blank
> display
> >>> for
> >>>>>> Navigator (which has no code other than SoS behaviors).
> >>>>>>
> >>>>>> gc
> >>>
> >>>
> >>> _______________________________________________
> >>> use-livecode mailing list
> >>> use-livecode at lists.runrev.com
> >>> Please visit this url to subscribe, unsubscribe and manage your
> >>> subscription preferences:
> >>> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>>
> >>
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


More information about the use-livecode mailing list