tictacsync 1.4.5b0__py3-none-any.whl → 1.4.6b0__py3-none-any.whl

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.

Potentially problematic release.


This version of tictacsync might be problematic. Click here for more details.

tictacsync/mamdav.py CHANGED
@@ -41,7 +41,14 @@ wmv yuv rm rmvb viv asf amv mp4 m4p m4v mpg mp2 mpeg mpe mpv mpg mpeg m2v
41
41
  m4v svi 3gp 3g2 mxf roq nsv flv f4v f4p f4a f4b 3gp""".split()
42
42
 
43
43
 
44
- DAVINCI_RESOLVE_SCRIPT_LOCATION = '/Library/Application Support/Blackmagic Design/DaVinci Resolve/Fusion/Scripts/Utility/'
44
+ MAC = '/Library/Application Support/Blackmagic Design/DaVinci Resolve/Fusion/Scripts/Utility/'
45
+
46
+ WIN = pathlib.Path('C:/ProgramData/Blackmagic Design/DaVinci Resolve/Fusion/Scripts')
47
+
48
+ is_windows = hasattr(sys, 'getwindowsversion')
49
+ DAVINCI_RESOLVE_SCRIPT_LOCATION = WIN if is_windows else MAC
50
+
51
+
45
52
 
46
53
  DAVINCI_RESOLVE_SCRIPT_TEMPLATE_LUA = """local function ClipWithPartialPath(partial_path)
47
54
  local media_pool = app:GetResolve():GetProjectManager():GetCurrentProject():GetMediaPool()
@@ -624,7 +631,9 @@ def go(mode, otio_path, movie_path, wav_path):
624
631
  logger.debug(f'changes {pformat(changes)}')
625
632
  script = load_New_Sound_lua_script(changes)
626
633
  script_path = Path(DAVINCI_RESOLVE_SCRIPT_LOCATION)/'Load New Sound.lua'
627
- # script += f'os.remove("{script_path}")\n' # doesnt work
634
+ if is_windows:
635
+ escaped_script = script.replace("\\", "\\\\")
636
+ script = escaped_script
628
637
  with open(script_path, 'w') as fh:
629
638
  fh.write(script)
630
639
  print(f'Wrote new Lua script: run it in Resolve under Workspace/Scripts/{script_path.stem};')
tictacsync/mamreap.py CHANGED
@@ -7,16 +7,6 @@ from rich import print
7
7
  from enum import Enum
8
8
  from rich.progress import Progress
9
9
 
10
- # send-to-sound DSC085 -> one clip only, find the ISOs, load the clip
11
- # send-to-sound cut27.otio -> whole project
12
- # send-to-sound cut27.otio cut27.mov
13
- # cut27.mov has TC + duration -> can find clips in otio...
14
- # place cut27.mov according to its TC
15
- # produce a cut27mix.wav saved in SNDROOT/postprod
16
- # three modes: one clip; some clips; all clips
17
-
18
-
19
-
20
10
  try:
21
11
  from . import mamconf
22
12
  from . import mamdav
@@ -26,7 +16,12 @@ except:
26
16
 
27
17
  dev = 'Cockos Incorporated'
28
18
  app ='REAPER'
