The dodl command-line tool is designed to be intuitive and easy to use, with commands and options that make sense even to first-time users. Below is the proposed command-line schema, along with examples that illustrate how to use each command and option effectively.
General Syntax
dodl [command] [options]
command: The action you want to perform (e.g., create, init, config, etc.).
options: Additional flags and parameters to customise the command.
If no command is provided, dodl defaults to the create action.
Document Creation and Retrieval
Create a New Document
Syntax:
dodl create [document_type] [options]
dodl defaults to the 'create' command, which means the following is valid too:
dodl [document_type] [options]
Options:
-t, --topic [topic]: Specify the topic (title) of the document.
-d, --date [date]: Specify the date (defaults to today's date) can use format like "dd-mm-yy" or natural language ("tomorrow" or "next tuesday" etc.)
--dry-run: Simulate the action without creating the document.
Examples:
Create a new scrum document with a topic:
dodl scrum -t "Sprint Planning"
Create a notes document with a specific date and topic:
dodl notes -d 2023-10-01 --topic "Project X"
Simulate creating a document without actually doing it:
dodl scrum --topic "Test Run" --dry-run
Workspace Initialisation and Management
Initialise a workspace
The dodl init command creates a new dodl workspace. This workspace contains a .dodl directory that stores configuration and templates.
Syntax:
dodl init [[-d, --directory] directory]
Options:
-d, --directory [directory]: Optional. The path where the workspace will be created. If omitted, it defaults to the current working directory. Works as positional (dodl init /path/to/workspace) and as a flag (dodl init --directory /path/to/workspace).
Examples:
Initialise a new workspace in the current directory:
The dodl command-line tool is designed to be intuitive and easy to use, with commands and options that make sense even to first-time users. Below is the proposed command-line schema, along with examples that illustrate how to use each command and option effectively.
General Syntax
If no command is provided, dodl defaults to the
create
action.Document Creation and Retrieval
Create a New Document
Syntax:
dodl defaults to the 'create' command, which means the following is valid too:
Options:
-t, --topic [topic]
: Specify the topic (title) of the document.-d, --date [date]
: Specify the date (defaults to today's date) can use format like "dd-mm-yy" or natural language ("tomorrow" or "next tuesday" etc.)--dry-run
: Simulate the action without creating the document.Examples:
Create a new scrum document with a topic:
Create a notes document with a specific date and topic:
Simulate creating a document without actually doing it:
Workspace Initialisation and Management
Initialise a workspace
The
dodl init
command creates a new dodl workspace. This workspace contains a.dodl
directory that stores configuration and templates.Syntax:
Options:
-d, --directory [directory]
: Optional. The path where the workspace will be created. If omitted, it defaults to the current working directory. Works as positional (dodl init /path/to/workspace
) and as a flag (dodl init --directory /path/to/workspace
).Examples:
Initialise a new workspace in the current directory:
Initialise a workspace in a specified directory:
Configure dodl Settings
Syntax:
Examples:
Set the default editor to vim:
Get the current default editor:
Help and Usage Information
Syntax:
Example:
Get help for the create command: