Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kiosk
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
don
kiosk
Commits
e8cdd6a0
Commit
e8cdd6a0
authored
6 years ago
by
don
Browse files
Options
Downloads
Patches
Plain Diff
Took out a lot of debug printing
parent
46ac3dae
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bin/run
+2
-17
2 additions, 17 deletions
bin/run
slides/background.png
+0
-0
0 additions, 0 deletions
slides/background.png
with
2 additions
and
17 deletions
bin/run
+
2
−
17
View file @
e8cdd6a0
...
...
@@ -113,7 +113,6 @@ def writescript(scriptpath, content):
def
processfile
(
f
):
global
videolist
print
(
'
processfile start
'
,
f
)
filepath
=
os
.
path
.
join
(
contentbase
,
f
)
sb
=
os
.
stat
(
filepath
)
filetype
=
ms
.
file
(
filepath
)
...
...
@@ -125,7 +124,6 @@ def processfile(f):
thisstatus
=
filestatus
[
f
]
if
(
thisstatus
[
'
s
'
]
==
sb
.
st_size
)
and
(
thisstatus
[
'
m
'
]
==
sb
.
st_mtime
)
and
(
thisstatus
[
'
t
'
]
==
filetype
):
# exact match, do not need to process this file
print
(
'
exact
'
,
f
)
# See if it is video or slides
if
thisstatus
[
'
v
'
]:
# Mark this video to get played
...
...
@@ -137,14 +135,12 @@ def processfile(f):
return
else
:
# something has changed
print
(
'
changed
'
,
f
)
filestatus
[
f
][
'
s
'
]
=
sb
.
st_size
filestatus
[
f
][
'
m
'
]
=
sb
.
st_mtime
filestatus
[
f
][
'
t
'
]
=
filetype
filestatus
[
f
][
'
v
'
]
=
False
else
:
# new file, no status record yet, so make one
print
(
'
new
'
,
f
)
filestatus
[
f
]
=
{}
filestatus
[
f
][
'
s
'
]
=
sb
.
st_size
filestatus
[
f
][
'
m
'
]
=
sb
.
st_mtime
...
...
@@ -168,7 +164,6 @@ def processfile(f):
if
direct
:
# files that can be displayed directly just need to be copied into place
print
(
'
direct
'
,
filepath
)
tmpcopy
(
f
)
subprocess
.
call
([
'
/bin/cp
'
,
'
-p
'
,
'
-f
'
,
filepath
,
destpath
])
keepslides
[
f
]
=
True
...
...
@@ -187,15 +182,12 @@ def processfile(f):
elif
video
:
videolist
+=
[
f
]
else
:
print
(
'
unknown
'
,
filepath
)
print
(
filetype
)
print
(
f
,
filetype
,
direct
,
video
)
print
(
'
unknown
'
,
filepath
,
filetype
)
filelist
=
tmpmove
(
direct
)
filestatus
[
f
][
'
f
'
]
=
filelist
for
i
in
filelist
:
keepslides
[
i
]
=
True
filestatus
[
f
][
'
v
'
]
=
video
print
(
'
processfile done
'
,
f
)
# end of functions, main program starts here
...
...
@@ -235,9 +227,6 @@ for confline in confdata[1:]:
slide_rate
=
setparam
(
'
slide_rate
'
)
check_time
=
setparam
(
'
check_time
'
)
print
(
'
slide_rate
'
,
slide_rate
)
print
(
'
check_time
'
,
check_time
)
# Examine and process all content files
contentfiles
=
os
.
listdir
(
contentbase
)
contentfiles
.
sort
()
...
...
@@ -260,8 +249,6 @@ writescript(loopfile, loopscript)
waitscript
=
waittemplate
%
check_time
writescript
(
waitfile
,
waitscript
)
print
(
'
keepslides
'
,
keepslides
)
# final cleanup, delete obsolete slides
# Get list of slide files
files
=
os
.
listdir
(
slidebase
)
...
...
@@ -270,7 +257,6 @@ for f in files:
if
f
not
in
keepslides
:
try
:
os
.
unlink
(
os
.
path
.
join
(
slidebase
,
f
))
print
(
'
unlink slide
'
,
f
)
except
:
pass
...
...
@@ -282,7 +268,6 @@ for s in filestatus.keys():
for
s
in
deletekeys
:
del
filestatus
[
s
]
print
(
'
delete status
'
,
s
)
# Write new status file
stf
=
open
(
statusfile
,
'
wb
'
)
...
...
@@ -291,7 +276,7 @@ stf.close()
# If requested, upload rendered slides for verification
try
:
updst
=
remote
+
parmeters
[
'
verify_folder
'
]
updst
=
remote
+
par
a
meters
[
'
verify_folder
'
]
doupload
=
rclonebase
+
[
slidebase
,
updst
]
subprocess
.
call
(
doupload
)
except
:
...
...
This diff is collapsed.
Click to expand it.
slides/background.png
0 → 100644
+
0
−
0
View file @
e8cdd6a0
5.96 KiB
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