#!/bin/bash

ARCHIVE_PATH="$HOME/Downloads/twitter-2026-03-27-d4471cc6eb6703034d592f870933561ebee374d9d9b90c9b8923abff064afc1e/Your archive.html"
CHUNK_DIR="$HOME/Downloads/twitter_chunks"
CHUNK_SIZE_MB=40

mkdir -p "$CHUNK_DIR"
echo "Splitting archive file into $CHUNK_SIZE_MB MB chunks in $CHUNK_DIR"
split -b $((CHUNK_SIZE_MB * 1024 * 1024)) -d --additional-suffix=".html" "$ARCHIVE_PATH" "$CHUNK_DIR/chunk_"
echo "Chunks prepared."