barebones

This commit is contained in:
Elizabeth Cray 2024-05-02 22:44:45 -04:00
commit d3eecbb0e6
7 changed files with 193 additions and 0 deletions

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
dist/
build/
node_modules/
console.err
console.out

5
README.md Normal file
View File

@ -0,0 +1,5 @@
# CyberViewX5 Companion
This really wasn't made to be usable by anyone except myself, but I might update it in the future.
This is a tool to track how long each frame of film takes to scan so I can run analytics afterwards.

57
index.py Normal file
View File

@ -0,0 +1,57 @@
import sys
import win32gui
import time
def callback(hwnd, strings):
if win32gui.IsWindowVisible(hwnd):
window_title = win32gui.GetWindowText(hwnd)
left, top, right, bottom = win32gui.GetWindowRect(hwnd)
if window_title and right-left and bottom-top:
strings.append(window_title)
return True
log_file = open("C:\\Users\\liz\\Documents\\Git\\filmscantimer\\scan_log.csv", "a")
def log(msg):
log_file.write(msg + "\n")
def done():
log_file.close()
sys.exit(0)
def main():
state = False
launchTime = time.time()
window = 120.0 # It has two minutes to launch
while not state:
win_list = []
win32gui.EnumWindows(callback, win_list)
if win_list.count("CyberViewX5") > 0:
state = True
else:
time.sleep(0.5)
if time.time() - launchTime > window:
done()
state = False
while True:
win_list = [] # list of strings containing win handles and window titles
win32gui.EnumWindows(callback, win_list) # populate list
if win_list.count("CyberViewX5") > 1:
if not state:
print("START," + str(time.time()))
state = True
elif win_list.count("CyberViewX5") == 1:
if state:
print("END," + str(time.time()))
state = False
else:
# CyberViewX5 closed
print("CyberViewX5 Not Running")
done()
time.sleep(0.01)
done()
if __name__ == '__main__':
main()

38
index.spec Normal file
View File

@ -0,0 +1,38 @@
# -*- mode: python ; coding: utf-8 -*-
a = Analysis(
['index.py'],
pathex=[],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name='index',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)

3
run.ps1 Normal file
View File

@ -0,0 +1,3 @@
Start-Process -FilePath "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\CyberViewX.lnk"
Start-Sleep -Milliseconds 3000
Start-Process -FilePath "C:\Users\Liz\.pyenv\pyenv-win\versions\3.10.11\python3.exe" -ArgumentList 'C:\Users\Liz\Documents\Git\filmscantimer\index.py' -Wait

BIN
run.ps1 - Shortcut.lnk Normal file

Binary file not shown.

85
scan_log.csv Normal file
View File

@ -0,0 +1,85 @@
ACTION,TIMESTAMP
START,1714671981.681007
END,1714672081.9560761
START,1714672281.681823
END,1714672472.9604802
START,1714672481.231264
END,1714672675.256915
START,1714672687.4683855
END,1714672890.5915043
START,1714672907.7280502
END,1714673098.4014394
START,1714673107.5587103
END,1714673300.1613328
START,1714679387.335423
END,1714679656.7147973
START,1714679676.898519
END,1714679875.406228
START,1714680190.1102633
END,1714680386.4101868
START,1714680424.206592
END,1714680622.9295104
START,1714680639.226426
END,1714680830.2757254
START,1714680835.032656
END,1714681027.0559857
START,1714681046.7317646
END,1714681239.8537474
START,1714681266.0327773
END,1714681459.9294858
START,1714682025.6242187
END,1714682221.479338
START,1714682997.7753234
END,1714683245.02265
START,1714683249.7641852
END,1714683502.1769078
START,1714683502.9376805
END,1714683764.951064
START,1714683813.6963525
END,1714684049.0541506
START,1714684066.3504825
END,1714684327.0773475
START,1714684353.2826965
END,1714684586.778165
START,1714684840.0408244
END,1714685077.0288386
START,1714685404.6945825
END,1714685641.9328074
START,1714685730.607431
END,1714685977.6495645
START,1714686012.8087292
END,1714686245.3187919
START,1714686308.0208383
END,1714686538.8999248
START,1714686700.0502682
END,1714686929.3896363
START,1714686941.567573
END,1714687182.5082612
START,1714687186.658023
END,1714687422.0111208
START,1714687546.6520996
END,1714687779.508072
START,1714687781.169326
END,1714688065.7297397
START,1714688112.6133792
END,1714688351.9008133
START,1714688610.090224
END,1714688844.354024
START,1714688848.0215528
END,1714689073.2049983
START,1714689109.9789798
END,1714689336.7776277
START,1714689362.462249
END,1714689589.9356983
START,1714689616.0727196
END,1714689846.7305298
START,1714689847.8862386
END,1714690078.8723495
START,1714690136.1198533
END,1714690371.7041185
START,1714690400.8575451
END,1714690623.6396954
START,1714690919.3011584
END,1714691155.7371678
START,1714691175.381525
END,1714691411.826881
1 ACTION TIMESTAMP
2 START 1714671981.681007
3 END 1714672081.9560761
4 START 1714672281.681823
5 END 1714672472.9604802
6 START 1714672481.231264
7 END 1714672675.256915
8 START 1714672687.4683855
9 END 1714672890.5915043
10 START 1714672907.7280502
11 END 1714673098.4014394
12 START 1714673107.5587103
13 END 1714673300.1613328
14 START 1714679387.335423
15 END 1714679656.7147973
16 START 1714679676.898519
17 END 1714679875.406228
18 START 1714680190.1102633
19 END 1714680386.4101868
20 START 1714680424.206592
21 END 1714680622.9295104
22 START 1714680639.226426
23 END 1714680830.2757254
24 START 1714680835.032656
25 END 1714681027.0559857
26 START 1714681046.7317646
27 END 1714681239.8537474
28 START 1714681266.0327773
29 END 1714681459.9294858
30 START 1714682025.6242187
31 END 1714682221.479338
32 START 1714682997.7753234
33 END 1714683245.02265
34 START 1714683249.7641852
35 END 1714683502.1769078
36 START 1714683502.9376805
37 END 1714683764.951064
38 START 1714683813.6963525
39 END 1714684049.0541506
40 START 1714684066.3504825
41 END 1714684327.0773475
42 START 1714684353.2826965
43 END 1714684586.778165
44 START 1714684840.0408244
45 END 1714685077.0288386
46 START 1714685404.6945825
47 END 1714685641.9328074
48 START 1714685730.607431
49 END 1714685977.6495645
50 START 1714686012.8087292
51 END 1714686245.3187919
52 START 1714686308.0208383
53 END 1714686538.8999248
54 START 1714686700.0502682
55 END 1714686929.3896363
56 START 1714686941.567573
57 END 1714687182.5082612
58 START 1714687186.658023
59 END 1714687422.0111208
60 START 1714687546.6520996
61 END 1714687779.508072
62 START 1714687781.169326
63 END 1714688065.7297397
64 START 1714688112.6133792
65 END 1714688351.9008133
66 START 1714688610.090224
67 END 1714688844.354024
68 START 1714688848.0215528
69 END 1714689073.2049983
70 START 1714689109.9789798
71 END 1714689336.7776277
72 START 1714689362.462249
73 END 1714689589.9356983
74 START 1714689616.0727196
75 END 1714689846.7305298
76 START 1714689847.8862386
77 END 1714690078.8723495
78 START 1714690136.1198533
79 END 1714690371.7041185
80 START 1714690400.8575451
81 END 1714690623.6396954
82 START 1714690919.3011584
83 END 1714691155.7371678
84 START 1714691175.381525
85 END 1714691411.826881