{"id":25176314,"url":"https://github.com/redturtle/redturtle.importer.volto","last_synced_at":"2025-04-04T01:40:46.035Z","repository":{"id":49421464,"uuid":"227405230","full_name":"RedTurtle/redturtle.importer.volto","owner":"RedTurtle","description":"Used to import an old Plone Site into a new with Volto","archived":false,"fork":false,"pushed_at":"2022-04-19T10:59:29.000Z","size":168,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-02-19T17:10:01.229Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RedTurtle.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE.GPL","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-11T16:00:37.000Z","updated_at":"2021-06-17T10:08:13.000Z","dependencies_parsed_at":"2022-09-24T03:12:43.926Z","dependency_job_id":null,"html_url":"https://github.com/RedTurtle/redturtle.importer.volto","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedTurtle%2Fredturtle.importer.volto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedTurtle%2Fredturtle.importer.volto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedTurtle%2Fredturtle.importer.volto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedTurtle%2Fredturtle.importer.volto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RedTurtle","download_url":"https://codeload.github.com/RedTurtle/redturtle.importer.volto/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247107820,"owners_count":20884795,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-09T13:16:53.154Z","updated_at":"2025-04-04T01:40:46.016Z","avatar_url":"https://github.com/RedTurtle.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":".. This README is meant for consumption by humans and pypi. Pypi can render rst files so please do not use Sphinx features.\n   If you want to learn more about writing documentation, please check out: http://docs.plone.org/about/documentation_styleguide.html\n   This text does not appear on pypi or github. It is a comment.\n\n========================\nRedturtle Importer Volto\n========================\n\nPlugin for `redturtle.importer.base`__ to migrate old site into a new Volto-enabled site.\n\n__ https://github.com/RedTurtle/redturtle.importer.base\n\nFeatures\n========\n\nThere is a new adapter for **redturtle.importer.base** for content-types with **volto.blocks** enabled behavior\nthat converts rich text from html (TinyMce) to json (DraftJs/blocks).\n\nHTML to DraftJs converter\n=========================\n\nFor content-types with blocks enabled, we need to convert old-style HTML text to a DraftJs compatible data structure.\n\nThe best library to do this, is the officiale one that is only available for Javascript.\n\nFor that reason, to convert HTML we need to connect to an external tool: https://github.com/RedTurtle/draftjs-converter\n\nThis is a nodejs rest api that accept some html and returns its DraftJs converted version.\n\nTo use this api, we need to set an environment variable with its address in our buildout::\n\n    environment-vars +=\n        ...\n        DRAFTJS_CONVERTER_URL http://localhost:3000/html_converter\n\n\nBlocks conversions\n==================\n\nEvery piece of a RichText value should be converted into a Volto block element.\n\nSome pieces can be converted into a specific block (for example tables, images, embed items).\nOther standard html elements are converted into a *text* block that contains a DraftJs data structure.\n\nWe made some assumption when converting text into blocks.\n\nEvery paragraph is a new block\n------------------------------\n\nThis allows editors to move text, insert elements between paragraphs, etc.\n\n\nImages are wrapped into a separate paragraph\n--------------------------------------------\n\nBefore launching the conversion tool, we wrap every image into a separate paragraph.\n\nIn this way we can handle them as an \"image block\" in Volto.\n\nImage sizes conversion\n----------------------\n\nIn Plone images in text can have also a miniature (images scales in Plone).\n\nIn Volto, right now, there are only 3 available sizes (S, M, L), so we mapped plone scales into these 3 sizes.\n\n\nTypes conversion\n================\n\nIf a content-type have **volto.blocks** behavior enabled and a **text** field, that field will be converted in blocks.\n\n**Collection** content-types will be converted into a **Document** with a **listing block** with its criteria filters.\n\n**Folders** with a default view will be converted into a **Document** content-type with these rules for its blocks:\n\n- If default view is a **Collection** content-type, we create a **listing block** with its criteria filters.\n- If default view is a **Document** or **News Item**, we convert its text into blocks.\n- If the folder doesn't have a default item as view, we create a **listing block** that shows first level contents.\n\n\nInstallation\n============\n\nInstall redturtle.importer.volto by adding it to your buildout::\n\n    [buildout]\n\n    ...\n\n    eggs =\n        redturtle.importer.volto\n\n\nand then running ``bin/buildout``\n\nYou don't have to install it. In this way, after the data migration, you can\nremove it from the buildout and everything is clean.\n\n\nContribute\n----------\n\n- Issue Tracker: https://github.com/collective/redturtle.importer.volto/issues\n- Source Code: https://github.com/collective/redturtle.importer.volto\n\n\nCredits\n-------\n\nThis product has been developed with some help from\n\n.. image:: https://kitconcept.com/logo.svg\n   :alt: kitconcept\n   :width: 300\n   :height: 80\n   :target: https://kitconcept.com/\n\nLicense\n-------\n\nThe project is licensed under the GPLv2.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredturtle%2Fredturtle.importer.volto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredturtle%2Fredturtle.importer.volto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredturtle%2Fredturtle.importer.volto/lists"}