⬇️ Download all the images you uploaded to Twos
by d00p · 32 things on Twos
- ❓ Why did I do this?
- I love writing things in Twos. But, over the years, it also became my journal. It's so quick to add things here that I'd rather do this than open another app, like DayOne.
The problem for me was the backups. They were TEXT ONLY. True, the images were there as a link to AWS, but... they weren't mine.
And this was frustrating.
So, I decided to find a way to download all these images so that I can have a proper backup of ALL MY THINGS ✌️
- ---
- 🤔 So, what do we have here ?
- This small script will download all the images it can find in your backup; then it will create a copy of the markdown backup file, replacing all the web links with links to the local files it has downloaded.
- This way you can backup your things and all your uploaded images 👏
- ---
- 🖥️ Requirements :
- python
- make sure the "requests" module is installed (it is not a buil in module)
- (optional) if you want to use the version that optimise and resize images, you should also install Pillow
- ---
- 🔩 Usage :
- Make an export of your Twos data (Settings → Export → Export as markdown)
- Save the file in a folder of your choice
- Download the "twosImageExtractor.py" (in the same folder) from here : https://github.com/podiboq/TwosImagesDownloader/
- Open a terminal and launch the script. There are 2 options :
- Download all the images as they are on the servers (full quality)
- python3 twosImageExtractor.py YOUR_EXPORT_FILE.md
- Download and resize + optimize the images (to have smaller files, easier to display in the final Markdown file)
- python3 twosImageExtractor.py YOUR_EXPORT_FILE.md --optimize
- The script will download the images. You'll be able to see the progress :
- That's it... ✌️
- You now have :
- 🔗 A "links.txt" file containing all the image links that were found in your Twos backup
- 🏞️ In the "/images" folder you have all the downloaded files
- ✌️ An updated .md file was created with all the image links updated. Now you can open this file in Obsidian or Markdown editor and you can see all the images next to your THINGS ✔
- 👏 I hope it works for you and if I helped you, I'm very-very happy ツ
- PS : Thanks to Parker and Joe for building Twos ✌️