this is a tool to archive all of your twitter media and create a very simple website you can share to anyone. [example with my archive] every image is hosted on google drive, and will be publicly avalible. to start, download your twitter (x) archive, then follow the steps below
**(everything is run locally and the code is completely open source. only tested in google chrome im sorry)**
create a new folder in google drive (1)
right click the folder, go to Folder Information > Details (2). then on the sidebar, click Manage access (3)
under General access, change the permission from Restricted to Anyone with the link (4), then click Done (5)
on your twitter archive, go to data > tweets_media, then upload all the images into the google drive folder (6). (delete anything you dont want on the web. also video does not work currently)
press f12, or right click anywhere and Inspect, then click on the Console (7) and paste the following code (8)
**(known problems: all content must be loaded in order to work correctly, make sure to scroll all the way down and back up before pasting the code)**
press enter to run the code, then right click on the output and Copy Object
paste the output into the box below
on your twitter archive, go to data folder, and upload tweets.js below
**(needed because i plan to update in the future to add more export options. by default this ignores retweets and only looks for image media)**
containerElements =
document.querySelectorAll('div[role="presentation"]')[34].parentElement.parentElement.childNodes;
var allImgs = [];
containerElements.forEach(function (element, i) {
var fileName = element.childNodes[0].childNodes[0].childNodes[2].childNodes[1].childNodes[0].innerHTML.match(/>(.*)\./)[1];
var driveId = element.innerHTML.match(/data-id="(.*?)"/)[1];
allImgs.push([fileName,driveId]);
});
console.log(allImgs);
**(preview will attempt to load all images at once, this could be laggy)**
Disable preview?