sageroad 1.0.2__tar.gz → 1.0.3__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.
- {sageroad-1.0.2/src/sageroad.egg-info → sageroad-1.0.3}/PKG-INFO +4 -3
- {sageroad-1.0.2 → sageroad-1.0.3}/PYPI.md +3 -2
- {sageroad-1.0.2 → sageroad-1.0.3}/README.md +2 -2
- {sageroad-1.0.2 → sageroad-1.0.3}/pyproject.toml +1 -1
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/lib/homePage.js +13 -4
- {sageroad-1.0.2 → sageroad-1.0.3/src/sageroad.egg-info}/PKG-INFO +4 -3
- {sageroad-1.0.2 → sageroad-1.0.3}/LICENSE +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/setup.cfg +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/__init__.py +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/__main__.py +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/app.py +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/main.py +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/app.css +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/index.html +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/lib/app.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/lib/args.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/lib/canvas.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/lib/doc.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/lib/draw.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/lib/explore.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/lib/form.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/lib/format.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/lib/geo.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/lib/mapPage.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/lib/markdown.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/lib/model.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/lib/models.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/lib/modelsPage.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/lib/planData.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/lib/planView.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/lib/report.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/lib/schemaDoc.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/lib/smoothing.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/lib/tables.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/lib/view3d.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/lib/viewPages.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/plan/lib/auto.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/plan/lib/browser/buffer.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/plan/lib/browser/io.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/plan/lib/browser/zlib.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/plan/lib/design.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/plan/lib/draft.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/plan/lib/draws.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/plan/lib/elevationImage.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/plan/lib/engineer.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/plan/lib/features.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/plan/lib/numeric.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/plan/lib/ollama.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/plan/lib/planFile.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/plan/lib/plot.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/plan/lib/png.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/plan/lib/profile.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/plan/lib/roads.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/plan/lib/route.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/plan/lib/siteCommand.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/plan/lib/structures.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/plan/lib/terrain.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/plan/lib/usgs.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/sageroad.svg +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/schema-markdown/lib/parser.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/schema-markdown/lib/schema.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/schema-markdown/lib/schemaUtil.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad/static/schema-markdown/lib/typeModel.js +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad.egg-info/SOURCES.txt +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad.egg-info/dependency_links.txt +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad.egg-info/entry_points.txt +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad.egg-info/requires.txt +0 -0
- {sageroad-1.0.2 → sageroad-1.0.3}/src/sageroad.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sageroad
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.3
|
|
4
4
|
Summary: SageRoad engineers low-volume roads on USGS lidar terrain and views the resulting road plans
|
|
5
5
|
Author: Craig A. Hobbs
|
|
6
6
|
License-Expression: MIT
|
|
@@ -129,8 +129,9 @@ criteria, and marks), and what can be done with it:
|
|
|
129
129
|
Options** clears them - the plan keeps its site's data.
|
|
130
130
|
- **Save** the plan to its file - the file it was opened from, or saved to - or **Save As** another,
|
|
131
131
|
to duplicate it (and run it with another config, say). In a browser that can't write to a file
|
|
132
|
-
(Firefox and Safari),
|
|
133
|
-
and its map image, so it's one file - and a plan without road options is its
|
|
132
|
+
(Firefox and Safari), it's **Download** - the plan's file is downloaded. A plan with road options
|
|
133
|
+
keeps its config and its map image, so it's one file - and a plan without road options is its
|
|
134
|
+
config's file.
|
|
134
135
|
- **Close** it - if it has changes that aren't saved, you're asked first.
|
|
135
136
|
- **Ollama Models** - Ollama's models on this computer: whether each reads images, its parameters,
|
|
136
137
|
size, and modified date. **Delete** a model, or **Update** it (download it again), and see a
|
|
@@ -104,8 +104,9 @@ criteria, and marks), and what can be done with it:
|
|
|
104
104
|
Options** clears them - the plan keeps its site's data.
|
|
105
105
|
- **Save** the plan to its file - the file it was opened from, or saved to - or **Save As** another,
|
|
106
106
|
to duplicate it (and run it with another config, say). In a browser that can't write to a file
|
|
107
|
-
(Firefox and Safari),
|
|
108
|
-
and its map image, so it's one file - and a plan without road options is its
|
|
107
|
+
(Firefox and Safari), it's **Download** - the plan's file is downloaded. A plan with road options
|
|
108
|
+
keeps its config and its map image, so it's one file - and a plan without road options is its
|
|
109
|
+
config's file.
|
|
109
110
|
- **Close** it - if it has changes that aren't saved, you're asked first.
|
|
110
111
|
- **Ollama Models** - Ollama's models on this computer: whether each reads images, its parameters,
|
|
111
112
|
size, and modified date. **Delete** a model, or **Update** it (download it again), and see a
|
|
@@ -61,8 +61,8 @@ once it's run), run it (its steps - the planning tools' `autoSteps` - and its ti
|
|
|
61
61
|
report when it's done; it's stopped with an abort signal, when its current step's work is done, and its work is
|
|
62
62
|
thrown away; the last model chosen is remembered; a plan's site's data is kept, unless the site changed or it's
|
|
63
63
|
fetched again), clear its road options (its site's data is kept), save it (to its file, or another - the browser's
|
|
64
|
-
save dialog, or a download), and close it (the user is asked first, if it has
|
|
65
|
-
road options is one file: it keeps its config and its map image (a data URL). The recent files are listed - a file is
|
|
64
|
+
save dialog, or a download - "Download", in a browser without one), and close it (the user is asked first, if it has
|
|
65
|
+
changes that aren't saved). A plan with road options is one file: it keeps its config and its map image (a data URL). The recent files are listed - a file is
|
|
66
66
|
opened, or removed (but for the loaded plan's road options' file).
|
|
67
67
|
|
|
68
68
|
The engineering isn't the back end's: a plan is run in the browser, by the planning tools' procedure (`autoPlan`,
|
|
@@ -19,6 +19,12 @@ export function titleFileName(title) {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
|
|
22
|
+
// Whether the browser has a save dialog that writes to a file (the File System Access API's - Chromium's)
|
|
23
|
+
function hasSaveDialog(window) {
|
|
24
|
+
return typeof window.showSaveFilePicker === 'function';
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
22
28
|
// The plan config's design criteria's and cost rates' text - each member's words, and its value
|
|
23
29
|
function memberText(members) {
|
|
24
30
|
return Object.entries(members).map(([name, value]) => `${memberWords(name)} ${value}`).join(', ');
|
|
@@ -137,7 +143,8 @@ export class HomePage {
|
|
|
137
143
|
return;
|
|
138
144
|
}
|
|
139
145
|
|
|
140
|
-
// The plan's title, its file, and its actions - its road options are viewed with "View Plan", in a new tab
|
|
146
|
+
// The plan's title, its file, and its actions - its road options are viewed with "View Plan", in a new tab, and
|
|
147
|
+
// a browser without a save dialog (Firefox and Safari) downloads the plan ("Download" - save and save as are the same)
|
|
141
148
|
const button = (id, text, isDisabled = false) => (
|
|
142
149
|
`<button type="button" id="${id}" class="sageroad-button"${isDisabled ? ' disabled' : ''}>${escapeHtml(text)}</button>`
|
|
143
150
|
);
|
|
@@ -152,7 +159,8 @@ export class HomePage {
|
|
|
152
159
|
'<p class="sageroad-actions">' +
|
|
153
160
|
`${viewHtml}${button('sageroad-edit', 'Edit Plan', site === null)}` +
|
|
154
161
|
`${button('sageroad-map', 'Edit Map', site === null || !('georeference' in (value ?? {})))}` +
|
|
155
|
-
`${button('sageroad-save', 'Save')}${button('sageroad-save-as', 'Save As…')}
|
|
162
|
+
`${hasSaveDialog(app.window) ? `${button('sageroad-save', 'Save')}${button('sageroad-save-as', 'Save As…')}` :
|
|
163
|
+
button('sageroad-save', 'Download')}${button('sageroad-close', 'Close')}</p>`,
|
|
156
164
|
'<p id="sageroad-save-status"></p>'
|
|
157
165
|
];
|
|
158
166
|
if (value === null) {
|
|
@@ -439,7 +447,7 @@ export class HomePage {
|
|
|
439
447
|
let name = loaded.name ?? titleFileName(loaded.site.title);
|
|
440
448
|
try {
|
|
441
449
|
let handle = isSaveAs ? null : app.fileHandle;
|
|
442
|
-
if (handle === null &&
|
|
450
|
+
if (handle === null && hasSaveDialog(window)) {
|
|
443
451
|
handle = await window.showSaveFilePicker({
|
|
444
452
|
'suggestedName': name, 'types': [{'description': 'SageRoad plan', 'accept': {'application/json': ['.json']}}]
|
|
445
453
|
});
|
|
@@ -474,7 +482,8 @@ export class HomePage {
|
|
|
474
482
|
app.setLoaded({...loaded, name, file, 'saved': true});
|
|
475
483
|
if (!this.closed) {
|
|
476
484
|
await this.renderLoaded();
|
|
477
|
-
|
|
485
|
+
const verb = hasSaveDialog(window) ? 'Saved' : 'Downloaded';
|
|
486
|
+
document.getElementById('sageroad-save-status').textContent = `${verb} the plan, "${name}".`;
|
|
478
487
|
await this.renderRecent();
|
|
479
488
|
}
|
|
480
489
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sageroad
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.3
|
|
4
4
|
Summary: SageRoad engineers low-volume roads on USGS lidar terrain and views the resulting road plans
|
|
5
5
|
Author: Craig A. Hobbs
|
|
6
6
|
License-Expression: MIT
|
|
@@ -129,8 +129,9 @@ criteria, and marks), and what can be done with it:
|
|
|
129
129
|
Options** clears them - the plan keeps its site's data.
|
|
130
130
|
- **Save** the plan to its file - the file it was opened from, or saved to - or **Save As** another,
|
|
131
131
|
to duplicate it (and run it with another config, say). In a browser that can't write to a file
|
|
132
|
-
(Firefox and Safari),
|
|
133
|
-
and its map image, so it's one file - and a plan without road options is its
|
|
132
|
+
(Firefox and Safari), it's **Download** - the plan's file is downloaded. A plan with road options
|
|
133
|
+
keeps its config and its map image, so it's one file - and a plan without road options is its
|
|
134
|
+
config's file.
|
|
134
135
|
- **Close** it - if it has changes that aren't saved, you're asked first.
|
|
135
136
|
- **Ollama Models** - Ollama's models on this computer: whether each reads images, its parameters,
|
|
136
137
|
size, and modified date. **Delete** a model, or **Update** it (download it again), and see a
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|