https://github.com/shivammg/orb
Slack bot to post CodeChef programming problems
https://github.com/shivammg/orb
golang
Last synced: 3 months ago
JSON representation
Slack bot to post CodeChef programming problems
- Host: GitHub
- URL: https://github.com/shivammg/orb
- Owner: shivamMg
- License: gpl-3.0
- Created: 2015-12-17T06:33:44.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-01-04T05:34:37.000Z (almost 10 years ago)
- Last Synced: 2025-01-28T03:51:15.248Z (8 months ago)
- Topics: golang
- Language: Go
- Homepage:
- Size: 121 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# orb
Slack bot to post CodeChef programming problems at 8:30 each day. **orb** uses cron job for scheduling.
## Openshift Deployment
**orb** can be deployed on [Openshift](https://openshift.com) with the following steps. Make sure you have [Openshift Client Tools](https://developers.openshift.com/en/managing-client-tools.html) installed.
1. Install the Go cartridge.
```
rhc create-app orb https://cartreflect-claytondev.rhcloud.com/reflect?github=smarterclayton/openshift-go-cart
```2. Create a local copy of your project.
```
rhc git-clone -a orb
```3. Update `.godir` file with your package name. e.g. The `.godir` file might contain:
```
github.com/shivamMg/orb
```4. Install cron cartridge for your application.
```
rhc cartridge add cron -a orb
```5. You need to add a cron job that runs hourly, so create `hourly` directory inside `cron` and create a bash script in it.
```
mkdir -p .openshift/cron/hourly
touch .openshift/cron/hourly/script.sh
```6. Add the following inside the script:
```bash
#! /bin/bashexport TZ="Asia/Calcutta"
date >> $OPENSHIFT_GO_LOG_DIR/last_date_cron_ran
$OPENSHIFT_REPO_DIR/bin/orb >> $OPENSHIFT_GO_LOG_DIR/last_date_cron_ran
```This will keep a track of the questions posted.
7. Make your script executable.
```
chmod +x .openshift/cron/hourly/script.sh
```8. Add necessary files used by **orb**.
9. Add your changes, commit work and push.
```
git add *
git commit -m "Add orb"
git push
```## License
See `LICENSE` file.