Skip to content

Latest commit

History

24 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Day.rs: Overview

Throughout our lives we constantly face the challenge of working towards long term goals while trying to balance our time-constrained everyday lives. Day is a tool that facilitates productive and sustainable time management by allowing the user to define their goals declaritively and automatically scheduling them around their everyday commitments.

As part of this, day augments or replaces your traditional calendaring and todo systems.

What can it do

Automatically managing and scheduling tasks and sleep around your everyday commitments. This can be anything from a standard list of To-Dos with or without deadlines to a complex schedule of constrained events, on-going projects and recurring tasks, with special considerations for optimally partioning sleep, exercise, meals, work, socialising and rest in a way that's both productive and sustainable long-term.

Crates

There are two crates in this repo:

  • day_core contains all the types and scheduling logic
  • day_cli contains all the cli logic, including the storage of state and configuration files

Installation

cargo install day_cli

Usage

day --help

Slices

The true power of day comes with it's module system, allowing you to systematically model a graph like structure defining how you might want to spend your time. These modules are called slices, and represent a slice of your time.

Inbuilt Slices

Day is configured through the use of modules, each of which interacts with the scheduler in a (mostly) configurable order in order to prioritise more important tasks.

The only inbuilt module currently is the sleep module.

Custom Slices

Each custom slice is made up of a set of parameters, and crucially, a set of child slices. These child slices are called subslices and are scheduled within the parent slice, and can be configured to be scheduled in a variety of ways. If a slice has no children that can be scheduled, it is considered a leaf slice and is scheduled directly.

Parameters

General

NameTypeDescriptionDefault
namestringThe name of the sliceN/A
idstringA unique identifiername

Slice Length

NameTypeDescriptionDefault
unitminutes | subslicesThe unit of time to schedule this slice forsubslices
minintThe minimum number of units to schedule this slice for1
preferredintThe preferred number of units to schedule this slice formin
maxint | nullThe maximum number of units to schedule this slice fornull

Default Length

NameTypeDescriptionDefault
defaultSubsliceMinMinsintMinimum minutes when not delegating to a subslice20 for Root Slices
Same as parent otherwise
defaultSubslicePreferredMinsintPreferred minutes when not delegating to a subslice40 for Root Slices
Same as parent otherwise
defaultSubsliceMaxMinsint | nullMaximum minutes when not delegating to a subslicenull for Root Slices
Same as parent otherwise

Self-triggers (Root Slices only)

NameTypeDescriptionDefault
autoscheduleUnitminutes | subslices | slicesThe unit of time for lengthsubslices
minPerDayintThe minimum number of autoscheduleUnits this slice can be autoscheduled in a day0
preferredPerDayintThe preferred number of autoscheduleUnits this slice can be scheduled in a dayminPerDay
maxPerDayint | nullThe maximum number of autoscheduleUnits this slice can be scheduled in a day (unless manually scheduled)null
minPerWeekintThe minimum number of autoscheduleUnits this slice can be autoscheduled in a week0
preferredPerWeekintThe preferred number of autoscheduleUnits this slice can be scheduled in a weekminPerWeek
maxPerWeekint | nullThe maximum number of autoscheduleUnits this slice can be scheduled in a week (unless manually scheduled)null
shareOfFreeTimeintshareOfFreeTime / sum(slices shareOfFreeTime for all root slices) is the proportion of otherwise unoccupied time taken up by this0

Self-triggers (Child Slices only)

NameTypeDescriptionDefault
parentProportionintparentProportion / (parentProportion + sum of sibling parentProportions) is the proportion of the parent's slices time or sessions (depending on the parent's subsliceSelectionBehaviour) dedicated to that slice1

Triggers

NameTypeDescriptionDefault
interspersestring | nullWhat slice to intersperse subslices withnull
preferredIntersperseBehaviourfixed | proportionalPreferred length of interspersed slicesfixed
intersperseRatiofloatTime in this slice / Time in interspersed slice4.0

Subslices

NameTypeDescriptionDefault
childrenSlice[]The subslices of this slice[]
errorOnNoEligibleSubsliceboolWhether to throw an error if there are no eligible subslices to schedulefalse
subsliceSelectionBehaviourroundRobin | equalTimeHow to select subslices to scheduleroundRobin

Example

[{name: "Work",// don't need to specify anything else as it's scheduled by an external calendar},{name: "Rest",autoschedule: {length_unit: "proportion",length: 1,},children: [{name: "Socialising",parent_can_schedule: false}]},{name: "Study",no_eligible_subslice_behaviour: "error",autoschedule: {length_unit: "minutes",length: 1200,time_period_unit: "day",time_period: 7,context_behaviour: "average"},intersperse: "Rest",preferred_intersperse_behaviour: "proportional",intersperse_ratio: 5.0,children: [{name: "GroupWork",parent_can_schedule: false},{name: "Subject1"}]},{name: "Exercise",min: 1,preferred: 2,autoschedule: {length: 3,length_unit: "slices",time_period_unit: "day",time_period: 7,context_behaviour: "only_down"},children: [{name: "Cardio",opaque_subslice_min_mins: 20,opaque_subslice_max_mins: 40,children: [{name: "Running"},{name: "Rowing"}]},{name: "ResistanceTraining"}]}]

About

A comprehensive CLI time management tool

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages