Welcome to BMO
find_program(name, hints=[], recursive=False)
where is a given binary
Source code in bmo/common.py
76 77 78 79 80 81 82 83 84 85 86 87 88 |
|
is_windows(cygwin_is_windows=True)
Check if we are running on windows.
Parameters
cygwin_is_windows : (default `True`). When set to `True`, consider cygwin as Windows.
Returns
True
if on Windows, False
otherwise.
Source code in bmo/common.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
|
run_command(cmd, cwd=Path.cwd(), silent=False, stream=True)
Run a given command.
Parameters
str
cmd
Path
Current working directory.
bool
If True
, output is not printed onto console.
bool
If True
the output is printed line by line eagerly (as soon as a line is available)
rather than all at once.
Returns
str
Credits
- https://stackoverflow.com/questions/18421757/live-output-from-subprocess-command
Source code in bmo/common.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
|
search_pat(pat, haystack)
Search for a pattern in haystack.
Source code in bmo/common.py
140 141 142 143 144 |
|
weekly_email(to=typer.Option(...), config=typer.Option(..., callback=bmo.common.conf_callback, is_eager=True), notion_token=typer.Option(...), smtp_server=typer.Option(...), smtp_port=typer.Option(...), smtp_username=typer.Option(...), smtp_password=typer.Option(...), force=typer.Option(False, '--force'))
This week in SubCom delivered to your INBOX.
Source code in bmo/subcom/__init__.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
|