@datakurre, @pigeonflight and @tkimnguyen
Primary challenge here is with deserializers i.e "suitable import code" Please help me with this.
JSON to CSV conversion is secondary challenge here.
@datakurre, @pigeonflight and @tkimnguyen
Primary challenge here is with deserializers i.e "suitable import code" Please help me with this.
JSON to CSV conversion is secondary challenge here.
@Shriyanshagro specifically what are you trying to deserialise that is missing?
Seems to support both AT and DX out of the box.
Content endpoint seems to have usage examples for plone.restapi deserializer. Serializers itself only populate data for existing content, so content objects must be created first and only then filled with deserializer (look at add endpoint in add.py):
Creation of new folder in Plone site by default declares several fields of object, such as-
title: 'foldera', URL:'http://localhost:'8080/Plone/foldera', id:'foldera', short_title:'foldera', and some other fields
Now with plone.importexport egg a user manipulated title using CSV spreadsheet to 'folderb', but still the Url, id and short_title remains same.
How does plone.importexport should handle this? Need suggestion from community
You'd need to do an explicit rename
Do you mean explicitly renaming foldera to folderb in every other field values? In other words making title a UNIQUE string? as Plone site keys also has to be renamed
In such case what about path and similar relations for subcontent of foldera or any other dependencies to foldera??
keep it simple: plone.importexport should not make any guess and should not fix anything.
if the user breaks the CSV file, it will get a broken import.
I meant that if you want an object's ID to match a changed title, you usually have to rename the object (ie. the title and ID are not strongly coupled).
(I'm not sure what you see as the difference between short_title and ID)
please keep things simple and don't start assuming too many things in this stage of the project: the first thing we need is to have an export/import process running; after that we can add some validation on row level.
don't try to fix end user errors in the beginning.
Sure
I was just curious about these type of contradictions and want community to come forward with ideas, which may be preserved for later implementations.
Anyway for now I would just log every possible error in a file.
Hello everyone
I'm happy to share this, that the addon plone.importexport(build on top of plone.restapi) is advanced with its basic functionality of importexport Plone content in CSV data format(zipped in a file with blob content as file types).
I invite everyone to test this product and share your valuable feedback.
A few issues are already raised on the issue tracker, testers can add more to it if found any.
Also moving on to the next phase, as the idea was basically to provide an ease to non-techie people with the content importexport, we need suggestions from the entire community for an easy to use UI. (mockups would be appreciated), upon which we could discuss and reach out to our goal.
Please provide suggestions as simple as even a nerdy admin can understand and use it like a pro.
Great work!
What sort of UI designs do you have so far?
This is the current UI:
And this was the idea decided earlier in the PLIP
The screen is accessible from the Actions menu on any folder. The screen would propose two tabs: Basic and Advanced.
The Basic tab would allow to export all the folder and tree contents (and the result is immediately downloaded), or to import contents by uploading a file (about the data format see below).
The Advanced tab would allow to do the same but also to choose: - the types to export/import, (or maybe query) - to exclude (or not)
comments, assigned portlets, workflow state sharing content rule assignments display view assignments the fields to export/import, (based on schemas of locally addable types)
to choose the exportation mode (browser upload/download or read/write in server ./var folder), to choose the data format. action to take if content already exists (stop, ignore, update, overwrite, rename) (import) dry run mode (import)
After import a report is given of how many objects created, updated etc.
Integrating it directly into folder contents might be the best place. It directly relates to the upload feature in folder contents so it would be confusing to have two places to do this.
Could it be an idea to make a (youtube) video?
It would be especially nice if it demonstrates how to export content from a Plone 4 site and import it a Plone 5 (if that is possible)
I think that folder contents is very commonly used and that import/export isn't/won't be nearly as much.
I was going to suggest displaying all the types of content that can be exported/Imported and maybe showing a checkbox for the ones that have been, or a side by side widget letting you select what to export/Import.
A drag and drop widget to allow you to drop a file to be imported.
I don't know if it's possible but being able to control the export from another site (or the import "to" another site) so that you can be controlling both the export and the import between two sites live would be fantastic. Then you could maybe also eliminate the handling of the files by tracking where you save them (e.g. in /tmp) so the files become invisible to the user.
@tkimnguyen I didn't say it would replace folder contents. I mean inside the folder contents UI as an advanced feature.
The alternative is it goes in toolbar > Actions, which I think would be more annoying.
or the sitesetup which means content editors can't use it and you can't use it in context
I think thats a great idea. If it can be done using some kind of token so there is no need to enter your password into one site as previous sollutions have done then that would be great. ie, click "connect" and enter url of other plone site. Gives you a popup where you login and that results in an exchange of a single use key just for exporting. Then you control the whole thing from the site you are importing to, select content, filters etc.
Out of scope of this project I would image however
@tkimnguyen I like that idea too +1