Functions
create_omoospace(name, under='.', brief=None, contents_dir='Contents', subspaces_dir='Subspaces', language=None, readme=False, chinese_to_pinyin=False, reveal_in_explorer=False)
Create an omoospace.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name |
str
|
Omoospace name |
required |
under |
str
|
Add omoospace to which folder. Defaults to '.'. |
'.'
|
brief |
str
|
Omoospace brief. Defaults to None. |
None
|
chinese_to_pinyin |
bool
|
Whether convert chinese to pinyin. Defaults to False. |
False
|
reveal_in_explorer |
bool
|
Whether open folder after or not. Defaults to True. |
False
|
Raises: ExistsError: Target path already exists. CreateFailed: Fail to create directories.
Returns:
| Name | Type | Description |
|---|---|---|
Omoospace |
Omoospace
|
New created omoospace. |
Source code in src\omoospace\functions.py
extract_objective(path)
Returns the objective.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path |
AnyPath
|
The giving path. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Objective |
Objective
|
Objective. |
Source code in src\omoospace\functions.py
extract_pathname(path)
Returns the pathname of a path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path |
AnyPath
|
The giving path. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ObjectivePath |
str
|
Objective path. |