Allow download multiple content first as ZIP

Created on 18 July 2025, 9 days ago

Problem/Motivation

Being able to download content as zip can be useful for multiple purposes:

- Reviewing all the content of the site, out of browsing the site
- Analyzing texts with AI
- Generating content with AI using content first as part of the prompt.

Proposed resolution

Create a custom Drupal action to generate a ZIP. Study if there is no issues generating the zip as the final step.

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇪🇸Spain omarlopesino

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @omarlopesino
  • 🇪🇸Spain omarlopesino

    The plan is developing it the next week and releasing it at beta7.

  • 🇮🇳India kulpratap2002

    Working on it.

  • 🇪🇸Spain omarlopesino

    Oh it was on my plans doing this but I haven't started yet, so contributions are welcome :)

    If you are going to work on it, I expect that this feature works technically as follows:

    - Do a Drupal Action Plugin to save the markdown generated by content_first.builder service into a temporary file.
    - Allow this action to be enabled at /admin/content, so any content needing downloading can be selected.
    - After doing the bulk operations, save all the files into a ZIP.
    - Either display a Drupal message linking the generated file, or auto download it in the next page load.

    This would be a "Drupal way" solution that would meet the requirement, otherwise it can become tricky I think.

  • 🇮🇳India kulpratap2002

    Yes, I am on it and doing it the same way as you mentioned.
    @omarlopesino We want both HTML and Markdown, or just Markdown, in the downloaded ZIP.

  • 🇪🇸Spain omarlopesino

    If it is easy, we could add a selector in the action plugin configuration form to choose between HTML or Markdown. My only concern is I don't remember if that configuration is global for all the selected elements, or is specific for each one. If it is global, go for it. Otherwise, only markdown.

  • @kulpratap opened merge request.
  • 🇮🇳India kulpratap2002

    @omarlopesino I have created an action that downloads a ZIP file. For now, I have only created action for markdown.

    For reference, I am attaching a video on how it works.

    Please review.

    Thanks

  • 🇮🇳India sandeep_k New Delhi

    @kul.pratap I tried this MR !3 mergeable on Drupal version- 10.3.1-dev, the patch was applied successfully, but I am not getting that option to download the zip as shown in the video.
    Also, while I was trying to access the node- Content first tab, it's throwing an error.
    Please check and let me know if I have missed any steps here.

  • 🇮🇳India kulpratap2002

    @sandeep_k you have not installed the "league/html-to-markdown": "^5.1" this is a package which is require to run this module.
    You can see in the composer.json
    After that reinstall the module.

  • 🇪🇸Spain omarlopesino

    It works perfect, thanks also for correcting most of styling errors reported by drupalci!

    I've done some slight adjustments and I am merging it.

    Thanks!

  • 🇪🇸Spain omarlopesino

    Released at beta9

Production build 0.71.5 2024