Code Monkey home page Code Monkey logo

yaif's Introduction

Yet Anoter IF this then that

Description

Sorry, I copied ifttt.

The target of yaif is to connect services in the internet, let them work together and automatically.

Basically, a typical services will have some triggers and actions. For example, Twitter. The home line of Twitter is a trigger, you can get information from it and to do something depends on the content of a tweet. And to post a tweet is an action, which will update and change the status of your home line. Yaif's target is connect all different services. You can create some task, get information from a trigger of A Service, and do an action in B Service.

Usage

  1. Clone the code and prepare the rails environment.

  2. Copy the ./service.template to ./service

  3. Update the service information in ./service, for example: oauth secret and key. The update information depends on service authentication type.

  4. Run command to import service to database:

    $ rake service:import
    
  5. Open config/application.rb and change below username/password:

    config.basic_auth_username = 'username'
    config.basic_auth_password = 'password'
    
  6. Make a invite to your self:

    $ rails c
    irb > u = RegKey.new :email => "[email protected]"
    irb > u.save
    irb > puts u.key
    db716e8d8          # this output depend on your computer, only example here
    
  7. Start your rails server.

  8. Create a new user. Access your site: http://yoursite/signup?reg\_key=db716e8d8 . The reg_key is the output of step 6.

  9. Access http://yoursite/crontab with username/password set at step 5. Add lines to your cron to trigger tasks interval.

  10. Enjoy.

TODO

  1. Custom error handler. Some action error should be ignore. (for example: fobidden word in weibo)
  2. Multiply user meta for one service.
  3. Make normal http login request. (It ought to save user's password directly. Is it OK?)
  4. Make some css. (I'm lazy…)

yaif's People

Watchers

 avatar  avatar  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.