juxt 1.2.0__tar.gz → 1.3.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.
- {juxt-1.2.0 → juxt-1.3.0}/PKG-INFO +35 -3
- {juxt-1.2.0 → juxt-1.3.0}/README.md +33 -1
- {juxt-1.2.0 → juxt-1.3.0}/juxt/__main__.py +75 -22
- {juxt-1.2.0 → juxt-1.3.0}/juxt/_version.py +2 -2
- juxt-1.3.0/juxt/complete.py +556 -0
- juxt-1.3.0/juxt/completion.bash +111 -0
- {juxt-1.2.0 → juxt-1.3.0}/juxt/detect.py +23 -17
- juxt-1.3.0/juxt/dialogs.py +401 -0
- juxt-1.3.0/juxt/settings.py +300 -0
- juxt-1.3.0/juxt/startup.py +286 -0
- {juxt-1.2.0 → juxt-1.3.0}/juxt/viewer.py +403 -135
- {juxt-1.2.0 → juxt-1.3.0}/pyproject.toml +1 -0
- juxt-1.2.0/juxt/settings.py +0 -136
- {juxt-1.2.0 → juxt-1.3.0}/.gitignore +0 -0
- {juxt-1.2.0 → juxt-1.3.0}/examples/sample_config.yaml +0 -0
- {juxt-1.2.0 → juxt-1.3.0}/juxt/__init__.py +0 -0
- {juxt-1.2.0 → juxt-1.3.0}/juxt/config.py +0 -0
- {juxt-1.2.0 → juxt-1.3.0}/juxt/loader.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: juxt
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.0
|
|
4
4
|
Summary: Fast desktop tool for navigating N-dimensional hypercubes of plots
|
|
5
5
|
Project-URL: Homepage, https://github.com/ColinMoldenhauer/juxt
|
|
6
6
|
Project-URL: Documentation, https://juxt.readthedocs.io
|
|
@@ -73,6 +73,8 @@ juxt config.yaml # explicit config file
|
|
|
73
73
|
|
|
74
74
|
For directory and remote-directory modes, filenames are split on separators (`_` and `/` by default) and any position with more than one distinct value becomes an axis. You'll be prompted to name the axes on first run; use `-a` to skip.
|
|
75
75
|
|
|
76
|
+
Run `juxt` with no argument and it opens a dialog instead: a **Browse** tab for picking a directory (auto-discover), and a **Build path** tab for typing a `{placeholder}` template by hand, with `Tab` completing real directories and files along the way.
|
|
77
|
+
|
|
76
78
|
## Config
|
|
77
79
|
|
|
78
80
|
### Auto-discover mode
|
|
@@ -152,6 +154,33 @@ Use `:mode tap|seek|pin` in the command bar to switch navigation modes.
|
|
|
152
154
|
|
|
153
155
|
Press `:` to open the command bar (vim-style). Tab-completion narrows candidates as you type.
|
|
154
156
|
|
|
157
|
+
Path arguments complete with `{placeholders}` in place: `:pattern plots/{sensor}/2⇥` lists what every sensor directory holds, so a template is built top-down instead of completing a concrete path and deleting the parts that should vary. `{` + `Tab` completes an existing axis name, and anonymous `{}` placeholders are numbered automatically.
|
|
158
|
+
|
|
159
|
+
## Shell completion
|
|
160
|
+
|
|
161
|
+
The same completion works at the shell prompt. Add one line to `~/.bashrc`:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
eval "$(juxt --bash-completion)"
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
zsh needs `bashcompinit` first:
|
|
168
|
+
|
|
169
|
+
```zsh
|
|
170
|
+
autoload -U bashcompinit && bashcompinit
|
|
171
|
+
eval "$(juxt --bash-completion)"
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Then `juxt plots/{sensor}/2⇥` completes at the prompt, as do the command-line options. ble.sh is handled as well, through its own hook. Reload the shell (`source ~/.bashrc`, or open a new terminal) for it to take effect.
|
|
175
|
+
|
|
176
|
+
Point `JUXT_COMPLETE` at `juxt-complete` if juxt lives in a virtualenv you do not activate:
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
export JUXT_COMPLETE=~/env/juxt/bin/juxt-complete
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Placeholders standing for a known kind of value complete only as far as that value: `plots/{date}⇥` stops at `plots/{date}_` rather than swallowing the rest of the filename. The names that count are the ones listed under `placeholders:` in `~/.juxt/settings.yaml`, which juxt seeds with `date datetime time year month day doy` — edit or delete them, and completion follows. Date-style shorthands such as `{yyyy-mm-dd}` are recognised on sight, with or without an entry.
|
|
183
|
+
|
|
155
184
|
| Command | Action |
|
|
156
185
|
|---|---|
|
|
157
186
|
| `:q` | quit |
|
|
@@ -162,6 +191,7 @@ Press `:` to open the command bar (vim-style). Tab-completion narrows candidates
|
|
|
162
191
|
| `:mode tap\|seek\|pin` | switch navigation mode |
|
|
163
192
|
| `:grid [AXIS]` | tile an axis into a grid of viewports |
|
|
164
193
|
| `:grid AXIS VAL …` | grid with a value subset |
|
|
194
|
+
| `:grid-dialog` | open the grid builder dialogue (`Ctrl+Shift+G`) |
|
|
165
195
|
| `:grid-layout NxM` | change grid layout without exiting |
|
|
166
196
|
| `:ungrid` | return to single-image view |
|
|
167
197
|
| `:grid-sharex` / `:grid-sharey` | toggle synchronized pan/zoom |
|
|
@@ -182,4 +212,6 @@ Press `:` to open the command bar (vim-style). Tab-completion narrows candidates
|
|
|
182
212
|
| Key | Action |
|
|
183
213
|
|---|---|
|
|
184
214
|
| `Enter` | toggle fullscreen |
|
|
185
|
-
| `Ctrl+H` | toggle status bar |
|
|
215
|
+
| `Ctrl+Shift+H` | toggle status bar |
|
|
216
|
+
| `Ctrl+Shift+I` | toggle info sidebar |
|
|
217
|
+
| `Ctrl+Shift+G` | open the grid builder dialogue |
|
|
@@ -40,6 +40,8 @@ juxt config.yaml # explicit config file
|
|
|
40
40
|
|
|
41
41
|
For directory and remote-directory modes, filenames are split on separators (`_` and `/` by default) and any position with more than one distinct value becomes an axis. You'll be prompted to name the axes on first run; use `-a` to skip.
|
|
42
42
|
|
|
43
|
+
Run `juxt` with no argument and it opens a dialog instead: a **Browse** tab for picking a directory (auto-discover), and a **Build path** tab for typing a `{placeholder}` template by hand, with `Tab` completing real directories and files along the way.
|
|
44
|
+
|
|
43
45
|
## Config
|
|
44
46
|
|
|
45
47
|
### Auto-discover mode
|
|
@@ -119,6 +121,33 @@ Use `:mode tap|seek|pin` in the command bar to switch navigation modes.
|
|
|
119
121
|
|
|
120
122
|
Press `:` to open the command bar (vim-style). Tab-completion narrows candidates as you type.
|
|
121
123
|
|
|
124
|
+
Path arguments complete with `{placeholders}` in place: `:pattern plots/{sensor}/2⇥` lists what every sensor directory holds, so a template is built top-down instead of completing a concrete path and deleting the parts that should vary. `{` + `Tab` completes an existing axis name, and anonymous `{}` placeholders are numbered automatically.
|
|
125
|
+
|
|
126
|
+
## Shell completion
|
|
127
|
+
|
|
128
|
+
The same completion works at the shell prompt. Add one line to `~/.bashrc`:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
eval "$(juxt --bash-completion)"
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
zsh needs `bashcompinit` first:
|
|
135
|
+
|
|
136
|
+
```zsh
|
|
137
|
+
autoload -U bashcompinit && bashcompinit
|
|
138
|
+
eval "$(juxt --bash-completion)"
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Then `juxt plots/{sensor}/2⇥` completes at the prompt, as do the command-line options. ble.sh is handled as well, through its own hook. Reload the shell (`source ~/.bashrc`, or open a new terminal) for it to take effect.
|
|
142
|
+
|
|
143
|
+
Point `JUXT_COMPLETE` at `juxt-complete` if juxt lives in a virtualenv you do not activate:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
export JUXT_COMPLETE=~/env/juxt/bin/juxt-complete
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Placeholders standing for a known kind of value complete only as far as that value: `plots/{date}⇥` stops at `plots/{date}_` rather than swallowing the rest of the filename. The names that count are the ones listed under `placeholders:` in `~/.juxt/settings.yaml`, which juxt seeds with `date datetime time year month day doy` — edit or delete them, and completion follows. Date-style shorthands such as `{yyyy-mm-dd}` are recognised on sight, with or without an entry.
|
|
150
|
+
|
|
122
151
|
| Command | Action |
|
|
123
152
|
|---|---|
|
|
124
153
|
| `:q` | quit |
|
|
@@ -129,6 +158,7 @@ Press `:` to open the command bar (vim-style). Tab-completion narrows candidates
|
|
|
129
158
|
| `:mode tap\|seek\|pin` | switch navigation mode |
|
|
130
159
|
| `:grid [AXIS]` | tile an axis into a grid of viewports |
|
|
131
160
|
| `:grid AXIS VAL …` | grid with a value subset |
|
|
161
|
+
| `:grid-dialog` | open the grid builder dialogue (`Ctrl+Shift+G`) |
|
|
132
162
|
| `:grid-layout NxM` | change grid layout without exiting |
|
|
133
163
|
| `:ungrid` | return to single-image view |
|
|
134
164
|
| `:grid-sharex` / `:grid-sharey` | toggle synchronized pan/zoom |
|
|
@@ -149,4 +179,6 @@ Press `:` to open the command bar (vim-style). Tab-completion narrows candidates
|
|
|
149
179
|
| Key | Action |
|
|
150
180
|
|---|---|
|
|
151
181
|
| `Enter` | toggle fullscreen |
|
|
152
|
-
| `Ctrl+H` | toggle status bar |
|
|
182
|
+
| `Ctrl+Shift+H` | toggle status bar |
|
|
183
|
+
| `Ctrl+Shift+I` | toggle info sidebar |
|
|
184
|
+
| `Ctrl+Shift+G` | open the grid builder dialogue |
|
|
@@ -7,10 +7,23 @@ import socket
|
|
|
7
7
|
import sys
|
|
8
8
|
from pathlib import Path
|
|
9
9
|
|
|
10
|
-
from
|
|
11
|
-
from
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
from .complete import SCRIPT_FLAGS, WORDS_FLAG, normalize_template
|
|
11
|
+
from .complete import main as _complete_main
|
|
12
|
+
|
|
13
|
+
# Shell completion runs on every Tab press, so answer it here — before Qt is
|
|
14
|
+
# imported — which also lets `juxt` itself back the completion when the
|
|
15
|
+
# standalone binary is all a user has installed.
|
|
16
|
+
if len(sys.argv) > 1 and sys.argv[1] in (*SCRIPT_FLAGS, WORDS_FLAG):
|
|
17
|
+
sys.exit(_complete_main(sys.argv[1:]))
|
|
18
|
+
|
|
19
|
+
from PySide6.QtCore import Qt, QSocketNotifier, QTimer # noqa: E402
|
|
20
|
+
from PySide6.QtGui import QCursor, QIcon # noqa: E402
|
|
21
|
+
from PySide6.QtWidgets import ( # noqa: E402
|
|
22
|
+
QApplication,
|
|
23
|
+
QInputDialog,
|
|
24
|
+
QLineEdit,
|
|
25
|
+
QProgressDialog,
|
|
26
|
+
)
|
|
14
27
|
from .config import Config, _auto_keys, dump_config, load_config
|
|
15
28
|
from .detect import (
|
|
16
29
|
_axes_from_local_template,
|
|
@@ -24,6 +37,7 @@ from .detect import (
|
|
|
24
37
|
)
|
|
25
38
|
from .loader import preload, preload_remote
|
|
26
39
|
from .settings import load_settings
|
|
40
|
+
from .startup import StartupDialog
|
|
27
41
|
from .viewer import MainWindow
|
|
28
42
|
|
|
29
43
|
log = logging.getLogger(__name__)
|
|
@@ -97,11 +111,37 @@ def _print_help() -> None:
|
|
|
97
111
|
"",
|
|
98
112
|
"keys (all modes)",
|
|
99
113
|
None, # horizontal rule
|
|
100
|
-
"↑ ↓ ← →
|
|
101
|
-
"Space
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
"
|
|
114
|
+
"↑ ↓ ← → navigate axes",
|
|
115
|
+
"Space toggle between two positions",
|
|
116
|
+
"Home / End first / last value on active axis",
|
|
117
|
+
"1–9 jump to Nth value on active axis",
|
|
118
|
+
"Enter toggle fullscreen",
|
|
119
|
+
"Escape exit fullscreen / cancel",
|
|
120
|
+
": command mode (:fit :zoom N :q)",
|
|
121
|
+
"Ctrl+C cancel command / value picker",
|
|
122
|
+
"Ctrl+Shift+H toggle status bar",
|
|
123
|
+
"Ctrl+Shift+I toggle info sidebar",
|
|
124
|
+
"Ctrl+Shift+G open the grid builder",
|
|
125
|
+
"",
|
|
126
|
+
"view controls",
|
|
127
|
+
None, # horizontal rule
|
|
128
|
+
"0 reset zoom to 100%",
|
|
129
|
+
"double-click fit image to window",
|
|
130
|
+
"drag pan the image",
|
|
131
|
+
"wheel step the ←/→ axis",
|
|
132
|
+
"Shift+wheel step the ↑/↓ axis",
|
|
133
|
+
"Ctrl+wheel zoom under the cursor",
|
|
134
|
+
"",
|
|
135
|
+
"mode keys",
|
|
136
|
+
None, # horizontal rule
|
|
137
|
+
"tap letter +1 on that axis (Letter = −1)",
|
|
138
|
+
" Ctrl+letter open value picker",
|
|
139
|
+
"seek letter incremental axis → value search",
|
|
140
|
+
"pin letter focus axis, then use arrows",
|
|
141
|
+
" Ctrl+letter open value picker",
|
|
142
|
+
"",
|
|
143
|
+
"Key bindings are configurable in",
|
|
144
|
+
"~/.juxt/settings.yaml (also via :settings).",
|
|
105
145
|
"",
|
|
106
146
|
]
|
|
107
147
|
pad = 2
|
|
@@ -123,10 +163,11 @@ def _print_help() -> None:
|
|
|
123
163
|
PATH accepts several forms (auto-detected):
|
|
124
164
|
/path/to/dir scan directory, detect axes from filenames
|
|
125
165
|
plots/{sensor}_{date}.png local template with explicit placeholders
|
|
166
|
+
plots/{}/{}.png anonymous placeholders, named axis_1, axis_2, …
|
|
126
167
|
host:/path/to/dir remote directory over SSH (requires juxt[ssh])
|
|
127
168
|
host:/path/{sensor}.png remote template over SSH (requires juxt[ssh])
|
|
128
169
|
config.yaml explicit YAML config file
|
|
129
|
-
(default: opens a directory
|
|
170
|
+
(default: opens a dialog to browse a directory or build a template)
|
|
130
171
|
|
|
131
172
|
-s, --separator SEP [...] separator(s) for auto-detection
|
|
132
173
|
-a, --auto skip axis naming prompt
|
|
@@ -141,16 +182,26 @@ def _print_help() -> None:
|
|
|
141
182
|
|
|
142
183
|
grid view
|
|
143
184
|
--grid AXIS enter grid view for AXIS on startup
|
|
185
|
+
(or build one in the UI with Ctrl+Shift+G)
|
|
144
186
|
--grid-values VAL ... show only these values in the grid (requires --grid)
|
|
145
187
|
--grid-layout NxM explicit grid layout, e.g. 2x3 (requires --grid)
|
|
146
188
|
--no-sharex disable synchronized horizontal pan/zoom in grid view
|
|
147
189
|
--no-sharey disable synchronized vertical pan/zoom in grid view
|
|
148
190
|
-h, --help show this message and exit
|
|
149
191
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
192
|
+
shell completion (bash / zsh)
|
|
193
|
+
eval "$(juxt --bash-completion)" complete options and {placeholder} paths
|
|
194
|
+
|
|
195
|
+
commands (press : in the viewer, Tab completes)
|
|
196
|
+
:fit :fit-width :fit-height :zoom N :fullscreen
|
|
197
|
+
:grid AXIS [VALUES|NxM] :grid-dialog :grid-layout NxM :ungrid
|
|
198
|
+
:grid-sharex on|off :grid-sharey on|off
|
|
199
|
+
:axis-h NAME :axis-v NAME :axis-auto :swap-axes
|
|
200
|
+
:mode tap|seek|pin :switch-last :info
|
|
201
|
+
:pattern PATH :reload :watch true|false
|
|
202
|
+
:remove-axis NAME :remove-value AXIS VALUE
|
|
203
|
+
:change-key AXIS LETTER :settings
|
|
204
|
+
:copy-image :copy-path :write [PATH] :quit""")
|
|
154
205
|
|
|
155
206
|
|
|
156
207
|
class _HelpAction(argparse.Action):
|
|
@@ -243,20 +294,17 @@ def main():
|
|
|
243
294
|
return _pw_cache[0]
|
|
244
295
|
|
|
245
296
|
if args.path is None:
|
|
246
|
-
dlg =
|
|
247
|
-
dlg.
|
|
248
|
-
|
|
249
|
-
dlg.setOption(QFileDialog.Option.DontUseNativeDialog, True)
|
|
250
|
-
if not app_icon.isNull():
|
|
251
|
-
dlg.setWindowIcon(app_icon)
|
|
297
|
+
dlg = StartupDialog(str(Path.home()), app_icon=app_icon)
|
|
298
|
+
QTimer.singleShot(0, lambda: dlg.move(
|
|
299
|
+
_startup_screen.geometry().center() - dlg.rect().center()))
|
|
252
300
|
QTimer.singleShot(0, lambda: _force_focus(dlg))
|
|
253
|
-
chosen = dlg.
|
|
301
|
+
chosen = dlg.chosen_path() if dlg.exec() else ""
|
|
254
302
|
if not chosen:
|
|
255
303
|
sys.exit(0)
|
|
256
304
|
args.path = chosen
|
|
257
305
|
|
|
258
306
|
try:
|
|
259
|
-
raw = args.path
|
|
307
|
+
raw = normalize_template(args.path) # anonymous {} → {axis_1}, {axis_2}, …
|
|
260
308
|
if _is_remote_pattern(raw):
|
|
261
309
|
remote_cfg, remote_tmpl = _parse_remote_pattern(raw)
|
|
262
310
|
if '{' in remote_tmpl:
|
|
@@ -394,6 +442,9 @@ def main():
|
|
|
394
442
|
if not m:
|
|
395
443
|
print(f"Warning: --grid-layout {args.grid_layout!r} is not a valid NxM layout, ignoring",
|
|
396
444
|
file=sys.stderr)
|
|
445
|
+
elif int(m.group(1)) < 1 or int(m.group(2)) < 1:
|
|
446
|
+
print(f"Warning: --grid-layout {args.grid_layout!r} needs rows and cols >= 1, ignoring",
|
|
447
|
+
file=sys.stderr)
|
|
397
448
|
else:
|
|
398
449
|
grid_layout = (int(m.group(1)), int(m.group(2)))
|
|
399
450
|
|
|
@@ -418,6 +469,8 @@ def main():
|
|
|
418
469
|
session_name=args.name,
|
|
419
470
|
seek_greedy=settings.seek_greedy,
|
|
420
471
|
keybindings=settings.keybindings,
|
|
472
|
+
highlight=settings.highlight,
|
|
473
|
+
highlight_candidates=settings.highlight_candidates,
|
|
421
474
|
grid=args.grid,
|
|
422
475
|
grid_values=args.grid_values,
|
|
423
476
|
grid_layout=grid_layout,
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '1.
|
|
22
|
-
__version_tuple__ = version_tuple = (1,
|
|
21
|
+
__version__ = version = '1.3.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (1, 3, 0)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|