29
- REAPER_SCRIPT_LOCATION = pathlib.Path(platformdirs.user_data_dir(app, dev)) / 'Scripts' / 'Atomic'
19
+ MAC = pathlib.Path(platformdirs.user_data_dir(app, dev)) / 'Scripts' / 'Atomic'
20
+ WIN = pathlib.Path(platformdirs.user_data_dir('Scripts', 'Reaper', roaming=True))
21
+
22
+ is_windows = hasattr(sys, 'getwindowsversion')
23
+ REAPER_SCRIPT_LOCATION = WIN if is_windows else MAC
24
+
30
25
  REAPER_LUA_CODE = """reaper.Main_OnCommand(40577, 0) -- lock left/right move
31
26
  reaper.Main_OnCommand(40569, 0) -- lock enabled
32
27
  local function placeWavsBeginingAtTrack(clip, start_idx)
@@ -298,12 +293,13 @@ def find_and_set_ISO_dir(clip, SND_dirs):
298
293
  logger.debug(f'found {complete_path}')
299
294
  clip.ISOdir = str(complete_path)
300
295
 
296
+ # logger.add(sys.stdout, filter=lambda r: r["function"] == "gen_lua_table")
301
297
  def gen_lua_table(clips):
302
298
  # returns a string defining a lua nested table
303
299
  # top level: a sequence of clips
304
300
  # a clip has keys: name, start_time, in_time, cut_duration, timeline_pos, files
305
301
  # clip.files is a sequence of ISO wav files
306
- def _list_ISO(dir):
302
+ def _list_ISO(dir):
307
303
  iso_dir = pathlib.Path(dir)/'ISOfiles'
308
304
  ISOs = [f for f in iso_dir.iterdir() if f.suffix.lower() == '.wav']
309
305
  # ISOs = [f for f in ISOs if f.name[:2] != 'tc'] # no timecode
@@ -436,6 +432,10 @@ def main():
436
432
  script_path = pathlib.Path(REAPER_SCRIPT_LOCATION)/f'{title}.lua'
437
433
  Lua_script_pre, _ , Lua_script_post = REAPER_LUA_CODE.split('--cut here--')
438
434
  script = Lua_script_pre + 'clips=' + lua_clips + Lua_script_post
435
+ # is_windows = hasattr(sys, 'getwindowsversion')
436
+ if is_windows:
437
+ escaped_script = script.replace("\\", "\\\\")
438
+ script = escaped_script
439
439
  with open(script_path, 'w') as fh:
440
440
  fh.write(script)
441
441
  print(f'Wrote ReaScripts "{script_path.stem}"', end=' ')
@@ -452,9 +452,12 @@ def main():
452
452
  render_destination.unlink()
453
453
  logger.debug(f'clip\n{lua_code}')
454
454
  script_path = pathlib.Path(REAPER_SCRIPT_LOCATION)/f'Render Movie Audio.lua'
455
+ if is_windows:
456
+ escaped_script = lua_code.replace("\\", "\\\\")
457
+ lua_code = escaped_script
455
458
  with open(script_path, 'w') as fh:
456
459
  fh.write(lua_code)
457
- print(f'and "{script_path.stem}"')
460
+ print(f'and "{script_path.stem}" in directory \n"{REAPER_SCRIPT_LOCATION}"')
458
461
  print(f'Reaper will render audio to "{render_destination.absolute()}"')
459
462
  if mode in [mamdav.Modes.INTERCLIP_ALL, mamdav.Modes.INTERCLIP_SOME]:
460
463
  print(f'Warning: once saved, "{render_destination.name}" wont be of any use if not paired with "{op.name}", so keep them in the same directory.')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tictacsync
3
- Version: 1.4.5b0
3
+ Version: 1.4.6b0
4
4
  Summary: commands for syncing audio video recordings
5
5
  Home-page: https://tictacsync.org/
6
6
  Author: Raymond Lutz
@@ -2,15 +2,15 @@ tictacsync/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  tictacsync/device_scanner.py,sha256=lYCMWSCeI0KNQclrRMOzeIERh2ME2gvBxV-q9Y2uou0,26175
3
3
  tictacsync/entry.py,sha256=JmOx7B6d4LnGLWGuuMFpKV9GxkWhmAG4fdKayI7qzUA,15024
4
4
  tictacsync/mamconf.py,sha256=nfXTwabx-tJmBcpnDR4CRkFe9W4fudzfnbq_nHUg0qE,6424
5
- tictacsync/mamdav.py,sha256=2we8tfIbJBtDMQdpZZVlCQ9hCQRMbKmV2aU3dDEUf2k,27457
6
- tictacsync/mamreap.py,sha256=ej7Ap8nbVBCkfah2j5hrE7QBWuqL6Zm-OEsQpNK8mYg,21085
5
+ tictacsync/mamdav.py,sha256=x0xbIoxNIEvjcZEozegwA9PORNCIW5c6qrjJKAG3gMs,27670
6
+ tictacsync/mamreap.py,sha256=ed3wcu_5Xy7oq-POmQAlOJ0QmWP18Y67FfFkTzz1smg,21278
7
7
  tictacsync/mamsync.py,sha256=orwP-TzKdRTiTCoiM7BsQgVK1KtAIs3SpKe9K8ZWM_Q,13872
8
8
  tictacsync/multi2polywav.py,sha256=OX72eDtanaax-lGc6JJXwOz9MaveNcYlgBfBijzR8oA,7583
9
9
  tictacsync/timeline.py,sha256=ykmB8EfnprQZoEHXRYzriASNWZ7bHfkmQ2-TR6gxZ6Y,75985
10
10
  tictacsync/yaltc.py,sha256=xrgL7qokP1A7B_VF4W_BZcC7q9APSmYpmtWH8_t3VWc,68003
11
- tictacsync-1.4.5b0.dist-info/LICENSE,sha256=ZAOPXLh1zlQAnhHUd7oLslKM01YZ5UiAu3STYjwIxck,1068
12
- tictacsync-1.4.5b0.dist-info/METADATA,sha256=isx8DzvfowkLJgEPTX6y7Q3xyqEvH2Rt2yRHPgHvMVM,5689
13
- tictacsync-1.4.5b0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
14
- tictacsync-1.4.5b0.dist-info/entry_points.txt,sha256=0R8K6T0iUJGj87LDZ0vNO8pToshbkxrXZqTRgcjBlMk,244
15
- tictacsync-1.4.5b0.dist-info/top_level.txt,sha256=eaCWG-BsYTRR-gLTJbK4RfcaXajr0gjQ6wG97MkGRrg,11
16
- tictacsync-1.4.5b0.dist-info/RECORD,,
11
+ tictacsync-1.4.6b0.dist-info/LICENSE,sha256=ZAOPXLh1zlQAnhHUd7oLslKM01YZ5UiAu3STYjwIxck,1068
12
+ tictacsync-1.4.6b0.dist-info/METADATA,sha256=LAeuk9MefhDk-MZDoNYsA-1hGKr69oWvFZ7nuVj0FPQ,5689
13
+ tictacsync-1.4.6b0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
14
+ tictacsync-1.4.6b0.dist-info/entry_points.txt,sha256=0R8K6T0iUJGj87LDZ0vNO8pToshbkxrXZqTRgcjBlMk,244
15
+ tictacsync-1.4.6b0.dist-info/top_level.txt,sha256=eaCWG-BsYTRR-gLTJbK4RfcaXajr0gjQ6wG97MkGRrg,11
16
+ tictacsync-1.4.6b0.dist-info/RECORD,,