Skip to content

Commit 69e1d84

Browse files
committed
Refactor admin privilege check and add verbose option
1 parent 86ba369 commit 69e1d84

4 files changed

Lines changed: 25 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.0.1] - 2024-05-31
9+
10+
Fix admin privileges for the `Linux` users.
11+
812
## [1.0.0] - 2024-05-31
913

1014
Initial release of Captametropolis! 🎉

captametropolis/__init__.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from moviepy.editor import CompositeVideoClip, VideoFileClip
99

1010
from . import segment_parser, transcriber
11+
from .__version__ import __version__
1112
from .errors import UtilityNotFoundError
1213
from .text_drawer import Word, create_shadow, create_text_ex, get_text_size_ex
1314
from .utils import (
@@ -19,7 +20,13 @@
1920
run_as_admin,
2021
)
2122

22-
__all__ = ["add_captions"]
23+
__all__ = [
24+
"__version__",
25+
"add_captions",
26+
"ffmpeg_installed",
27+
"imagemagick_binary",
28+
"run_as_admin",
29+
]
2330

2431
lines_cache = {}
2532

captametropolis/__version__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "1.0.1"

setup.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,20 @@ def get_requirements():
1111
return f.read().splitlines()
1212

1313

14+
def get_version():
15+
version_path = os.path.join(
16+
os.path.dirname(__file__), "captametropolis", "__version__.py"
17+
)
18+
with open(version_path, "r") as f:
19+
for line in f:
20+
if line.startswith("__version__"):
21+
return line.split("=")[1].strip().strip('"')
22+
return "1.0.0"
23+
24+
1425
setup(
1526
name="captametropolis",
16-
version="1.0.0",
27+
version=get_version(),
1728
packages=find_packages(),
1829
install_requires=get_requirements(),
1930
extras_require={

0 commit comments

Comments
 (0)