4 Commits

Author SHA1 Message Date
ca7c60f0e4 add tag trigger to Release 2025-06-25 18:40:30 +01:00
c1055408fb fixes double colouring bug
patch bump
2025-06-25 18:29:24 +01:00
b22f6f6f95 add created trigger to Release action 2025-06-25 18:18:57 +01:00
d2486be29a add more theme options
patch bump
2025-06-25 18:06:59 +01:00
3 changed files with 18 additions and 7 deletions

View File

@@ -2,7 +2,10 @@ name: Release
on: on:
release: release:
types: [published] types: [created, published]
push:
tags:
- 'v*.*.*'
jobs: jobs:
pypi-publish: pypi-publish:

View File

@@ -1,6 +1,6 @@
[project] [project]
name = "simple-recorder" name = "simple-recorder"
version = "0.1.1" version = "0.1.3"
description = "A simple OBS recorder" description = "A simple OBS recorder"
authors = [{ name = "onyx-and-iris", email = "code@onyxandiris.online" }] authors = [{ name = "onyx-and-iris", email = "code@onyxandiris.online" }]
dependencies = [ dependencies = [

View File

@@ -37,14 +37,14 @@ class Start(Command):
@override @override
async def run(self): async def run(self):
if not self.filename: if not self.filename:
raise ClypiException(error("Recording name cannot be empty.")) raise ClypiException("Recording name cannot be empty.")
with obsws.ReqClient( with obsws.ReqClient(
host=self.host, port=self.port, password=self.password host=self.host, port=self.port, password=self.password
) as client: ) as client:
resp = client.get_record_status() resp = client.get_record_status()
if resp.output_active: if resp.output_active:
raise ClypiException(error("Recording is already active.")) raise ClypiException("Recording is already active.")
filename = f"{self.filename} {self.get_timestamp()}" filename = f"{self.filename} {self.get_timestamp()}"
client.set_profile_parameter( client.set_profile_parameter(
@@ -70,7 +70,7 @@ class Stop(Command):
) as client: ) as client:
resp = client.get_record_status() resp = client.get_record_status()
if not resp.output_active: if not resp.output_active:
raise ClypiException(error("Recording is not active.")) raise ClypiException("Recording is not active.")
client.stop_record() client.stop_record()
print("Recording stopped successfully.") print("Recording stopped successfully.")
@@ -78,7 +78,15 @@ class Stop(Command):
def theme_parser(value: str) -> str: def theme_parser(value: str) -> str:
"""Parse the theme argument.""" """Parse the theme argument."""
themes = ["Light Purple", "Neutral Blue", "Reds", "Sandy Beach"] themes = [
"Light Purple",
"Neutral Blue",
"Reds",
"Sandy Beach",
"Kayak",
"Light Blue 2",
"Dark Teal1",
]
if value not in themes: if value not in themes:
raise ClypiException( raise ClypiException(
f"Invalid theme: {value}. Available themes: {', '.join(themes)}" f"Invalid theme: {value}. Available themes: {', '.join(themes)}"
@@ -148,7 +156,7 @@ class SimpleRecorder(Command):
def run(): def run():
"""Run the CLI application.""" """Run the application."""
SimpleRecorder.parse().start() SimpleRecorder.parse().start()