Giter Club home page Giter Club logo

onebutton's Introduction

OneButton

OneButton is a one-click solution for ipa to finish all hackathon duties at once. Some features are mentioned in hackpad.

Prerequisite

  • brew install phantomjs
  • npm install -g casperjs
  • npm i
  • create config.js from config_example.js
    • kktix's account, password
    • hackpad's id, secret (each hackpad subdomain has different hackpad id, secret)
    • bit.ly's access token

Your config.js may look like this:

module.exports = {
  KKTIX: {
    login: '',
    password: '',
    organization: '',
    template: ''
  },
  HACKPAD: {
    site: 'g0v.hackpad.tw',
    client_id: '',
    secret: '',
    template: '2ucl5ftrzot'
  },
  GAPI: {
    "secret_path": "./client_secret.json",
    "token_path": "./.gapi-token.json"
  },
  BITLY:{
    "access_token": ""
  },
  TYPEFORM:{
    "api_key": "825108dfb1a50204cef6ffffad8affff",
    "webhook_submit_url": "http://exampel.com/api/typeform"
  }
};

Google OAuth

In order to use google drive api, please follow the guide from Google Drive APIs to turn on google drive api (OAuth 2.0 client ID, application type: other) and generate a client secret. Once a secret is downloaded, you need to update the path of your GAPI secret and where a token is to stored in config.js. After that, you have generate a token using:

$ node js/gapi-gen-token.js

Templates

Hackpad

You can find yours in the config.js by combining the site field and the default field in the HACKPAD section.

Google Spreadsheets

They are hard-coded in /js/spreadsheet.js. Someone should move the file id and the parent id to config.js.

Ethercalc

The Ethercalc template is located in /tmpl/ethercalc.sc. It's in "SocialCalc sheet save" format.

Typeform

The Typeform template is located in /tmpl/typeform.js.

Run

See the GUI in development

Run npm start and visit http://localhost:3000/.

Run whole function

Run node js/input.js to create event in CUI.

Run part of function

You can fork and create event manually now:

  • casperjs --ignore-ssl-errors=yes --ssl-protocol=tlsv1 --slug="EVENT_SLUG" --name="EVENT_NAME" --start_at="2016/06/24 09:00" --end_at="2016/06/24 18:00" --signup_at="06/10" js/kktix.js

To create an event spreadsheet manually:

  • node js/spreadsheet.js EVENT_NUMBER EVENT_NAME

To create an event hackpad manually:

  • node js/hackpad.js EVENT_NUMBER EVENT_NAME EVENT_START_TIME EVENT_END_TIME

To create an event hackfoldr manually:

  • node js/hackfoldr.js EVENT_NUMBER EVENT_NAME EVENT_START_TIME EVENT_SIGNUP_TIME [SPREADSHEET_LINK]

To create an event typeform manually:

  • node js/typeform.js EVENT_NAME

You can customize tmpl/typeform.js to add more professions and achievements.

Contributors

onebutton's People

Contributors

aelcenganda avatar caasi avatar felixonmars avatar hlb avatar ipaaa avatar jessy1092 avatar lemonlatte avatar ronnywang avatar ttcat avatar typingmonk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

onebutton's Issues

gsheet -> bit.ly 縮網址的問題

縮網址沒辦法指定 g0v-hackath00n 這種自訂網址
只能產生亂碼的格式,所以沒辦法重新吐回去 kktix

解法

  1. 調換順序,先產生 gsheet 再用 kktix

or

  1. 把這串亂碼存在某個地方,在 kktix temp 前端用 ajax 去 call 再取代文字與連結

更新 Typeform API 版本

CheckList :

  • Change Base URL at js/typeform.js
  • Create API
    • Adjust fields at tmpl/typeform.js (Tested by sending POST request through Postman)
  • Webhooks API
    現在的這個 API 是需要付費的功能,之前 webhook_submit_url 是包在 create form 的 request 內一併送出,這個選項就拔除不使用。從 config.js 中拿掉。

自動開 google doc 提案表

  • 把某份 google spreadsheet 複製一份
  • 重新命名為 "hackath{變數1}n | g0v {變數2} 專案列表"
  • 產生一個新 spreadsheet 的 bit.ly 短網址

替 config 提供統一的預設值

不管 config.js 有沒有寫爛,都該讀到各項設定的預設值。

預設值如果可以用 config.example.js 中的值就更好了!

使用網頁介面開大松

希望能完成 hlb 等人當初的初衷,按下「給我開吧!」,在勇者王滂薄的音樂中,開完大松。

需要:

  • 隱藏輸入框
  • 將過程輸出在 output textarea 中
  • 失敗時可以安全地重試

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.