LegendLore

🗺️LegendLore

image

The story behind this project

As a DM, I’m hopelessly addicted to maps. The stories they tell, the games we play on them, just the pretty colors and shapes - I began to hoard them like a dragon hoards shiny treasure. Unfortunately my hoard quickly became unmanageable. I couldn’t keep up with the rate at which I was acquiring maps, and it became really hard to find the right one for a session, as my maps folder reached sizes that couldn’t even be reasonably processed by the software I was using.

So it was always my goal to organize them in some way. I tried organizing them by folder, by artist, etc., but the amount of time it took to get through even 100 was exhausting. Forget about 100,000. And then, once they were “organized” in some manner, it was still really hard to see them all side-by-side to find the right one.

Eventually I discovered Notion and began to organize my campaign notes in there, and I realized it could lay out images and tag them. And around that time, GPT4-Vision came out, and it could describe images, and even play Geoguessr. The key to organizing all these maps was in these two tools. So I used them to organize my huge, personal collection of maps, and it went so well, I thought hey, why not literally organize every map, ever?

And thus the legend began…

✨ My hope is that this tool can also help you find your perfect map! Please support the artists of each map by upvoting the original post, or even subscribing via Patreon! ✨

Instructions and Tips

image

Known Issues


Technical Stuff

This repo contains the code behind LegendLore! It does not contain certain components such as credentials in credentials.json, MongoDB, or Docker.

Currently tracks 5 subreddits:

  1. r/battlemaps
  2. r/dndmaps
  3. r/dungeondraft
  4. r/FantasyMaps
  5. r/inkarnate

LegendLore is a database consisting of a few key components:

  1. Python scripts - The Python scripts in this repo enable LegendLore to find/tag/track state/push new maps
  2. Reddit - All maps are pulled from publicly available images on the above subreddits.
  3. MongoDB - Data on every post is stored on a MongoDB backend and processed later. At the time of writing, there are about 100k maps, and an additional 40k posts in the DB that could not be sent to Notion - either because they’re not maps (question posts, spam, etc.) or the image links aren’t yet supported.
  4. GPT4-Vision - Analyzes the maps and tags them based on a list of tags provided. This was the game-changer that finally let me fulfill the dream of organizing my map backlog.
  5. Docker/Cron - On my home server, I have two docker containers running - one every hour that just pushes new maps to Notion, and one every 6 hours that updates the scores of all maps less than a week old (to enable fair and accurate score sorting, I decided on a week cause scores have largely settled by then).
  6. Notion - The lovely visual database and web host that lets me show all the maps without having to worry about all that front-end stuff.

Can I use LegendLore for insert thing here?

Sure! It’s a bit purpose built at the moment, but using config.py, you can hook it up to your own Notion DB, MongoDB, GPT token, and subreddits and run it on whatever you want, doesn’t even really have to be maps. Do keep in mind that the GPT calls cost a bit of money (like 0.3 cents per image on average).

Can I help tag some untagged maps?

I would love to say yes, but unfortunately I can’t allow limited edit access at the moment - it’s all or nothing. In the future, if I can figure out how to allow contributors, I would love your help!

I would like to report a bug or contribute to the project!

Thank you! Feel free to use the Issues tab above to submit a bug, or make a pull request/fork to contribute!

I would like my content to be removed from this tool!

Understood! Please shoot a PM to u/EpicRandomGuy2 on Reddit and I will gladly remove your content!