Save file through website hosted on toon and other question

Everything about software tools, new software development and toolchains. For developers, mostly.

Moderators: marcelr, TerrorSource, Toonz, TheHogNL

Save file through website hosted on toon and other question

Postby Semsemsem » Sat Nov 28, 2020 3:08 pm

I am creating a project (soon completed) which needs to have some files saved/readed by the hosted website on toon, how could I do this? ( current solution is to download it and manually upload it to the toon using sftp)
My second question is about reading folder contents from the app (qt). How can I do this so that I can loop through the files in the folder?

thanks in advance
Semsemsem
Starting Member
Starting Member
 
Posts: 5
Joined: October 2019

Re: Save file through website hosted on toon and other question

Postby Semsemsem » Sat Nov 28, 2020 7:07 pm

I’ve got another little question, how can I read arguments passed to the tile? I want multiple tiles with the same qml file but with different arguments. I know that there is an ‘app’ variable which I can access in the Tile, but I need the passed args (which contains the thumbLabel for example) from registerWidget.
Semsemsem
Starting Member
Starting Member
 
Posts: 5
Joined: October 2019

Re: Save file through website hosted on toon and other question

Postby Toonz » Sat Nov 28, 2020 8:31 pm

Easiest way to access the file system is via FileIO, this allows you to list files in folders and read file contents. You cannot write files with FileIO however.
Writing files can be done via an XMLHttpRequest function.
FileIO examples can be found in the ToonStore app for instance (folder listing as well as accessing files)

Regarding the Tiles: you don't pass arguments to a Tile, typically app variables are shown on a tile. Of course your app can change the values at any time at which the tile will be automatically updated.
If you want to have multiple tiles active at the same time with different content you need to create multiple tile QML files with different content.
In QML you can create run-time objects as well (tiles) but that will be much more difficult to maintain and debug. Not the preferred option......
member of the Toon Software Collective
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1627
Joined: December 2016

Re: Save file through website hosted on toon and other question

Postby Semsemsem » Sat Nov 28, 2020 9:06 pm

Hmmm, the whole idea was that you could go to a webpage, enter your api url, select what items of the api you wanna use (https://ibb.co/KsJm0Bq), rename them, add prefixes and/or suffixes (https://ibb.co/KmTD45G), preview (https://ibb.co/XLNy3rc), and send config (https://ibb.co/WsHndW3) to the toon.
This kinda requires it to have multiple tiles for multiple api urls, so that's a real problem here.
Do you have an idea on how to continue this app/project?

note: urls lead to pictures of the current working prototype (not publicly available yet), with only a single config
Semsemsem
Starting Member
Starting Member
 
Posts: 5
Joined: October 2019

Re: Save file through website hosted on toon and other question

Postby Toonz » Sun Nov 29, 2020 10:54 am

I am not sure if I understand what you want to achieve to be honest, just show some random data?
QML specifies the layout of your screen elements for instance, so you need to know upfront what data you are going to display.
Or you can define a generic app on the Toon which shows a list of data elements which you can provide in a json but it will probably not look very attractive (just a list).
member of the Toon Software Collective
User avatar
Toonz
Forum Moderator
Forum Moderator
 
Posts: 1627
Joined: December 2016

Re: Save file through website hosted on toon and other question

Postby Semsemsem » Mon Nov 30, 2020 2:06 pm

Yeah kinda, just a tool to make it easier for people to make simple widget apps for the Toon.
So hopefully this would allow more apis/data to be displayed on the toon. (more apps for the Toon store)
Suggestions are welcome though :)
Semsemsem
Starting Member
Starting Member
 
Posts: 5
Joined: October 2019


Return to Toon software development

Who is online

Users browsing this forum: No registered users and 1 guest