desertislandutils 0.4.2__py3-none-any.whl → 0.4.3__py3-none-any.whl
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.
- desertislandutils-0.4.3.dist-info/METADATA +179 -0
- {desertislandutils-0.4.2.dist-info → desertislandutils-0.4.3.dist-info}/RECORD +4 -4
- desertislandutils-0.4.2.dist-info/METADATA +0 -96
- {desertislandutils-0.4.2.dist-info → desertislandutils-0.4.3.dist-info}/WHEEL +0 -0
- {desertislandutils-0.4.2.dist-info → desertislandutils-0.4.3.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: desertislandutils
|
|
3
|
+
Version: 0.4.3
|
|
4
|
+
Summary: A collection of personal convenience utilities
|
|
5
|
+
Project-URL: Homepage, https://github.com/mahiki/desertislandutils
|
|
6
|
+
Project-URL: Repository, https://github.com/mahiki/desertislandutils
|
|
7
|
+
Project-URL: Issues, https://github.com/mahiki/desertislandutils/issues
|
|
8
|
+
Author-email: mahiki <mahiki@users.noreply.github.com>
|
|
9
|
+
License: MIT
|
|
10
|
+
Requires-Python: >=3.11
|
|
11
|
+
Requires-Dist: argparse>=1.4.0
|
|
12
|
+
Requires-Dist: gitpython>=3.1.27
|
|
13
|
+
Requires-Dist: pendulum>=3.0.0
|
|
14
|
+
Requires-Dist: typer>=0.12.0
|
|
15
|
+
Provides-Extra: dev
|
|
16
|
+
Requires-Dist: ptpython>=3.0.23; extra == 'dev'
|
|
17
|
+
Provides-Extra: test
|
|
18
|
+
Requires-Dist: pytest>=7.2.2; extra == 'test'
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
|
|
21
|
+
# desertislandutils
|
|
22
|
+
|
|
23
|
+
A collection of personal convenience utilities for managing parallel directory structures and ISO week numbers. Written in Python because it's far better than shell scripting!
|
|
24
|
+
|
|
25
|
+
## Installation
|
|
26
|
+
|
|
27
|
+
Install globally using `uv`:
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
uv tool install desertislandutils
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Update to the latest version:
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
uv tool upgrade desertislandutils
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## The Utils
|
|
40
|
+
|
|
41
|
+
### toobigdatadoc (`too`)
|
|
42
|
+
|
|
43
|
+
Manage parallel directory structures for separating text files from large binary files and datasets. Creates symlinked folders under `HOME/{toobig|toodata|toodoc}`:
|
|
44
|
+
|
|
45
|
+
- `toobig` - Large files excluded from backups
|
|
46
|
+
- `toodata` - Small-ish data files
|
|
47
|
+
- `toodoc` - Binary files like PDFs and images
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
$HOME
|
|
51
|
+
|-- toobig
|
|
52
|
+
|-- # replicated folder paths with large files here, assume not to be backed up
|
|
53
|
+
|-- toodata
|
|
54
|
+
|-- # small-ish data files in support of the parallel root
|
|
55
|
+
|-- toodoc
|
|
56
|
+
|-- # usually pdfs or image files
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Usage:**
|
|
60
|
+
|
|
61
|
+
```sh
|
|
62
|
+
too --help
|
|
63
|
+
|
|
64
|
+
usage: too [-h] {big,data,doc}
|
|
65
|
+
|
|
66
|
+
Create symlinked parallel folders under HOME/{toobig|toodata|toodoc}, to
|
|
67
|
+
contain data/binary files outside of git repo or away from source/text files.
|
|
68
|
+
|
|
69
|
+
positional arguments:
|
|
70
|
+
{big,data,doc} large files to exclude from backup, smallish datasets,
|
|
71
|
+
binary files like pdf
|
|
72
|
+
|
|
73
|
+
options:
|
|
74
|
+
-h, --help show this help message and exit
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### weeknumber (`wn`)
|
|
78
|
+
|
|
79
|
+
Get ISO year week numbers in YYYY-WDD format. Default weekend day is Saturday.
|
|
80
|
+
|
|
81
|
+
**Usage:**
|
|
82
|
+
|
|
83
|
+
```sh
|
|
84
|
+
wn --help
|
|
85
|
+
|
|
86
|
+
Usage: wn [OPTIONS] [DATE]
|
|
87
|
+
|
|
88
|
+
ISO year week number of a date as YYYY-"W"WW. Default weekend day is Saturday.
|
|
89
|
+
|
|
90
|
+
Example:
|
|
91
|
+
|
|
92
|
+
$> wn 'Jul 22 2020' --last
|
|
93
|
+
|
|
94
|
+
2020-W29
|
|
95
|
+
|
|
96
|
+
╭─ Arguments ────────────────────────────────────────────────────────────────╮
|
|
97
|
+
│ date [DATE] A text expression of date, ex: 'November 27', or │
|
|
98
|
+
│ 2112-07-29. Default is today's in current TZ. │
|
|
99
|
+
│ [default: (dynamic)] │
|
|
100
|
+
╰────────────────────────────────────────────────────────────────────────────╯
|
|
101
|
+
╭─ Options ──────────────────────────────────────────────────────────────────╮
|
|
102
|
+
│ --sunday Week end is Saturday by default, this flag sets │
|
|
103
|
+
│ Sunday weekend day (ISO standard). │
|
|
104
|
+
│ --last Give week number of most recently completed week │
|
|
105
|
+
│ (overrides DATE argument). │
|
|
106
|
+
│ --verbose -v Full parsed date details for verification. │
|
|
107
|
+
│ --install-completion Install completion for the current shell. │
|
|
108
|
+
│ --show-completion Show completion for the current shell, to copy it │
|
|
109
|
+
│ or customize the installation. │
|
|
110
|
+
│ --help Show this message and exit. │
|
|
111
|
+
╰────────────────────────────────────────────────────────────────────────────╯
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Examples:**
|
|
115
|
+
|
|
116
|
+
```sh
|
|
117
|
+
# Get current week number
|
|
118
|
+
wn
|
|
119
|
+
|
|
120
|
+
# Get week number for a specific date
|
|
121
|
+
wn 'Jul 22'
|
|
122
|
+
|
|
123
|
+
# Get last completed week number
|
|
124
|
+
wn --last
|
|
125
|
+
|
|
126
|
+
# Parse a specific date with details
|
|
127
|
+
wn 'November 27 2024' --verbose
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Development
|
|
133
|
+
|
|
134
|
+
Built with modern Python tooling:
|
|
135
|
+
|
|
136
|
+
- **Build system:** `uv`
|
|
137
|
+
- **Deploy:** PyPI via GitHub Actions CI/CD
|
|
138
|
+
- **Package manager:** `uv`
|
|
139
|
+
|
|
140
|
+
### Setup
|
|
141
|
+
|
|
142
|
+
```sh
|
|
143
|
+
# Clone the repository
|
|
144
|
+
git clone https://github.com/mahiki/desertislandutils.git
|
|
145
|
+
cd desertislandutils
|
|
146
|
+
|
|
147
|
+
# Install dependencies (including dev extras)
|
|
148
|
+
uv sync --all-extras
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Testing
|
|
152
|
+
|
|
153
|
+
```sh
|
|
154
|
+
# Run tests
|
|
155
|
+
just test
|
|
156
|
+
|
|
157
|
+
# Or directly with uv
|
|
158
|
+
uv run --extra test pytest --disable-warnings --verbose
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Local Development
|
|
162
|
+
|
|
163
|
+
```sh
|
|
164
|
+
# Run commands directly from source
|
|
165
|
+
uv run wn --help
|
|
166
|
+
uv run too --help
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### Project Tasks
|
|
170
|
+
|
|
171
|
+
See the `justfile` for available commands:
|
|
172
|
+
|
|
173
|
+
```sh
|
|
174
|
+
just --list
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## License
|
|
178
|
+
|
|
179
|
+
MIT
|
|
@@ -3,7 +3,7 @@ src/toobigdatadoc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
|
|
|
3
3
|
src/toobigdatadoc/too.py,sha256=PF8ycDOfrk6yzlQkajAEYQOB2G7FGsBWvHcDMobdwTg,2848
|
|
4
4
|
src/weeknumber/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
src/weeknumber/wn.py,sha256=uqKt-oXhLKkKeK35xyjx1vakjAIKVZniQksycbF1PE8,2908
|
|
6
|
-
desertislandutils-0.4.
|
|
7
|
-
desertislandutils-0.4.
|
|
8
|
-
desertislandutils-0.4.
|
|
9
|
-
desertislandutils-0.4.
|
|
6
|
+
desertislandutils-0.4.3.dist-info/METADATA,sha256=UAK_ixp1LWc102kF_RKhIOclkmIXs6OCmMjVkSmqKFE,5827
|
|
7
|
+
desertislandutils-0.4.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
8
|
+
desertislandutils-0.4.3.dist-info/entry_points.txt,sha256=5TRbM9NEaDJ_d-cfZprBLYMhblbwTp2Zn966FTkwVM8,78
|
|
9
|
+
desertislandutils-0.4.3.dist-info/RECORD,,
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: desertislandutils
|
|
3
|
-
Version: 0.4.2
|
|
4
|
-
Summary: A collection of personal convenience utilities
|
|
5
|
-
Author-email: mahiki <mahiki@users.noreply.github.com>
|
|
6
|
-
License: MIT
|
|
7
|
-
Requires-Python: >=3.11
|
|
8
|
-
Requires-Dist: argparse>=1.4.0
|
|
9
|
-
Requires-Dist: gitpython>=3.1.27
|
|
10
|
-
Requires-Dist: pendulum>=3.0.0
|
|
11
|
-
Requires-Dist: typer>=0.12.0
|
|
12
|
-
Provides-Extra: dev
|
|
13
|
-
Requires-Dist: ptpython>=3.0.23; extra == 'dev'
|
|
14
|
-
Provides-Extra: test
|
|
15
|
-
Requires-Dist: pytest>=7.2.2; extra == 'test'
|
|
16
|
-
Description-Content-Type: text/markdown
|
|
17
|
-
|
|
18
|
-
# desertislandutils
|
|
19
|
-
Refactoring my convenience utility bash scripts into python for learning and profit. Deployed for MacOS via homebrew, its really far better than shell scripting, yuck!
|
|
20
|
-
|
|
21
|
-
## INSTALL
|
|
22
|
-
brew install mahiki/tap/desertislandutils
|
|
23
|
-
|
|
24
|
-
## THE UTILS
|
|
25
|
-
### toobigdatadoc
|
|
26
|
-
I like to keep text files in one directory system, with supporting data files and binary documents in parallel directories from the home folder: `toobig`, `toodata`, `toodoc`. For example, its easy to exclude the whole `toobig` directory structure from backups, since there is nothing but huge files here.
|
|
27
|
-
|
|
28
|
-
$HOME
|
|
29
|
-
|-- toobig
|
|
30
|
-
|-- # replicated folder paths with large files here, assume not to be backed up
|
|
31
|
-
|-- toodata
|
|
32
|
-
|-- # small-ish data files in support of the parallel root
|
|
33
|
-
|-- toodoc
|
|
34
|
-
|-- # usually pdfs or image files
|
|
35
|
-
|
|
36
|
-
```sh
|
|
37
|
-
$> too --help
|
|
38
|
-
usage: too [-h] {big,data,doc}
|
|
39
|
-
|
|
40
|
-
Create symlinked parallel folders to contain data/binary files outside of git repo or away from source/text files.
|
|
41
|
-
|
|
42
|
-
positional arguments:
|
|
43
|
-
{big,data,doc} large files to exclude from backup, smallish datasets, binary files like pdf
|
|
44
|
-
|
|
45
|
-
optional arguments:
|
|
46
|
-
-h, --help show this help message and exit
|
|
47
|
-
Kehena segovia: ~
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
### weeknumber
|
|
51
|
-
```sh
|
|
52
|
-
wn --help
|
|
53
|
-
|
|
54
|
-
Usage: wn [OPTIONS] [DATE]
|
|
55
|
-
|
|
56
|
-
ISO year week number of a date as YYYY-WDD. Default weekend day is Sat.
|
|
57
|
-
Example:
|
|
58
|
-
$> wn 'Jul 22'
|
|
59
|
-
2023-W29
|
|
60
|
-
|
|
61
|
-
╭─ Arguments ───────────────────────────────────────────────────────────────────────────────────────────────────╮
|
|
62
|
-
│ date [DATE] A text expression of date, ex: 'November 27', or 2112-07-29 [default: (dynamic)] │
|
|
63
|
-
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
64
|
-
╭─ Options ─────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
|
65
|
-
│ --sunday Weekend is Saturday by default, this flag sets Sunday weekend day. │
|
|
66
|
-
│ --last Give week number of most recently completed week (overrides DATE argument). │
|
|
67
|
-
│ --verbose --no-verbose [default: no-verbose] │
|
|
68
|
-
│ --install-completion Install completion for the current shell. │
|
|
69
|
-
│ --show-completion Show completion for the current shell, to copy it or customize the installation. │
|
|
70
|
-
│ --help Show this message and exit. │
|
|
71
|
-
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
----------
|
|
75
|
-
## DEVELOPMENT
|
|
76
|
-
>Trying to automate the merge tag homebrew tap repo upgrade thing. Its not going great.
|
|
77
|
-
|
|
78
|
-
* build: poetry
|
|
79
|
-
* deploy: poetry -> pypi -> homebrew
|
|
80
|
-
* github CI actions
|
|
81
|
-
|
|
82
|
-
### JUSTFILE
|
|
83
|
-
>Best documentation is in the Just taskrunner `justfile`.
|
|
84
|
-
|
|
85
|
-
```sh
|
|
86
|
-
just info
|
|
87
|
-
|
|
88
|
-
just wn --help
|
|
89
|
-
|
|
90
|
-
# also direct into poetry environment
|
|
91
|
-
poetry shell
|
|
92
|
-
(desertislandutils)> wn --help
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
### Testing
|
|
96
|
-
just test
|
|
File without changes
|
|
File without changes
|