DocNow / diffengine

track changes to the news, where news is anything with an RSS feed
MIT License
177 stars 30 forks source link

Tweet changes on a thread! #63

Closed nahuelhds closed 4 years ago

nahuelhds commented 4 years ago

The engine now create a tweet when a new entry is detected and then, for every change, it makes a thread on it.

Also, I've replaced deprecated warn by warning

You can see a working example on the Twitter account @ep_diff

edsu commented 4 years ago

This is a really awesome addition to diffengine, thanks @nahuelhds! Not only that, but I'm encouraged that you were able to find your way around in the source code, especially since it's one big python file still.

Do you want to let me know when you think the work on this is ready to be merged, and I can take a look? One thing that will require some thought is how people can upgrade their databases. I don't know if I've accounted for that in the past.

nahuelhds commented 4 years ago

Hey @edsu. I think that maybe I should make a PR per every addition I've done so far. They are:

  1. Ability to personalize the text when the url, the title or the summary has changed (internalization). Integrated to the yaml. You can see it configured in this repo.
  2. Migration to from gecko to chrome driver. This was because the latest "just" works with Heroku. Sadly, I couldn't make it work with gecko and Firefox (I've tried a LOT of things).
  3. Environment vars in the YAML file. So I can upload a repo with the implementation to Github and keep the tokens secretly (like here)
  4. The last addition I'm working on is be able to use PostgreSQL. I think peewee already support it. I need to do some I+D there.

All that with the idea to have this working directly in services like Heroku and keep it working there

nahuelhds commented 4 years ago

I'll close this PR as I've realized that it's pointing to my master branch and that was not my idea about the PR but just the twitter thread thing. I'll create a PR per every one of the features so we can discuss them separately.

edsu commented 4 years ago

Ok sounds good @nahuelhds. I am not sure I like the idea of starting the thread with a tweet of just the URL. But maybe I can warm up to the idea.

edsu commented 4 years ago

It's great to see you getting some attention on your new diffengine bots @nahuelhds! The more I see it the more I like the new threads! Shall I try to merge in your changes from your master branch?

edsu commented 4 years ago

HI @nahuelhds. I've merged in your master to the threads branch. Could you see if you if you can start working off that branch too, and we can refine it further so it can be merged into master? I have some changes I would like to make, but I want to make sure we are both working off the same version before I do that.

nahuelhds commented 4 years ago

Sure! Ed. I'll do that, of course

nahuelhds commented 4 years ago

My thinking about this is that I've made several additions and not only the thread thing:

I think is better to add them separately, make tests, so we can focus in one thing at a time... what do you say?

I insist that I don't have any problem in working in all these at the same time if you prefer so.