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

  1. A user visits admin/content/package
  2. The desired View is selected in the "Make a Content Package" section
  3. 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.
  4. 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

wwedding created an issue. See original summary.

wwedding’s picture

Issue summary: View changes
saesa’s picture

Issue summary: View changes
avpaderno’s picture

Issue summary: View changes

Thank you for your contribution! The PAReview checklist has been added. Reviewers will check the code and report here what should be changed.

klausi’s picture

Status: Needs review » Reviewed & tested by the community

Thanks 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!

avpaderno’s picture

Assigned: Unassigned » avpaderno
Status: Reviewed & tested by the community » Fixed

Thank 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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.