Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LarvaTagger.jl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nyx
LarvaTagger.jl
Commits
6c282b07
Commit
6c282b07
authored
1 month ago
by
François LAURENT
Browse files
Options
Downloads
Patches
Plain Diff
fix
#316
parent
c7d503cf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!25
Set of commits to be tagged v0.20.1
Pipeline
#154857
passed
1 month ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/files.jl
+21
-0
21 additions, 0 deletions
src/files.jl
src/larvatagger.js
+1
-0
1 addition, 0 deletions
src/larvatagger.js
with
22 additions
and
0 deletions
src/files.jl
+
21
−
0
View file @
6c282b07
...
...
@@ -249,6 +249,22 @@ end
getoutput
(
controller
)
=
gethub
(
controller
)[
:
output
]
function
valid_filename
(
name
)
# adapted from NyxUI.jl (MIT license, same author)
windows_extra
=
"|:*?<>"
for
c
in
"./
\\
'
\"
`"
*
windows_extra
if
c
in
name
return
false
end
end
for
nonprintable
in
0x0
:
0x31
if
nonprintable
in
name
return
false
end
end
return
true
end
interpolate
(
s
=
"yyyymmdd_HHMMSS"
)
=
Dates
.
format
(
Dates
.
now
(),
s
)
function
savetofile
(
controller
,
file
;
datafile
=
nothing
,
merge
=
false
)
...
...
@@ -474,6 +490,11 @@ function getoutputfile(controller)
dir
=
cwd
(
controller
)
if
isnothing
(
file
)
outputfile
.
name
.
val
=
"{yyyymmdd_HHMMSS}.label"
elseif
!
valid_filename
(
file
)
@warn
"Invalid filename; saving to date_time format instead"
file
file
=
"{yyyymmdd_HHMMSS}.label"
savetofile
(
hub
,
file
)
reset!
(
outputfile
)
elseif
isfile
(
joinpath
(
dir
,
file
))
twooptiondialog
(
hub
,
outputfile
.
merge
,
"File already exists"
,
...
...
This diff is collapsed.
Click to expand it.
src/larvatagger.js
+
1
−
0
View file @
6c282b07
...
...
@@ -118,6 +118,7 @@ const LarvaTagger = (function () {
return
false
;
}
// TODO: validate filepath similarly to valid_filename in files.jl
function
setOutputFilename
(
obs
)
{
var
defaultfilepath
=
obs
.
value
;
if
(
defaultfilepath
===
null
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment