cannawen / metric_units_reddit_bot

Reddit bot converting imperial units to metric units
https://www.reddit.com/user/metric_units
GNU General Public License v3.0
77 stars 34 forks source link

Keyword triggers for fl oz instead of oz conversions #52

Closed eliotw closed 7 years ago

eliotw commented 7 years ago

Added a preprocess function to the "fl. oz" converter. Will check to see if it sees oz/ounces and a liquid keyword within the same line. If so, it will convert it to "fl. oz".

input: 1 oz of water output: 1 fl. oz. ≈ 30 mL

input: 8 oz steak 1.5 cups of water output8 oz ≈ 230 g \n1.5 cups (US) ≈ 360.0 mL

cannawen commented 7 years ago

Looks awesome, thank you!

Unrelated to this PR, but I'm not sure where else to ask... did you github notify you about my "contributors" PR? Or do I have to at-notify everyone individually?

eliotw commented 7 years ago

Got a notification that you added me as a contributor. But I did not get notified specifically about the PR. I actually also had a question about it, although you may not know answer to it. I noticed in the PR, for each person there is a 'login' field. I'm assuming that corresponds with the username field. I'm actually thinking about changing my username, so I dunno if that would affect anything.

cannawen commented 7 years ago

Oh... well. I guess I'll have to at-mention everyone then...

If/when you change your username, let me know and we can change it in the file :)

cannawen commented 7 years ago

Holy cow I just deployed the change, and it's working as expected already! High five, that's awesome!

https://www.reddit.com/r/ketochow/comments/74gg6g/ketochow_and_water_intake/dnyaato/?context=3

eliotw commented 7 years ago

Awesome!

High five

eliotw commented 7 years ago

Oo forgot cup :(

https://www.reddit.com/r/tea/comments/74g929/timelapse_making_iced_tea_out_of_jasmine_pearls/dnyakce/?context=3&st=j8eqx1xw&sh=6c918cbd

cannawen commented 7 years ago

Ahh! It's ok, we can monitor the bot for a few days looking for new keywords and then open up a new PR to fix it.

cannawen commented 7 years ago

I created a new issue #54 so we can keep track of everything - feel free to throw any more keywords that you find into that issue