Last active
January 9, 2025 12:24
-
-
Save doZennn/cc7d2942ab6f743731f38e77a208ba0e to your computer and use it in GitHub Desktop.
Rename archivebox output folders to site title
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Array.from(document.querySelectorAll('#table-bookmarks .title-col > [title]')).map(x => { | |
| const title = x.title.replace(/(\W+)/gi, ' '); | |
| const pathParts = URL.parse(x.href).pathname.split('/'); | |
| return `cp -R "${pathParts[pathParts.indexOf('archive') + 1]}" "${title}"`; | |
| }).join(';\n'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment