Page 1 of 1

Export code to pdf

Posted: Tue Apr 07, 2015 11:00 am
by Adrien
Hello all,

Something I could make a good use of, would be a "export code to pdf" option (or text..).

With everything neatly organized, like new card = new chapter, with all the controls scripts on that card in the chapter, you get to pick which chapters you export, ...

It can be a pain to open each and every control on a heavily populated card..

Yes/no, maybe? Too gadget?


Cheers,



Adrien

Re: Export code to pdf

Posted: Tue Apr 07, 2015 3:33 pm
by FourthWorld
LC includes a PDF print external, so if you really want this you could have it this afternoon with a little bit of work.

But I'm curious: What would you do with the PDF?

Re: Export code to pdf

Posted: Tue Apr 07, 2015 3:53 pm
by dunbarx
I suppose the OP just wants to be able to create a complete report of all scripts, to peruse and reference at leisure.

But as Richard points out, you likely want this in a format that satisfies your own style. The best way to do that is to write your own.

Craig Newman

Re: Export code to pdf

Posted: Tue Apr 07, 2015 4:17 pm
by FourthWorld
dunbarx wrote:I suppose the OP just wants to be able to create a complete report of all scripts, to peruse and reference at leisure.
I guess I'm poking around the edges of another question: what if we had a tool that made is just as leisurely to read scripts in place?

Re: Export code to pdf

Posted: Tue Apr 07, 2015 4:20 pm
by Adrien
All,

The uses I would have for such a pdf include but are not limited to:
- working on the algorythms when I'm on the move (printed out or not..)
- print some sheets, lay some on a big table, pin others to the wall, draw on them, ..
- share algorythms and logic with LC-less advisors or techs
- have a clearer view on the relationships between controls and cards (solopreuneur's budget and 15" laptop screen)
- ..

Having an option in some LC drop-down menu would be a fast (maybe furious) way to get that done on command!
I haven't explored the marvelous world of LC externals yet, I was just dropping the idea in there :)

Cheers,


Adrien

edit: and yes, the focus point would be on having everything neatly, logically organized and also being able to pick exactly what you need, like "everything on that stack", "that card and all of its controls", "every handler with x y conditions in that stack", ...

Re: Export code to pdf

Posted: Tue Apr 07, 2015 5:13 pm
by FourthWorld
Adrien wrote:All,

The uses I would have for such a pdf include but are not limited to:
- working on the algorythms when I'm on the move (printed out or not..)
- print some sheets, lay some on a big table, pin others to the wall, draw on them, ..
- share algorythms and logic with LC-less advisors or techs
- have a clearer view on the relationships between controls and cards (solopreuneur's budget and 15" laptop screen)
Excellent list - thanks.

I have some code review tools in progress which may help some day, but they're in a very early stage at this time. One of the things that holds me back from finishing them is that aside from a few things I very rarely use I've found the Project Browser very satisfying, providing a nicely nested view of objects with quick access to not only their own scripts but also any behavior scripts they may use. When I find a particularly complex script I can print that, but most of the time I find perusing things in the PB very useful, esp. since my code sometimes changes frequently, so any printout I made last week won't represent what I'm working with this week.

Have you explored the Project Browser?

Would other export formats like RTF and/or HTML be useful for sharing with others?

Would it be useful to share hypermedia representations of the code in a free application that could be easily shared with others? There may be some nice things we can do easily in LC which may be more difficult to do in HTML or PDF.

Re: Export code to pdf

Posted: Tue Apr 07, 2015 6:42 pm
by Adrien
FourthWorld wrote:share hypermedia representations of the code
Do you mean - like a graphical layout of the code? Would this be similar to a database representation with controls (within cards) instead of tables and handler messages instead of relations?


I've been using the project / application browsers yeah, but some of my cards are really heavily populated, some of my logic can be confusing after some time (and yes, I do comment my code), hence the idea of a 1-clic 1-ask export.

And my application browser got SWARMED with "revidelibrary", "revMenuBar", "revprintlibrary", "reveverythingaboutthisworld" and so on, no idea how so, why so, and how to get back to only see my own stacks.


Cheers,

Adrien

Re: Export code to pdf

Posted: Tue Apr 07, 2015 6:56 pm
by FourthWorld
Adrien wrote:
FourthWorld wrote:share hypermedia representations of the code
Do you mean - like a graphical layout of the code? Would this be similar to a database representation with controls (within cards) instead of tables and handler messages instead of relations?
That would be cool, and there are algos for those sorts of graph diagrams. That's beyond the scope of what I'm working on now, but perhaps down the road it would be nice to add. For now I'm working on a simple tree view, though it will include Calls In and Calls Out, with popup lists of where those calls originate.
And my application browser got SWARMED with "revidelibrary", "revMenuBar", "revprintlibrary", "reveverythingaboutthisworld" and so on, no idea how so, why so, and how to get back to only see my own stacks.
That's governed by a Preferences setting - in Prefs see the "General" section, and uncheck the checkbox labeled "LiveCode UI elements appear in lists of stacks".

Re: Export code to pdf

Posted: Wed Apr 08, 2015 8:51 am
by Adrien
FourthWorld wrote:That's governed by a Preferences setting - in Prefs see the "General" section, and uncheck the checkbox labeled "LiveCode UI elements appear in lists of stacks".
Thanks, that was it.
FourthWorld wrote:That's beyond the scope of what I'm working on now
This is also far, far away from my reach, considering my already limited time.. hence dropping the idea in the request forum :mrgreen:


Cheers,


Adrien

Re: Export code to pdf

Posted: Mon May 04, 2015 8:57 pm
by ThomasFireheart
Personally, I was hoping that something like 'Script Reporter' [ http://www.createchsol.com/ScriptReporter/ ] would do the trick - as I also desire the ability to export/print all the code for a stack, but it doesn't seem like it works with Livecode 7. Maybe someone with more knowledge than I can take a look at it and figure out what is going wrong with it.

Re: Export code to pdf

Posted: Mon May 04, 2015 9:26 pm
by Simon
Hi Thomas,
Not sure if this will solve your problem but

Code: Select all

if  item 6 line i of fld Display = "" then next repeat
Just under the switch at line 258 of stack script of Script Reporter.

Is that where it was breaking for you?

Simon

Re: Export code to pdf

Posted: Fri May 29, 2015 1:11 pm
by ThomasFireheart