muxtools 0.2.1__tar.gz → 0.2.2__tar.gz

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.
Files changed (49) hide show
  1. {muxtools-0.2.1 → muxtools-0.2.2}/PKG-INFO +1 -1
  2. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/subtitle/sub.py +11 -11
  3. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools.egg-info/PKG-INFO +1 -1
  4. {muxtools-0.2.1 → muxtools-0.2.2}/pyproject.toml +1 -1
  5. {muxtools-0.2.1 → muxtools-0.2.2}/LICENSE +0 -0
  6. {muxtools-0.2.1 → muxtools-0.2.2}/README.md +0 -0
  7. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/__init__.py +0 -0
  8. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/__main__.py +0 -0
  9. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/audio/__init__.py +0 -0
  10. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/audio/audioutils.py +0 -0
  11. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/audio/encoders.py +0 -0
  12. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/audio/extractors.py +0 -0
  13. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/audio/memecoders.py +0 -0
  14. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/audio/preprocess.py +0 -0
  15. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/audio/tools.py +0 -0
  16. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/cli.py +0 -0
  17. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/functions.py +0 -0
  18. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/main.py +0 -0
  19. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/misc/__init__.py +0 -0
  20. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/misc/chapters.py +0 -0
  21. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/muxing/__init__.py +0 -0
  22. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/muxing/mux.py +0 -0
  23. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/muxing/muxfiles.py +0 -0
  24. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/muxing/tmdb.py +0 -0
  25. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/muxing/tracks.py +0 -0
  26. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/py.typed +0 -0
  27. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/subtitle/__init__.py +0 -0
  28. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/subtitle/basesub.py +0 -0
  29. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/subtitle/font.py +0 -0
  30. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/subtitle/styles.py +0 -0
  31. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/subtitle/subutils.py +0 -0
  32. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/utils/__init__.py +0 -0
  33. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/utils/convert.py +0 -0
  34. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/utils/dataclass.py +0 -0
  35. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/utils/download.py +0 -0
  36. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/utils/env.py +0 -0
  37. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/utils/files.py +0 -0
  38. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/utils/format.py +0 -0
  39. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/utils/glob.py +0 -0
  40. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/utils/log.py +0 -0
  41. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/utils/parsing.py +0 -0
  42. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/utils/subprogress.py +0 -0
  43. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools/utils/types.py +0 -0
  44. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools.egg-info/SOURCES.txt +0 -0
  45. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools.egg-info/dependency_links.txt +0 -0
  46. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools.egg-info/entry_points.txt +0 -0
  47. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools.egg-info/requires.txt +0 -0
  48. {muxtools-0.2.1 → muxtools-0.2.2}/muxtools.egg-info/top_level.txt +0 -0
  49. {muxtools-0.2.1 → muxtools-0.2.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: muxtools
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: A library for various muxing and automation tools for anything and everything fansubbing related
5
5
  Author-email: Vodes <vodes.imp@gmail.com>
6
6
  License: MPL 2.0
@@ -16,7 +16,7 @@ from .subutils import create_document, dummy_video, has_arch_resampler
16
16
  from ..utils.glob import GlobSearch
17
17
  from ..utils.download import get_executable
18
18
  from ..utils.types import PathLike, TrackType
19
- from ..utils.log import debug, error, info, warn
19
+ from ..utils.log import debug, error, info, warn, log_escape
20
20
  from ..utils.convert import frame_to_timedelta, timedelta_to_frame
21
21
  from ..utils.env import get_temp_workdir, get_workdir, run_commandline
22
22
  from ..utils.files import ensure_path_exists, get_absolute_track, make_output, clean_temp_files, uniquify_path
@@ -188,12 +188,12 @@ class SubFile(BaseSubFile):
188
188
  - A comment line with effect or name set to `***` will be set to a dialogue.
189
189
 
190
190
 
191
- `inline_tag_markers` can be used to swap ASS tags as well.
191
+ `inline_tag_markers` can be used to swap ASS tags as well. Keep in mind that "\" and "/" will be swapped, so override tags aren't applied.
192
192
 
193
193
  Assuming the markers are as default, except inline_tag_markers = `[]`:
194
- - `{*}{\i1}abc{*[\b1]def}` becomes `{*}{\b1}def{*[\i1]abc}` (AB Swap)
195
- - `abc{**[\b1]def}` becomes `abc{*}{\b1}def{*}` (Show Word)
196
- - `abc{*}{\b1}def{*}` becomes `abc{**[\b1]def}` (Hide Word)
194
+ - `{*}{\i1}abc{*[/b1]def}` becomes `{*}{\b1}def{*[/i1]abc}` (AB Swap)
195
+ - `abc{**[/b1]def}` becomes `abc{*}{\b1}def{*}` (Show Word)
196
+ - `abc{*}{\b1}def{*}` becomes `abc{**[/b1]def}` (Hide Word)
197
197
 
198
198
 
199
199
  :param allowed_styles: List of allowed styles to do the swapping on
@@ -235,7 +235,7 @@ class SubFile(BaseSubFile):
235
235
  if inline_tag_markers:
236
236
  to_swap.update(
237
237
  {
238
- f"{match.group(0)}": f"{{{inline_marker}}}{match.group(2).replace(inline_tag_markers[0], '{').replace(inline_tag_markers[1], '}')}{{{inline_marker}{match.group(1).replace('{', inline_tag_markers[0]).replace('}', inline_tag_markers[1])}}}"
238
+ f"{match.group(0)}": f"{{{inline_marker}}}{match.group(2).replace(inline_tag_markers[0], '{').replace(inline_tag_markers[1], '}').replace('/', '\\')}{{{inline_marker}{match.group(1).replace('{', inline_tag_markers[0]).replace('}', inline_tag_markers[1], ).replace('\\', '/')}}}"
239
239
  }
240
240
  )
241
241
  else:
@@ -250,7 +250,7 @@ class SubFile(BaseSubFile):
250
250
  if inline_tag_markers:
251
251
  to_swap.update(
252
252
  {
253
- f"{match.group(0)}": f"{{{inline_marker}}}{match.group(1).replace(inline_tag_markers[0], '{').replace(inline_tag_markers[1], '}')}{{{inline_marker}}}"
253
+ f"{match.group(0)}": f"{{{inline_marker}}}{match.group(1).replace(inline_tag_markers[0], '{').replace(inline_tag_markers[1], '}').replace('/', '\\')}{{{inline_marker}}}"
254
254
  }
255
255
  )
256
256
  else:
@@ -261,7 +261,7 @@ class SubFile(BaseSubFile):
261
261
  if inline_tag_markers:
262
262
  to_swap.update(
263
263
  {
264
- f"{match.group(0)}": f"{{{inline_marker*2}{match.group(1).replace('{', inline_tag_markers[0]).replace('}', inline_tag_markers[1])}}}"
264
+ f"{match.group(0)}": f"{{{inline_marker*2}{match.group(1).replace('{', inline_tag_markers[0]).replace('}', inline_tag_markers[1]).replace('\\', '/')}}}"
265
265
  }
266
266
  )
267
267
  else:
@@ -269,18 +269,18 @@ class SubFile(BaseSubFile):
269
269
 
270
270
  for key, val in to_swap.items():
271
271
  if print_swaps:
272
- info(f'autoswapper: Swapped "{key}" for "{val}" on line {i}', self)
272
+ info(f'autoswapper: Swapped "{log_escape(key)}" for "{log_escape(val)}" on line {i}', self)
273
273
  line.text = line.text.replace(key, val)
274
274
 
275
275
  if line.effect.strip() == line_marker or line.name.strip() == line_marker:
276
276
  if isinstance(line, Comment):
277
277
  line.TYPE = "Dialogue"
278
278
  if print_swaps:
279
- info(f'autoswapper: Uncommented Line {i} - "{line.text}"', self)
279
+ info(f'autoswapper: Uncommented Line {i} - "{log_escape(line.text)}"', self)
280
280
  elif isinstance(line, Dialogue):
281
281
  line.TYPE = "Comment"
282
282
  if print_swaps:
283
- info(f'autoswapper: Commented Line {i} - "{line.text}"', self)
283
+ info(f'autoswapper: Commented Line {i} - "{log_escape(line.text)}"', self)
284
284
 
285
285
  self.manipulate_lines(_do_autoswap)
286
286
  return self
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: muxtools
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: A library for various muxing and automation tools for anything and everything fansubbing related
5
5
  Author-email: Vodes <vodes.imp@gmail.com>
6
6
  License: MPL 2.0
@@ -1,7 +1,7 @@
1
1
 
2
2
  [project]
3
3
  name = "muxtools"
4
- version = "0.2.1"
4
+ version = "0.2.2"
5
5
  description = "A library for various muxing and automation tools for anything and everything fansubbing related"
6
6
  authors = [{ name = "Vodes", email = "vodes.imp@gmail.com" }]
7
7
  dependencies = [
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes