blag.quickstart
Helper methods for blag's quickstart command.
copy_default_theme()
Copy default theme into current directory.
The default theme contains the 'templates', 'content' and 'static' directories shipped with blag.
It will not overwrite existing files.
Source code in blag/quickstart.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
|
get_input(question, default)
Prompt for user input.
This is a wrapper around the input-builtin. It will show the default answer in the prompt and -- if no answer was given -- use the default.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
question |
str
|
the question the user is presented |
required |
default |
str
|
the default value that will be used if no answer was given |
required |
Returns:
Type | Description |
---|---|
str
|
the answer |
Source code in blag/quickstart.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
|
quickstart(args)
Quickstart.
This method asks the user some questions and generates a configuration file that is needed in order to run blag. Additionally, it creates the content and static directories with some initial content, to get the user started.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
args |
Namespace | None
|
not used |
required |
Source code in blag/quickstart.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
|