Export long texts to PDF?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 4002
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: Export long texts to PDF?
Richmond,
here it is. I do not remember what I edited in this very useful stack by Stewart Lynch and Sarah Reichelt.
Nor do I know why Cyril Pruszko put that version on his site
Kind regards
Bernd
here it is. I do not remember what I edited in this very useful stack by Stewart Lynch and Sarah Reichelt.
Nor do I know why Cyril Pruszko put that version on his site
Kind regards
Bernd
-
- Livecode Opensource Backer
- Posts: 9387
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Export long texts to PDF?
Thank you very much: that will be very useful.
Re: Export long texts to PDF?
Thanks Richmond
Re: Export long texts to PDF?
Thanks for the link Bernd... seemed interesting so i open one of my apps in it and it seemed to go into a tailspin, with what looked like an endless loop that had to be force-exited... (the app does link into some libraries and the liveCloud libs as well, one of which is password protected, although i wasn't asked for a password...).
-
- VIP Livecode Opensource Backer
- Posts: 9837
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Export long texts to PDF?
One of my first projects with HyperCard was a script reporter. When I moved on to SuperCard I made a couple more, then some for MC, and then it dawned on me: while they were fun to make, I never actually used one for any production purpose.
For myself, I've found it more useful to be able to navigate through code in vivo more efficiently, and getting around inside of living projects has been more of a focus.
But I see interest in these things remains somewhat constant, so maybe I'm missing something.
What do you folks do with the output from script reporters, and how often do you use those files relative to reading scripts directly in objects?
For myself, I've found it more useful to be able to navigate through code in vivo more efficiently, and getting around inside of living projects has been more of a focus.
But I see interest in these things remains somewhat constant, so maybe I'm missing something.
What do you folks do with the output from script reporters, and how often do you use those files relative to reading scripts directly in objects?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Livecode Opensource Backer
- Posts: 9387
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Export long texts to PDF?
Personally I intend to print out some of my very long scripts from Devawriter Pro so thatWhat do you folks do with the output from script reporters
I can work through them in the garden, in the sunshine, with no computer to distract me.
-
- VIP Livecode Opensource Backer
- Posts: 4002
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: Export long texts to PDF?
@Stamstam wrote: ↑Sun Apr 24, 2022 2:16 pmThanks for the link Bernd... seemed interesting so i open one of my apps in it and it seemed to go into a tailspin, with what looked like an endless loop that had to be force-exited... (the app does link into some libraries and the liveCloud libs as well, one of which is password protected, although i wasn't asked for a password...).
I had a look at the stack an indeed it only checks if the mainStack is password protected, not if a subStack is password protected. I changed that in the script. Password protected substacks are omitted now. And it worked.
However I tested with a beast of a stack: about 170,000 objects that could potentially have scripts and the sum of the script-lines is over 4.5 million lines.
That choked some formatting routines of Script Reporter. (disclaimer: I did not write that beast of a stack).
I did however notice that some scripts were not very efficiently written: field access for getting repeatedly at lines etc.
I skipped some formatting for the display of all scripts in the main field and I got it to work however for the total of the script in plain text. Individual scripts are formatted as in the Script Editor and then some.
Historically I edited only one potential endless loop and sped up one formatting routine for display. I was not involved otherwise in that stack and have not used it except when I edited it in 2015.
@Richard: I agree that the idea of a "Stack Analyser" is intriguing but in practice I never or rarely used one.
@Richmond: did "Script Reporter" work for your project? If not I could probably coax it into reporting. I see a point in sitting in the sun and fanning fresh air with a bunch of printouts of the scripts of Devawriter Pro. Just tell me
Kind regards
Bernd
-
- Livecode Opensource Backer
- Posts: 9387
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Export long texts to PDF?
That is one of the reasons I need to have a 'distanced' look at the scripts in my Devawriter.I did however notice that some scripts were not very efficiently written
-
- VIP Livecode Opensource Backer
- Posts: 135
- Joined: Tue Feb 23, 2010 10:53 pm
- Location: Saint Louis, Missouri USA
Re: Export long texts to PDF?
I have the Script Reporter version 1.1 stack and am now using the version (1.2) from Bernd's link.
I have always liked the Script Reporter (SR) app and have used it to produce searchable documents with all of the scripts in a stack. Handy for searching.
Today I had an issue with a button that did not appear to have a name. SR choked on the error.
The button's name was: <-- Back
The button's name was not displayed in SR's Display field because SR puts object names are in the Display field's htmlText.
The backward symbol and hyphens indicate a comment in html so the button's name was ignored.
The problem was fixed when I changed the button's name to: < Back
Tricky problem to diagnose but simple to fix.
Bob
I have always liked the Script Reporter (SR) app and have used it to produce searchable documents with all of the scripts in a stack. Handy for searching.
Today I had an issue with a button that did not appear to have a name. SR choked on the error.
The button's name was: <-- Back
The button's name was not displayed in SR's Display field because SR puts object names are in the Display field's htmlText.
The backward symbol and hyphens indicate a comment in html so the button's name was ignored.
The problem was fixed when I changed the button's name to: < Back
Tricky problem to diagnose but simple to fix.
Bob
-
- VIP Livecode Opensource Backer
- Posts: 4002
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: Export long texts to PDF?
Bob,bobcole wrote: ↑Mon Apr 25, 2022 4:11 amToday I had an issue with a button that did not appear to have a name. SR choked on the error.
The button's name was: <-- Back
The button's name was not displayed in SR's Display field because SR puts object names are in the Display field's htmlText.
The backward symbol and hyphens indicate a comment in html so the button's name was ignored.
The problem was fixed when I changed the button's name to: < Back
Tricky problem to diagnose but simple to fix.
Bob
I try to avoid stuff like this by setting the name of e.g. a button to, well a name. If I want to display "<-- Name" I set the label of the button to that.
I am a bit superstitious with regards to funny characters in Names and the label is "user land".
Kind regards
Bernd
-
- VIP Livecode Opensource Backer
- Posts: 9837
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Export long texts to PDF?
If all that code and the extra step of using it is for searching, sounds like an opportunity for a better search tool for stack files.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 7237
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Export long texts to PDF?
I use the advanced Find in the script editor. I suspect it's largely ignored but it's really very useful. You can search many different ways, including regex, and in a variety of different areas: current tab, open tabs, whole stack, whole stack file, and more.
The best part is the list of found results which allow you to jump to any instance immediately. The main Find and Replace in the IDE menu is also useful but for searching scripts I prefer the editor's version.
The best part is the list of found results which allow you to jump to any instance immediately. The main Find and Replace in the IDE menu is also useful but for searching scripts I prefer the editor's version.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Export long texts to PDF?
I also find doing a search in Atom useful, but the main reason I externalize my stack’s scripts is for version tracking. Git makes it very easy to see the changes to scripts over time. ScriptTracker provides this to me without the need to convert everything to real script only stacks (the files could easily be SOS but they are not linked that way).
Brian Milby
Script Tracker https://github.com/bwmilby/scriptTracker
Script Tracker https://github.com/bwmilby/scriptTracker
Re: Export long texts to PDF?
Dear Jacque, thank you for that - pageHeights is amazing, and i had no idea it was there!
Makes it very easy to create a 'print preview' within LC as well...
It's slightly annoying that you kinda had to know about it to find it - it's only 'association' in the Dictionary is 'Field' and it's not linked to printing in any way... all printing related features really should be grouped together in the documentation...
In the end i did also find this in the LiveCode User Guide.pdf -- which again is another pet peeve of mine.
Why create a great resource like the User Guide and then just dump it in a PDF file?
Why not have this online so it can be searchable by <insert your preferred search engine here>, preferably with some search engine optimisation to increase exposure?
Granted, it's a non-trivial cost to convert this to 'nice' html and not just dumping the entire pdf into a single file with for example the free https://pdf.online/convert-pdf-to-html, but maintenance would be trivial as the user guide is not updated that often...
But enough mumbling
BTW i did also note that pageHeights links to formatForPrinting which seems like another gotcha i may have missed had i not scrutinised the pageHeights entry... although not sure how important that is for PDF creation?
Anyway thanks once again for the invaluable help!
Stam
-
- Livecode Opensource Backer
- Posts: 9387
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Export long texts to PDF?
It maybe 100% trivial as, in the Linux versions of LiveCode the Documentationit's a non-trivial cost to convert this to 'nice' html
opens in a browser.
Also: surely (?) the clever thing to do is extract the bits of the User Guide that differ from the Dictionary
and integrate them into the Dictionary.