mirror of
https://github.com/GeorgeSG/sarah.git
synced 2025-12-28 20:30:29 +00:00
Move config back into config folder
This commit is contained in:
@@ -2,8 +2,8 @@ extends: default
|
||||
|
||||
ignore: |
|
||||
appdaemon/
|
||||
templates/partials/
|
||||
secrets.yaml
|
||||
config/templates/partials/
|
||||
config/secrets.yaml
|
||||
|
||||
rules:
|
||||
document-start:
|
||||
|
||||
@@ -22,7 +22,7 @@ keep everything organized and grouped by different functionalities.
|
||||
- `routines` - definitions of automated routines - e.g. Coming Home or Waking Up
|
||||
- `sensors` - describing sensors the house can use
|
||||
|
||||
The `speech` module uses [partial templates](https://github.com/GeorgeSG/sarah/tree/master/templates/partials) to generate more complex messages.
|
||||
The `speech` module uses [partial templates](https://github.com/GeorgeSG/sarah/tree/master/config/templates/partials) to generate more complex messages.
|
||||
|
||||
## Hardware
|
||||
|
||||
|
||||
0
.gitignore → config/.gitignore
vendored
0
.gitignore → config/.gitignore
vendored
18
config/custom_scripts/youtube_download.py
Normal file
18
config/custom_scripts/youtube_download.py
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/python3.7
|
||||
|
||||
import sys
|
||||
import youtube_dl
|
||||
import os
|
||||
|
||||
youtube_url = sys.argv[1]
|
||||
out_name = sys.argv[2] if len(sys.argv) > 2 else "temp"
|
||||
out_folder = sys.argv[3] if len(sys.argv) > 3 else ""
|
||||
|
||||
full_file_path = f"""/config/www/audio/youtube/{out_folder}{out_name}"""
|
||||
|
||||
ydl = youtube_dl.YoutubeDL({"format": "bestaudio", "outtmpl": full_file_path})
|
||||
|
||||
with ydl:
|
||||
result = ydl.extract_info(youtube_url, download=True)
|
||||
os.system(f"""ffmpeg -i {full_file_path} -acodec libmp3lame {full_file_path}.mp3""")
|
||||
os.system(f"""rm {full_file_path}""")
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user