Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a File snippet #3743

Open
svenvc opened this issue Apr 30, 2024 · 2 comments
Open

Add a File snippet #3743

svenvc opened this issue Apr 30, 2024 · 2 comments
Assignees

Comments

@svenvc
Copy link
Contributor

svenvc commented Apr 30, 2024

Often in a narrative on a page we assign some variable to a a file reference to later use that file's contents in further processing.

file := FileLocator imageDirectory / 'myfile.data'

A File snippet would make this explicit and could offer some additional support in setting/locating the file, tracking the file when it moves or resolving special locations like gtResource.

By using the existing support in AbstractFileReference view/editing/parsing/styling are already covered.

The fundamental properties of the File snippet would be the fileReference in File URL form and the binding name.

@svenvc svenvc self-assigned this Apr 30, 2024
@svenvc
Copy link
Contributor Author

svenvc commented Apr 30, 2024

This is the current state of the File snippet:

2024-04-30_20-35-52_BlElement-348731904

Search for the Snippet of type File.

Package Lepiter-Snippet-File, class LeFileSnippet.

@botwhytho
Copy link

This snippet type is rather welcome 👍 . Assuming this would also work for folders right? Would be useful to be able to bind to either (File or Folder). Did some explorations on this a while back on my LepiterBuildingBlocs repo. That pushed the limit of what could be done without creating custom snippet types, but the correct way to do this is with a custom snippet type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants