GithubHelp home page GithubHelp logo

myshifts.sh's Introduction

myshifts.sh

I created this script as a way to quickly add my shifts to my calendar, which I use via Khal on a Mac and sync it with iCloud via vdirsyncer.

Then, because I've been studying bash scripting and want practice, I went ahead and made it a little fancier by putting configuration into a separate file etc.

Usage:

./myshifts.sh [date] [time]+

[date] sets the date of the first shift you're adding then [time] sets the start time of your shift that day then after that, each new [time] you add will create a new shift the next day, and the next and so on, for as many days as you like. For days you don't work, you will type off.

Use myshifts.config.sample to set stuff like what dateformat you use in khal, whether or not you want it to sync vdirsyncer after the script finishes, and things like which calendar you want your events added to, the name of the events created, and the length of your shifts.

For [date], use %m/%d, for time, use %H:%m. In myshifts.config.sample, you can set the dateformat to make sure it'll match what you use in khal, and this script will convert it to that. However, it won't do that for your timeformat, so either edit the script yourself or make sure you use %H:%m as your timeformat in khal, sorry...

Example:

./myshifts.sh 01/01 08:00 08:00 08:00 08:00 08:00 off off

Creates events from monday through friday starting at 8am, and no events for saturday and sunday.

Thanks for stopping by.

- Tiago Donato

myshifts.sh's People

Stargazers

 avatar

myshifts.sh's Issues

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.