cables-gl / cables_docs

cables documentation docs.cables.gl
https://cables.gl/docs/docs
44 stars 14 forks source link

Include files used in CSS op in patch files manifest #860

Open TobyKLight opened 2 days ago

TobyKLight commented 2 days ago

Feature request

Any local URLS referenced in the CSS op are included in the files manifest.

Then these are automatically packaged and downloaded with exports.

I also notice that in the downloaded assets files are renamed 123456789_name.jpg In principle why not leave the folders in there? so it remains 123456789/name.jpg?

TobyKLight commented 2 days ago

Hmm actually what would be useful is an op that scanned any string for local file URLs and added them to the patch manifest. I have some strings that contain <img href="123456789/bla.png"> tags for use in html elements.

TobyKLight commented 2 days ago

More info: Files become untracked and linked to old patches when you are in a workflow where you are cloning your patch.

Regularly making a new clone of a patch to update release versions is very useful for showing a client "here's this weeks version".

steam0r commented 2 days ago

Regularly making a new clone of a patch to update release versions is very useful for showing a client "here's this weeks version".

we do this by exporting to different directories /preview/1, /preview/2 but always keep the same patch...also keeps you away from a lot of caching issues.

steam0r commented 2 days ago

Hmm actually what would be useful is an op that scanned any string for local file URLs and added them to the patch manifest. I have some strings that contain <img href="123456789/bla.png"> tags for use in html elements.

this is basically what the export is trying to do, it just gets really hard to find these urls, and then the files that are associated with that. if you do something like this you should use {{ASSETPATH}} in CSS or any op that uses inUrl ports (anything that let's you pick a file)...if you need to generate filenames, there are

https://cables.gl/op/Ops.Cables.AssetPathURL https://cables.gl/op/Ops.String.File.SwitchFile_v2

and the likes. to help the exporter know that you are talking about local files. make sure to export "all" assets in these cases.

for the feature request: how would a "manifest" help in this case and where would you/we put it?