Functions
create_omoospace(name, under='.', brief=None, contents_dir='Contents', subspaces_dir='Subspaces', language=None, readme=False, gitfiles=False, chinese_to_pinyin=False, reveal_in_explorer=False)
Create an omoospace.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name |
str
|
The name of the omoospace. |
required |
under |
str
|
The directory under which to create the omoospace. Defaults to ".". |
'.'
|
brief |
str
|
A brief description of the omoospace. Defaults to None. |
None
|
contents_dir |
str
|
The name of the contents directory. Defaults to "Contents". |
'Contents'
|
subspaces_dir |
str
|
The name of the subspaces directory. Defaults to "Subspaces". |
'Subspaces'
|
language |
Language
|
The language of the omoospace profile. Defaults to None. |
None
|
readme |
bool
|
Whether to create a README.md file. Defaults to False. |
False
|
gitfiles |
bool
|
Whether to create .gitattributes and .gitignore files. Defaults to False. |
False
|
chinese_to_pinyin |
bool
|
Whether to convert Chinese characters in the name to Pinyin. Defaults to False. |
False
|
reveal_in_explorer |
bool
|
Whether to reveal the created omoospace in file explorer. Defaults to False. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
Omoospace |
Omoospace
|
The created omoospace. |
Source code in src\omoospace\functions.py
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 | |
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. |