[scribus] scribus Digest, Vol 164, Issue 7
Beth Rains
bethbrains at gmail.com
Sun Nov 21 20:29:05 UTC 2021
Greg,
OpenXTalk is a rapid application development environment.
Drag and drop buttons, fields, graphics, menus with super easy scripting.
Scribus is page layout is drag and drop fields, buttons, graphics with some
scripting for PDF
BUT, it could also make applications with the OpenXTalk engine, it could
also be
easily scriptable to make web pages from the page content, and or to create
GUI based extensions for the program.
For instance if you wanted to build a quick access visual library from SVG
Fonts
The Font is converted from XML to JSON , by online converter, just so I
didn't have to code that part
Then this button script loads the JSON
*on* mouseUp pMouseButton
*local* tFile, tData, tArray
*answer* file "Choose a JSON file to load" with *type* "JSON|json|JSON"
*if* the result is not "cancel"
*then**put* it into tFile
*put* url ("file:" & tFile) into tData
*put* JSONToArray(tData) into tArray
*end*
*if**set* the SVGArray of this stack to tArray
*end* mouseUp
Then this button script displays the data in a Tree View, like a desktop
directory structure
*on* mouseUp
*put* the SVGArray of this stack into tArray
*set* the arraydata of widget "Tree View" to tArray
*end* mouseUp
Then this button script massages the JSON font data to only the SVG image
data
*on* mouseUp
*put* the SVGArray of stack (the mainStack of this stack) into svgD
*put* svgd["svg"] into array1
*put* array1["defs"] into array2
*put* array2["font"] into array3
*put* array3["glyph"] into tIcon
*set* the SVGArray of stack (the mainStack of this stack) to tIcon
*end* mouseUp
I could then make a big (or small) grid of SVG widgets to pick the icons
visually
But for simplicity this slider script quickly displays the SVG one by one
*on* scrollbarDrag
*put* the thumbposition of me into N
*put* the hilitedElement of widget "Tree View" into tElement
*put* the arrayData of widget "Tree View" into tArray
*put* tArray[N] into tSubArray
*put* tSubArray["_d"] into tSVGpath
*set* the iconPath of widget "SVG Icon" to tSVGPath
*end* scrollbarDrag
So now I can quickly view and access the data of any SVG Icon in the font.
Passing that to Scribus is what I can't do yet, but let's say
hypothetically they are bridged
Then Scribus is considered a Stack by OpenXTalk each open document is
considered substack of that Mainstack
The SVGlibrary I've just described could pass the data something like this
by clicking the displayed SVG icon
we'd probably want to store this as a global before using any palettes
*put* the long name of the focusedObject into gActiveDocument
-- that would store the entire path of the currentDocument as far as
OpenXTalk is concerned like this
card id 1002 of stack "[Document-1]" of stack "C:\Program Files
(x86)\Scribus 1.4.8\Scribus.exe"
Then when we click the icon:
*on* mouseup
*do "copy* widget" && quote & "SVG Icon" & quote && "to gActiveDocument"
*set* the width of it to 120
*set* the height of it to 120
*set* the topLeft of it to 20,20
*set* the foregroundColor of it to white
*set* the dropShadow of it to true
*end* mouseUp
Now what you have is basically a Scribus Scrapbook, but it's instant access
to maybe 200 or or more graphics in a few clicks.
You can do similar with a whole folder of all formats of image files,
although OpenXTalk current has no way to manage Adobe Illustrator, EPS.
Another example: I took all my child's digital art 100+ images and
converted it to PDF in a couple clicks and sent it off to the printer:
As soon as I open the stack (or built binary app) it requests a folder to
find images in :
*on* OpenStack
*set* the width of the templateImage to 550
*set* the height of the templateImage to 720
*set* the loc of the templateImage to 310,390
*local* tRatio, tHeight,tWidth
*answer* "Select a folder to load images from" with "OK"
*answer* folder "IMAGE FILES :"
*if* it is not empty
*then**put* it into tFolder
*else**exit* openStack
*end*
*if*clearCards
*set* the folder to tFolder
*put* the files into tFiles
*repeat* for each line F in tFiles
*put* tFolder &"/" & F into tFile
*set* fileName of the templateImage to tFile
*put* char 1 to -4 of F into tName
*lock* screen
*create* image tName
*put* the long name of image tName into pImageID
*put* 550 into pWidth
*put* (the formattedWidth of pImageID) / pWidth into tRatio
*put* (the formattedHeight of pImageID) / tRatio into tHeight
*set* the width of pImageID to pWidth
*set* the height of pImageID to tHeight
*put* 720 into pHeight
*if* tHeight > pHeight
*then**put* (the formattedHeight of pImageID) / pHeight into tRatio
*put* (the formattedWidth of pImageID) / tRatio into tWidth
*set* the width of pImageID to tWidth
*set* the height of pImageID to pHeight
*end*
*if**set* the loc of pImageID to 310,390
*unlock* screen
*create* card
*put* the number of cards of this stack into N
*go* to card N
*end*
*repeat**delete* card N
*go* to card 1
printcards
*end* OpenStack
## Prints to PDF opens the PDF when done
*on* printCards
*## Path to the pdf file we want to create**answer* "Printing Cards to PDF"
with "OK"
*set* itemDel to "/"
*put* item -1 of the folder into tName
*put* item 1 to -2 of the folder into tPath
*put* specialFolderPath("documents") & "/" & tName & ".pdf" into tPDFPath
*open* printing to pdf tPDFPath
*if* the result is "Cancel"
*then*
*## The user has cancelled printing**exit* printCards
*else*
*## Print the cards into the printable area**put* the number of cards of
this stack into N
*repeat* with I = 1 to N
*print* card I of this stack into 0,0,611,792
*print*
*break**end*
*repeat**end*
*if**close* printing
*put* "start" && quote & quote && tPDFPath into tCmd
*put* shell(tCmd) into openThePDF
*end* printCards
------------------------------------------------------------------------
That same process could be used if say you were printing 200 playing cards,
or greeting cards.
you could modify that script above quickly and visually for the loading of
images and placement into the page on a galley
or with some extra scripts it could be an iPhone/Android app from the same
folder of images
or with some template CSS and Javascript or Hyperscript it could be a web
sites worth of content
Now the trick is to get OpenXtalk and Scribus to talk together
A layout in Scribus would be understood as a layout in OpenXtalk seamlessly.
Making new GUI extensions of Scribus would be easy.
A graphic designer could make an application for desktop, mobile or web as
easily as making a business card.
Everything you can do with Python, but with more features like drag and
drop GUI, syntax highlighting, built in documentation, error checking in
the script editor,
It's already in the package, just needs to be adapted. OpenXTalk current
uses Cairo for UI and Skia for the web browser widget.
You'd probably want to wrap your QT implementation.
That's just the start. I'm sure there are more use cases like job tracking,
scheduling, billing, proofing, client contact info etc that could all be
scripted into the productivity environment of Scribus at the end user level
or as add ons made available to all.
Here's a list of quarkxpress Xtensions from back in the 90s,
QuarkXPress XTensions & Utilities from the 90's - Macintosh Garden
<https://macintoshgarden.org/apps/63-quarkxpress-xtensions-utilities-the-90s>
Most of this stuff is default in every page layout app now. They all were
created with the same kind of 'scriptable page layout program' concept.
There was no visual editor then, which was baffling, you have a page layout
program but can't layout a graphical user interface from a graphic user
interface?
So the big idea is to finally end that silly paradox.
Hope that illustrates the concept better.
Regards,
Beth
On Sun, Nov 21, 2021 at 5:01 AM <scribus-request at lists.scribus.net> wrote:
> Send scribus mailing list submissions to
> scribus at lists.scribus.net
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.scribus.net/mailman/listinfo/scribus
> or, via email, send a message with subject or body 'help' to
> scribus-request at lists.scribus.net
>
> You can reach the person managing the list at
> scribus-owner at lists.scribus.net
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of scribus digest..."
>
>
> Today's Topics:
>
> 1. OpenXTalk: Open Source Rapid Application Development and
> Scribus (Beth Rains)
> 2. Re: OpenXTalk: Open Source Rapid Application Development and
> Scribus (Gregory Pittman)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 20 Nov 2021 16:11:07 -0700
> From: Beth Rains <bethbrains at gmail.com>
> To: scribus at lists.scribus.net
> Subject: [scribus] OpenXTalk: Open Source Rapid Application
> Development and Scribus
> Message-ID:
> <CA+hNAdSLb+L1U+oWe9-8A07v5rWwzvkwcWk_EMoDh_MgWym=
> AQ at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hello Scribus!
> I'm here to see if there'd be interest in adopting OpenXTalk as a
> feature/companion to Scribus.
>
> At the end of August 2021 Livecode Inc, announced that nobody but their
> company was contributing to the source code and most of their users were
> using the free Community Edition so without any warning they ended the open
> source initiative of their Rapid Application Development environment and
> pulled all their free Community Edition installers from their public facing
> downloads page.
>
> Paul McClernan stepped up and created the OpenXTalk project to carry on the
> open source dream.
>
> So here we are, three or six people who can't code C/C++ & Python
> which limits our ability to get a rebranded free IDE out to the public.
> I'm stuck with compiler errors and I have no idea how to fix them. We all
> come from a background with the IDE: Super simple English-Like scripting,
> two or three button presses to compile to binary applications for Linux,
> Windows, Mac OSX , Android, iOS and HTML5, so the advantage of almost two
> decades of simplicity has left us at a programming disadvantage. Like being
> able to drive real fast, but not build a car from a box of parts..
>
> Meanwhile, Paul dreams of adding desktop publishing features to the
> Livecode/OpenXTalk IDE and I've dreamed of a page layout app that can
> produce applications for decades. I even wrote QuarkXpress way back in 1997
> with a long winded document all about that, soon after they had an XTension
> that made something like super slow Myst experiences, that mutilated the
> graphics by using PICT resources, and I had to make apps that were 320x240
> just fit on ZIP disks.
>
> So I got to thinking...what if you could design desktop, mobile and/or
> web applications inside of Scribus? I see you have some Python, which is
> not as easy to script as xTalk even though it's insanely popular. It has a
> lot of GUI frameworks but doesn't just come prebuilt with one.
> I see you have Javascript for PDFS, that's interesting.
> They don't seem to work directly in Scribus though?
> They only work in Acrobat? No browser seems to take the MouseUp
>
> But what if you had something even better than Python and Javascript? Well
> maybe not better, but just easier and more application ready?.
>
> You can get the Free Livecode Community Edition Installers at Archive.org
> <https://archive.org/search.php?query=creator%3A%22LiveCode%2C+Inc.%22>
> You can reach the OpenXTalk group via our forums <https://openxtalk.org/>
> Or our subreddit <https://www.reddit.com/r/openxtalk>
> You can fork the source on Github
> <https://github.com/OpenXTalk-org/OpenXTalk-Community-DPE>
>
> Livecode, Inc. doesn't want to associate with the open source at all, so
> you'll have to Google for their forums and documentation, or just download
> and install the apps and click around in the menus as a shortcut until we
> can build our own binaries and replace all that.
>
> So what I'm hoping for from Scribus as a software group and community is:
> 1. adoption of the xTalk language for scriptable Scribus
> 2. maybe some programming support since we are undermanned and
> undereducated for this task at the moment
> 3.featuring the xTalk environment as a product suite with Scribus
> 4. and community feedback, general interest, cross development
>
> It might take some time to work out the details but here it is on the
> table.
> OpenXTalk is Paul's project but there's nothing stopping Scribus from
> making SuperScriptableScribus from a fork of the GPLv3 code.
>
> I should also mention that through the mysterious Builder Language
> <
> https://github.com/livecode/livecode/blob/develop/docs/guides/LiveCode%20Builder%20Language%20Reference.md
> >
> it is possible to wrap Python, Javascript, Lua and other libraries to the
> IDE. without recompiling the whole project. This also allows for
> development of custom widgets, like the web browser widget, SVG importer,
> line chart widget, and native smartphone OS controls you can see in the IDE
> now.
>
> I got about 2% into wrapping rayLib <https://www.raylib.com/>to the IDE
> with builder language before my lack of C knowledge stopped me cold. I have
> an openGL window open at least. Baby steps.
>
> One more interesting detail: there is a separate project that is bringing
> xTalk to the web: Hyperscript <https://hyperscript.org/> It's very
> promising. We could all work together to create a magical page layout,
> desktop application, smartphone app, web experience powerhouse.
>
> Please enjoy your free copy of Livecode Community Edition on behalf of the
> 3,342 people who donated ?493,795 to make it open source in 2013. The IDE
> should run smoothly for fourteen years or so if old copies on my machine
> are any indication.
>
> I hope to hear your views and would be very pleased for your support in any
> capacity.
>
> Thanks for your attention.
>
> Regards,
> Beth
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.scribus.net/pipermail/scribus/attachments/20211120/682f2d40/attachment.htm
> >
>
> ------------------------------
>
> Message: 2
> Date: Sat, 20 Nov 2021 20:17:52 -0500
> From: Gregory Pittman <gpittman at iglou.com>
> To: scribus at lists.scribus.net
> Subject: Re: [scribus] OpenXTalk: Open Source Rapid Application
> Development and Scribus
> Message-ID: <91f85709-0c25-5100-0560-ed4159004cb2 at iglou.com>
> Content-Type: text/plain; charset=UTF-8; format=flowed
>
> Hi Beth,
>
> What I'm not getting from your post is what OpenXTalk is or does.
> Scribus is a layout application, used to generate PDFs. How does that
> interact with what OpenXTalk wants to accomplish?
>
> Greg
>
> On 11/20/21 18:11, Beth Rains wrote:
> > Hello Scribus!
> > I'm here to see if there'd be interest in adopting OpenXTalk as a
> > feature/companion to Scribus.
> >
> > At the end of August 2021 Livecode Inc, announced that nobody but their
> > company was contributing to the source code and most of their users were
> > using the free Community Edition so without any warning they ended the
> open
> > source initiative of their Rapid Application Development environment and
> > pulled all their free Community Edition installers from their public
> facing
> > downloads page.
> >
> > Paul McClernan stepped up and created the OpenXTalk project to carry on
> the
> > open source dream.
> >
> > So here we are, three or six people who can't code C/C++ & Python
> > which limits our ability to get a rebranded free IDE out to the public.
> > I'm stuck with compiler errors and I have no idea how to fix them. We all
> > come from a background with the IDE: Super simple English-Like scripting,
> > two or three button presses to compile to binary applications for Linux,
> > Windows, Mac OSX , Android, iOS and HTML5, so the advantage of almost
> two
> > decades of simplicity has left us at a programming disadvantage. Like
> being
> > able to drive real fast, but not build a car from a box of parts..
> >
> > Meanwhile, Paul dreams of adding desktop publishing features to the
> > Livecode/OpenXTalk IDE and I've dreamed of a page layout app that can
> > produce applications for decades. I even wrote QuarkXpress way back in
> 1997
> > with a long winded document all about that, soon after they had an
> XTension
> > that made something like super slow Myst experiences, that mutilated the
> > graphics by using PICT resources, and I had to make apps that were
> 320x240
> > just fit on ZIP disks.
> >
> > So I got to thinking...what if you could design desktop, mobile and/or
> > web applications inside of Scribus? I see you have some Python, which is
> > not as easy to script as xTalk even though it's insanely popular. It has
> a
> > lot of GUI frameworks but doesn't just come prebuilt with one.
> > I see you have Javascript for PDFS, that's interesting.
> > They don't seem to work directly in Scribus though?
> > They only work in Acrobat? No browser seems to take the MouseUp
> >
> > But what if you had something even better than Python and Javascript?
> Well
> > maybe not better, but just easier and more application ready?.
> >
> > You can get the Free Livecode Community Edition Installers at Archive.org
> > <https://archive.org/search.php?query=creator%3A%22LiveCode%2C+Inc.%22>
> > You can reach the OpenXTalk group via our forums <https://openxtalk.org/
> >
> > Or our subreddit <https://www.reddit.com/r/openxtalk>
> > You can fork the source on Github
> > <https://github.com/OpenXTalk-org/OpenXTalk-Community-DPE>
> >
> > Livecode, Inc. doesn't want to associate with the open source at all, so
> > you'll have to Google for their forums and documentation, or just
> download
> > and install the apps and click around in the menus as a shortcut until we
> > can build our own binaries and replace all that.
> >
> > So what I'm hoping for from Scribus as a software group and community is:
> > 1. adoption of the xTalk language for scriptable Scribus
> > 2. maybe some programming support since we are undermanned and
> > undereducated for this task at the moment
> > 3.featuring the xTalk environment as a product suite with Scribus
> > 4. and community feedback, general interest, cross development
> >
> > It might take some time to work out the details but here it is on the
> table.
> > OpenXTalk is Paul's project but there's nothing stopping Scribus from
> > making SuperScriptableScribus from a fork of the GPLv3 code.
> >
> > I should also mention that through the mysterious Builder Language
> > <
> https://github.com/livecode/livecode/blob/develop/docs/guides/LiveCode%20Builder%20Language%20Reference.md
> >
> > it is possible to wrap Python, Javascript, Lua and other libraries to the
> > IDE. without recompiling the whole project. This also allows for
> > development of custom widgets, like the web browser widget, SVG importer,
> > line chart widget, and native smartphone OS controls you can see in the
> IDE
> > now.
> >
> > I got about 2% into wrapping rayLib <https://www.raylib.com/>to the IDE
> > with builder language before my lack of C knowledge stopped me cold. I
> have
> > an openGL window open at least. Baby steps.
> >
> > One more interesting detail: there is a separate project that is bringing
> > xTalk to the web: Hyperscript <https://hyperscript.org/> It's very
> > promising. We could all work together to create a magical page layout,
> > desktop application, smartphone app, web experience powerhouse.
> >
> > Please enjoy your free copy of Livecode Community Edition on behalf of
> the
> > 3,342 people who donated ?493,795 to make it open source in 2013. The
> IDE
> > should run smoothly for fourteen years or so if old copies on my machine
> > are any indication.
> >
> > I hope to hear your views and would be very pleased for your support in
> any
> > capacity.
>
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> scribus mailing list
> scribus at lists.scribus.net
> http://lists.scribus.net/mailman/listinfo/scribus
>
>
> ------------------------------
>
> End of scribus Digest, Vol 164, Issue 7
> ***************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20211121/a3abd572/attachment.htm>
More information about the scribus
mailing list