Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OSUG
RESIF
resif_data_reporter
Commits
99f75761
Commit
99f75761
authored
Aug 10, 2020
by
Jonathan Schaeffer
Browse files
Bud and Validated archived differ in pattern
parent
356d7e89
Changes
1
Hide whitespace changes
Inline
Side-by-side
resifdatareporter/resifdatareporter.py
View file @
99f75761
...
...
@@ -5,6 +5,7 @@ import os
import
sys
import
io
import
subprocess
import
re
from
time
import
gmtime
,
strftime
from
datetime
import
datetime
,
date
,
timedelta
import
yaml
...
...
@@ -40,8 +41,12 @@ def scan_volume(path):
if
len
(
path
)
==
4
:
logger
.
debug
(
"path: %s, size: %s"
,
path
,
size
)
(
channel
,
quality
)
=
path
[
3
].
split
(
'.'
)
data
.
append
({
'year'
:
path
[
1
],
'network'
:
path
[
0
],
'station'
:
path
[
2
],
'channel'
:
channel
,
'quality'
:
quality
,
'size'
:
size
})
if
re
.
match
(
'[2-9][0-9]{3}'
,
path
[
0
]):
data
.
append
({
'year'
:
path
[
0
],
'network'
:
path
[
1
],
'station'
:
path
[
2
],
'channel'
:
channel
,
'quality'
:
quality
,
'size'
:
size
})
else
:
data
.
append
({
'year'
:
path
[
1
],
'network'
:
path
[
0
],
'station'
:
path
[
2
],
'channel'
:
channel
,
'quality'
:
quality
,
'size'
:
size
})
logger
.
debug
(
data
[
-
1
])
logger
.
debug
(
"Volume scanned in %s"
,
datetime
.
now
()
-
starttime
)
return
data
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment