Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

working_class

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

working_class

  • 0.1.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

WorkingClass

WorkingClass is an human readable syntax to write tasklists. Besides being easy to read it's fully parseable, so you can work with the tasks in Ruby.

Installation

Add this line to your application's Gemfile:

gem 'working_class'

And then execute:

$ bundle

Or install it yourself as:

$ gem install working_class

Usage

The Syntax

Keep in mind that all dates are formatted like this: DD.MM.YYYY or D.M.YY

Tasklist Name
---
[ ] My first task
[X] A finished task
[ ]{1.1.15} A task with a due date
[ ]{1.1.15}(31.1.15 12:00) A task with a date and a reminder
[ ]{1.1.15}(-1 12:00) A task with a date and a »relative« reminder
[ ]{1.1.15}(12:00) A task that will remind me at 12:00 1.1.15

You see it's pretty easy to write tasks like this.

At the moment the order of date and reminder is mandatory.

So you can't write:

My Tasklist
---
[ ](REMINDER){DATE} My Task
Tasklist Names

A tasklist name is written like this:

The --- is important, don't forget it.

Every tasklist should have a name.

Tasklist Name
---
…
Unfinished Tasks

Both tasks are equal, they are both not finished.

We recommend the [ ], it looks much nicer.

Shopping List
---
[ ] Jeans
[] T-Shirts
Finished Tasks
Groceries List
---
[X] Milk
[x] Bread

To write a finished task you have to write a [X] or [x]. It's not important whether you write a small x or a capital X, both characters are recognized as a finished task.

Tasks with a Date

It doesn't matter if you write your dates DD.MM.YY or D.M.YY or DD.MM.YYYY WorkingClass accepts all of those formats, as long as it is a valid date.

The Party List
---
[X]{6.2.2015} Birthday Party
[X]{13.2.15} Another Birthday Party
Tasks with a Reminder

Every task can have a reminder. You have several options when adding a reminder.

All times are 24h.

You can write a full date without a time and the parser will add the default time (9:00) automatically.

An even more awesome Party List
---
[ ](31.1.15) This time of year

If you already specified a date for the task you can use a relative reminder by writing -2, this specifies that you want to be reminded 2 days earlier. The parser will add the default time, if you didn't add one.

The after party
---
[ ]{2.1.15}(-2) You will have to clean up everthing.

Important: This only works if your task has already a date.

This will not work:

The after party
---
[ ](-2) You will have to clean up everthing.

So enough of that, what about the times. You can easily add a time to your reminder

My Finals
---
[ ]{26.1.15}(15:00) English

If you don't specify a relative or absolute date you will be reminded at 15:00 on the same day.

You can also combine absolute or relative dates with a time

My Finals
---
[ ]{26.1.15}(24.1.15 9:00) Don't panic.
[ ]{26.1.15}(-1 15:00) English

The Parser

Check out the full documentation

require 'working_class'

string = """
My Finals
---
[ ]{26.1.15}(15:00) English
"""

WorkingClass.load(string) # => WorkingClass::Tasklist

# or if you have a file
WorkingClass.load_file('./examples/example_1.txt') # => WorkingClass::Tasklist

Contributing

  1. Fork it ( https://github.com/TimKaechele/workingclass/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

FAQs

Package last updated on 25 Feb 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc