redmine-worklog 0.1.0__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.
- redmine_worklog-0.1.0/LICENSE +21 -0
- redmine_worklog-0.1.0/PKG-INFO +152 -0
- redmine_worklog-0.1.0/README.md +124 -0
- redmine_worklog-0.1.0/pyproject.toml +46 -0
- redmine_worklog-0.1.0/redmine_worklog/__init__.py +3 -0
- redmine_worklog-0.1.0/redmine_worklog/cli.py +405 -0
- redmine_worklog-0.1.0/redmine_worklog/csv_backfill.py +173 -0
- redmine_worklog-0.1.0/redmine_worklog/engine.py +229 -0
- redmine_worklog-0.1.0/redmine_worklog/holidays.txt +6 -0
- redmine_worklog-0.1.0/redmine_worklog/retro.py +116 -0
- redmine_worklog-0.1.0/redmine_worklog/userconfig.py +144 -0
- redmine_worklog-0.1.0/redmine_worklog/worklog_parser.py +93 -0
- redmine_worklog-0.1.0/redmine_worklog.egg-info/PKG-INFO +152 -0
- redmine_worklog-0.1.0/redmine_worklog.egg-info/SOURCES.txt +17 -0
- redmine_worklog-0.1.0/redmine_worklog.egg-info/dependency_links.txt +1 -0
- redmine_worklog-0.1.0/redmine_worklog.egg-info/entry_points.txt +3 -0
- redmine_worklog-0.1.0/redmine_worklog.egg-info/requires.txt +1 -0
- redmine_worklog-0.1.0/redmine_worklog.egg-info/top_level.txt +1 -0
- redmine_worklog-0.1.0/setup.cfg +4 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Your Organization
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: redmine-worklog
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A tiny retro CLI to log daily tasks to Redmine in plain text.
|
|
5
|
+
Author-email: Your Name <you@example.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/your-org/redmine-worklog
|
|
8
|
+
Project-URL: Repository, https://github.com/your-org/redmine-worklog
|
|
9
|
+
Project-URL: Issues, https://github.com/your-org/redmine-worklog/issues
|
|
10
|
+
Keywords: redmine,time-tracking,worklog,cli,timesheet
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Office/Business :: Scheduling
|
|
22
|
+
Classifier: Topic :: Utilities
|
|
23
|
+
Requires-Python: >=3.9
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: requests>=2.28
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
|
|
29
|
+
# redmine-worklog
|
|
30
|
+
|
|
31
|
+
A tiny retro CLI to log your daily tasks to Redmine in plain text.
|
|
32
|
+
No Teams, no web UI, no admin approval — just `pip install` and go.
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
.-------------------.
|
|
36
|
+
| ## REDMINE ## |
|
|
37
|
+
| .-----------. |
|
|
38
|
+
| | >_ o o | |
|
|
39
|
+
| | WORKLOG | |
|
|
40
|
+
| '-----------' |
|
|
41
|
+
| [A] [B] == |
|
|
42
|
+
'-------------------'
|
|
43
|
+
R E D M I N E W O R K L O G
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Install
|
|
47
|
+
|
|
48
|
+
From this folder:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
pip install .
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
or for development (edits take effect immediately):
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
pip install -e .
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
This adds two commands: `rmlog` and `redmine-worklog`.
|
|
61
|
+
|
|
62
|
+
## First run
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
rmlog
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
The setup wizard asks for your name, Redmine URL, and API access key
|
|
69
|
+
(Redmine -> My account -> API access key), verifies the token, and saves
|
|
70
|
+
everything to `~/.redmine_worklog/config.json` (per user, so each teammate
|
|
71
|
+
logs as themselves).
|
|
72
|
+
|
|
73
|
+
## Logging tasks
|
|
74
|
+
|
|
75
|
+
After setup, `rmlog` greets you and waits for tasks. One task per line:
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
upload module discovery 3 hr today
|
|
79
|
+
fix login bug 2h yesterday
|
|
80
|
+
sprint planning 1.5 hr 15-09-2026 16-09-2026
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Format: `<subject> <hours> hr <start-date> [<end-date>]`
|
|
84
|
+
- dates: `today` | `yesterday` | `dd-mm-yyyy`
|
|
85
|
+
- end date optional (defaults to start date)
|
|
86
|
+
|
|
87
|
+
It shows a preview and waits for you to type `yes` before posting.
|
|
88
|
+
|
|
89
|
+
## Rules (enforced before posting)
|
|
90
|
+
|
|
91
|
+
- Max 9 hours/day (configurable)
|
|
92
|
+
- No weekends
|
|
93
|
+
- No holidays (`~/.redmine_worklog/config.json` -> `holidays`)
|
|
94
|
+
|
|
95
|
+
## CSV backfill (bulk upload)
|
|
96
|
+
|
|
97
|
+
Inside the chat, type `csv` to bulk-upload many tasks at once — handy for
|
|
98
|
+
back-filling weeks or months. It shows the required format, asks for the file
|
|
99
|
+
path, validates the whole file, reports any problems, and only uploads after
|
|
100
|
+
you confirm.
|
|
101
|
+
|
|
102
|
+
CSV header (exact column names):
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
subject,description,priority,status,start_date,due_date,estimated_hours,date,hours,activity,comment
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Example row:
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
UPLOAD MODULE DISCOVERY,working on upload module discovery,Normal,Closed,2026-09-17,2026-09-18,8,2026-09-18,4,Development,Initial implementation
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Required in every row: `subject`, `hours`, `date`. Everything else falls back
|
|
115
|
+
to your defaults. Dates accept `YYYY-MM-DD` or `dd-mm-yyyy`. The same rules
|
|
116
|
+
(9h/day, no weekends, no holidays) are checked across all rows before upload.
|
|
117
|
+
|
|
118
|
+
## Commands (inside the chat)
|
|
119
|
+
|
|
120
|
+
- type a task log one task
|
|
121
|
+
- `csv` bulk upload from a CSV (backfill)
|
|
122
|
+
- `change project` switch the default project (verified against Redmine)
|
|
123
|
+
- `change user` switch Redmine account (re-runs setup)
|
|
124
|
+
- `help` show instructions
|
|
125
|
+
- `quit` exit
|
|
126
|
+
|
|
127
|
+
## Multiple accounts
|
|
128
|
+
|
|
129
|
+
`change user` lists your saved accounts and lets you switch between them
|
|
130
|
+
instantly (no need to re-enter the token). Choose `N` to add a new account.
|
|
131
|
+
Profiles are stored in `~/.redmine_worklog/config.json`.
|
|
132
|
+
|
|
133
|
+
## Command-line flags
|
|
134
|
+
|
|
135
|
+
- `rmlog` log tasks (runs setup on first use)
|
|
136
|
+
- `rmlog --setup` re-run the setup wizard / add an account
|
|
137
|
+
- `rmlog --plain` disable colors and box characters (old terminals)
|
|
138
|
+
- `rmlog --version` show version
|
|
139
|
+
|
|
140
|
+
Setting the `NO_COLOR` environment variable also enables plain mode.
|
|
141
|
+
|
|
142
|
+
## Daily hours limit
|
|
143
|
+
|
|
144
|
+
If a day would go over the limit (default 9h), the tool shows a warning and
|
|
145
|
+
asks you to confirm before logging the extra time. Weekends and holidays are
|
|
146
|
+
still hard blocks.
|
|
147
|
+
|
|
148
|
+
## Config file
|
|
149
|
+
|
|
150
|
+
`~/.redmine_worklog/config.json` holds your name, URL, token, project,
|
|
151
|
+
tracker, defaults (activity/comment/status), rules, and holidays.
|
|
152
|
+
The token is stored locally with restricted file permissions.
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# redmine-worklog
|
|
2
|
+
|
|
3
|
+
A tiny retro CLI to log your daily tasks to Redmine in plain text.
|
|
4
|
+
No Teams, no web UI, no admin approval — just `pip install` and go.
|
|
5
|
+
|
|
6
|
+
```
|
|
7
|
+
.-------------------.
|
|
8
|
+
| ## REDMINE ## |
|
|
9
|
+
| .-----------. |
|
|
10
|
+
| | >_ o o | |
|
|
11
|
+
| | WORKLOG | |
|
|
12
|
+
| '-----------' |
|
|
13
|
+
| [A] [B] == |
|
|
14
|
+
'-------------------'
|
|
15
|
+
R E D M I N E W O R K L O G
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Install
|
|
19
|
+
|
|
20
|
+
From this folder:
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
pip install .
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
or for development (edits take effect immediately):
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
pip install -e .
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
This adds two commands: `rmlog` and `redmine-worklog`.
|
|
33
|
+
|
|
34
|
+
## First run
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
rmlog
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The setup wizard asks for your name, Redmine URL, and API access key
|
|
41
|
+
(Redmine -> My account -> API access key), verifies the token, and saves
|
|
42
|
+
everything to `~/.redmine_worklog/config.json` (per user, so each teammate
|
|
43
|
+
logs as themselves).
|
|
44
|
+
|
|
45
|
+
## Logging tasks
|
|
46
|
+
|
|
47
|
+
After setup, `rmlog` greets you and waits for tasks. One task per line:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
upload module discovery 3 hr today
|
|
51
|
+
fix login bug 2h yesterday
|
|
52
|
+
sprint planning 1.5 hr 15-09-2026 16-09-2026
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Format: `<subject> <hours> hr <start-date> [<end-date>]`
|
|
56
|
+
- dates: `today` | `yesterday` | `dd-mm-yyyy`
|
|
57
|
+
- end date optional (defaults to start date)
|
|
58
|
+
|
|
59
|
+
It shows a preview and waits for you to type `yes` before posting.
|
|
60
|
+
|
|
61
|
+
## Rules (enforced before posting)
|
|
62
|
+
|
|
63
|
+
- Max 9 hours/day (configurable)
|
|
64
|
+
- No weekends
|
|
65
|
+
- No holidays (`~/.redmine_worklog/config.json` -> `holidays`)
|
|
66
|
+
|
|
67
|
+
## CSV backfill (bulk upload)
|
|
68
|
+
|
|
69
|
+
Inside the chat, type `csv` to bulk-upload many tasks at once — handy for
|
|
70
|
+
back-filling weeks or months. It shows the required format, asks for the file
|
|
71
|
+
path, validates the whole file, reports any problems, and only uploads after
|
|
72
|
+
you confirm.
|
|
73
|
+
|
|
74
|
+
CSV header (exact column names):
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
subject,description,priority,status,start_date,due_date,estimated_hours,date,hours,activity,comment
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Example row:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
UPLOAD MODULE DISCOVERY,working on upload module discovery,Normal,Closed,2026-09-17,2026-09-18,8,2026-09-18,4,Development,Initial implementation
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Required in every row: `subject`, `hours`, `date`. Everything else falls back
|
|
87
|
+
to your defaults. Dates accept `YYYY-MM-DD` or `dd-mm-yyyy`. The same rules
|
|
88
|
+
(9h/day, no weekends, no holidays) are checked across all rows before upload.
|
|
89
|
+
|
|
90
|
+
## Commands (inside the chat)
|
|
91
|
+
|
|
92
|
+
- type a task log one task
|
|
93
|
+
- `csv` bulk upload from a CSV (backfill)
|
|
94
|
+
- `change project` switch the default project (verified against Redmine)
|
|
95
|
+
- `change user` switch Redmine account (re-runs setup)
|
|
96
|
+
- `help` show instructions
|
|
97
|
+
- `quit` exit
|
|
98
|
+
|
|
99
|
+
## Multiple accounts
|
|
100
|
+
|
|
101
|
+
`change user` lists your saved accounts and lets you switch between them
|
|
102
|
+
instantly (no need to re-enter the token). Choose `N` to add a new account.
|
|
103
|
+
Profiles are stored in `~/.redmine_worklog/config.json`.
|
|
104
|
+
|
|
105
|
+
## Command-line flags
|
|
106
|
+
|
|
107
|
+
- `rmlog` log tasks (runs setup on first use)
|
|
108
|
+
- `rmlog --setup` re-run the setup wizard / add an account
|
|
109
|
+
- `rmlog --plain` disable colors and box characters (old terminals)
|
|
110
|
+
- `rmlog --version` show version
|
|
111
|
+
|
|
112
|
+
Setting the `NO_COLOR` environment variable also enables plain mode.
|
|
113
|
+
|
|
114
|
+
## Daily hours limit
|
|
115
|
+
|
|
116
|
+
If a day would go over the limit (default 9h), the tool shows a warning and
|
|
117
|
+
asks you to confirm before logging the extra time. Weekends and holidays are
|
|
118
|
+
still hard blocks.
|
|
119
|
+
|
|
120
|
+
## Config file
|
|
121
|
+
|
|
122
|
+
`~/.redmine_worklog/config.json` holds your name, URL, token, project,
|
|
123
|
+
tracker, defaults (activity/comment/status), rules, and holidays.
|
|
124
|
+
The token is stored locally with restricted file permissions.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "redmine-worklog"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "A tiny retro CLI to log daily tasks to Redmine in plain text."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
license-files = ["LICENSE"]
|
|
13
|
+
authors = [{ name = "Your Name", email = "you@example.com" }]
|
|
14
|
+
keywords = ["redmine", "time-tracking", "worklog", "cli", "timesheet"]
|
|
15
|
+
dependencies = [
|
|
16
|
+
"requests>=2.28",
|
|
17
|
+
]
|
|
18
|
+
classifiers = [
|
|
19
|
+
"Development Status :: 4 - Beta",
|
|
20
|
+
"Environment :: Console",
|
|
21
|
+
"Intended Audience :: Developers",
|
|
22
|
+
"Operating System :: OS Independent",
|
|
23
|
+
"Programming Language :: Python :: 3",
|
|
24
|
+
"Programming Language :: Python :: 3.9",
|
|
25
|
+
"Programming Language :: Python :: 3.10",
|
|
26
|
+
"Programming Language :: Python :: 3.11",
|
|
27
|
+
"Programming Language :: Python :: 3.12",
|
|
28
|
+
"Programming Language :: Python :: 3.13",
|
|
29
|
+
"Topic :: Office/Business :: Scheduling",
|
|
30
|
+
"Topic :: Utilities",
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
[project.urls]
|
|
34
|
+
Homepage = "https://github.com/your-org/redmine-worklog"
|
|
35
|
+
Repository = "https://github.com/your-org/redmine-worklog"
|
|
36
|
+
Issues = "https://github.com/your-org/redmine-worklog/issues"
|
|
37
|
+
|
|
38
|
+
[project.scripts]
|
|
39
|
+
rmlog = "redmine_worklog.cli:main"
|
|
40
|
+
redmine-worklog = "redmine_worklog.cli:main"
|
|
41
|
+
|
|
42
|
+
[tool.setuptools]
|
|
43
|
+
packages = ["redmine_worklog"]
|
|
44
|
+
|
|
45
|
+
[tool.setuptools.package-data]
|
|
46
|
+
redmine_worklog = ["holidays.txt"]
|