Last active
November 26, 2025 15:32
-
-
Save gnysek/cb46d7d6453c169f062eb53c732f6dbe to your computer and use it in GitHub Desktop.
Wanderlog Itinerary as text .
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
| (function() { | |
| const sections = [...document.querySelectorAll('.SectionComponent')]; | |
| let output = ''; | |
| let total = 0; | |
| sections.forEach(section => { | |
| const header = section.querySelector('.SectionComponentHeader'); | |
| if (!header) return; // its' another block, skip | |
| const dayTitle = header.textContent.trim(); | |
| if (!dayTitle) return; | |
| output += `\n${dayTitle}\n`; | |
| // only from that section, skip hotels | |
| const items = [ | |
| ...section.querySelectorAll('[data-rbd-droppable-id] .SectionItemControls__mainItem span.text-truncate')] | |
| .map(el => el.textContent.trim()) | |
| .filter(Boolean); | |
| const unique = [...new Set(items)]; | |
| unique.forEach(name => output += `- ${name}\n`); | |
| total += unique.length; | |
| }); | |
| output += '\nTotal number of places to visit: ' + total; | |
| console.log(output); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment