Description
Components like readme and transform represent textual data. They work by having a path to another file which contains this text. The file may reside on the local filesystem, or on IPFS.
Sometimes, the dataset loading subsystem (dsfs) will load this file, and assign its contents to scriptBytes
(base64 encoding it). Sometimes it won't, and leaves the path in scriptPath
. I'm not 100% certain why this only happens sometimes, but I'm pretty sure it's due to FSI (file system integration). That is, if the file is "checked out" and has a "working directory" will lead to one outcome, and if not, then the other.
These components should have a property method called script()
that will handle either scriptBytes or scriptPath and return the text as a string in either case. This means the python package will need to be able to get data off of IPFS. Probably the best way to do this, for now, is to just get qri core to do it by asking like: qri get readme.script <dataset_ref>
.