Skip to content

Recursively identify all nested pages and databases within the Notion workspace, regardless of nesting depth. Export these items based on their content type: as .md files for pages and .csv files for databases. #260

@developerisnow

Description

@developerisnow

Title:

Enhancement: Extend notion-backup to Recursively Download All Content as .md or .csv

Body:

Description

The notion-backup script is currently capable of exporting top-level Notion pages and their immediate subpages. However, for nested content beyond the first level of subpages, it only downloads links rather than the actual content. For a comprehensive backup, there's a need for the script to recursively download all nested pages and databases, exporting them as .md (Markdown) or .csv (Comma Separated Values) files, depending on the content type.

Current Behavior

When executing a backup, the script processes top-level pages and their direct subpages correctly, exporting them as expected. However, at deeper nesting levels, it only captures links to these pages or databases instead of downloading the actual content.

Desired Enhancement

Modify the script to:

  • Recursively identify all nested pages and databases within the Notion workspace, regardless of nesting depth.
  • Export these items based on their content type: as .md files for pages and .csv files for databases.
  • Ensure that the backup mirrors the full structure and content of the Notion workspace, providing a complete offline snapshot.

Potential Approach

A potential approach to achieve this could involve:

  1. Enhancing the script's logic to traverse the Notion page hierarchy more deeply.
  2. Implementing functionality to check each item's content type and choose the appropriate export format.
  3. Testing with Notion workspaces that have complex nested structures to ensure comprehensive coverage and functionality.

Additional Context

  • The script's current functionality is highly valuable for top-level and first-level subpage backups.
  • The enhancement is aimed at making the tool even more powerful for users needing detailed backups of complex Notion workspaces.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions