Giter Site home page Giter Site logo

mayankagarwal2402 / metric_units_reddit_bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cannawen/metric_units_reddit_bot

0.0 2.0 0.0 530 KB

Reddit bot converting imperial units to metric units

Home Page: https://www.reddit.com/user/metric_units

License: GNU General Public License v3.0

JavaScript 100.00%

metric_units_reddit_bot's Introduction

Build status Coverage Status

first-timers-only PRs Welcome All Contributors License: GPL v3

Vision

How does the code work?

This is a javascript app built with Node.js, and all of the app code is in the src directory.

The app starts in bot.js, and it polls the Reddit servers in an infinite loop. The app has two major components:

converter.js and conversion_helper.js are responsible for converting imperial units to metric units. See documentation to add a conversion

personality.js create sassy responses to certain trigger words

Running the code

For changes not related to networking, running tests is often enough. But if you want to see the bot hitting the Reddit servers:

  1. Create your bot's reddit account.
  2. Create a reddit script app through your reddit preferences. (Use http://localhost as your redirect url, we don't need it.)
  3. Get your OAuth username (random characters below "personal use script") and secret
  4. Fork the main github repo and download the bot's code from your own repo
  5. Create a file ./private/environment.yaml that looks like sample-environment.yaml
  6. ensure your node --version is >= v6.2.1
  7. run npm install
  8. run node ./src/bot.js
  9. You should have the bot up and running!

Note: You can run the bot in development mode (which won't POST requests to reddit servers) by changing the dev-mode environment variable to true

Running the tests

You do not need to create a reddit app to run the tests, you can use the sample-environment.yaml default values.

run npm test

Note: To run a single spec, add .only

Questions or Comments?

Feel free to drop by the subreddit or open a github issue

Contribute

See Contributing Guideline and Code of Conduct

First time getting involved in Open Source Software? Welcome, and we hope you stick around! See New to OSS guide

Thanks goes to these wonderful people who have contributed (emoji key):


Canna Wen

๐Ÿ’ป ๐Ÿ’ฌ ๐Ÿค” ๐Ÿ‘€

Daniel Albert

๐Ÿ’ป

Bob Clingan

๐Ÿ’ป

fbontin

๐Ÿ’ป

Nitin Choudhary

๐Ÿ’ป

Manuel Porto

๐Ÿ’ป

Anna Do

๐Ÿ’ป

Charles

๐Ÿ’ป ๐Ÿ’ฌ ๐Ÿค”

Hasan

๐Ÿ’ป

Marc Fogleman

๐Ÿ’ป

Eliot Wong

๐Ÿ’ป

Doomki

๐Ÿ’ป

Wing Lian

๐Ÿ’ป

NFerraro

๐Ÿ’ป

Nalin Bhardwaj

๐Ÿ’ป ๐Ÿ’ฌ

thepassenger-hub

๐Ÿ’ป

Sean Grimes

๐Ÿ’ป

Rafal Dittwald

๐Ÿ“–

namantw

๐Ÿ’ป

Dan C

๐Ÿ’ป

cmd-kvn

๐Ÿ’ป ๐Ÿ›

Andrew Terranova

๐Ÿ’ป โš ๏ธ

Jacob Allen

๐Ÿ’ป โš ๏ธ

See the Contributor Introductions thread to learn more about the people who help make this project happen!

All contributions welcome

This project follows the all-contributors specification. Contributions of any kind welcome!

License

This source is distributed under GNU GPLv3

metric_units_reddit_bot's People

Contributors

cannawen avatar shrink avatar esclear avatar doomki avatar nalinbhardwaj avatar nicolasferraro avatar chazzlabs avatar eliotw avatar juanpotato avatar rafd avatar winglian avatar cmd-kvn avatar fbontin avatar annuhdo avatar aterranova-bv avatar bclingan avatar skuhoo avatar jacobscottallen avatar mfogleman avatar miporto avatar nitinkgp23 avatar seandgrimes avatar sirugh avatar namantw avatar

Watchers

James Cloos avatar darthpool avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.