mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-22 21:34:59 +00:00
style: Format code with linter
This commit is contained in:
parent
8404165db3
commit
791dc213fa
1 changed files with 17 additions and 15 deletions
|
@ -94,6 +94,7 @@ def load_metadata(output_dir):
|
||||||
|
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
||||||
def save_metadata(output_dir, metadata):
|
def save_metadata(output_dir, metadata):
|
||||||
"""Save the audio metadata to JSON file."""
|
"""Save the audio metadata to JSON file."""
|
||||||
metadata_file = os.path.join(output_dir, "metadata.json")
|
metadata_file = os.path.join(output_dir, "metadata.json")
|
||||||
|
@ -101,12 +102,14 @@ def save_metadata(output_dir, metadata):
|
||||||
with open(metadata_file, "w") as f:
|
with open(metadata_file, "w") as f:
|
||||||
json.dump(metadata, f, indent=2)
|
json.dump(metadata, f, indent=2)
|
||||||
|
|
||||||
|
|
||||||
def get_timestamp_key(time_sec):
|
def get_timestamp_key(time_sec):
|
||||||
"""Generate a consistent timestamp key format for metadata."""
|
"""Generate a consistent timestamp key format for metadata."""
|
||||||
minutes = time_sec // 60
|
minutes = time_sec // 60
|
||||||
seconds = time_sec % 60
|
seconds = time_sec % 60
|
||||||
return f"{minutes:02d}-{seconds:02d}"
|
return f"{minutes:02d}-{seconds:02d}"
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser(description="Generate TTS audio for recording commentary.")
|
parser = argparse.ArgumentParser(description="Generate TTS audio for recording commentary.")
|
||||||
parser.add_argument("markdown_file", help="Path to the recording markdown file")
|
parser.add_argument("markdown_file", help="Path to the recording markdown file")
|
||||||
|
@ -176,8 +179,7 @@ def main():
|
||||||
|
|
||||||
# Check if we need to generate this file
|
# Check if we need to generate this file
|
||||||
needs_update = args.force or (
|
needs_update = args.force or (
|
||||||
timestamp_key not in metadata or
|
timestamp_key not in metadata or metadata[timestamp_key] != message
|
||||||
metadata[timestamp_key] != message
|
|
||||||
)
|
)
|
||||||
|
|
||||||
minutes = time_sec // 60
|
minutes = time_sec // 60
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue