-
Notifications
You must be signed in to change notification settings - Fork 17
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
Support having one json-file per content item #223
Conversation
I chatted with @pbauer and @davisagli and maybe @flipmcf about this during PloneConf 2023. The problem here is one of the core computer science ones, 'naming things'. the goal of storing items in single file items is that
I have only a beginning love/hate relation toward generative LLM's and Chat GTP, but it has helped me a few times already to clear my mind. check this prompt and response: I want to export a hierarchical database with nodes that have parent/children relation to a classical filesystem. the nodes should be individual files. What is a correct naming scheme or algorithm for the storage of the individual files so that the order is preserved for exiting items. But new items can also be added or items can be deleted. All of this without renaming files or folder id's on the filesystem. To achieve a hierarchical database representation as individual files in a classical filesystem with the ability to preserve order, add new items, and delete items without renaming files or folder IDs, you can consider the following naming scheme:
This naming scheme allows you to preserve the hierarchical structure, maintain order, add new items without renaming existing ones, and keep track of deleted items in your classical filesystem-based representation of the hierarchical database. So , with the added complexity that an export would need to support reading an existing hierarchical export to 'patch' the existing content tree, we would need to add some fancy numbering when you insert an item inbetween 1 and 2 for the position so it would become 1.1 or 1.1.1 (but github's diffing algorithms could handle this correctly) and that we have folderish items where you'd create a file for a folderish pages that could become a hierarchy with contents added into it . Is using folders and a naming scheme like objposid_[optional_extenstion_pos]-uuid.json and an an accompanying identical folder name without .json as soon as it contains content a naming scheme that would give us all of these features? |
Yesterday I prototyped an hierarchy export/ import for content types. |
At the moment the export creates a structure like this:
The import also works with the structure created by collective.jsonify:
The order of items in containers and the tree-structure of the portal is not covered here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.