Skip to content

Instantly share code, notes, and snippets.

@subtleGradient
Last active May 28, 2019 14:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save subtleGradient/3a7aac41df025020223bea349b20f496 to your computer and use it in GitHub Desktop.
Save subtleGradient/3a7aac41df025020223bea349b20f496 to your computer and use it in GitHub Desktop.
[...$$('img')].map(img => {
const imageFilename = img.getAttribute('src');
const [type, ...name] = img.parentNode.parentNode.parentNode.parentNode.nextSibling.nextSibling.textContent.trim().split('\n').map(string=>string.trim()).reverse();
return `cp '${imageFilename}' '${name.reverse().join(' ')}.${imageFilename.split('.').reverse()[0]}'`;
}).join('\n')
@subtleGradient
Copy link
Author

subtleGradient commented May 28, 2019

  1. Go here https://docs.google.com/document/d/1pwl7KRsOtoE7p66MW7PWxICQOCxHXuIaQDOAPhEYvIo/edit
  2. Export as HTML
  3. Unzip
  4. Open the HTML in Chrome
  5. Open the chrome devtools
  6. Paste the op-img-extract.console.js script into the console
  7. copy the results with copy($_)
  8. Open a terminal window and cd into the unzipped folder
  9. Paste the shell script code into the terminal
  10. Drag all of the images into a Notion.sh Gallery DB window

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment