A tool to generate CSV files for uploading to the WBSO tool
Project description
GOWBSO
======
Make CSV files for uploading to the WBSO tool.
Installation
============
Assuming you have pip installed, you can run
```bash
pip install gowbso --user
```
Omit `--user` if you are running in a Python virtual environment, but otherwise keep it: don't use sudo, it's a dangerous route because it modifies the Python environment that your operating system may rely on.
If you aren't running in a Python virtual environment, you may need to add `~/.local/bin` to your `PATH` environment variable. This can be done by editing your shell initialization script, usually `~/.bashrc`. (The tilde character '~' will expand to the path to your home directory). Add the following line to the end of that file:
```bash
export PATH=~/.local/bin:$PATH
```
Now check that the `gowbso` script is available by trying `gowbso --help`. If you see usage information, everything went fine. If you get something like 'command not found', then everything went not fine.
Usage
=====
The command `gowbso` takes as its main argument a specifier of a Python module, containing data describing a week of events. This argument can be either:
- A path to the module file
- A dot-separated module path that can be imported like `import my_module` or `import my_package.my_module`.
To see other arguments, run `gowbso --help`.
Usage examples, for a Python module called `wbso_data`:
```bash
gowbso wbso_data
gowbso ~/admin/wbso/wbso_data.py
gowbso --monday 2017-02-27 wbso_data
```
Data module structure
=====================
This module should define a function, `get_events(mon, tue, wed, thur, fri)`. The function should return an iterable, such as a list or a generator, of `event` objects.
An `event`, available in `gowbso.event` is constructed like:
```python
import gowbso
e = gowbso.event(date=wed, type='meeting-standup', desc='Team stand-up',
story='Predict world happiness', duration='20m')
```
- `date`: A datetime object for the day when the event occurred. Objects corresponding to each day of the week are available as arguments to the function.
- `type`, `story`, `desc`: Details of the event, as strings
- `duration`: The duration of the event in minutes, as a string like '120m', for 120 minute duration.
======
Make CSV files for uploading to the WBSO tool.
Installation
============
Assuming you have pip installed, you can run
```bash
pip install gowbso --user
```
Omit `--user` if you are running in a Python virtual environment, but otherwise keep it: don't use sudo, it's a dangerous route because it modifies the Python environment that your operating system may rely on.
If you aren't running in a Python virtual environment, you may need to add `~/.local/bin` to your `PATH` environment variable. This can be done by editing your shell initialization script, usually `~/.bashrc`. (The tilde character '~' will expand to the path to your home directory). Add the following line to the end of that file:
```bash
export PATH=~/.local/bin:$PATH
```
Now check that the `gowbso` script is available by trying `gowbso --help`. If you see usage information, everything went fine. If you get something like 'command not found', then everything went not fine.
Usage
=====
The command `gowbso` takes as its main argument a specifier of a Python module, containing data describing a week of events. This argument can be either:
- A path to the module file
- A dot-separated module path that can be imported like `import my_module` or `import my_package.my_module`.
To see other arguments, run `gowbso --help`.
Usage examples, for a Python module called `wbso_data`:
```bash
gowbso wbso_data
gowbso ~/admin/wbso/wbso_data.py
gowbso --monday 2017-02-27 wbso_data
```
Data module structure
=====================
This module should define a function, `get_events(mon, tue, wed, thur, fri)`. The function should return an iterable, such as a list or a generator, of `event` objects.
An `event`, available in `gowbso.event` is constructed like:
```python
import gowbso
e = gowbso.event(date=wed, type='meeting-standup', desc='Team stand-up',
story='Predict world happiness', duration='20m')
```
- `date`: A datetime object for the day when the event occurred. Objects corresponding to each day of the week are available as arguments to the function.
- `type`, `story`, `desc`: Details of the event, as strings
- `duration`: The duration of the event in minutes, as a string like '120m', for 120 minute duration.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gowbso-1.1.0.tar.gz
(5.1 kB
view hashes)
Built Distribution
gowbso-1.1.0-py2.py3-none-any.whl
(10.2 kB
view hashes)
Close
Hashes for gowbso-1.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 939c011750e74b56e90e79da0a7b72ea51c1ab6cf912ee4b4ab52ca8f65f4490 |
|
MD5 | f18cee9dbc34cb76faedeb5a91a98ece |
|
BLAKE2b-256 | 208dfc7fbd6272599a8abeb990fb8ec259d31f3c574f87e31341b0e4098a1dee |