Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
shellbear committed Sep 14, 2019
1 parent 8dcbe18 commit d504074
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 6 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 Shellbear

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ epical version

#### Direct download

You can also download the binaries from the **Release** page: https://github.com/ShellBear/epical/releases.
You can also download the binaries from the [releases](https://github.com/ShellBear/epical/releases) page.

## Commands

Expand Down Expand Up @@ -58,7 +58,7 @@ You can specify the Google Calendar API folder path containing `credentials.json

## Usage

The easiest way to run this tool is to launch it with a periodic periodic job.
The easiest way to run this tool is to execute it with a periodic cron job.

First, you need to generate the `token.json` file, which is the Google Calendar API token file.
Make sure you have the file `credentials.json` and then run the script for the first time:
Expand All @@ -83,8 +83,8 @@ https://accounts.google.com/o/oauth2/auth...
Just open this link in a browser, sign in with your google account, and paste the code you received.
Then, the `token.json` will be generated automatically.

Finally, make sure that cron is installed and that the `/ etc / cron.hourly` folder exists.
Just create a script in the `/ etc / cron.hourly` directory or any other cron directory of your choice:
Finally, make sure that cron is installed and that the `/etc/cron.hourly` folder exists.
Just create a script in the `/etc/cron.hourly` directory or any other cron directory of your choice:

```bash
> cat /etc/cron.hourly/epical
Expand All @@ -93,9 +93,20 @@ Just create a script in the `/ etc / cron.hourly` directory or any other cron di
EPICAL_BINARY_PATH/epical --token YOUR_EPITECH_AUTOLOGIN_TOKEN -c CREDENTIALS_AND_TOKEN_FOLDER_PATH sync
```

Then give execute permissions to the file and check that everything is working correctly:
Then give execute permission to the script and check that everything is working correctly:

```bash
chmod +x /etc/cron.hourly/epical
run-parts -v /etc/cron.hourly/
```
```

Congrats, you're done!

## Built With

- [cobra](https://github.com/spf13/cobra) - A Commander for modern Go CLI interactions
- [google-api-go-client](https://github.com/googleapis/google-api-go-client) - Google APIs for Go

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

0 comments on commit d504074

Please sign in to comment.