auto-editor 23.38.1__py3-none-any.whl → 23.40.1__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.
auto_editor/__init__.py CHANGED
@@ -1,2 +1,2 @@
1
- __version__ = "23.38.1"
2
- version = "23w38a"
1
+ __version__ = "23.40.1"
2
+ version = "23w40a"
auto_editor/analyze.py CHANGED
@@ -12,9 +12,9 @@ from auto_editor.lang.json import Lexer, Parser, dump
12
12
  from auto_editor.lib.contracts import (
13
13
  is_bool,
14
14
  is_nat,
15
+ is_nat1,
15
16
  is_str,
16
17
  is_threshold,
17
- is_uint,
18
18
  is_void,
19
19
  orc,
20
20
  )
@@ -46,28 +46,28 @@ if TYPE_CHECKING:
46
46
  audio_builder = pAttrs(
47
47
  "audio",
48
48
  pAttr("threshold", 0.04, is_threshold),
49
- pAttr("stream", 0, orc(is_uint, Sym("all"), "all")),
50
- pAttr("mincut", 6, is_uint),
51
- pAttr("minclip", 3, is_uint),
49
+ pAttr("stream", 0, orc(is_nat, Sym("all"), "all")),
50
+ pAttr("mincut", 6, is_nat),
51
+ pAttr("minclip", 3, is_nat),
52
52
  )
53
53
  motion_builder = pAttrs(
54
54
  "motion",
55
55
  pAttr("threshold", 0.02, is_threshold),
56
- pAttr("stream", 0, is_uint),
57
- pAttr("blur", 9, is_uint),
58
- pAttr("width", 400, is_nat),
56
+ pAttr("stream", 0, is_nat),
57
+ pAttr("blur", 9, is_nat),
58
+ pAttr("width", 400, is_nat1),
59
59
  )
60
60
  pixeldiff_builder = pAttrs(
61
61
  "pixeldiff",
62
- pAttr("threshold", 1, is_uint),
63
- pAttr("stream", 0, is_uint),
62
+ pAttr("threshold", 1, is_nat),
63
+ pAttr("stream", 0, is_nat),
64
64
  )
65
65
  subtitle_builder = pAttrs(
66
66
  "subtitle",
67
67
  pAttr("pattern", Required, is_str),
68
- pAttr("stream", 0, is_uint),
68
+ pAttr("stream", 0, is_nat),
69
69
  pAttr("ignore-case", False, is_bool),
70
- pAttr("max-count", None, orc(is_uint, is_void)),
70
+ pAttr("max-count", None, orc(is_nat, is_void)),
71
71
  )
72
72
 
73
73
  builder_map = {
@@ -149,16 +149,14 @@ def obj_tag(tag: str, tb: Fraction, obj: dict[str, Any]) -> str:
149
149
  return key
150
150
 
151
151
 
152
+ @dataclass
152
153
  class Levels:
153
- def __init__(
154
- self, ensure: Ensure, src: FileInfo, tb: Fraction, bar: Bar, temp: str, log: Log
155
- ):
156
- self.ensure = ensure
157
- self.src = src
158
- self.tb = tb
159
- self.bar = bar
160
- self.temp = temp
161
- self.log = log
154
+ ensure: Ensure
155
+ src: FileInfo
156
+ tb: Fraction
157
+ bar: Bar
158
+ temp: str
159
+ log: Log
162
160
 
163
161
  @property
164
162
  def media_length(self) -> int:
@@ -167,9 +165,7 @@ class Levels:
167
165
  return len(arr)
168
166
 
169
167
  sr, samples = read(
170
- self.ensure.audio(
171
- f"{self.src.path.resolve()}", self.src.label, stream=0
172
- )
168
+ self.ensure.audio(f"{self.src.path.resolve()}", self.src.label, 0)
173
169
  )
174
170
  samp_count = len(samples)
175
171
  del samples
auto_editor/help.py CHANGED
@@ -31,28 +31,28 @@ editing.
31
31
  Editing Methods:
32
32
  - audio ; Audio silence/loudness detection
33
33
  - threshold threshold? : 4%
34
- - stream (or/c uint? 'all "all") : 0
35
- - mincut uint? : 6
36
- - minclip uint? : 3
34
+ - stream (or/c nat? 'all "all") : 0
35
+ - mincut nat? : 6
36
+ - minclip nat? : 3
37
37
 
38
38
  - motion ; Motion detection specialized for noisy real-life videos
39
39
  - threshold threshold? : 2%
40
- - stream uint? : 0
41
- - blur uint? : 9
42
- - width nat? : 400
40
+ - stream nat? : 0
41
+ - blur nat? : 9
42
+ - width nat1? : 400
43
43
 
44
44
  - none ; Do not modify the media in anyway; mark all sections as "loud" (1).
45
45
  - all/e ; Cut out everything out; mark all sections as "silent" (0).
46
46
 
47
47
  - pixeldiff ; Detect when a certain amount of pixels have changed between frames.
48
- - threshold uint? : 1
49
- - stream uint? : 0
48
+ - threshold nat? : 1
49
+ - stream nat? : 0
50
50
 
51
51
  - subtitle ; Detect when subtitle matches pattern as a RegEx string.
52
52
  - pattern string?
53
- - stream uint? : 0
53
+ - stream nat? : 0
54
54
  - ignore-case bool? : #f
55
- - max-count (or/c uint? void?) : (void)
55
+ - max-count (or/c nat? void?) : (void)
56
56
 
57
57
  Command-line Examples:
58
58
  --edit audio