devdash-mac 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.
- devdash_mac-0.1.0/LICENSE +21 -0
- devdash_mac-0.1.0/PKG-INFO +194 -0
- devdash_mac-0.1.0/README.md +155 -0
- devdash_mac-0.1.0/pyproject.toml +72 -0
- devdash_mac-0.1.0/setup.cfg +4 -0
- devdash_mac-0.1.0/src/devdash/__init__.py +4 -0
- devdash_mac-0.1.0/src/devdash/__main__.py +6 -0
- devdash_mac-0.1.0/src/devdash/app.py +145 -0
- devdash_mac-0.1.0/src/devdash/clipboard.py +98 -0
- devdash_mac-0.1.0/src/devdash/config.py +51 -0
- devdash_mac-0.1.0/src/devdash/plugin_loader.py +43 -0
- devdash_mac-0.1.0/src/devdash/storage.py +244 -0
- devdash_mac-0.1.0/src/devdash/tools/__init__.py +1 -0
- devdash_mac-0.1.0/src/devdash/tools/base.py +38 -0
- devdash_mac-0.1.0/src/devdash/tools/base64_tool.py +79 -0
- devdash_mac-0.1.0/src/devdash/tools/color_tool.py +108 -0
- devdash_mac-0.1.0/src/devdash/tools/cron_tool.py +137 -0
- devdash_mac-0.1.0/src/devdash/tools/hash_tool.py +65 -0
- devdash_mac-0.1.0/src/devdash/tools/json_tool.py +61 -0
- devdash_mac-0.1.0/src/devdash/tools/jwt_tool.py +97 -0
- devdash_mac-0.1.0/src/devdash/tools/lorem_tool.py +102 -0
- devdash_mac-0.1.0/src/devdash/tools/password_tool.py +366 -0
- devdash_mac-0.1.0/src/devdash/tools/regex_tool.py +88 -0
- devdash_mac-0.1.0/src/devdash/tools/timestamp_tool.py +142 -0
- devdash_mac-0.1.0/src/devdash/tools/url_tool.py +75 -0
- devdash_mac-0.1.0/src/devdash/tools/uuid_tool.py +119 -0
- devdash_mac-0.1.0/src/devdash/ui/__init__.py +1 -0
- devdash_mac-0.1.0/src/devdash/ui/notifications.py +22 -0
- devdash_mac-0.1.0/src/devdash/ui/windows.py +84 -0
- devdash_mac-0.1.0/src/devdash_mac.egg-info/PKG-INFO +194 -0
- devdash_mac-0.1.0/src/devdash_mac.egg-info/SOURCES.txt +37 -0
- devdash_mac-0.1.0/src/devdash_mac.egg-info/dependency_links.txt +1 -0
- devdash_mac-0.1.0/src/devdash_mac.egg-info/entry_points.txt +2 -0
- devdash_mac-0.1.0/src/devdash_mac.egg-info/requires.txt +14 -0
- devdash_mac-0.1.0/src/devdash_mac.egg-info/top_level.txt +1 -0
- devdash_mac-0.1.0/tests/test_app.py +92 -0
- devdash_mac-0.1.0/tests/test_clipboard.py +134 -0
- devdash_mac-0.1.0/tests/test_config.py +133 -0
- devdash_mac-0.1.0/tests/test_plugin_loader.py +115 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 DevDash Contributors
|
|
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,194 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: devdash-mac
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Open-source macOS menubar developer utilities
|
|
5
|
+
Author: DevDash Contributors
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/devdash/devdash
|
|
8
|
+
Project-URL: Repository, https://github.com/devdash/devdash
|
|
9
|
+
Project-URL: Issues, https://github.com/devdash/devdash/issues
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Environment :: MacOS X
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Operating System :: MacOS
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
21
|
+
Classifier: Topic :: Utilities
|
|
22
|
+
Requires-Python: >=3.10
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Requires-Dist: rumps>=0.4.0
|
|
26
|
+
Requires-Dist: pyperclip>=1.8.0
|
|
27
|
+
Requires-Dist: PyJWT>=2.8.0
|
|
28
|
+
Requires-Dist: pyyaml>=6.0
|
|
29
|
+
Requires-Dist: croniter>=1.3.0
|
|
30
|
+
Provides-Extra: dev
|
|
31
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
32
|
+
Requires-Dist: pytest-cov; extra == "dev"
|
|
33
|
+
Requires-Dist: ruff; extra == "dev"
|
|
34
|
+
Requires-Dist: mypy; extra == "dev"
|
|
35
|
+
Requires-Dist: pre-commit; extra == "dev"
|
|
36
|
+
Requires-Dist: build; extra == "dev"
|
|
37
|
+
Requires-Dist: twine; extra == "dev"
|
|
38
|
+
Dynamic: license-file
|
|
39
|
+
|
|
40
|
+
# DevDash
|
|
41
|
+
|
|
42
|
+
Open-source macOS menubar developer utilities at your fingertips.
|
|
43
|
+
|
|
44
|
+
[](https://pypi.org/project/devdash)
|
|
45
|
+
[](https://www.python.org/downloads/)
|
|
46
|
+
[](LICENSE)
|
|
47
|
+
|
|
48
|
+
[GIF PLACEHOLDER - menubar app with tools opening in macOS]
|
|
49
|
+
|
|
50
|
+
## Why DevDash?
|
|
51
|
+
|
|
52
|
+
- **Free & Open Source** — MIT licensed, no ads, no tracking, community-driven
|
|
53
|
+
- **Offline First** — All processing happens locally. Nothing is ever sent to external services
|
|
54
|
+
- **Pip Installable** — Single command installation. Works with Python 3.10+
|
|
55
|
+
|
|
56
|
+
## Quick Start
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
pip install devdash
|
|
60
|
+
devdash
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Click the wrench icon (🔧) in your macOS menubar to access all tools.
|
|
64
|
+
|
|
65
|
+
## Tools
|
|
66
|
+
|
|
67
|
+
DevDash includes 12 essential developer utilities:
|
|
68
|
+
|
|
69
|
+
| Tool | What it does |
|
|
70
|
+
|------|-------------|
|
|
71
|
+
| 📝 **JSON Formatter** | Format, validate, and minify JSON |
|
|
72
|
+
| 🔐 **JWT Decoder** | Decode and inspect JSON Web Tokens |
|
|
73
|
+
| 🆔 **UUID / ULID Generator** | Generate UUID v4, v7, or ULID identifiers |
|
|
74
|
+
| 📄 **Base64 Encode/Decode** | Encode text to Base64 or decode back |
|
|
75
|
+
| #️⃣ **Hash Generator** | Generate MD5, SHA256, SHA512 hashes |
|
|
76
|
+
| ⏰ **Timestamp Converter** | Convert between Unix timestamps and readable dates |
|
|
77
|
+
| 🔗 **URL Encode/Decode** | Encode and decode URL-safe strings |
|
|
78
|
+
| 🔍 **Regex Tester** | Test regular expressions with live matches |
|
|
79
|
+
| 🎨 **Color Converter** | Convert between hex, RGB, and HSL colors |
|
|
80
|
+
| 📚 **Lorem Ipsum Generator** | Generate placeholder text and paragraphs |
|
|
81
|
+
| 🔑 **Password Generator** | Create secure random passwords |
|
|
82
|
+
| ⏱️ **Cron Parser** | Parse and explain cron expressions |
|
|
83
|
+
|
|
84
|
+
## Smart Clipboard
|
|
85
|
+
|
|
86
|
+
DevDash auto-detects your clipboard content and opens the right tool automatically.
|
|
87
|
+
|
|
88
|
+
**How it works:**
|
|
89
|
+
1. Copy anything to your clipboard (JSON, UUID, JWT, URL, etc.)
|
|
90
|
+
2. Click "Clipboard: Auto-detect" in the DevDash menu
|
|
91
|
+
3. The matching tool opens with your content pre-filled
|
|
92
|
+
|
|
93
|
+
Supports auto-detection for: JSON, JWT, UUID, Base64, URL-encoded text, timestamps, hex colors, and cron expressions.
|
|
94
|
+
|
|
95
|
+
## Configuration
|
|
96
|
+
|
|
97
|
+
DevDash stores user preferences in `~/.config/devdash/config.yaml`. Edit this file to customize:
|
|
98
|
+
|
|
99
|
+
```yaml
|
|
100
|
+
# Default hash algorithm: md5, sha256, sha512
|
|
101
|
+
default_hash_algorithm: sha256
|
|
102
|
+
|
|
103
|
+
# Timestamp format (Python strftime)
|
|
104
|
+
timestamp_format: "%Y-%m-%d %H:%M:%S"
|
|
105
|
+
|
|
106
|
+
# Password generator length
|
|
107
|
+
password_length: 16
|
|
108
|
+
|
|
109
|
+
# UUID version: v4, v7
|
|
110
|
+
uuid_version: v4
|
|
111
|
+
|
|
112
|
+
# Enable clipboard auto-detection
|
|
113
|
+
auto_clipboard_detection: true
|
|
114
|
+
|
|
115
|
+
# Watch clipboard for changes (experimental)
|
|
116
|
+
clipboard_watcher: false
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
The config file is created automatically on first run with sensible defaults.
|
|
120
|
+
|
|
121
|
+
## Installation
|
|
122
|
+
|
|
123
|
+
### From PyPI (Recommended)
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
pip install devdash
|
|
127
|
+
devdash
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### From Source
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
git clone https://github.com/devdash/devdash.git
|
|
134
|
+
cd devdash
|
|
135
|
+
pip install -e .
|
|
136
|
+
devdash
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
For development setup, see [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
140
|
+
|
|
141
|
+
## macOS Permissions
|
|
142
|
+
|
|
143
|
+
DevDash needs clipboard access to work. On first run, macOS will ask for permission:
|
|
144
|
+
|
|
145
|
+
> "DevDash" would like to access your clipboard.
|
|
146
|
+
|
|
147
|
+
Click **Allow** to enable clipboard auto-detection. You can revoke this later in System Preferences → Security & Privacy → Accessibility.
|
|
148
|
+
|
|
149
|
+
## Troubleshooting
|
|
150
|
+
|
|
151
|
+
**"command not found: devdash"**
|
|
152
|
+
- Ensure Python 3.10+ is installed: `python3 --version`
|
|
153
|
+
- Reinstall: `pip install --upgrade devdash`
|
|
154
|
+
|
|
155
|
+
**Menubar icon doesn't appear**
|
|
156
|
+
- Restart the app: press Ctrl+C to quit, then run `devdash` again
|
|
157
|
+
- Check that you have a menubar (not in fullscreen)
|
|
158
|
+
|
|
159
|
+
**Clipboard detection not working**
|
|
160
|
+
- Grant clipboard permission: System Preferences → Security & Privacy → Accessibility
|
|
161
|
+
- Enable in config: `auto_clipboard_detection: true`
|
|
162
|
+
|
|
163
|
+
## Contributing
|
|
164
|
+
|
|
165
|
+
Found a bug? Want a new tool? Head to [CONTRIBUTING.md](CONTRIBUTING.md) to get started.
|
|
166
|
+
|
|
167
|
+
Quick links:
|
|
168
|
+
- [Reporting bugs](CONTRIBUTING.md#reporting-bugs)
|
|
169
|
+
- [Suggesting features](CONTRIBUTING.md#suggesting-features)
|
|
170
|
+
- [Adding a new tool](docs/adding-tools.md)
|
|
171
|
+
- [Architecture overview](docs/architecture.md)
|
|
172
|
+
|
|
173
|
+
## Built With
|
|
174
|
+
|
|
175
|
+
- [rumps](https://github.com/jmorey/rumps) — Ridiculously Uncomplicated macOS Python Statusbar applications
|
|
176
|
+
- [pyperclip](https://github.com/asweigart/pyperclip) — Cross-platform clipboard support
|
|
177
|
+
- [PyJWT](https://pyjwt.readthedocs.io/) — JWT encoding and decoding
|
|
178
|
+
- [pyyaml](https://pyyaml.org/) — YAML configuration parsing
|
|
179
|
+
- [croniter](https://github.com/taichino/croniter) — Cron expression parsing
|
|
180
|
+
|
|
181
|
+
## Security
|
|
182
|
+
|
|
183
|
+
All data processing happens locally on your machine:
|
|
184
|
+
- Input is never sent to external services
|
|
185
|
+
- Clipboard content is not logged or stored
|
|
186
|
+
- No telemetry or analytics
|
|
187
|
+
|
|
188
|
+
See [LICENSE](LICENSE) for full details.
|
|
189
|
+
|
|
190
|
+
## License
|
|
191
|
+
|
|
192
|
+
MIT License © 2024 DevDash Contributors
|
|
193
|
+
|
|
194
|
+
See [LICENSE](LICENSE) for details.
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# DevDash
|
|
2
|
+
|
|
3
|
+
Open-source macOS menubar developer utilities at your fingertips.
|
|
4
|
+
|
|
5
|
+
[](https://pypi.org/project/devdash)
|
|
6
|
+
[](https://www.python.org/downloads/)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
|
|
9
|
+
[GIF PLACEHOLDER - menubar app with tools opening in macOS]
|
|
10
|
+
|
|
11
|
+
## Why DevDash?
|
|
12
|
+
|
|
13
|
+
- **Free & Open Source** — MIT licensed, no ads, no tracking, community-driven
|
|
14
|
+
- **Offline First** — All processing happens locally. Nothing is ever sent to external services
|
|
15
|
+
- **Pip Installable** — Single command installation. Works with Python 3.10+
|
|
16
|
+
|
|
17
|
+
## Quick Start
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pip install devdash
|
|
21
|
+
devdash
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Click the wrench icon (🔧) in your macOS menubar to access all tools.
|
|
25
|
+
|
|
26
|
+
## Tools
|
|
27
|
+
|
|
28
|
+
DevDash includes 12 essential developer utilities:
|
|
29
|
+
|
|
30
|
+
| Tool | What it does |
|
|
31
|
+
|------|-------------|
|
|
32
|
+
| 📝 **JSON Formatter** | Format, validate, and minify JSON |
|
|
33
|
+
| 🔐 **JWT Decoder** | Decode and inspect JSON Web Tokens |
|
|
34
|
+
| 🆔 **UUID / ULID Generator** | Generate UUID v4, v7, or ULID identifiers |
|
|
35
|
+
| 📄 **Base64 Encode/Decode** | Encode text to Base64 or decode back |
|
|
36
|
+
| #️⃣ **Hash Generator** | Generate MD5, SHA256, SHA512 hashes |
|
|
37
|
+
| ⏰ **Timestamp Converter** | Convert between Unix timestamps and readable dates |
|
|
38
|
+
| 🔗 **URL Encode/Decode** | Encode and decode URL-safe strings |
|
|
39
|
+
| 🔍 **Regex Tester** | Test regular expressions with live matches |
|
|
40
|
+
| 🎨 **Color Converter** | Convert between hex, RGB, and HSL colors |
|
|
41
|
+
| 📚 **Lorem Ipsum Generator** | Generate placeholder text and paragraphs |
|
|
42
|
+
| 🔑 **Password Generator** | Create secure random passwords |
|
|
43
|
+
| ⏱️ **Cron Parser** | Parse and explain cron expressions |
|
|
44
|
+
|
|
45
|
+
## Smart Clipboard
|
|
46
|
+
|
|
47
|
+
DevDash auto-detects your clipboard content and opens the right tool automatically.
|
|
48
|
+
|
|
49
|
+
**How it works:**
|
|
50
|
+
1. Copy anything to your clipboard (JSON, UUID, JWT, URL, etc.)
|
|
51
|
+
2. Click "Clipboard: Auto-detect" in the DevDash menu
|
|
52
|
+
3. The matching tool opens with your content pre-filled
|
|
53
|
+
|
|
54
|
+
Supports auto-detection for: JSON, JWT, UUID, Base64, URL-encoded text, timestamps, hex colors, and cron expressions.
|
|
55
|
+
|
|
56
|
+
## Configuration
|
|
57
|
+
|
|
58
|
+
DevDash stores user preferences in `~/.config/devdash/config.yaml`. Edit this file to customize:
|
|
59
|
+
|
|
60
|
+
```yaml
|
|
61
|
+
# Default hash algorithm: md5, sha256, sha512
|
|
62
|
+
default_hash_algorithm: sha256
|
|
63
|
+
|
|
64
|
+
# Timestamp format (Python strftime)
|
|
65
|
+
timestamp_format: "%Y-%m-%d %H:%M:%S"
|
|
66
|
+
|
|
67
|
+
# Password generator length
|
|
68
|
+
password_length: 16
|
|
69
|
+
|
|
70
|
+
# UUID version: v4, v7
|
|
71
|
+
uuid_version: v4
|
|
72
|
+
|
|
73
|
+
# Enable clipboard auto-detection
|
|
74
|
+
auto_clipboard_detection: true
|
|
75
|
+
|
|
76
|
+
# Watch clipboard for changes (experimental)
|
|
77
|
+
clipboard_watcher: false
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
The config file is created automatically on first run with sensible defaults.
|
|
81
|
+
|
|
82
|
+
## Installation
|
|
83
|
+
|
|
84
|
+
### From PyPI (Recommended)
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
pip install devdash
|
|
88
|
+
devdash
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### From Source
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
git clone https://github.com/devdash/devdash.git
|
|
95
|
+
cd devdash
|
|
96
|
+
pip install -e .
|
|
97
|
+
devdash
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
For development setup, see [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
101
|
+
|
|
102
|
+
## macOS Permissions
|
|
103
|
+
|
|
104
|
+
DevDash needs clipboard access to work. On first run, macOS will ask for permission:
|
|
105
|
+
|
|
106
|
+
> "DevDash" would like to access your clipboard.
|
|
107
|
+
|
|
108
|
+
Click **Allow** to enable clipboard auto-detection. You can revoke this later in System Preferences → Security & Privacy → Accessibility.
|
|
109
|
+
|
|
110
|
+
## Troubleshooting
|
|
111
|
+
|
|
112
|
+
**"command not found: devdash"**
|
|
113
|
+
- Ensure Python 3.10+ is installed: `python3 --version`
|
|
114
|
+
- Reinstall: `pip install --upgrade devdash`
|
|
115
|
+
|
|
116
|
+
**Menubar icon doesn't appear**
|
|
117
|
+
- Restart the app: press Ctrl+C to quit, then run `devdash` again
|
|
118
|
+
- Check that you have a menubar (not in fullscreen)
|
|
119
|
+
|
|
120
|
+
**Clipboard detection not working**
|
|
121
|
+
- Grant clipboard permission: System Preferences → Security & Privacy → Accessibility
|
|
122
|
+
- Enable in config: `auto_clipboard_detection: true`
|
|
123
|
+
|
|
124
|
+
## Contributing
|
|
125
|
+
|
|
126
|
+
Found a bug? Want a new tool? Head to [CONTRIBUTING.md](CONTRIBUTING.md) to get started.
|
|
127
|
+
|
|
128
|
+
Quick links:
|
|
129
|
+
- [Reporting bugs](CONTRIBUTING.md#reporting-bugs)
|
|
130
|
+
- [Suggesting features](CONTRIBUTING.md#suggesting-features)
|
|
131
|
+
- [Adding a new tool](docs/adding-tools.md)
|
|
132
|
+
- [Architecture overview](docs/architecture.md)
|
|
133
|
+
|
|
134
|
+
## Built With
|
|
135
|
+
|
|
136
|
+
- [rumps](https://github.com/jmorey/rumps) — Ridiculously Uncomplicated macOS Python Statusbar applications
|
|
137
|
+
- [pyperclip](https://github.com/asweigart/pyperclip) — Cross-platform clipboard support
|
|
138
|
+
- [PyJWT](https://pyjwt.readthedocs.io/) — JWT encoding and decoding
|
|
139
|
+
- [pyyaml](https://pyyaml.org/) — YAML configuration parsing
|
|
140
|
+
- [croniter](https://github.com/taichino/croniter) — Cron expression parsing
|
|
141
|
+
|
|
142
|
+
## Security
|
|
143
|
+
|
|
144
|
+
All data processing happens locally on your machine:
|
|
145
|
+
- Input is never sent to external services
|
|
146
|
+
- Clipboard content is not logged or stored
|
|
147
|
+
- No telemetry or analytics
|
|
148
|
+
|
|
149
|
+
See [LICENSE](LICENSE) for full details.
|
|
150
|
+
|
|
151
|
+
## License
|
|
152
|
+
|
|
153
|
+
MIT License © 2024 DevDash Contributors
|
|
154
|
+
|
|
155
|
+
See [LICENSE](LICENSE) for details.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "devdash-mac"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Open-source macOS menubar developer utilities"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = {text = "MIT"}
|
|
11
|
+
requires-python = ">=3.10"
|
|
12
|
+
authors = [{name = "DevDash Contributors"}]
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Development Status :: 4 - Beta",
|
|
15
|
+
"Environment :: MacOS X",
|
|
16
|
+
"Intended Audience :: Developers",
|
|
17
|
+
"License :: OSI Approved :: MIT License",
|
|
18
|
+
"Operating System :: MacOS",
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Programming Language :: Python :: 3.10",
|
|
21
|
+
"Programming Language :: Python :: 3.11",
|
|
22
|
+
"Programming Language :: Python :: 3.12",
|
|
23
|
+
"Programming Language :: Python :: 3.13",
|
|
24
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
25
|
+
"Topic :: Utilities",
|
|
26
|
+
]
|
|
27
|
+
dependencies = [
|
|
28
|
+
"rumps>=0.4.0",
|
|
29
|
+
"pyperclip>=1.8.0",
|
|
30
|
+
"PyJWT>=2.8.0",
|
|
31
|
+
"pyyaml>=6.0",
|
|
32
|
+
"croniter>=1.3.0",
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
[project.optional-dependencies]
|
|
36
|
+
dev = [
|
|
37
|
+
"pytest>=7.0",
|
|
38
|
+
"pytest-cov",
|
|
39
|
+
"ruff",
|
|
40
|
+
"mypy",
|
|
41
|
+
"pre-commit",
|
|
42
|
+
"build",
|
|
43
|
+
"twine",
|
|
44
|
+
]
|
|
45
|
+
|
|
46
|
+
[project.scripts]
|
|
47
|
+
devdash = "devdash.__main__:main"
|
|
48
|
+
|
|
49
|
+
[project.urls]
|
|
50
|
+
Homepage = "https://github.com/devdash/devdash"
|
|
51
|
+
Repository = "https://github.com/devdash/devdash"
|
|
52
|
+
Issues = "https://github.com/devdash/devdash/issues"
|
|
53
|
+
|
|
54
|
+
[tool.setuptools.packages.find]
|
|
55
|
+
where = ["src"]
|
|
56
|
+
|
|
57
|
+
[tool.ruff]
|
|
58
|
+
line-length = 100
|
|
59
|
+
target-version = "py310"
|
|
60
|
+
|
|
61
|
+
[tool.ruff.lint]
|
|
62
|
+
select = ["E", "F", "I", "N", "W", "UP"]
|
|
63
|
+
|
|
64
|
+
[tool.mypy]
|
|
65
|
+
python_version = "3.10"
|
|
66
|
+
strict = true
|
|
67
|
+
warn_return_any = true
|
|
68
|
+
warn_unused_configs = true
|
|
69
|
+
|
|
70
|
+
[tool.pytest.ini_options]
|
|
71
|
+
testpaths = ["tests"]
|
|
72
|
+
addopts = "--cov=src/devdash --cov-report=term-missing"
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"""Main DevDash application - macOS menubar app."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import rumps
|
|
6
|
+
|
|
7
|
+
from devdash import __app_name__, __version__, clipboard
|
|
8
|
+
from devdash.config import load_config
|
|
9
|
+
from devdash.plugin_loader import discover_tools
|
|
10
|
+
from devdash.tools.base import DevTool
|
|
11
|
+
from devdash.ui.notifications import notify
|
|
12
|
+
from devdash.ui.windows import show_tool_dialog
|
|
13
|
+
|
|
14
|
+
# Content type display names for notifications
|
|
15
|
+
_TYPE_NAMES: dict[clipboard.ContentType, str] = {
|
|
16
|
+
clipboard.ContentType.JSON: "JSON",
|
|
17
|
+
clipboard.ContentType.JWT: "JWT token",
|
|
18
|
+
clipboard.ContentType.UUID: "UUID",
|
|
19
|
+
clipboard.ContentType.BASE64: "Base64",
|
|
20
|
+
clipboard.ContentType.UNIX_TIMESTAMP: "Unix timestamp",
|
|
21
|
+
clipboard.ContentType.URL: "URL",
|
|
22
|
+
clipboard.ContentType.URL_ENCODED: "URL-encoded text",
|
|
23
|
+
clipboard.ContentType.HEX_COLOR: "HEX color",
|
|
24
|
+
clipboard.ContentType.CRON: "Cron expression",
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class DevDashApp(rumps.App):
|
|
29
|
+
"""macOS menubar developer utilities app."""
|
|
30
|
+
|
|
31
|
+
def __init__(self) -> None:
|
|
32
|
+
super().__init__(name=__app_name__, title="\U0001f527", quit_button=None)
|
|
33
|
+
self._tools: list[DevTool] = discover_tools()
|
|
34
|
+
self._last_clipboard: str = ""
|
|
35
|
+
self._build_menu()
|
|
36
|
+
# Start clipboard watcher if enabled in config
|
|
37
|
+
config = load_config()
|
|
38
|
+
if config.get("clipboard_watcher", False):
|
|
39
|
+
self._start_clipboard_watcher()
|
|
40
|
+
|
|
41
|
+
def _build_menu(self) -> None:
|
|
42
|
+
"""Build the menubar dropdown from discovered tools."""
|
|
43
|
+
menu_items: list[rumps.MenuItem | None] = []
|
|
44
|
+
|
|
45
|
+
# Auto-detect clipboard item
|
|
46
|
+
auto_detect = rumps.MenuItem("Clipboard: Auto-detect", callback=self._on_auto_detect)
|
|
47
|
+
menu_items.append(auto_detect)
|
|
48
|
+
menu_items.append(None) # separator
|
|
49
|
+
|
|
50
|
+
# Group tools by category
|
|
51
|
+
current_category = ""
|
|
52
|
+
for tool in self._tools:
|
|
53
|
+
if tool.category != current_category:
|
|
54
|
+
if current_category:
|
|
55
|
+
menu_items.append(None) # separator between categories
|
|
56
|
+
current_category = tool.category
|
|
57
|
+
item = rumps.MenuItem(tool.name, callback=self._make_tool_callback(tool))
|
|
58
|
+
menu_items.append(item)
|
|
59
|
+
|
|
60
|
+
menu_items.append(None) # separator
|
|
61
|
+
|
|
62
|
+
# About and Quit
|
|
63
|
+
about = rumps.MenuItem(f"About {__app_name__}", callback=self._on_about)
|
|
64
|
+
quit_item = rumps.MenuItem("Quit", callback=self._on_quit)
|
|
65
|
+
menu_items.append(about)
|
|
66
|
+
menu_items.append(quit_item)
|
|
67
|
+
|
|
68
|
+
self.menu = menu_items
|
|
69
|
+
|
|
70
|
+
def _make_tool_callback(self, tool: DevTool): # type: ignore[no-untyped-def]
|
|
71
|
+
"""Create a callback closure for a specific tool."""
|
|
72
|
+
|
|
73
|
+
def callback(_: rumps.MenuItem) -> None:
|
|
74
|
+
show_tool_dialog(tool)
|
|
75
|
+
|
|
76
|
+
return callback
|
|
77
|
+
|
|
78
|
+
def _on_auto_detect(self, _: rumps.MenuItem) -> None:
|
|
79
|
+
"""Read clipboard, detect content type, open matching tool."""
|
|
80
|
+
content = clipboard.read()
|
|
81
|
+
if not content.strip():
|
|
82
|
+
notify("DevDash", "Clipboard is empty")
|
|
83
|
+
return
|
|
84
|
+
|
|
85
|
+
detected = clipboard.detect_type(content)
|
|
86
|
+
# Find matching tool by keyword
|
|
87
|
+
keyword_map = {
|
|
88
|
+
clipboard.ContentType.JSON: "json",
|
|
89
|
+
clipboard.ContentType.JWT: "jwt",
|
|
90
|
+
clipboard.ContentType.UUID: "uuid",
|
|
91
|
+
clipboard.ContentType.BASE64: "base64",
|
|
92
|
+
clipboard.ContentType.UNIX_TIMESTAMP: "timestamp",
|
|
93
|
+
clipboard.ContentType.URL: "url",
|
|
94
|
+
clipboard.ContentType.URL_ENCODED: "url",
|
|
95
|
+
clipboard.ContentType.HEX_COLOR: "color",
|
|
96
|
+
clipboard.ContentType.CRON: "cron",
|
|
97
|
+
}
|
|
98
|
+
keyword = keyword_map.get(detected)
|
|
99
|
+
if keyword:
|
|
100
|
+
for tool in self._tools:
|
|
101
|
+
if tool.keyword == keyword:
|
|
102
|
+
show_tool_dialog(tool, input_text=content)
|
|
103
|
+
return
|
|
104
|
+
notify("DevDash", f"Detected: {detected.name}. No matching tool found.")
|
|
105
|
+
|
|
106
|
+
def _on_about(self, _: rumps.MenuItem) -> None:
|
|
107
|
+
"""Show about dialog."""
|
|
108
|
+
rumps.alert(
|
|
109
|
+
title=f"About {__app_name__}",
|
|
110
|
+
message=f"{__app_name__} v{__version__}\n\n"
|
|
111
|
+
"Open-source macOS menubar developer utilities.\n"
|
|
112
|
+
"https://github.com/devdash/devdash",
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
def _on_quit(self, _: rumps.MenuItem) -> None:
|
|
116
|
+
"""Quit the app."""
|
|
117
|
+
rumps.quit_application()
|
|
118
|
+
|
|
119
|
+
def _start_clipboard_watcher(self) -> None:
|
|
120
|
+
"""Start background clipboard polling (opt-in, privacy conscious)."""
|
|
121
|
+
|
|
122
|
+
@rumps.timer(2)
|
|
123
|
+
def _watch_clipboard(timer: rumps.Timer) -> None:
|
|
124
|
+
try:
|
|
125
|
+
content = clipboard.read()
|
|
126
|
+
if not content or content == self._last_clipboard:
|
|
127
|
+
return
|
|
128
|
+
self._last_clipboard = content
|
|
129
|
+
detected = clipboard.detect_type(content)
|
|
130
|
+
if detected != clipboard.ContentType.PLAIN_TEXT:
|
|
131
|
+
type_name = _TYPE_NAMES.get(detected, detected.name)
|
|
132
|
+
notify(
|
|
133
|
+
"DevDash",
|
|
134
|
+
f"Detected {type_name} in your clipboard. Click to process.",
|
|
135
|
+
)
|
|
136
|
+
except Exception:
|
|
137
|
+
pass # Never crash the watcher
|
|
138
|
+
|
|
139
|
+
_watch_clipboard.start() # type: ignore[attr-defined]
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
def main() -> None:
|
|
143
|
+
"""Entry point for the application."""
|
|
144
|
+
app = DevDashApp()
|
|
145
|
+
app.run()
|