worklog-opsdevnz 0.1.0__tar.gz → 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- worklog_opsdevnz-0.1.2/LICENSE +191 -0
- {worklog_opsdevnz-0.1.0 → worklog_opsdevnz-0.1.2}/PKG-INFO +20 -43
- worklog_opsdevnz-0.1.2/README.md +71 -0
- {worklog_opsdevnz-0.1.0 → worklog_opsdevnz-0.1.2}/pyproject.toml +1 -1
- {worklog_opsdevnz-0.1.0 → worklog_opsdevnz-0.1.2}/src/worklog_opsdevnz/cli.py +7 -7
- {worklog_opsdevnz-0.1.0 → worklog_opsdevnz-0.1.2}/src/worklog_opsdevnz/config.py +1 -1
- {worklog_opsdevnz-0.1.0 → worklog_opsdevnz-0.1.2}/src/worklog_opsdevnz.egg-info/PKG-INFO +20 -43
- {worklog_opsdevnz-0.1.0 → worklog_opsdevnz-0.1.2}/tests/test_cli.py +22 -0
- {worklog_opsdevnz-0.1.0 → worklog_opsdevnz-0.1.2}/tests/test_config.py +12 -0
- worklog_opsdevnz-0.1.0/LICENSE +0 -90
- worklog_opsdevnz-0.1.0/README.md +0 -94
- {worklog_opsdevnz-0.1.0 → worklog_opsdevnz-0.1.2}/setup.cfg +0 -0
- {worklog_opsdevnz-0.1.0 → worklog_opsdevnz-0.1.2}/src/worklog_opsdevnz/__init__.py +0 -0
- {worklog_opsdevnz-0.1.0 → worklog_opsdevnz-0.1.2}/src/worklog_opsdevnz/paths.py +0 -0
- {worklog_opsdevnz-0.1.0 → worklog_opsdevnz-0.1.2}/src/worklog_opsdevnz/template.py +0 -0
- {worklog_opsdevnz-0.1.0 → worklog_opsdevnz-0.1.2}/src/worklog_opsdevnz.egg-info/SOURCES.txt +0 -0
- {worklog_opsdevnz-0.1.0 → worklog_opsdevnz-0.1.2}/src/worklog_opsdevnz.egg-info/dependency_links.txt +0 -0
- {worklog_opsdevnz-0.1.0 → worklog_opsdevnz-0.1.2}/src/worklog_opsdevnz.egg-info/entry_points.txt +0 -0
- {worklog_opsdevnz-0.1.0 → worklog_opsdevnz-0.1.2}/src/worklog_opsdevnz.egg-info/requires.txt +0 -0
- {worklog_opsdevnz-0.1.0 → worklog_opsdevnz-0.1.2}/src/worklog_opsdevnz.egg-info/top_level.txt +0 -0
- {worklog_opsdevnz-0.1.0 → worklog_opsdevnz-0.1.2}/tests/test_paths.py +0 -0
- {worklog_opsdevnz-0.1.0 → worklog_opsdevnz-0.1.2}/tests/test_template.py +0 -0
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
Copyright [2026] StartMeUp.nz Limited
|
|
180
|
+
|
|
181
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
182
|
+
you may not use this file except in compliance with the License.
|
|
183
|
+
You may obtain a copy of the License at
|
|
184
|
+
|
|
185
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
186
|
+
|
|
187
|
+
Unless required by applicable law or agreed to in writing, software
|
|
188
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
189
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
190
|
+
See the License for the specific language governing permissions and
|
|
191
|
+
limitations under the License.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: worklog-opsdevnz
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: Configurable worklog management CLI for dated development logs
|
|
5
5
|
Author-email: "OpsDev.nz Collective" <john@opsdev.nz>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -31,41 +31,21 @@ Requires-Dist: ruff>=0.4; extra == "dev"
|
|
|
31
31
|
Requires-Dist: mypy>=1.0; extra == "dev"
|
|
32
32
|
Dynamic: license-file
|
|
33
33
|
|
|
34
|
-
#
|
|
35
|
-
|
|
36
|
-
**Status:** Development — see pyproject.toml for version
|
|
34
|
+
# worklog-opsdevnz
|
|
37
35
|
|
|
38
36
|
Configurable CLI tool for creating and managing dated development worklogs.
|
|
39
37
|
Generates Markdown entries with YAML frontmatter from per-project templates.
|
|
40
38
|
|
|
41
|
-
## Problem
|
|
42
|
-
|
|
43
|
-
Across multiple projects we kept reinventing the same pattern: a script that
|
|
44
|
-
creates a dated Markdown file from a template, with frontmatter for date,
|
|
45
|
-
author, tags, and draft status. Each implementation had slightly different
|
|
46
|
-
directory structures, section headers, and filenames. The core concept was
|
|
47
|
-
always the same.
|
|
48
|
-
|
|
49
|
-
## Solution
|
|
50
|
-
|
|
51
|
-
`worklog-opsdevnz` formalises this pattern into a single published module:
|
|
52
|
-
|
|
53
|
-
- **Per-project config** — `worklog.toml` controls directory structure, sections,
|
|
54
|
-
author, tags, and filename patterns
|
|
55
|
-
- **Three structure modes** — `flat`, `year`, or `year-month` directory layouts
|
|
56
|
-
- **YAML frontmatter** — date, title, author, tags, draft status
|
|
57
|
-
- **Configurable sections** — each project defines its own section headers
|
|
58
|
-
- **Editor integration** — opens new entries in `$VISUAL` / `$EDITOR`
|
|
59
|
-
- **List existing entries** — browse worklogs with `--list`
|
|
60
|
-
|
|
61
39
|
## Quick Start
|
|
62
40
|
|
|
63
41
|
```bash
|
|
42
|
+
pip install worklog-opsdevnz
|
|
43
|
+
|
|
64
44
|
# Create today's worklog
|
|
65
45
|
worklog-opsdevnz
|
|
66
46
|
|
|
67
|
-
#
|
|
68
|
-
worklog-opsdevnz --
|
|
47
|
+
# Show installed version
|
|
48
|
+
worklog-opsdevnz --version
|
|
69
49
|
|
|
70
50
|
# Override the editor for this run
|
|
71
51
|
worklog-opsdevnz --editor nvim
|
|
@@ -79,6 +59,7 @@ Each project gets a `worklog.toml` at its root:
|
|
|
79
59
|
worklog_dir = "docs/worklog"
|
|
80
60
|
structure = "year" # "flat", "year", or "year-month"
|
|
81
61
|
author = "Your Name"
|
|
62
|
+
editor = "nvim" # optional, overridden by -e / $VISUAL / $EDITOR
|
|
82
63
|
default_tags = ["worklog", "log"]
|
|
83
64
|
|
|
84
65
|
[[sections]]
|
|
@@ -94,34 +75,30 @@ title = "Notes"
|
|
|
94
75
|
title = "Next"
|
|
95
76
|
```
|
|
96
77
|
|
|
97
|
-
##
|
|
78
|
+
## Features
|
|
98
79
|
|
|
99
|
-
**WorkLog DOES:**
|
|
100
|
-
- Create dated Markdown worklog entries with YAML frontmatter
|
|
101
80
|
- Per-project configuration via `worklog.toml`
|
|
102
|
-
-
|
|
103
|
-
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
-
|
|
107
|
-
- Auto-generated index pages
|
|
108
|
-
- Retro template support (planned for 0.1.0)
|
|
109
|
-
- Time tracking / timesheet aggregation
|
|
110
|
-
- `list`, `init`, or `create` subcommands (planned for 0.1.0)
|
|
81
|
+
- Three directory structure modes: `flat`, `year`, `year-month`
|
|
82
|
+
- YAML frontmatter: date, author, tags, draft status
|
|
83
|
+
- Configurable section headers per project
|
|
84
|
+
- Editor integration: `-e` flag → config → `$VISUAL` → `$EDITOR`
|
|
85
|
+
- `--version` flag for installed version
|
|
111
86
|
|
|
112
87
|
## Requirements
|
|
113
88
|
|
|
114
89
|
- Python 3.12+
|
|
115
90
|
- See [pyproject.toml](pyproject.toml) for full dependencies
|
|
116
91
|
|
|
117
|
-
##
|
|
92
|
+
## Documentation
|
|
118
93
|
|
|
94
|
+
- [Release Process](docs/release-process.md)
|
|
119
95
|
- [Functional Requirements](docs/specs/README.md)
|
|
96
|
+
- [Non-Functional Requirements](docs/specs/NFR.md)
|
|
120
97
|
- [Design Decisions](docs/design/README.md)
|
|
121
98
|
- [User Stories](docs/stories/README.md)
|
|
122
99
|
|
|
123
|
-
|
|
100
|
+
## Related
|
|
124
101
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
102
|
+
- [PyPI](https://pypi.org/project/worklog-opsdevnz/)
|
|
103
|
+
- [GitHub](https://github.com/startmeup-nz/worklog_opsdevnz)
|
|
104
|
+
- [OpsDev.nz Collective](https://opsdev.nz)
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# worklog-opsdevnz
|
|
2
|
+
|
|
3
|
+
Configurable CLI tool for creating and managing dated development worklogs.
|
|
4
|
+
Generates Markdown entries with YAML frontmatter from per-project templates.
|
|
5
|
+
|
|
6
|
+
## Quick Start
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
pip install worklog-opsdevnz
|
|
10
|
+
|
|
11
|
+
# Create today's worklog
|
|
12
|
+
worklog-opsdevnz
|
|
13
|
+
|
|
14
|
+
# Show installed version
|
|
15
|
+
worklog-opsdevnz --version
|
|
16
|
+
|
|
17
|
+
# Override the editor for this run
|
|
18
|
+
worklog-opsdevnz --editor nvim
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Configuration
|
|
22
|
+
|
|
23
|
+
Each project gets a `worklog.toml` at its root:
|
|
24
|
+
|
|
25
|
+
```toml
|
|
26
|
+
worklog_dir = "docs/worklog"
|
|
27
|
+
structure = "year" # "flat", "year", or "year-month"
|
|
28
|
+
author = "Your Name"
|
|
29
|
+
editor = "nvim" # optional, overridden by -e / $VISUAL / $EDITOR
|
|
30
|
+
default_tags = ["worklog", "log"]
|
|
31
|
+
|
|
32
|
+
[[sections]]
|
|
33
|
+
title = "Focus for Today"
|
|
34
|
+
|
|
35
|
+
[[sections]]
|
|
36
|
+
title = "Completed"
|
|
37
|
+
|
|
38
|
+
[[sections]]
|
|
39
|
+
title = "Notes"
|
|
40
|
+
|
|
41
|
+
[[sections]]
|
|
42
|
+
title = "Next"
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Features
|
|
46
|
+
|
|
47
|
+
- Per-project configuration via `worklog.toml`
|
|
48
|
+
- Three directory structure modes: `flat`, `year`, `year-month`
|
|
49
|
+
- YAML frontmatter: date, author, tags, draft status
|
|
50
|
+
- Configurable section headers per project
|
|
51
|
+
- Editor integration: `-e` flag → config → `$VISUAL` → `$EDITOR`
|
|
52
|
+
- `--version` flag for installed version
|
|
53
|
+
|
|
54
|
+
## Requirements
|
|
55
|
+
|
|
56
|
+
- Python 3.12+
|
|
57
|
+
- See [pyproject.toml](pyproject.toml) for full dependencies
|
|
58
|
+
|
|
59
|
+
## Documentation
|
|
60
|
+
|
|
61
|
+
- [Release Process](docs/release-process.md)
|
|
62
|
+
- [Functional Requirements](docs/specs/README.md)
|
|
63
|
+
- [Non-Functional Requirements](docs/specs/NFR.md)
|
|
64
|
+
- [Design Decisions](docs/design/README.md)
|
|
65
|
+
- [User Stories](docs/stories/README.md)
|
|
66
|
+
|
|
67
|
+
## Related
|
|
68
|
+
|
|
69
|
+
- [PyPI](https://pypi.org/project/worklog-opsdevnz/)
|
|
70
|
+
- [GitHub](https://github.com/startmeup-nz/worklog_opsdevnz)
|
|
71
|
+
- [OpsDev.nz Collective](https://opsdev.nz)
|
|
@@ -19,7 +19,7 @@ from worklog_opsdevnz.template import generate_content
|
|
|
19
19
|
"-e",
|
|
20
20
|
"--editor",
|
|
21
21
|
default=None,
|
|
22
|
-
help="Override the editor command (
|
|
22
|
+
help="Override the editor command (overrides config, $VISUAL, $EDITOR).",
|
|
23
23
|
)
|
|
24
24
|
def main(editor: str | None) -> None:
|
|
25
25
|
"""Create or open today's worklog entry."""
|
|
@@ -36,12 +36,12 @@ def main(editor: str | None) -> None:
|
|
|
36
36
|
target.write_text(content)
|
|
37
37
|
print(f"Created: {target}")
|
|
38
38
|
|
|
39
|
-
_open_editor(target, editor)
|
|
39
|
+
_open_editor(target, editor, config.get("editor"))
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
def _open_editor(path: str | Path, override: str | None = None) -> None:
|
|
42
|
+
def _open_editor(path: str | Path, override: str | None = None, config_editor: str | None = None) -> None:
|
|
43
43
|
"""Open the file in the configured editor, or print the path."""
|
|
44
|
-
editor = _resolve_editor(override)
|
|
44
|
+
editor = _resolve_editor(override, config_editor)
|
|
45
45
|
if editor:
|
|
46
46
|
editor_cmd = shutil.which(editor)
|
|
47
47
|
if editor_cmd:
|
|
@@ -54,11 +54,11 @@ def _open_editor(path: str | Path, override: str | None = None) -> None:
|
|
|
54
54
|
print(f"No editor configured. Path: {path}")
|
|
55
55
|
|
|
56
56
|
|
|
57
|
-
def _resolve_editor(override: str | None = None) -> str | None:
|
|
58
|
-
"""Resolve editor from CLI
|
|
57
|
+
def _resolve_editor(override: str | None = None, config_editor: str | None = None) -> str | None:
|
|
58
|
+
"""Resolve editor from CLI, config, $VISUAL, or $EDITOR."""
|
|
59
59
|
import os
|
|
60
60
|
|
|
61
|
-
for candidate in (override, os.environ.get("VISUAL"), os.environ.get("EDITOR")):
|
|
61
|
+
for candidate in (override, config_editor, os.environ.get("VISUAL"), os.environ.get("EDITOR")):
|
|
62
62
|
if candidate:
|
|
63
63
|
return candidate
|
|
64
64
|
return None
|
|
@@ -26,7 +26,7 @@ def find_config(start: Path | None = None) -> Path | None:
|
|
|
26
26
|
"""Search for worklog.toml or worklog.yaml from start up to root."""
|
|
27
27
|
if start is None:
|
|
28
28
|
start = Path.cwd()
|
|
29
|
-
candidates = list(start.parents)
|
|
29
|
+
candidates = [start] + list(start.parents)
|
|
30
30
|
for candidate in candidates:
|
|
31
31
|
for name in ("worklog.toml", "worklog.yaml", "worklog.yml"):
|
|
32
32
|
path = candidate / name
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: worklog-opsdevnz
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: Configurable worklog management CLI for dated development logs
|
|
5
5
|
Author-email: "OpsDev.nz Collective" <john@opsdev.nz>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -31,41 +31,21 @@ Requires-Dist: ruff>=0.4; extra == "dev"
|
|
|
31
31
|
Requires-Dist: mypy>=1.0; extra == "dev"
|
|
32
32
|
Dynamic: license-file
|
|
33
33
|
|
|
34
|
-
#
|
|
35
|
-
|
|
36
|
-
**Status:** Development — see pyproject.toml for version
|
|
34
|
+
# worklog-opsdevnz
|
|
37
35
|
|
|
38
36
|
Configurable CLI tool for creating and managing dated development worklogs.
|
|
39
37
|
Generates Markdown entries with YAML frontmatter from per-project templates.
|
|
40
38
|
|
|
41
|
-
## Problem
|
|
42
|
-
|
|
43
|
-
Across multiple projects we kept reinventing the same pattern: a script that
|
|
44
|
-
creates a dated Markdown file from a template, with frontmatter for date,
|
|
45
|
-
author, tags, and draft status. Each implementation had slightly different
|
|
46
|
-
directory structures, section headers, and filenames. The core concept was
|
|
47
|
-
always the same.
|
|
48
|
-
|
|
49
|
-
## Solution
|
|
50
|
-
|
|
51
|
-
`worklog-opsdevnz` formalises this pattern into a single published module:
|
|
52
|
-
|
|
53
|
-
- **Per-project config** — `worklog.toml` controls directory structure, sections,
|
|
54
|
-
author, tags, and filename patterns
|
|
55
|
-
- **Three structure modes** — `flat`, `year`, or `year-month` directory layouts
|
|
56
|
-
- **YAML frontmatter** — date, title, author, tags, draft status
|
|
57
|
-
- **Configurable sections** — each project defines its own section headers
|
|
58
|
-
- **Editor integration** — opens new entries in `$VISUAL` / `$EDITOR`
|
|
59
|
-
- **List existing entries** — browse worklogs with `--list`
|
|
60
|
-
|
|
61
39
|
## Quick Start
|
|
62
40
|
|
|
63
41
|
```bash
|
|
42
|
+
pip install worklog-opsdevnz
|
|
43
|
+
|
|
64
44
|
# Create today's worklog
|
|
65
45
|
worklog-opsdevnz
|
|
66
46
|
|
|
67
|
-
#
|
|
68
|
-
worklog-opsdevnz --
|
|
47
|
+
# Show installed version
|
|
48
|
+
worklog-opsdevnz --version
|
|
69
49
|
|
|
70
50
|
# Override the editor for this run
|
|
71
51
|
worklog-opsdevnz --editor nvim
|
|
@@ -79,6 +59,7 @@ Each project gets a `worklog.toml` at its root:
|
|
|
79
59
|
worklog_dir = "docs/worklog"
|
|
80
60
|
structure = "year" # "flat", "year", or "year-month"
|
|
81
61
|
author = "Your Name"
|
|
62
|
+
editor = "nvim" # optional, overridden by -e / $VISUAL / $EDITOR
|
|
82
63
|
default_tags = ["worklog", "log"]
|
|
83
64
|
|
|
84
65
|
[[sections]]
|
|
@@ -94,34 +75,30 @@ title = "Notes"
|
|
|
94
75
|
title = "Next"
|
|
95
76
|
```
|
|
96
77
|
|
|
97
|
-
##
|
|
78
|
+
## Features
|
|
98
79
|
|
|
99
|
-
**WorkLog DOES:**
|
|
100
|
-
- Create dated Markdown worklog entries with YAML frontmatter
|
|
101
80
|
- Per-project configuration via `worklog.toml`
|
|
102
|
-
-
|
|
103
|
-
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
-
|
|
107
|
-
- Auto-generated index pages
|
|
108
|
-
- Retro template support (planned for 0.1.0)
|
|
109
|
-
- Time tracking / timesheet aggregation
|
|
110
|
-
- `list`, `init`, or `create` subcommands (planned for 0.1.0)
|
|
81
|
+
- Three directory structure modes: `flat`, `year`, `year-month`
|
|
82
|
+
- YAML frontmatter: date, author, tags, draft status
|
|
83
|
+
- Configurable section headers per project
|
|
84
|
+
- Editor integration: `-e` flag → config → `$VISUAL` → `$EDITOR`
|
|
85
|
+
- `--version` flag for installed version
|
|
111
86
|
|
|
112
87
|
## Requirements
|
|
113
88
|
|
|
114
89
|
- Python 3.12+
|
|
115
90
|
- See [pyproject.toml](pyproject.toml) for full dependencies
|
|
116
91
|
|
|
117
|
-
##
|
|
92
|
+
## Documentation
|
|
118
93
|
|
|
94
|
+
- [Release Process](docs/release-process.md)
|
|
119
95
|
- [Functional Requirements](docs/specs/README.md)
|
|
96
|
+
- [Non-Functional Requirements](docs/specs/NFR.md)
|
|
120
97
|
- [Design Decisions](docs/design/README.md)
|
|
121
98
|
- [User Stories](docs/stories/README.md)
|
|
122
99
|
|
|
123
|
-
|
|
100
|
+
## Related
|
|
124
101
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
102
|
+
- [PyPI](https://pypi.org/project/worklog-opsdevnz/)
|
|
103
|
+
- [GitHub](https://github.com/startmeup-nz/worklog_opsdevnz)
|
|
104
|
+
- [OpsDev.nz Collective](https://opsdev.nz)
|
|
@@ -47,3 +47,25 @@ def test_main_version():
|
|
|
47
47
|
# Extract and verify it's a non-empty version string
|
|
48
48
|
version_str = result.output.strip().split(", version ")[-1]
|
|
49
49
|
assert version_str
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def test_main_editor_from_config(tmp_path, monkeypatch):
|
|
53
|
+
"""Editor in worklog.toml is resolved before $VISUAL/$EDITOR."""
|
|
54
|
+
monkeypatch.chdir(tmp_path)
|
|
55
|
+
(tmp_path / "worklog.toml").write_text('editor = "fake-editor-test"\n')
|
|
56
|
+
runner = CliRunner()
|
|
57
|
+
result = runner.invoke(main, [])
|
|
58
|
+
assert result.exit_code == 0
|
|
59
|
+
# config-based editor picked up but not found in PATH
|
|
60
|
+
assert "Editor 'fake-editor-test' not found" in result.output
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def test_main_editor_cli_overrides_config(tmp_path, monkeypatch):
|
|
64
|
+
"""-e flag overrides the editor set in worklog.toml."""
|
|
65
|
+
monkeypatch.chdir(tmp_path)
|
|
66
|
+
(tmp_path / "worklog.toml").write_text('editor = "fake-editor-test"\n')
|
|
67
|
+
runner = CliRunner()
|
|
68
|
+
result = runner.invoke(main, ["-e", "override-editor-test"])
|
|
69
|
+
assert result.exit_code == 0
|
|
70
|
+
# CLI override takes priority over config
|
|
71
|
+
assert "Editor 'override-editor-test' not found" in result.output
|
|
@@ -26,6 +26,18 @@ def test_find_config_walks_up(tmp_path: Path):
|
|
|
26
26
|
assert found.parent == tmp_path
|
|
27
27
|
|
|
28
28
|
|
|
29
|
+
def test_find_config_nearest_wins(tmp_path: Path):
|
|
30
|
+
"""When both parent and subdir have a config, the nearest (subdir) wins."""
|
|
31
|
+
(tmp_path / "worklog.toml").write_text('author = "parent-user"')
|
|
32
|
+
sub = tmp_path / "sub"
|
|
33
|
+
sub.mkdir()
|
|
34
|
+
(sub / "worklog.toml").write_text('author = "sub-user"')
|
|
35
|
+
|
|
36
|
+
found = find_config(start=sub)
|
|
37
|
+
assert found is not None
|
|
38
|
+
assert found.parent == sub # nearest wins, not parent
|
|
39
|
+
|
|
40
|
+
|
|
29
41
|
def test_find_config_not_found(tmp_path: Path):
|
|
30
42
|
assert find_config(start=tmp_path) is None
|
|
31
43
|
|
worklog_opsdevnz-0.1.0/LICENSE
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
-
|
|
7
|
-
1. Definitions.
|
|
8
|
-
|
|
9
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
-
|
|
12
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
-
the copyright owner that is granting the License.
|
|
14
|
-
|
|
15
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
16
|
-
exercising permissions granted by this License.
|
|
17
|
-
|
|
18
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
19
|
-
including but not limited to software source code, documentation
|
|
20
|
-
source, and configuration files.
|
|
21
|
-
|
|
22
|
-
"Object" form shall mean any form resulting from mechanical
|
|
23
|
-
transformation or translation of a Source form, including but
|
|
24
|
-
not limited to compiled object code, generated documentation,
|
|
25
|
-
and conversions to other media types.
|
|
26
|
-
|
|
27
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
28
|
-
Object form, made available under the License, as indicated by a
|
|
29
|
-
copyright notice that is included in or attached to the work
|
|
30
|
-
(an example is provided in the Appendix below).
|
|
31
|
-
|
|
32
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
33
|
-
form, that is based on (or derived from) the Work and for which the
|
|
34
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
35
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
36
|
-
of this License, Derivative Works shall not include works that remain
|
|
37
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
38
|
-
the Work and Derivative Works thereof.
|
|
39
|
-
|
|
40
|
-
"Contribution" shall mean any work of authorship, including
|
|
41
|
-
the original version of the Work and any modifications or additions
|
|
42
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
43
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
44
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
45
|
-
the copyright owner.
|
|
46
|
-
|
|
47
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
48
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
49
|
-
subsequently incorporated within the Work.
|
|
50
|
-
|
|
51
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
52
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
53
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
54
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
55
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
56
|
-
Work and such Derivative Works in Source or Object form.
|
|
57
|
-
|
|
58
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
59
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
60
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
61
|
-
(except as stated in this section) patent license to make, have made,
|
|
62
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
63
|
-
where such license applies only to those patent claims licensable
|
|
64
|
-
by such Contributor that are necessarily infringed by their
|
|
65
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
66
|
-
with the Work to which such Contribution(s) was submitted.
|
|
67
|
-
|
|
68
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
69
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
70
|
-
modifications, and in Source or Object form, provided that You
|
|
71
|
-
meet the following conditions:
|
|
72
|
-
|
|
73
|
-
(a) You must give any other recipients of the Work or
|
|
74
|
-
Derivative Works a copy of this License; and
|
|
75
|
-
|
|
76
|
-
(b) You must cause any modified files to carry prominent notices
|
|
77
|
-
stating that You changed the files; and
|
|
78
|
-
|
|
79
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
80
|
-
that You distribute, all copyright, patent, trademark, and
|
|
81
|
-
attribution notices from the Source form of the Work,
|
|
82
|
-
excluding those notices that do not pertain to any part of
|
|
83
|
-
the Derivative Works; and
|
|
84
|
-
|
|
85
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
86
|
-
distribution, then any Derivative Works that You distribute must
|
|
87
|
-
include a readable copy of the attribution notices contained
|
|
88
|
-
within such NOTICE file.
|
|
89
|
-
|
|
90
|
-
END OF TERMS AND CONDITIONS
|
worklog_opsdevnz-0.1.0/README.md
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
# WorkLog OpsDev.NZ
|
|
2
|
-
|
|
3
|
-
**Status:** Development — see pyproject.toml for version
|
|
4
|
-
|
|
5
|
-
Configurable CLI tool for creating and managing dated development worklogs.
|
|
6
|
-
Generates Markdown entries with YAML frontmatter from per-project templates.
|
|
7
|
-
|
|
8
|
-
## Problem
|
|
9
|
-
|
|
10
|
-
Across multiple projects we kept reinventing the same pattern: a script that
|
|
11
|
-
creates a dated Markdown file from a template, with frontmatter for date,
|
|
12
|
-
author, tags, and draft status. Each implementation had slightly different
|
|
13
|
-
directory structures, section headers, and filenames. The core concept was
|
|
14
|
-
always the same.
|
|
15
|
-
|
|
16
|
-
## Solution
|
|
17
|
-
|
|
18
|
-
`worklog-opsdevnz` formalises this pattern into a single published module:
|
|
19
|
-
|
|
20
|
-
- **Per-project config** — `worklog.toml` controls directory structure, sections,
|
|
21
|
-
author, tags, and filename patterns
|
|
22
|
-
- **Three structure modes** — `flat`, `year`, or `year-month` directory layouts
|
|
23
|
-
- **YAML frontmatter** — date, title, author, tags, draft status
|
|
24
|
-
- **Configurable sections** — each project defines its own section headers
|
|
25
|
-
- **Editor integration** — opens new entries in `$VISUAL` / `$EDITOR`
|
|
26
|
-
- **List existing entries** — browse worklogs with `--list`
|
|
27
|
-
|
|
28
|
-
## Quick Start
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
# Create today's worklog
|
|
32
|
-
worklog-opsdevnz
|
|
33
|
-
|
|
34
|
-
# Create yesterday's worklog
|
|
35
|
-
worklog-opsdevnz --previous
|
|
36
|
-
|
|
37
|
-
# Override the editor for this run
|
|
38
|
-
worklog-opsdevnz --editor nvim
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## Configuration
|
|
42
|
-
|
|
43
|
-
Each project gets a `worklog.toml` at its root:
|
|
44
|
-
|
|
45
|
-
```toml
|
|
46
|
-
worklog_dir = "docs/worklog"
|
|
47
|
-
structure = "year" # "flat", "year", or "year-month"
|
|
48
|
-
author = "Your Name"
|
|
49
|
-
default_tags = ["worklog", "log"]
|
|
50
|
-
|
|
51
|
-
[[sections]]
|
|
52
|
-
title = "Focus for Today"
|
|
53
|
-
|
|
54
|
-
[[sections]]
|
|
55
|
-
title = "Completed"
|
|
56
|
-
|
|
57
|
-
[[sections]]
|
|
58
|
-
title = "Notes"
|
|
59
|
-
|
|
60
|
-
[[sections]]
|
|
61
|
-
title = "Next"
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## Scope
|
|
65
|
-
|
|
66
|
-
**WorkLog DOES:**
|
|
67
|
-
- Create dated Markdown worklog entries with YAML frontmatter
|
|
68
|
-
- Per-project configuration via `worklog.toml`
|
|
69
|
-
- Open entries in configured editor (`$VISUAL` / `$EDITOR`)
|
|
70
|
-
- Three directory structure modes: flat, year, year-month
|
|
71
|
-
|
|
72
|
-
**WorkLog DOES NOT (out of scope for 0.0.2):**
|
|
73
|
-
- Zensical blog integration (see design doc)
|
|
74
|
-
- Auto-generated index pages
|
|
75
|
-
- Retro template support (planned for 0.1.0)
|
|
76
|
-
- Time tracking / timesheet aggregation
|
|
77
|
-
- `list`, `init`, or `create` subcommands (planned for 0.1.0)
|
|
78
|
-
|
|
79
|
-
## Requirements
|
|
80
|
-
|
|
81
|
-
- Python 3.12+
|
|
82
|
-
- See [pyproject.toml](pyproject.toml) for full dependencies
|
|
83
|
-
|
|
84
|
-
## Related
|
|
85
|
-
|
|
86
|
-
- [Functional Requirements](docs/specs/README.md)
|
|
87
|
-
- [Design Decisions](docs/design/README.md)
|
|
88
|
-
- [User Stories](docs/stories/README.md)
|
|
89
|
-
|
|
90
|
-
---
|
|
91
|
-
|
|
92
|
-
**Last Updated:** 2026-05-23
|
|
93
|
-
**Status:** Development (migrated to module template)
|
|
94
|
-
**Maintainer:** OpsDev.nz Collective
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{worklog_opsdevnz-0.1.0 → worklog_opsdevnz-0.1.2}/src/worklog_opsdevnz.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{worklog_opsdevnz-0.1.0 → worklog_opsdevnz-0.1.2}/src/worklog_opsdevnz.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{worklog_opsdevnz-0.1.0 → worklog_opsdevnz-0.1.2}/src/worklog_opsdevnz.egg-info/requires.txt
RENAMED
|
File without changes
|
{worklog_opsdevnz-0.1.0 → worklog_opsdevnz-0.1.2}/src/worklog_opsdevnz.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|