Save file through website hosted on toon and other question

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

Moderators: marcelr, TheHogNL, Toonz

Post Reply
Semsemsem
Starting Member
Starting Member
Posts: 5
Joined: Fri Oct 25, 2019 12:11 pm

Save file through website hosted on toon and other question

Post by Semsemsem »

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: Fri Oct 25, 2019 12:11 pm

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

Post by Semsemsem »

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.
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

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

Post by Toonz »

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
Semsemsem
Starting Member
Starting Member
Posts: 5
Joined: Fri Oct 25, 2019 12:11 pm

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

Post by Semsemsem »

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
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

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

Post by Toonz »

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
Semsemsem
Starting Member
Starting Member
Posts: 5
Joined: Fri Oct 25, 2019 12:11 pm

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

Post by Semsemsem »

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 :)
Post Reply

Return to “Toon software development”