WTPLAN

Section: User Commands (1)
Index Return to Main Contents
 

NAME

wtplan VERSION - keeps track of events with a command line interface or a web interface  

SYNOPSIS

wtplan [[--version] | [-h] | [--help]

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]

 

DESCRIPTION

wtplan manages a calendar with events. Every event has a start time, a duration and a description. wtplan provides both a command line interface (see section COMMAND LINE INTERFACE) as well as web based interface (see section WEB INTERFACE). wtplan integrates with git to make it easy to keep calendar data in-sync between several computers (see section GIT INTEGRATION). The calendar data as well as configuration files are by default located in ~/.wtplan but this directory can be changed with the -c or --config_dir parameters.  

OPTIONS

-h, --help
Shows the help text.
--version
Shows version information
-c <path>, --config_dir <path>
Specifies a directory for the configuration file and the data file other than the default ~/.wtplan.

 

COMMAND LINE INTERFACE

The command line interface makes it possible to show and modify the calendar data from a command line console. The add command and the edit command may open an editor to edit the calendar item if not enough arguments are specified. By default the editor nano is used but this can be changed using the configuration variable editor_command in ~/wtplan/config.json.

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)  

WEB INTERFACE

The web interface is started with the wtplan web command. By default the web interface listen to port 8005. The web interface can then be accessed by pointing a web browser to the address http://localhost:8005 or http://0.0.0.0:8005. For example, the command firefox --new-window http://localhost:8005 will open the web interface using the firefox web browser if it is installed in your system. The port and address that the web interface listen to can be changed by specifying the --address option. The command wtplan web --address :8700 will start the web interface on port 8700 instead of the default port.

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.  

GIT INTEGRATION

The purpose of the git integration is to make it more convenient to synchronize the calendar data between several computers using the git version control system. A prerequirement for using the git integration is that git is installed on your system.

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.

 

AUTHOR

Kjell Winblad (kjellwinblad@gmail.com, http://winsh.me)

 

REPORTING BUGS

Bugs can be reported at the projects github page <http://github.com/kjellwinblad/wtplan>

 

COPYRIGHT

Copyright © 2017 Kjell Winblad. License MIT <https://opensource.org/licenses/MIT>.


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
COMMAND LINE INTERFACE
WEB INTERFACE
GIT INTEGRATION
AUTHOR
REPORTING BUGS
COPYRIGHT

This document was created by man2html, using the manual pages.
Time: 17:56:35 GMT, January 24, 2019