UltrosBot/Ultros

URL catcher

Closed this issue · 3 comments

Reported by phat on IRC

Catch all URLs and put them into a database.

  • Add an event to the URL catcher for when a URL is detected
  • Create a contrib module..
    • Use SQLAlchemy to support all of the databases
    • Allow configuration of specific channels to watch for URLs
    • Store metadata - Protocol, channel, user, the URL itself
      • Possibly store the title as well, provided there is one
    • Add support to the web interface, and provide a sample PHP page

I assume using a Data class that wraps SQLAlchemy? Also, can we do this in twisted properly (async)?

I was going to use Twistar as an ORM but honestly it's not up to the job of being a proper ORM.

There are no other ORMs for Twisted, so I'll have to support different databases manually. We'll just use MySQL for now. I'm also going to need a database schema from Phat.

The database schema Phat was using with the eggdrop is not suitable, so I've modified it a bit to work for our needs. I'll be supporting MySQL and PostgreSQL by default; adding dialects will be very easy as they're stored in .sql files, and users can use whatever adapters they like.