Skip to content

Instantly share code, notes, and snippets.

@gnysek
Last active November 26, 2025 15:32
Show Gist options
  • Select an option

  • Save gnysek/cb46d7d6453c169f062eb53c732f6dbe to your computer and use it in GitHub Desktop.

Select an option

Save gnysek/cb46d7d6453c169f062eb53c732f6dbe to your computer and use it in GitHub Desktop.
Wanderlog Itinerary as text .
(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