This module eases the headache of trying to use Drupal to manage and create content and then package up that content (and only that content) for use in offline applications or for easy archiving.
This is distinct from a more common "migration" or "export" workflow; an export or migration is often less about deploying an asset bundle somewhere and more about moving data into and out of databases, with file assets left by the wayside or requiring command-line intervention to keep things from getting messy.
Initial configuration
A REST Export view that provides the entities you need (and JSON content for your application)
Visiting admin/config/content/content_packager to include necessary image styles and exclude some fields (like user images).
Core behavior
- A user visits admin/content/package
- The desired View is selected in the "Make a Content Package" section
- The "Copy Files" button is clicked, kicking off a batch that iterates through a View's results and reviews Media field content. The batch will assemble a list of media files and then copy these files into the configured "content package" directory.
- The "Zip Package" button is clicked and a zip archive of every file that has been saved to the "content package" directory. This part is optional and might fail depending on a mixture of server configuration and file sizes involved.
Project page
https://www.drupal.org/project/content_packager
Git Instructions
git clone --branch 8.x-1.x https://git.drupalcode.org/project/content_packager.git
PAReview checklist
https://pareview.sh/pareview/https-git.drupal.org-project-content_packager
Comments
Comment #2
wwedding commentedComment #3
saesa commentedComment #4
avpadernoThank you for your contribution! The PAReview checklist has been added. Reviewers will check the code and report here what should be changed.
Comment #5
klausiThanks for your contribution!
Review:
* EntityProcessor and FieldProcessor have a lot of static methods and seem good candidates to convert into a custom service that your module provides. See Defining your own services at https://www.drupal.org/docs/8/api/services-and-dependency-injection/serv...
Looks super good otherwise!
Comment #6
avpadernoThank you for your contribution! I am going to update your account.
These are some recommended readings to help with excellent maintainership:
You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
I thank all the dedicated reviewers as well.