wtplan [-c <path>] | [--config_dir <path>]]
show [NUMBER_OF_DAYS] | [ISO_DATE [NUMBER_OF_DAYS]]
add [ISO_DATE [DURATION [DESCRIPTION]]]
remove ID ...
edit ID
git GIT_PARAMETER ...
web [--address ADDRESS] [--password PASSWORD]
The wtplan commands are:
show Show calendar items. Examples:
wtplan show 10 (shows today and the following 9 days)
wtplan show 2016-10-30 10 (shows 2016-10-30 and the following 9 days)
wtplan show 2016-10 10 (shows 2016-10-01 and the following 9 days)
wtplan show 2016 365 (shows 2016-01-01 and the following 364 days)
add Add calendar item. Examples:
wtplan add (adds an item using the editor -- see ~/wtplan/config.json)
wtplan add 2016-10-30 (adds an item using the editor)
wtplan add 2016-10-30 NA (adds an item using the editor)
wtplan add 2016-10-30T14:10 1h10m "table tennis" (adds an item)
remove Remove calendar item. Examples:
wtplan remove 7 (removes item with ID 7,
use the show command to show IDs of items)
wtplan remove 7 5 3 (removes several items)
edit Edits calendar item. Examples:
wtplan edit 7 (edit item with ID 7 using editor)
git Run git command in the calendar directory. Example:
wtplan git remote add origin https://gitlab.com/user/calendar.git
web Starts the wtplan web interface. Examples:
wtplan web (Starts the web interface at the default port 8005)
wtplan web --address :8700 --password mypass
(Starts the web interface at port 8700 with password mypass)
The --password option can be used to protect the web interface with a password. Running the command wtplan web --password mySecretPass will start the web interface protected by the password mySecretPass.
To initiate a git repository for your calendar data, run the command wtplan git init. This will create a git repository in the default wtplan configuration folder ~/.wtplan. Typically, you want to synchronize your calendar data with a remote repository. To set this up run wtplan git remote add origin yourRemoteGitRepo. By default, wtplan will add and commit changes to the calendar data to the repository if it detects that ~/.wtplan is a git repository. For example, running the command wtplan add 2016-10-30T14:10 1h10m "table tennis" will run git add data.json and git commit -m "Change!" in the ~/.wtplan folder after adding the event. Note that the configuration variable post_change_commands in ~/.wtplan/config.json will be changed to include those two git commands automatically when the first calendar change is done after initializing a git repository in the configuration directory if the configuration variable auto_add_post_change_commands_if_git_repo is set to true. The post_change_commands variable can then be modified if one wants to run other commands when the calendar data is changed. For example, setting the post_change_commands variable to [["git", "add", "data.json"], ["git", "commit", "-m", "Change!"], ["git", "push"]] will also run the git push command after committing the change.
Kjell Winblad (kjellwinblad@gmail.com, http://winsh.me)
Bugs can be reported at the projects github page <http://github.com/kjellwinblad/wtplan>
Copyright © 2017 Kjell Winblad. License MIT <https://opensource.org/licenses/MIT>.