Skip to content

ejania/clear_transcripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clear Transcripts from Notion

Description

This script exports the content of a "Транскрипт интервью" toggle from a Notion database to a text file. It can also optionally delete the content from the original Notion card.

Setup

  1. Install Python: Make sure you have Python 3.6+ installed.
  2. Install dependencies: Install the required Python libraries using pip:
    pip install -r requirements.txt
  3. Create a Notion integration:
    • Go to https://www.notion.so/my-integrations and create a new integration.
    • Give it a name (e.g., "Transcript Exporter").
    • Copy the "Internal Integration Token". You will use this as the --notion-token.
  4. Share the database with your integration:
    • Go to your Notion database.
    • Click the "..." menu in the top right corner.
    • Click "Add connections" and select your newly created integration.
  5. Get the Database ID:
    • Open your database in Notion.
    • The URL will look something like this: https://www.notion.so/your-workspace/DATABASE_ID?v=...
    • The DATABASE_ID is the long string of characters between your workspace name and the ?v=. You will use this as the --database-id.

Usage

Run the script from your terminal, providing your Notion token and database ID:

python clear_transcripts.py --notion-token <your_notion_token> --database-id <your_database_id>

To delete the transcripts from Notion after exporting, use the --delete flag:

python clear_transcripts.py --notion-token <your_notion_token> --database-id <your_database_id> --delete

For testing, you can limit the number of pages processed with the --limit flag:

python clear_transcripts.py --notion-token <your_notion_token> --database-id <your_database_id> --limit 5

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages