niryariv / opentaba-server

BSD 3-Clause "New" or "Revised" License
4 stars 13 forks source link

Feature:add email subscription for taba changes for a specific address #15

Open alonisser opened 11 years ago

alonisser commented 11 years ago

Enables us to utilize the all of the taba information and not only jerusalem where we have a map (bringing in Tel Aviv and rest of gush dan)

Algorithm:

  1. add a "update-time" timefield to the gush model
  2. add a collection subscribers: including: name/email/[subscribed gushim -array{gush_id:update-time}]
  3. when someone subscribe he receives an email with the current taba and the update-time field is updated to current date(or date of the last db update)
  4. the same email can't subscribe to more then 3 gush in one email (to prevent abuse or commercial use)
  5. after every db update(scraping) a job run over all email address. check for each email/gush_id-update-time against the last update of that gush and if <last update. send last update.
  6. For beginners we could send all the relevant plans every update, after that figure out how to send only updated plans

maybe the collection should be reversed (an table of gush:[email subscribers])

More parts:

I think this can be the killer app for open taba

niryariv commented 11 years ago

We're about half way there - we have the atom feed, we need to find some atom/rss -> email service that can handle the subscriptions for us (and remove the need to code all that email/subscription/etc stuff)

I would leave it at the city/municipality level. Mostly for simplicity's sake (handling multiple customized subscriptions would harder to scale than city level), also because TBA sometimes refers to a whole new neighborhood, which is something the user might want to know even if it's not within 5 KM from home.

There are a handful of new plans each week in Jerusalem (or less) so it's not a huge information overload on the user to show everything that goes on in their city.

alonisser commented 11 years ago

tools for email sending: I'll check up enevelope. I think we can utilize gmail smtp for sending emails, but not sure (I saw some code examples in the wild using this pattern)

alonisser commented 10 years ago

Just found django-feedme - maybe I'll use it the feed reading part: (or just part of the code). Since Oknesset team already has an email server on django I can use this to supplement and provide the feed reading part

alonisser commented 10 years ago

a humble beginning: https://github.com/alonisser/opentaba-register

noamoss commented 8 years ago

@niryariv @alonisser Just saw this issue after a few weeks of working on a meta-project delivery service. Beginners Level. You are welcome to review and contribute: https://github.com/noamoss/notifier

Already created interface from opentaba-client: https://github.com/noamoss/opentaba-client. Pull request will be sent soon, when main service is ready.