given the format of the json export of playlists and history, write a small script (in jq and/or bash) that will accept an arbitrary number of these exported files, and combine them into one (returning the result to standard out is fine). pay close attention to reconciling differences (between playlist versions and between history versions), and ensure no loss of data. try to preserve playlist order (even if a later version had added more videos, for example), and use filename date (later versions break ties, if necessary). if videos have been removed in subsequent versions, keep them in the combined version.
Created merge-exports.sh - a bash script using jq to merge multiple playlist export JSON files.
Playlist Merging:
History Merging:
Open Tabs:
Date Handling:
./merge-exports.sh export1.json export2.json export3.json > merged.json
For playlists:
For history:
Fixed "Cannot index array with string" error by properly accessing the files array with $files[0] instead of just $files.