given the format of the json export of playlists and history, write a couple small scripts (in jq and/or bash) that will convert a json exported file, and present the data in a plaintext format. one script prints the title of each playlist then outputs the url and title of each video in the playlist (unviewed ones first, then the "done" ones). another script outputs the history data, but condensed: the url and title of each video viewed, plus the date and time of the most recent activity of that video, ordered by that date and time; optional space-separated arguments filter only the videos containing all the tags given by the arguments.
The Firefox extension exports data in JSON format with the following structure:
{
"playlists": {
"playlist-name": [
{
"url": "...",
"title": "...",
"status": "done" // optional, omitted for unviewed videos
}
]
},
"playbackHistory": {
"video-id": {
"url": "...",
"title": "...",
"history": [
{
"timestamp": 1234567890000,
"action": "play|pause|ended",
"position": 123.45
}
],
"tags": ["tag1", "tag2"] // optional
}
},
"openTabs": [...],
"exportDate": "..."
}
Both scripts: