Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2c1e9f38f7 | ||
|
|
164b0309ab | ||
|
|
ca080e53a0 | ||
|
|
7776365c80 | ||
|
|
ef3a2dfbe5 | ||
|
|
1b26fe9a46 | ||
|
|
e6b475fc5c | ||
|
|
ff98d4d191 | ||
|
|
df9d1053df | ||
|
|
0618574cbf | ||
|
|
1028c26a59 | ||
|
|
49982b4ad4 | ||
|
|
a9291e97a1 | ||
|
|
d96b844962 | ||
|
|
5d5cb86494 | ||
|
|
d0276aafb4 | ||
|
|
60d347e812 | ||
|
|
6362c426f2 | ||
|
|
7247bf2765 | ||
|
|
b68dd667a2 | ||
|
|
fba1a1146e | ||
|
|
951512f236 | ||
|
|
45f13fdd2f | ||
|
|
87abc4720f | ||
|
|
aaf1480964 | ||
|
|
cc84254988 | ||
|
|
64924f5fee | ||
|
|
d8327936aa | ||
|
|
91c0db6f72 | ||
|
|
1a8503730d | ||
|
|
b0914f21dd | ||
|
|
4867a6fa0c | ||
|
|
3e133ef787 | ||
|
|
4b6845faff | ||
|
|
8181db5278 | ||
|
|
c17b6ca57e | ||
|
|
671eabea78 | ||
|
|
e967a7e1d8 | ||
|
|
bb756c4740 | ||
|
|
ac4d8d5394 | ||
|
|
2530f150bc | ||
|
|
ee634ae70a | ||
|
|
06b670e62f | ||
|
|
008c09a72e | ||
|
|
0587334eec | ||
|
|
b3319774c2 | ||
|
|
6306c274cc | ||
|
|
f2bf347234 | ||
|
|
e225dfcefc | ||
|
|
d4ff5878a7 | ||
|
|
8d11222f82 | ||
|
|
010632d919 | ||
|
|
299444c3e3 | ||
|
|
6be2e9908f | ||
|
|
d28595e273 | ||
|
|
13b3ad1b76 | ||
|
|
a43cd39186 | ||
|
|
e65b7d5c0a | ||
|
|
fe354fbad9 | ||
|
|
7d0fcfb33d | ||
|
|
da594bdcd1 | ||
|
|
88eb6717c9 | ||
|
|
402aabe960 | ||
|
|
f7fcf49954 | ||
|
|
3da47b69bc | ||
|
|
e8165149dd | ||
|
|
6544edf04b | ||
|
|
fa9ec1a75a | ||
|
|
1dd474d25f | ||
|
|
4ada4ba039 | ||
|
|
ba1a1b90f7 | ||
|
|
88d07bb862 | ||
|
|
4a292fabd3 | ||
|
|
ceef4f5081 | ||
|
|
d33ad04016 | ||
|
|
513f8181df | ||
|
|
fd49ca3c68 | ||
|
|
d064d8388a | ||
|
|
096e499f6a | ||
|
|
ee6874d094 | ||
|
|
798ee11121 | ||
|
|
bbb15b9744 | ||
|
|
c643fa6d73 | ||
|
|
390892ba2d | ||
|
|
aaef3376ae | ||
|
|
ad9492d7e3 | ||
|
|
5560557c3a | ||
|
|
4ce326727d | ||
|
|
fe6b89be9b | ||
|
|
90297bd7ef | ||
|
|
8924875c26 | ||
|
|
27946a1dd8 | ||
|
|
b701920c75 | ||
|
|
0c77999c46 | ||
|
|
341a346865 | ||
|
|
a5a35c710e | ||
|
|
ac774d9aad | ||
|
|
2d988de0a3 | ||
|
|
6a6154fe44 | ||
|
|
f3ebaf5858 | ||
|
|
10554f19ee | ||
|
|
ff90b72a34 | ||
|
|
1e8a23ad50 | ||
|
|
9fbe04ecf8 | ||
|
|
224a9cfd57 | ||
|
|
9f8a6edab3 | ||
|
|
4bd2d121ae | ||
|
|
5a1095556c | ||
|
|
5877b9b8da | ||
|
|
bcc1196152 | ||
|
|
6c93bf3e50 | ||
|
|
292aa75d5d | ||
|
|
cdc4330873 | ||
|
|
36a34000c3 | ||
|
|
0851d938a5 | ||
|
|
4f98a6d286 | ||
|
|
d0712cc4be | ||
|
|
0dc30a442c | ||
|
|
88ac617c5f |
No files matched your search
@@ -0,0 +1,28 @@
|
||||
2384d2383
|
||||
< triton = ">=2.0.0,<3"
|
||||
4185d4183
|
||||
< triton = {version = "2.3.1", markers = "platform_system == \"Linux\" and platform_machine == \"x86_64\" and python_version < \"3.12\""}
|
||||
4318,4340d4315
|
||||
< name = "triton"
|
||||
< version = "2.3.1"
|
||||
< description = "A language and compiler for custom Deep Learning operations"
|
||||
< optional = false
|
||||
< python-versions = "*"
|
||||
< files = [
|
||||
< {file = "triton-2.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3c84595cbe5e546b1b290d2a58b1494df5a2ef066dd890655e5b8a8a92205c33"},
|
||||
< {file = "triton-2.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c9d64ae33bcb3a7a18081e3a746e8cf87ca8623ca13d2c362413ce7a486f893e"},
|
||||
< {file = "triton-2.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eaf80e8761a9e3498aa92e7bf83a085b31959c61f5e8ac14eedd018df6fccd10"},
|
||||
< {file = "triton-2.3.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b13bf35a2b659af7159bf78e92798dc62d877aa991de723937329e2d382f1991"},
|
||||
< {file = "triton-2.3.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:63381e35ded3304704ea867ffde3b7cfc42c16a55b3062d41e017ef510433d66"},
|
||||
< {file = "triton-2.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1d968264523c7a07911c8fb51b4e0d1b920204dae71491b1fe7b01b62a31e124"},
|
||||
< ]
|
||||
<
|
||||
< [package.dependencies]
|
||||
< filelock = "*"
|
||||
<
|
||||
< [package.extras]
|
||||
< build = ["cmake (>=3.20)", "lit"]
|
||||
< tests = ["autopep8", "flake8", "isort", "numpy", "pytest", "scipy (>=1.7.1)", "torch"]
|
||||
< tutorials = ["matplotlib", "pandas", "tabulate", "torch"]
|
||||
<
|
||||
< [[package]]
|
||||
@@ -4,7 +4,7 @@ on: [push, workflow_dispatch]
|
||||
|
||||
jobs:
|
||||
# Auto-publish when version is increased
|
||||
publish-job:
|
||||
publish-pypi:
|
||||
# Only publish on `main` branch
|
||||
if: github.ref == 'refs/heads/main'
|
||||
runs-on: ubuntu-latest
|
||||
@@ -17,3 +17,35 @@ jobs:
|
||||
pypi-token: ${{ secrets.PYPI_API_TOKEN }}
|
||||
gh-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
parse-changelog: false
|
||||
|
||||
# build-windows:
|
||||
# runs-on: windows-latest
|
||||
|
||||
# steps:
|
||||
# - uses: actions/checkout@v2
|
||||
|
||||
# - name: Set up Python
|
||||
# uses: actions/setup-python@v2
|
||||
# with:
|
||||
# python-version: '3.9'
|
||||
|
||||
# - name: Install dependencies with Poetry
|
||||
# run: |
|
||||
# pip install poetry
|
||||
# poetry install
|
||||
|
||||
# - name: Download ffmpeg binary
|
||||
# run: python platform/download_ffmpeg.py
|
||||
|
||||
# - name: Build EXE with PyInstaller
|
||||
# run: poetry run pyinstaller karaoke-prep.spec
|
||||
|
||||
# - name: Upload EXE as Artifact
|
||||
# uses: actions/upload-artifact@v2
|
||||
# with:
|
||||
# name: karaoke-prep-windows
|
||||
# path: |
|
||||
# build/
|
||||
# *.exe
|
||||
# */*.exe
|
||||
|
||||
@@ -40,7 +40,7 @@ MANIFEST
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
# *.spec
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
|
||||
@@ -15,13 +15,63 @@ This was created to make it easier for me to prepare the source audio, lyrics an
|
||||
- Easy Configuration: Control the tool's behavior using command-line arguments.
|
||||
- Organized Outputs: Creates structured output directories for easy access to generated tracks and lyrics.
|
||||
- Internet First: Completes operations which require internet first, in case user is preparing last-minute before a period of being offline!
|
||||
- Flexible Input: provide just a YouTube URL, just an artist and title, or both.
|
||||
- Playlist Processing: Capable of processing an entire YouTube playlist, extracting audio and lyrics for each track.
|
||||
- Easy Finalisation: After manually performing your sync (e.g. using [MidiCo](https://www.midicokaraoke.com)), run `karaoke-finalise` to remux and add your title screen!
|
||||
|
||||
## Installation 🛠️
|
||||
|
||||
You'll need Python version 3.9, 3.10 or 3.11 (newer versions aren't supported by PyTorch or ONNX Runtime yet).
|
||||
|
||||
### Windows Prerequisites
|
||||
- [Microsoft C++ Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/)
|
||||
- [FFmpeg](https://ffmpeg.org/download.html)
|
||||
|
||||
You can install Karaoke Prep using pip:
|
||||
|
||||
`pip install karaoke-prep`
|
||||
|
||||
You'll then also need to install a version of `audio-separator` for your hardware:
|
||||
|
||||
- Mac with Apple Silicon: `pip install audio-separator[silicon]`
|
||||
- Linux/Windows with CUDA GPU: `pip install audio-separator[gpu]`
|
||||
- Anything else: `pip install audio-separator[cpu]`
|
||||
|
||||
#### Install PyTorch with CUDA support
|
||||
|
||||
If you're trying to use CUDA for GPU acceleration, you'll also need to ensure the version of PyTorch you have installed is compatible with the CUDA version you have installed.
|
||||
|
||||
While PyTorch should get installed as a dependency of `karaoke-prep` anyway, you may need to install PyTorch for your CUDA version by running the installation command provided by the official install wizard: https://pytorch.org/get-started/locally/
|
||||
|
||||
#### UnicodeEncodeError
|
||||
|
||||
If you encounter this error: `UnicodeEncodeError: 'charmap' codec can't encode character`
|
||||
|
||||
Try setting the Python I/O encoding in your environment: `export PYTHONIOENCODING=utf-8`
|
||||
|
||||
#### Command-line newbie?
|
||||
|
||||
If you aren't sure what `pip` is or how to use the command line, here are some YouTube tutorials which will probably help:
|
||||
|
||||
- Install Python on Windows: https://www.youtube.com/watch?v=YKSpANU8jPE
|
||||
- Command Line basics Windows: https://www.youtube.com/watch?v=MBBWVgE0ewk
|
||||
- Install Python on Mac: https://www.youtube.com/watch?v=3-sPfR4JEQ8
|
||||
- Command Line basics Mac: https://www.youtube.com/watch?v=FfT8OfMpARM
|
||||
|
||||
## Karaoke production guide using karaoke-prep and MidiCo
|
||||
|
||||
- Get a Genius API Access Token ([docs](https://docs.genius.com/)) and set it as an environment variable named `GENIUS_API_TOKEN`
|
||||
- Run `karaoke-prep <Artist> <Title>` to fetch and prep the files above
|
||||
- Wait for it to output at least the WAV file and lyrics (you can leave it running in the background while you sync)
|
||||
- Open the WAV file in MidiCo: `(YouTube xxxxxxxxxxx).wav`
|
||||
- Copy/paste the lyrics into MidiCo: `(Lyrics Processed).txt`
|
||||
- Perform the lyrics sync (here's a [video](https://www.youtube.com/watch?v=63-Fk3mfZ7Q) showing me doing it) in MidiCo
|
||||
- Render the video to 4k using the MidiCo "Export Movie" feature, saving it as `Artist - Title (Karaoke).mov` in the same folder
|
||||
- Run `karaoke-finalise` to remux the instrumental audio and join the title clip to the start
|
||||
- Upload the resulting `Artist - Title (Final Karaoke).mp4` video to YouTube!
|
||||
|
||||
Here's my [tutorial video with verbal explanation](https://www.youtube.com/watch?v=ZsROHgqAVHs) of the whole process, and here's a [normal speed demo](https://www.youtube.com/watch?v=63-Fk3mfZ7Q) of me doing it (8 minutes total for a single track).
|
||||
|
||||
|
||||
## Usage 🚀
|
||||
|
||||
@@ -37,9 +87,7 @@ usage: karaoke-prep [-h] [-v] [--log_level LOG_LEVEL] [--model_name MODEL_NAME]
|
||||
Fetch audio and lyrics for a specified song, to prepare karaoke video creation.
|
||||
|
||||
positional arguments:
|
||||
artist Artist name for the song to prep.
|
||||
title Title of the song to prep.
|
||||
url YouTube URL of the song to prep.
|
||||
args [YouTube video or playlist URL] [Artist] [Title] of song to prep. If URL is provided, Artist and Title are optional but increase chance of fetching the correct lyrics. If Artist and Title are provided with no URL, the top YouTube search result will be fetched.
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
@@ -52,31 +100,102 @@ options:
|
||||
--use_coreml Optional: use Apple Silicon GPU with CoreML for separation (default: False). Example: --use_coreml=true
|
||||
--denoise DENOISE Optional: enable or disable denoising during separation (default: True). Example: --denoise=False
|
||||
--normalize NORMALIZE Optional: enable or disable normalization during separation (default: True). Example: --normalize=False
|
||||
--create_track_subfolders Optional: create subfolders in the output folder for each track (default: False). Example: --create_track_subfolders=true
|
||||
--no_track_subfolders Optional: do NOT create a named subfolder for each track. Example: --no_track_subfolders
|
||||
--intro_background_color INTRO_BACKGROUND_COLOR Optional: Background color for intro video (default: black). Example: --intro_background_color=#123456
|
||||
--intro_background_image INTRO_BACKGROUND_IMAGE Optional: Path to background image for intro video. Overrides background color if provided. Example: --intro_background_image=path/to/image.jpg
|
||||
--intro_font INTRO_FONT Optional: Font file for intro video (default: Avenir-Next-Bold). Example: --intro_font=AvenirNext-Bold.ttf
|
||||
--intro_artist_color INTRO_ARTIST_COLOR Optional: Font color for intro video artist text (default: #ff7acc). Example: --intro_artist_color=#123456
|
||||
--intro_title_color INTRO_TITLE_COLOR Optional: Font color for intro video title text (default: #ffdf6b). Example: --intro_title_color=#123456
|
||||
```
|
||||
|
||||
Example:
|
||||
|
||||
### ⭐ YouTube URL with Artist and Title
|
||||
|
||||
For the most consistent results, provide a specific YouTube URL along with the artist and title like so:
|
||||
|
||||
```
|
||||
karaoke-prep "https://www.youtube.com/watch?v=YOUR_VIDEO_ID" "The Fray" "Never Say Never"
|
||||
```
|
||||
|
||||
### Artist and Title Only
|
||||
|
||||
If you don't have a specific YouTube URL, just provide the artist and title. Karaoke Prep will search for and download the top YouTube result.
|
||||
|
||||
```
|
||||
karaoke-prep "The Fray" "Never Say Never"
|
||||
```
|
||||
|
||||
This command will search YouTube for the specified song, download audio from the top result and lyrics from genius, then separate the audio to produce an instrumental track, ready for a karaoke video to be created by whatever process you prefer!
|
||||
### Only YouTube URL
|
||||
|
||||
By default, you'll end up with files in the current folder, neatly organised e.g.
|
||||
This will process the video at the given URL, *guessing the artist and title from the YouTube title*.
|
||||
⚠️ Be aware the downloaded lyrics may be incorrect if the video title doesn't match the standard "Artist - Title" format.
|
||||
|
||||
```
|
||||
├── Artist - Title (Instrumental UVR-MDX-NET-Inst_HQ_3).flac
|
||||
├── Artist - Title (Instrumental UVR_MDXNET_KARA_2).flac
|
||||
├── Artist - Title (Lyrics).txt
|
||||
├── Artist - Title (Vocals UVR-MDX-NET-Inst_HQ_3).flac
|
||||
├── Artist - Title (Vocals UVR_MDXNET_KARA_2).flac
|
||||
└── Artist - Title (YouTube CNUgemJBLTw).wav
|
||||
karaoke-prep "https://www.youtube.com/watch?v=YOUR_VIDEO_ID"
|
||||
```
|
||||
|
||||
### YouTube Playlist URL
|
||||
|
||||
To process a playlist, just provide the playlist URL. The script will process every video in the playlist.
|
||||
⚠️ Be aware the downloaded _lyrics_ for each track may be incorrect if the video titles don't match the standard "Artist - Title" format.
|
||||
|
||||
```
|
||||
karaoke-prep "https://www.youtube.com/playlist?list=YOUR_PLAYLIST_ID"
|
||||
```
|
||||
|
||||
## Files produced by karaoke-prep and what to do with them
|
||||
|
||||
After running `karaoke-prep` you should have the following 11 files, grouped into folder(s) for each track:
|
||||
|
||||
- `Artist - Title (YouTube xxxxxxxxxxx).webm`
|
||||
- Original unmodified video, fetched from YouTube in the highest quality available (may not always be WebM)
|
||||
- You probably don't need this unless you're creating a custom request
|
||||
- `Artist - Title (YouTube xxxxxxxxxxx).png`
|
||||
- A still image taken from 30 seconds into the video, in case that's useful for a custom background
|
||||
- You probably don't need this unless you're creating a custom request
|
||||
- `Artist - Title (YouTube xxxxxxxxxxx).wav`
|
||||
- Unmodified audio from the YouTube video, converted to WAV format for compatibility
|
||||
- You should open this in MidiCo to begin syncing lyrics to make your karaoke video.
|
||||
- `Artist - Title (Lyrics).txt`
|
||||
- Unmodified lyrics fetched from genius.com based on the artist/title provided
|
||||
- Depending on the song, may have lines which are too long for one karaoke screen
|
||||
- `Artist - Title (Lyrics Processed).txt`
|
||||
- Lyrics from genius, split into lines no longer than 40 characters
|
||||
- You should open this and copy/paste the text into the MidiCo lyrics editor
|
||||
- `Artist - Title (Vocals UVR-MDX-NET-Inst_HQ_3).mp3`
|
||||
- Vocal track from the audio, separated using the UVR Inst_HQ_3 model.
|
||||
- You probably don't need this unless you're trying to tweak the backing track
|
||||
- `Artist - Title (Vocals UVR_MDXNET_KARA_2).mp3`
|
||||
- Vocal track from the audio, separated using the UVR KARA_2 model.
|
||||
- You probably don't need this unless you're trying to tweak the backing track
|
||||
- `Artist - Title (Instrumental UVR-MDX-NET-Inst_HQ_3).mp3`
|
||||
- Instrumental track from the audio, separated using the UVR Inst_HQ_3 model.
|
||||
- This is typically a safe bet for the instrumental track but will not include any backing vocals.
|
||||
- `Artist - Title (Instrumental UVR_MDXNET_KARA_2).mp3`
|
||||
- Instrumental track from the audio, separated using the UVR KARA_2 model.
|
||||
- This is the default choice for the finalisation step below as it usually does a good job of keeping backing vocals. However for some songs it includes far too much or is kinda glitchy, so you should check it before finalising and make a judgement call about using this vs. the Inst_HQ_3 one.
|
||||
- `Artist - Title (Title).png`
|
||||
- Title screen static image; if you specify your own background image, font, color etc. this should give you a convenient way to add a title screen to the start of your video.
|
||||
- `Artist - Title (Title).mov`
|
||||
- 5 second video clip version of the title screen image, ready to be joined by the finalisation step.
|
||||
|
||||
|
||||
## Finalisation 🎥
|
||||
|
||||
After completing your manual sync process and rendering your `Artist - Title (Karaoke).mov` file (still using the original audio!) into the same folder, you can now run `karaoke-finalise`.
|
||||
|
||||
This will output some additional files:
|
||||
- `Artist - Title (Karaoke).mov`
|
||||
- Karaoke video without title screen, remuxed to use the instrumental audio
|
||||
- `Artist - Title (With Vocals).mov`
|
||||
- Karaoke video without title screen, using the original audio (useful for practicing!)
|
||||
- `Artist - Title (Final Karaoke).mp4`
|
||||
- Final karaoke video with 5 second title screen intro, instrumental audio and converted to MP4 for compatibility and reduced file size. Upload this to YouTube!
|
||||
|
||||
|
||||
## Requirements 📋
|
||||
|
||||
Python <= 3.10 (one of the dependencies doesn't like 3.11 yet)
|
||||
Python >= 3.9
|
||||
|
||||
Libraries: onnx, onnxruntime, numpy, soundfile, librosa, torch, wget, six
|
||||
|
||||
|
||||
@@ -0,0 +1,262 @@
|
||||
from collections.abc import Sequence
|
||||
from enum import Enum
|
||||
from typing import BinaryIO, NamedTuple, TypeAlias
|
||||
|
||||
from .utils import *
|
||||
|
||||
|
||||
_RGBColor: TypeAlias = tuple[int, int, int]
|
||||
|
||||
|
||||
CDG_COMMAND = 0x09
|
||||
# TODO Find out how to store proper parity bytes
|
||||
CDG_PARITY = 0xa5
|
||||
CDG_MASK = 0x3f
|
||||
|
||||
CDG_SCREEN_WIDTH = 300
|
||||
CDG_SCREEN_HEIGHT = 216
|
||||
CDG_VISIBLE_WIDTH = 280
|
||||
CDG_VISIBLE_HEIGHT = 192
|
||||
CDG_VISIBLE_X = 6
|
||||
CDG_VISIBLE_Y = 12
|
||||
CDG_TILE_WIDTH = 6
|
||||
CDG_TILE_HEIGHT = 12
|
||||
|
||||
CDG_FPS = 300
|
||||
|
||||
|
||||
class CDGInstruction(Enum):
|
||||
NO_INSTRUCTION = 0x00
|
||||
MEMORY_PRESET = 0x01
|
||||
BORDER_PRESET = 0x02
|
||||
TILE_BLOCK = 0x06
|
||||
SCROLL_PRESET = 0x14
|
||||
SCROLL_COPY = 0x18
|
||||
DEFINE_TRANSPARENT = 0x1c
|
||||
LOAD_COLOR_TABLE_LO = 0x1e
|
||||
LOAD_COLOR_TABLE_HI = 0x1f
|
||||
TILE_BLOCK_XOR = 0x26
|
||||
|
||||
|
||||
class CDGScrollCommand(Enum):
|
||||
NO_SCROLL = 0
|
||||
SCROLL_RIGHT = 1
|
||||
SCROLL_DOWN = 1
|
||||
SCROLL_AHEAD = 1
|
||||
SCROLL_LEFT = 2
|
||||
SCROLL_UP = 2
|
||||
SCROLL_BACK = 2
|
||||
|
||||
|
||||
class CDGPacket(NamedTuple):
|
||||
command: bool
|
||||
instruction: CDGInstruction
|
||||
data: bytes
|
||||
|
||||
|
||||
class CDGWriter:
|
||||
def __init__(self):
|
||||
self.packets: list[CDGPacket] = []
|
||||
|
||||
def queue_packet(self, packet: CDGPacket):
|
||||
self.packets.append(packet)
|
||||
|
||||
def queue_packets(self, packets: Sequence[CDGPacket]):
|
||||
for packet in packets:
|
||||
self.queue_packet(packet)
|
||||
|
||||
@property
|
||||
def packets_queued(self) -> int:
|
||||
return len(self.packets)
|
||||
|
||||
def write_packets(self, stream: BinaryIO):
|
||||
for packet in self.packets:
|
||||
self.write_packet(stream, packet)
|
||||
|
||||
def write_packet(self, stream: BinaryIO, packet: CDGPacket):
|
||||
stream.write((CDG_COMMAND if packet.command else 0x00).to_bytes())
|
||||
stream.write(packet.instruction.value.to_bytes())
|
||||
stream.write(CDG_PARITY.to_bytes() * 2)
|
||||
stream.write(packet.data)
|
||||
stream.write(CDG_PARITY.to_bytes() * 4)
|
||||
|
||||
|
||||
def no_instruction() -> CDGPacket:
|
||||
return CDGPacket(
|
||||
command=False,
|
||||
instruction=CDGInstruction.NO_INSTRUCTION,
|
||||
data=b"\x00" * 16,
|
||||
)
|
||||
|
||||
def memory_preset(color: int, repeat: int = 0) -> CDGPacket:
|
||||
return CDGPacket(
|
||||
command=True,
|
||||
instruction=CDGInstruction.MEMORY_PRESET,
|
||||
data=bytes(pad(
|
||||
[
|
||||
color & 0xf,
|
||||
repeat & 0xf,
|
||||
],
|
||||
16,
|
||||
padvalue=0,
|
||||
)),
|
||||
)
|
||||
|
||||
def border_preset(color: int) -> CDGPacket:
|
||||
return CDGPacket(
|
||||
command=True,
|
||||
instruction=CDGInstruction.BORDER_PRESET,
|
||||
data=bytes(pad(
|
||||
[
|
||||
color & 0xf,
|
||||
],
|
||||
16,
|
||||
padvalue=0,
|
||||
)),
|
||||
)
|
||||
|
||||
def tile_block(
|
||||
color0: int,
|
||||
color1: int,
|
||||
row: int,
|
||||
column: int,
|
||||
tile: Sequence[int],
|
||||
) -> CDGPacket:
|
||||
assert len(tile) == 12, "tile must have 12 rows"
|
||||
return CDGPacket(
|
||||
command=True,
|
||||
instruction=CDGInstruction.TILE_BLOCK,
|
||||
data=bytes([
|
||||
color0 & 0xf,
|
||||
color1 & 0xf,
|
||||
row & 0x1f,
|
||||
column & 0x3f,
|
||||
*[t & 0x3f for t in tile],
|
||||
]),
|
||||
)
|
||||
|
||||
def scroll_preset(
|
||||
color: int = 0,
|
||||
hcmd: CDGScrollCommand = CDGScrollCommand.NO_SCROLL,
|
||||
hoffset: int = 0,
|
||||
vcmd: CDGScrollCommand = CDGScrollCommand.NO_SCROLL,
|
||||
voffset: int = 0,
|
||||
) -> CDGPacket:
|
||||
return CDGPacket(
|
||||
command=True,
|
||||
instruction=CDGInstruction.SCROLL_PRESET,
|
||||
data=bytes(pad(
|
||||
[
|
||||
color & 0xf,
|
||||
(hcmd.value << 4) | (hoffset & 0x7),
|
||||
(vcmd.value << 4) | (voffset & 0xf),
|
||||
],
|
||||
16,
|
||||
padvalue=0,
|
||||
)),
|
||||
)
|
||||
|
||||
def scroll_copy(
|
||||
color: int = 0,
|
||||
hcmd: CDGScrollCommand = CDGScrollCommand.NO_SCROLL,
|
||||
hoffset: int = 0,
|
||||
vcmd: CDGScrollCommand = CDGScrollCommand.NO_SCROLL,
|
||||
voffset: int = 0,
|
||||
) -> CDGPacket:
|
||||
return CDGPacket(
|
||||
command=True,
|
||||
instruction=CDGInstruction.SCROLL_COPY,
|
||||
data=bytes(pad(
|
||||
[
|
||||
color & 0xf,
|
||||
(hcmd.value << 4) | (hoffset & 0x7),
|
||||
(vcmd.value << 4) | (voffset & 0xf),
|
||||
],
|
||||
16,
|
||||
padvalue=0,
|
||||
)),
|
||||
)
|
||||
|
||||
def define_transparent(levels: Sequence[int]) -> CDGPacket:
|
||||
assert len(levels) == 16, "must load 16 transparency levels"
|
||||
return CDGPacket(
|
||||
command=True,
|
||||
instruction=CDGInstruction.DEFINE_TRANSPARENT,
|
||||
data=bytes([level & CDG_MASK for level in levels]),
|
||||
)
|
||||
|
||||
def load_color_table_lo(colors: Sequence[_RGBColor]) -> CDGPacket:
|
||||
assert len(colors) == 8, "must load 8 colors into low table"
|
||||
return CDGPacket(
|
||||
command=True,
|
||||
instruction=CDGInstruction.LOAD_COLOR_TABLE_LO,
|
||||
data=b"".join(map(_rgb_to_bytes, colors)),
|
||||
)
|
||||
|
||||
def load_color_table_hi(colors: Sequence[_RGBColor]) -> CDGPacket:
|
||||
assert len(colors) == 8, "must load 8 colors into high table"
|
||||
return CDGPacket(
|
||||
command=True,
|
||||
instruction=CDGInstruction.LOAD_COLOR_TABLE_HI,
|
||||
data=b"".join(map(_rgb_to_bytes, colors)),
|
||||
)
|
||||
|
||||
def tile_block_xor(
|
||||
color0: int,
|
||||
color1: int,
|
||||
row: int,
|
||||
column: int,
|
||||
tile: Sequence[int],
|
||||
) -> CDGPacket:
|
||||
assert len(tile) == 12, "tile must have 12 rows"
|
||||
return CDGPacket(
|
||||
command=True,
|
||||
instruction=CDGInstruction.TILE_BLOCK_XOR,
|
||||
data=bytes([
|
||||
color0 & 0xf,
|
||||
color1 & 0xf,
|
||||
row & 0x1f,
|
||||
column & 0x3f,
|
||||
*[t & 0x3f for t in tile],
|
||||
]),
|
||||
)
|
||||
|
||||
|
||||
def memory_preset_repeat(color: int) -> list[CDGPacket]:
|
||||
return [
|
||||
memory_preset(color, repeat)
|
||||
for repeat in range(16)
|
||||
]
|
||||
|
||||
def load_color_table(colors: Sequence[_RGBColor]) -> list[CDGPacket]:
|
||||
assert len(colors) == 16, "must load 16 colors into table"
|
||||
return [
|
||||
load_color_table_lo(colors[:8]),
|
||||
load_color_table_hi(colors[8:]),
|
||||
]
|
||||
|
||||
|
||||
def _rgb_to_bytes(rgb: _RGBColor) -> bytes:
|
||||
r, g, b = rgb
|
||||
hi = ((r & 0xf0) >> 2) | ((g & 0xc0) >> 6)
|
||||
lo = (g & 0x30) | ((b & 0xf0) >> 4)
|
||||
return bytes([hi, lo])
|
||||
|
||||
|
||||
__all__ = [
|
||||
"CDG_COMMAND", "CDG_PARITY", "CDG_MASK",
|
||||
"CDG_SCREEN_WIDTH", "CDG_SCREEN_HEIGHT",
|
||||
"CDG_VISIBLE_WIDTH", "CDG_VISIBLE_HEIGHT",
|
||||
"CDG_VISIBLE_X", "CDG_VISIBLE_Y",
|
||||
"CDG_TILE_WIDTH", "CDG_TILE_HEIGHT",
|
||||
"CDG_FPS",
|
||||
|
||||
"CDGInstruction", "CDGScrollCommand", "CDGPacket",
|
||||
"CDGWriter",
|
||||
|
||||
"no_instruction", "memory_preset", "border_preset", "tile_block",
|
||||
"scroll_preset", "scroll_copy", "define_transparent",
|
||||
"load_color_table_lo", "load_color_table_hi", "tile_block_xor",
|
||||
|
||||
"memory_preset_repeat", "load_color_table",
|
||||
]
|
||||
@@ -0,0 +1,131 @@
|
||||
from enum import StrEnum
|
||||
from pathlib import Path
|
||||
from typing import Any, TypeAlias
|
||||
|
||||
from attrs import define, field
|
||||
from PIL import ImageColor
|
||||
|
||||
|
||||
# NOTE RGBColor is specifically an RGB 3-tuple (red, green, blue).
|
||||
RGBColor: TypeAlias = tuple[int, int, int]
|
||||
def to_rgbcolor(val: Any) -> RGBColor:
|
||||
if isinstance(val, str):
|
||||
return ImageColor.getrgb(val)[:3]
|
||||
raise TypeError("color value not convertible to RGBColor")
|
||||
def to_rgbcolor_or_none(val: Any) -> RGBColor | None:
|
||||
if val is None or val == "":
|
||||
return None
|
||||
if isinstance(val, str):
|
||||
return ImageColor.getrgb(val)[:3]
|
||||
raise TypeError("color value not convertible to RGBColor or None")
|
||||
|
||||
|
||||
class LyricClearMode(StrEnum):
|
||||
PAGE = "page"
|
||||
LINE_EAGER = "eager"
|
||||
LINE_DELAYED = "delayed"
|
||||
|
||||
|
||||
class TextAlign(StrEnum):
|
||||
LEFT = "left"
|
||||
CENTER = "center"
|
||||
RIGHT = "right"
|
||||
|
||||
|
||||
class TextPlacement(StrEnum):
|
||||
TOP_LEFT = "top left"
|
||||
TOP_MIDDLE = "top middle"
|
||||
TOP_RIGHT = "top right"
|
||||
MIDDLE_LEFT = "middle left"
|
||||
MIDDLE = "middle"
|
||||
MIDDLE_RIGHT = "middle right"
|
||||
BOTTOM_LEFT = "bottom left"
|
||||
BOTTOM_MIDDLE = "bottom middle"
|
||||
BOTTOM_RIGHT = "bottom right"
|
||||
|
||||
|
||||
class StrokeType(StrEnum):
|
||||
CIRCLE = "circle"
|
||||
SQUARE = "square"
|
||||
OCTAGON = "octagon"
|
||||
|
||||
|
||||
@define
|
||||
class SettingsInstrumental:
|
||||
sync: int
|
||||
line_tile_height: int
|
||||
|
||||
wait: bool = True
|
||||
text: str = "INSTRUMENTAL"
|
||||
text_align: TextAlign = TextAlign.CENTER
|
||||
text_placement: TextPlacement = TextPlacement.MIDDLE
|
||||
fill: RGBColor = field(converter=to_rgbcolor, default="#bbb")
|
||||
stroke: RGBColor | None = field(
|
||||
converter=to_rgbcolor_or_none,
|
||||
default=None,
|
||||
)
|
||||
background: RGBColor | None = field(
|
||||
converter=to_rgbcolor_or_none,
|
||||
default=None,
|
||||
)
|
||||
image: Path | None = None
|
||||
transition: str | None = None
|
||||
x: int = 0
|
||||
y: int = 0
|
||||
|
||||
|
||||
@define
|
||||
class SettingsSinger:
|
||||
active_fill: RGBColor = field(converter=to_rgbcolor, default="#33f")
|
||||
active_stroke: RGBColor = field(converter=to_rgbcolor, default="#004")
|
||||
inactive_fill: RGBColor = field(converter=to_rgbcolor, default="#ddf")
|
||||
inactive_stroke: RGBColor = field(converter=to_rgbcolor, default="#009")
|
||||
|
||||
|
||||
@define
|
||||
class SettingsLyric:
|
||||
sync: list[int]
|
||||
text: str
|
||||
line_tile_height: int
|
||||
lines_per_page: int
|
||||
|
||||
singer: int = 1
|
||||
row: int = 1
|
||||
|
||||
|
||||
@define
|
||||
class Settings:
|
||||
title: str
|
||||
artist: str
|
||||
file: Path
|
||||
font: Path
|
||||
title_screen_background: Path
|
||||
|
||||
outname: str = "output"
|
||||
clear_mode: LyricClearMode = LyricClearMode.LINE_DELAYED
|
||||
sync_offset: int = 0
|
||||
highlight_bandwidth: int = 1
|
||||
draw_bandwidth: int = 1
|
||||
background: RGBColor = field(converter=to_rgbcolor, default="black")
|
||||
border: RGBColor | None = field(
|
||||
converter=to_rgbcolor_or_none,
|
||||
default="black",
|
||||
)
|
||||
font_size: int = 18
|
||||
stroke_width: int = 0
|
||||
stroke_type: StrokeType = StrokeType.OCTAGON
|
||||
instrumentals: list[SettingsInstrumental] = field(factory=list)
|
||||
singers: list[SettingsSinger] = field(factory=list)
|
||||
lyrics: list[SettingsLyric] = field(factory=list)
|
||||
title_color: RGBColor = field(converter=to_rgbcolor, default="#ffffff")
|
||||
artist_color: RGBColor = field(converter=to_rgbcolor, default="#ffdf6b")
|
||||
|
||||
|
||||
__all__ = [
|
||||
"RGBColor",
|
||||
|
||||
"LyricClearMode", "TextAlign", "TextPlacement", "StrokeType",
|
||||
|
||||
"SettingsInstrumental", "SettingsSinger", "SettingsLyric",
|
||||
"Settings",
|
||||
]
|
||||
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 17 KiB |
@@ -0,0 +1,360 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import logging
|
||||
import re
|
||||
import toml
|
||||
import argparse
|
||||
from pathlib import Path
|
||||
from cdgmaker.composer import KaraokeComposer
|
||||
import sys
|
||||
from PIL import ImageFont, Image
|
||||
from cdgmaker.render import get_wrapped_text
|
||||
import itertools
|
||||
|
||||
# Constants for TOML configuration
|
||||
CLEAR_MODE = "eager"
|
||||
BACKGROUND_COLOR = "#111427"
|
||||
BORDER_COLOR = "#111427"
|
||||
FONT_SIZE = 18
|
||||
STROKE_WIDTH = 0
|
||||
STROKE_STYLE = "octagon"
|
||||
ACTIVE_FILL = "#7070F7"
|
||||
ACTIVE_STROKE = "#000000"
|
||||
INACTIVE_FILL = "#ff7acc"
|
||||
INACTIVE_STROKE = "#000000"
|
||||
|
||||
CDG_VISIBLE_WIDTH = 280
|
||||
TITLE_COLOR = "#ffffff"
|
||||
ARTIST_COLOR = "#ffdf6b"
|
||||
|
||||
FONT = "/Users/andrew/AvenirNext-Bold.ttf"
|
||||
TITLE_SCREEN_BACKGROUND = "/Users/andrew/cdg-title-screen-background-nomad-simple.png"
|
||||
|
||||
# Instead, create a logger specific to this module
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# Add new constants for default values
|
||||
DEFAULT_ROW = 4 # Increased from 1 to move text lower
|
||||
DEFAULT_LINE_TILE_HEIGHT = 3
|
||||
DEFAULT_LINES_PER_PAGE = 4
|
||||
|
||||
# Add new constants for instrumentals
|
||||
INSTRUMENTAL_GAP_THRESHOLD = 1500 # 15 seconds in centiseconds
|
||||
DEFAULT_INSTRUMENTAL_TEXT = "INSTRUMENTAL"
|
||||
|
||||
# Add these constants near the top of the file, with the other constants
|
||||
INSTRUMENTAL_BACKGROUND = "/Users/andrew/cdg-instrumental-background-nomad-notes.png"
|
||||
INSTRUMENTAL_TRANSITION = "cdginstrumentalwipepatternnomad"
|
||||
INSTRUMENTAL_FONT_COLOR = "#ffdf6b"
|
||||
|
||||
# Add this constant near the top of the file with other constants
|
||||
LEAD_IN_THRESHOLD = 300 # 3 seconds in centiseconds
|
||||
LEAD_IN_OFFSET = 200 # 2 seconds in centiseconds
|
||||
|
||||
# Modify these constants near the top of the file
|
||||
LEAD_IN_SYMBOLS = ["/>", ">", ">", ">"]
|
||||
LEAD_IN_DURATION = 30 # 300 ms in centiseconds
|
||||
LEAD_IN_TOTAL = 200 # 2 seconds in centiseconds
|
||||
|
||||
|
||||
def parse_lrc(lrc_file):
|
||||
with open(lrc_file, "r", encoding="utf-8") as f:
|
||||
content = f.read()
|
||||
|
||||
# Extract timestamps and lyrics
|
||||
pattern = r"\[(\d{2}):(\d{2})\.(\d{3})\](\d+:)?(/?.*)"
|
||||
matches = re.findall(pattern, content)
|
||||
|
||||
if not matches:
|
||||
raise ValueError(f"No valid lyrics found in the LRC file: {lrc_file}")
|
||||
|
||||
lyrics = []
|
||||
for match in matches:
|
||||
minutes, seconds, milliseconds = map(int, match[:3])
|
||||
timestamp = (minutes * 60 + seconds) * 100 + int(milliseconds / 10) # Convert to centiseconds
|
||||
text = match[4].strip().upper()
|
||||
if text: # Only add non-empty lyrics
|
||||
lyrics.append({"timestamp": timestamp, "text": text})
|
||||
# logger.debug(f"Parsed lyric: {timestamp} - {text}")
|
||||
|
||||
logger.info(f"Found {len(lyrics)} lyric lines")
|
||||
return lyrics
|
||||
|
||||
|
||||
def detect_instrumentals(lyrics_data):
|
||||
instrumentals = []
|
||||
for i in range(len(lyrics_data) - 1):
|
||||
current_end = lyrics_data[i]["timestamp"]
|
||||
next_start = lyrics_data[i + 1]["timestamp"]
|
||||
gap = next_start - current_end
|
||||
if gap >= INSTRUMENTAL_GAP_THRESHOLD:
|
||||
instrumental_start = current_end + 200 # Add 2 seconds (200 centiseconds) delay
|
||||
instrumental_duration = (gap - 200) // 100 # Convert to seconds
|
||||
instrumentals.append(
|
||||
{
|
||||
"sync": instrumental_start,
|
||||
"wait": True,
|
||||
"text": f"{DEFAULT_INSTRUMENTAL_TEXT}\n{instrumental_duration} seconds\n",
|
||||
"text_align": "center",
|
||||
"text_placement": "bottom middle",
|
||||
"line_tile_height": DEFAULT_LINE_TILE_HEIGHT,
|
||||
"fill": INSTRUMENTAL_FONT_COLOR,
|
||||
"stroke": "",
|
||||
"image": INSTRUMENTAL_BACKGROUND,
|
||||
"transition": INSTRUMENTAL_TRANSITION,
|
||||
}
|
||||
)
|
||||
logger.info(
|
||||
f"Detected instrumental: Gap of {gap} cs, starting at {instrumental_start} cs, duration {instrumental_duration} seconds"
|
||||
)
|
||||
|
||||
logger.info(f"Total instrumentals detected: {len(instrumentals)}")
|
||||
return instrumentals
|
||||
|
||||
|
||||
def generate_toml(lrc_file, audio_file, title, artist, output_file, row, line_tile_height, lines_per_page, title_color, artist_color):
|
||||
try:
|
||||
lyrics_data = parse_lrc(lrc_file)
|
||||
except ValueError as e:
|
||||
logger.error(f"Error parsing LRC file: {e}")
|
||||
return
|
||||
|
||||
if not lyrics_data:
|
||||
logger.error(f"No lyrics data found in the LRC file: {lrc_file}")
|
||||
return
|
||||
|
||||
sync_times = []
|
||||
formatted_lyrics = []
|
||||
|
||||
for i, lyric in enumerate(lyrics_data):
|
||||
logger.debug(f"Processing lyric {i}: timestamp {lyric['timestamp']}, text '{lyric['text']}'")
|
||||
|
||||
if i == 0 or lyric["timestamp"] - lyrics_data[i - 1]["timestamp"] >= LEAD_IN_THRESHOLD:
|
||||
lead_in_start = lyric["timestamp"] - LEAD_IN_TOTAL
|
||||
logger.debug(f"Adding lead-in before lyric {i} at timestamp {lead_in_start}")
|
||||
for j, symbol in enumerate(LEAD_IN_SYMBOLS):
|
||||
sync_time = lead_in_start + j * LEAD_IN_DURATION
|
||||
sync_times.append(sync_time)
|
||||
formatted_lyrics.append(symbol)
|
||||
logger.debug(f" Added lead-in symbol {j+1}: '{symbol}' at {sync_time}")
|
||||
|
||||
sync_times.append(lyric["timestamp"])
|
||||
formatted_lyrics.append(lyric["text"])
|
||||
logger.debug(f"Added lyric: '{lyric['text']}' at {lyric['timestamp']}")
|
||||
|
||||
instrumentals = detect_instrumentals(lyrics_data)
|
||||
formatted_lyrics = format_lyrics(formatted_lyrics, instrumentals, sync_times)
|
||||
|
||||
toml_data = {
|
||||
"title": title,
|
||||
"artist": artist,
|
||||
"file": audio_file,
|
||||
"outname": Path(lrc_file).stem,
|
||||
"clear_mode": CLEAR_MODE,
|
||||
"sync_offset": 0,
|
||||
"background": BACKGROUND_COLOR,
|
||||
"border": BORDER_COLOR,
|
||||
"font": FONT,
|
||||
"font_size": FONT_SIZE,
|
||||
"stroke_width": STROKE_WIDTH,
|
||||
"stroke_style": STROKE_STYLE,
|
||||
"singers": [
|
||||
{"active_fill": ACTIVE_FILL, "active_stroke": ACTIVE_STROKE, "inactive_fill": INACTIVE_FILL, "inactive_stroke": INACTIVE_STROKE}
|
||||
],
|
||||
"lyrics": [
|
||||
{
|
||||
"singer": 1,
|
||||
"sync": sync_times,
|
||||
"row": row,
|
||||
"line_tile_height": line_tile_height,
|
||||
"lines_per_page": lines_per_page,
|
||||
"text": formatted_lyrics,
|
||||
}
|
||||
],
|
||||
"title_color": title_color,
|
||||
"artist_color": artist_color,
|
||||
"title_screen_background": TITLE_SCREEN_BACKGROUND,
|
||||
"instrumentals": instrumentals,
|
||||
}
|
||||
|
||||
with open(output_file, "w", encoding="utf-8") as f:
|
||||
toml.dump(toml_data, f)
|
||||
|
||||
logger.info(f"TOML file generated: {output_file}")
|
||||
|
||||
|
||||
def get_font():
|
||||
try:
|
||||
return ImageFont.truetype(FONT, FONT_SIZE)
|
||||
except IOError:
|
||||
logger.warning(f"Font file {FONT} not found. Using default font.")
|
||||
return ImageFont.load_default()
|
||||
|
||||
|
||||
def get_text_width(text, font):
|
||||
return font.getmask(text).getbbox()[2]
|
||||
|
||||
|
||||
def wrap_text(text, max_width, font):
|
||||
words = text.split()
|
||||
lines = []
|
||||
current_line = []
|
||||
current_width = 0
|
||||
|
||||
for word in words:
|
||||
word_width = get_text_width(word, font)
|
||||
if current_width + word_width <= max_width:
|
||||
current_line.append(word)
|
||||
current_width += word_width + get_text_width(" ", font)
|
||||
else:
|
||||
if current_line:
|
||||
lines.append(" ".join(current_line))
|
||||
logger.debug(f"Wrapped line: {' '.join(current_line)}")
|
||||
current_line = [word]
|
||||
current_width = word_width
|
||||
|
||||
if current_line:
|
||||
lines.append(" ".join(current_line))
|
||||
logger.debug(f"Wrapped line: {' '.join(current_line)}")
|
||||
|
||||
return lines
|
||||
|
||||
|
||||
def format_lyrics(lyrics_data, instrumentals, sync_times):
|
||||
formatted_lyrics = []
|
||||
font = get_font()
|
||||
logger.debug(f"Using font: {font}")
|
||||
|
||||
current_line = ""
|
||||
lines_on_page = 0
|
||||
page_number = 1
|
||||
|
||||
for i, text in enumerate(lyrics_data):
|
||||
logger.debug(f"Processing text {i}: '{text}' (sync time: {sync_times[i]})")
|
||||
|
||||
if text.startswith("/"):
|
||||
if current_line:
|
||||
wrapped_lines = get_wrapped_text(current_line.strip(), font, CDG_VISIBLE_WIDTH).split("\n")
|
||||
for wrapped_line in wrapped_lines:
|
||||
formatted_lyrics.append(wrapped_line)
|
||||
lines_on_page += 1
|
||||
logger.debug(f"Added wrapped line: '{wrapped_line}'. Lines on page: {lines_on_page}")
|
||||
if lines_on_page == 4:
|
||||
lines_on_page = 0
|
||||
page_number += 1
|
||||
logger.debug(f"Page full. New page number: {page_number}")
|
||||
current_line = ""
|
||||
text = text[1:]
|
||||
|
||||
current_line += text + " "
|
||||
logger.debug(f"Current line: '{current_line}'")
|
||||
|
||||
is_last_before_instrumental = any(
|
||||
inst["sync"] > sync_times[i] and (i == len(sync_times) - 1 or sync_times[i + 1] > inst["sync"]) for inst in instrumentals
|
||||
)
|
||||
|
||||
if is_last_before_instrumental or i == len(lyrics_data) - 1:
|
||||
if current_line:
|
||||
wrapped_lines = get_wrapped_text(current_line.strip(), font, CDG_VISIBLE_WIDTH).split("\n")
|
||||
for wrapped_line in wrapped_lines:
|
||||
formatted_lyrics.append(wrapped_line)
|
||||
lines_on_page += 1
|
||||
logger.debug(f"Added wrapped line at end of section: '{wrapped_line}'. Lines on page: {lines_on_page}")
|
||||
if lines_on_page == 4:
|
||||
lines_on_page = 0
|
||||
page_number += 1
|
||||
logger.debug(f"Page full. New page number: {page_number}")
|
||||
current_line = ""
|
||||
|
||||
if is_last_before_instrumental:
|
||||
blank_lines_needed = 4 - lines_on_page
|
||||
if blank_lines_needed < 4:
|
||||
formatted_lyrics.extend(["~"] * blank_lines_needed)
|
||||
logger.debug(f"Added {blank_lines_needed} empty lines before instrumental. Lines on page was {lines_on_page}")
|
||||
lines_on_page = 0
|
||||
page_number += 1
|
||||
logger.debug(f"Reset lines_on_page to 0. New page number: {page_number}")
|
||||
|
||||
final_lyrics = []
|
||||
for line in formatted_lyrics:
|
||||
final_lyrics.append(line)
|
||||
if line.endswith(("!", "?", ".")) and not line == "~":
|
||||
final_lyrics.append("~")
|
||||
logger.debug("Added empty line after punctuation")
|
||||
|
||||
result = "\n".join(final_lyrics)
|
||||
logger.debug(f"Final formatted lyrics:\n{result}")
|
||||
return result
|
||||
|
||||
|
||||
def generate_cdg(
|
||||
lrc_file,
|
||||
audio_file,
|
||||
title,
|
||||
artist,
|
||||
row=DEFAULT_ROW,
|
||||
line_tile_height=DEFAULT_LINE_TILE_HEIGHT,
|
||||
lines_per_page=DEFAULT_LINES_PER_PAGE,
|
||||
title_color=TITLE_COLOR,
|
||||
artist_color=ARTIST_COLOR,
|
||||
):
|
||||
"""
|
||||
Generate a CDG file from an LRC file and audio file.
|
||||
|
||||
This function can be called from other Python code to generate CDG files.
|
||||
"""
|
||||
# Set up logging for this function if it hasn't been configured
|
||||
if not logger.handlers:
|
||||
handler = logging.StreamHandler()
|
||||
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
|
||||
handler.setFormatter(formatter)
|
||||
logger.addHandler(handler)
|
||||
logger.setLevel(logging.INFO) # Set to INFO by default, can be changed
|
||||
|
||||
toml_file = f"{Path(lrc_file).stem}.toml"
|
||||
generate_toml(lrc_file, audio_file, title, artist, toml_file, row, line_tile_height, lines_per_page, title_color, artist_color)
|
||||
|
||||
try:
|
||||
kc = KaraokeComposer.from_file(toml_file)
|
||||
kc.compose()
|
||||
logger.info("CDG file generated successfully")
|
||||
except Exception as e:
|
||||
logger.error(f"Error composing CDG: {e}")
|
||||
raise
|
||||
|
||||
|
||||
def cli_main():
|
||||
"""
|
||||
Command-line interface entry point for the lrc2cdg tool.
|
||||
"""
|
||||
# Set up logging for CLI use
|
||||
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s")
|
||||
|
||||
parser = argparse.ArgumentParser(description="Convert LRC file to CDG")
|
||||
parser.add_argument("lrc_file", help="Path to the LRC file")
|
||||
parser.add_argument("audio_file", help="Path to the audio file")
|
||||
parser.add_argument("--title", required=True, help="Title of the song")
|
||||
parser.add_argument("--artist", required=True, help="Artist of the song")
|
||||
parser.add_argument("--row", type=int, default=DEFAULT_ROW, help="Starting row for lyrics (0-17)")
|
||||
parser.add_argument("--line-tile-height", type=int, default=DEFAULT_LINE_TILE_HEIGHT, help="Height of each line in tile rows")
|
||||
parser.add_argument("--lines-per-page", type=int, default=DEFAULT_LINES_PER_PAGE, help="Number of lines per page")
|
||||
parser.add_argument("--title-color", default=TITLE_COLOR, help="Color of the title text on the intro screen")
|
||||
parser.add_argument("--artist-color", default=ARTIST_COLOR, help="Color of the artist text on the intro screen")
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
generate_cdg(
|
||||
args.lrc_file,
|
||||
args.audio_file,
|
||||
args.title,
|
||||
args.artist,
|
||||
args.row,
|
||||
args.line_tile_height,
|
||||
args.lines_per_page,
|
||||
args.title_color,
|
||||
args.artist_color,
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
cli_main()
|
||||
@@ -0,0 +1,507 @@
|
||||
from collections.abc import Collection
|
||||
import itertools as it
|
||||
import operator
|
||||
|
||||
from PIL import Image, ImageChops
|
||||
|
||||
from .cdg import *
|
||||
from .render import *
|
||||
from .utils import *
|
||||
|
||||
|
||||
FILL = 0
|
||||
STROKE = 1
|
||||
HIGHLIGHT = 2
|
||||
|
||||
|
||||
def image_section_to_tile_data(
|
||||
image: Image.Image,
|
||||
colors: Collection[int],
|
||||
xy: tuple[int, int] = (0, 0),
|
||||
) -> list[int]:
|
||||
"""
|
||||
Convert a section of an image to a list of CDG tile data bytes.
|
||||
|
||||
The 6x12 section of the image with `xy` at the top left corner is
|
||||
converted to a list of CDG tile data bytes. If a pixel's color index
|
||||
is in `colors`, it is converted to color 1; otherwise, it is
|
||||
converted to color 0. Pixels outside of the image are considered to
|
||||
have a color index of 0.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
image : `PIL.Image.Image`
|
||||
Image to convert to tile data bytes.
|
||||
colors : collection of int
|
||||
Color indices to convert as color 1.
|
||||
xy : tuple of (int, int), default (0, 0)
|
||||
Top left corner of image section to convert.
|
||||
|
||||
Returns
|
||||
-------
|
||||
list of int
|
||||
Tile data bytes.
|
||||
"""
|
||||
x, y = xy
|
||||
tile_data: list[int] = []
|
||||
for image_y in range(y, y + CDG_TILE_HEIGHT):
|
||||
# If image Y is out of bounds
|
||||
if not (0 <= image_y < image.height):
|
||||
# Every pixel in this row is considered 0
|
||||
tile_data.append(CDG_MASK if 0 in colors else 0)
|
||||
continue
|
||||
|
||||
tile_line = 0
|
||||
for image_x in range(x, x + CDG_TILE_WIDTH):
|
||||
if 0 <= image_x < image.width:
|
||||
pixel = image.getpixel((image_x, image_y))
|
||||
else:
|
||||
# If image X is out of bounds, pixel is 0
|
||||
pixel = 0
|
||||
# Shift in one bit, which is "on" if the pixel is in the
|
||||
# collection of colors and "off" otherwise
|
||||
tile_line = (tile_line << 1) | (pixel in colors)
|
||||
tile_data.append(tile_line)
|
||||
|
||||
return tile_data
|
||||
|
||||
|
||||
def line_image_to_packets(
|
||||
image: Image.Image,
|
||||
xy: tuple[int, int],
|
||||
fill: int = FILL,
|
||||
stroke: int = STROKE,
|
||||
background: int = 0,
|
||||
erase: bool = False,
|
||||
) -> list[CDGPacket]:
|
||||
"""
|
||||
Convert a karaoke line image to CDG packets.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
image : `PIL.Image.Image`
|
||||
Image to convert.
|
||||
xy : tuple of (int, int)
|
||||
Position of top left corner of image on-screen.
|
||||
fill : int, default 0
|
||||
Color index of text fill.
|
||||
stroke : int, default 1
|
||||
Color index of text stroke.
|
||||
background : int, default 0
|
||||
Color index of background.
|
||||
erase : bool, default False
|
||||
If true, render the CDG packets to erase this karaoke line; if
|
||||
false, render the CDG packets to draw this karaoke line.
|
||||
|
||||
Returns
|
||||
-------
|
||||
list of `CDGPacket`
|
||||
CDG packets to draw this karaoke line image.
|
||||
"""
|
||||
x, y = xy
|
||||
|
||||
width = ceildiv(
|
||||
# Width includes the blank space to the left of the first tile
|
||||
(x % CDG_TILE_WIDTH) + image.width,
|
||||
CDG_TILE_WIDTH,
|
||||
)
|
||||
height = ceildiv(
|
||||
# Height includes the blank space above the first tile
|
||||
(y % CDG_TILE_HEIGHT) + image.height,
|
||||
CDG_TILE_HEIGHT,
|
||||
)
|
||||
|
||||
packets: list[CDGPacket] = []
|
||||
# NOTE We iterate top-to-bottom, then left-to-right, so the effect
|
||||
# is sweeping across the columns from left to right.
|
||||
for tile_x, tile_y in it.product(range(width), range(height)):
|
||||
image_x = tile_x * CDG_TILE_WIDTH - (x % CDG_TILE_WIDTH)
|
||||
image_y = tile_y * CDG_TILE_HEIGHT - (y % CDG_TILE_HEIGHT)
|
||||
|
||||
row = y // CDG_TILE_HEIGHT + tile_y
|
||||
column = x // CDG_TILE_WIDTH + tile_x
|
||||
# Skip if row or column is out of bounds
|
||||
if not (
|
||||
0 <= row < CDG_SCREEN_HEIGHT // CDG_TILE_HEIGHT
|
||||
and 0 <= column < CDG_SCREEN_WIDTH // CDG_TILE_WIDTH
|
||||
):
|
||||
continue
|
||||
|
||||
if erase:
|
||||
# Draw blank tiles over non-blank parts of the image
|
||||
tile_data = image_section_to_tile_data(
|
||||
image,
|
||||
colors=[RENDERED_BLANK],
|
||||
xy=(image_x, image_y),
|
||||
)
|
||||
if any(t != CDG_MASK for t in tile_data):
|
||||
packets.append(tile_block(
|
||||
color0=background, color1=background,
|
||||
row=row, column=column,
|
||||
tile=[0 for _ in range(CDG_TILE_HEIGHT)],
|
||||
))
|
||||
else:
|
||||
# Draw stroke
|
||||
tile_data = image_section_to_tile_data(
|
||||
image,
|
||||
colors=[RENDERED_STROKE],
|
||||
xy=(image_x, image_y),
|
||||
)
|
||||
drew_stroke = False
|
||||
if any(tile_data):
|
||||
drew_stroke = True
|
||||
packets.append(tile_block(
|
||||
color0=background, color1=stroke,
|
||||
row=row, column=column,
|
||||
tile=tile_data,
|
||||
))
|
||||
|
||||
# Draw text
|
||||
tile_data = image_section_to_tile_data(
|
||||
image,
|
||||
colors=[RENDERED_FILL],
|
||||
xy=(image_x, image_y),
|
||||
)
|
||||
if any(tile_data):
|
||||
packet_func = tile_block
|
||||
color0 = background
|
||||
color1 = fill
|
||||
if drew_stroke:
|
||||
packet_func = tile_block_xor
|
||||
color0 = 0
|
||||
color1 = fill ^ background
|
||||
packets.append(packet_func(
|
||||
color0=color0, color1=color1,
|
||||
row=row, column=column,
|
||||
tile=tile_data,
|
||||
))
|
||||
|
||||
return packets
|
||||
|
||||
|
||||
def line_mask_to_packets(
|
||||
image: Image.Image,
|
||||
xy: tuple[int, int],
|
||||
edges: tuple[int, int],
|
||||
highlight: int = HIGHLIGHT,
|
||||
) -> list[CDGPacket]:
|
||||
"""
|
||||
Convert a section of a karaoke mask image to CDG packets.
|
||||
|
||||
The section is assumed to take up only one column of tiles.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
image : `PIL.Image.Image`
|
||||
Image to convert.
|
||||
xy : tuple of (int, int)
|
||||
Position of top left corner of image on-screen.
|
||||
edges : tuple of (int, int)
|
||||
X positions of left and right edges of section.
|
||||
highlight : int, default 2
|
||||
Number with necessary bits on for highlight. This is XORed with
|
||||
the color index for pixels with highlight.
|
||||
|
||||
Returns
|
||||
-------
|
||||
list of `CDGPacket`
|
||||
CDG packets to draw this section of this karaoke line mask.
|
||||
"""
|
||||
x, y = xy
|
||||
left_edge, right_edge = edges
|
||||
|
||||
# Create section mask
|
||||
section_mask = Image.new("P", image.size, 0)
|
||||
# Draw rectangle with color 255 with edges as boundaries
|
||||
# NOTE The color index must be 255 for ImageChops.multiply to
|
||||
# preserve the color indices.
|
||||
section_mask.paste(255, (left_edge - x, 0, right_edge - x, image.height))
|
||||
# Mask out section of image
|
||||
section = ImageChops.multiply(image, section_mask)
|
||||
|
||||
height = ceildiv(
|
||||
# Height includes the blank space above the first tile
|
||||
(y % CDG_TILE_HEIGHT) + image.height,
|
||||
CDG_TILE_HEIGHT,
|
||||
)
|
||||
|
||||
packets: list[CDGPacket] = []
|
||||
tile_x = (left_edge // CDG_TILE_WIDTH) - (x // CDG_TILE_WIDTH)
|
||||
# For all tiles in this column
|
||||
for tile_y in range(height):
|
||||
image_x = tile_x * CDG_TILE_WIDTH - (x % CDG_TILE_WIDTH)
|
||||
image_y = tile_y * CDG_TILE_HEIGHT - (y % CDG_TILE_HEIGHT)
|
||||
|
||||
row = y // CDG_TILE_HEIGHT + tile_y
|
||||
column = x // CDG_TILE_WIDTH + tile_x
|
||||
# Skip if row or column is out of bounds
|
||||
if not (
|
||||
0 <= row < CDG_SCREEN_HEIGHT // CDG_TILE_HEIGHT
|
||||
and 0 <= column < CDG_SCREEN_WIDTH // CDG_TILE_WIDTH
|
||||
):
|
||||
continue
|
||||
|
||||
# Draw mask section as highlight
|
||||
tile_data = image_section_to_tile_data(
|
||||
section,
|
||||
colors=[RENDERED_MASK],
|
||||
xy=(image_x, image_y),
|
||||
)
|
||||
if any(tile_data):
|
||||
packets.append(tile_block_xor(
|
||||
color0=0, color1=highlight,
|
||||
row=row, column=column,
|
||||
tile=tile_data,
|
||||
))
|
||||
|
||||
return packets
|
||||
|
||||
|
||||
def image_to_packets(
|
||||
image: Image.Image,
|
||||
xy: tuple[int, int] = (0, 0),
|
||||
background: Image.Image | None = None,
|
||||
) -> dict[tuple[int, int], list[CDGPacket]]:
|
||||
"""
|
||||
Convert an image to CDG packets.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
image : `PIL.Image.Image`
|
||||
Image to convert.
|
||||
xy : tuple of (int, int), default (0, 0)
|
||||
Position to draw image on screen.
|
||||
|
||||
Returns
|
||||
-------
|
||||
dict of {tuple of (int, int): list of CDGPacket}
|
||||
Tile positions, and CDG packets to draw at those positions.
|
||||
"""
|
||||
# Image must be in palette mode
|
||||
assert image.mode == "P"
|
||||
# Image must have correct number of colors
|
||||
# HACK Assuming the palette is in RGB, there should be one palette
|
||||
# entry per band (R, G, B). I don't know of a better way to count
|
||||
# palette entries.
|
||||
# REVIEW Is there a better way to count palette entries?
|
||||
palette_mode, palette_data = image.palette.getdata()
|
||||
assert palette_mode == "RGB"
|
||||
assert len(palette_data) // 3 <= 16
|
||||
|
||||
# Same things apply to the background image, if any
|
||||
if background is not None:
|
||||
assert background.mode == "P"
|
||||
bg_palette_mode, bg_palette_data = background.palette.getdata()
|
||||
assert bg_palette_mode == "RGB"
|
||||
assert len(bg_palette_data) // 3 <= 16
|
||||
|
||||
x, y = xy
|
||||
|
||||
width = ceildiv(
|
||||
# Width includes the blank space to the left of the first tile
|
||||
(x % CDG_TILE_WIDTH) + image.width,
|
||||
CDG_TILE_WIDTH,
|
||||
)
|
||||
height = ceildiv(
|
||||
# Height includes the blank space above the first tile
|
||||
(y % CDG_TILE_HEIGHT) + image.height,
|
||||
CDG_TILE_HEIGHT,
|
||||
)
|
||||
|
||||
packets: dict[tuple[int, int], list[CDGPacket]] = {}
|
||||
for tile_y, tile_x in it.product(range(height), range(width)):
|
||||
image_x = tile_x * CDG_TILE_WIDTH - (x % CDG_TILE_WIDTH)
|
||||
image_y = tile_y * CDG_TILE_HEIGHT - (y % CDG_TILE_HEIGHT)
|
||||
|
||||
row = y // CDG_TILE_HEIGHT + tile_y
|
||||
column = x // CDG_TILE_WIDTH + tile_x
|
||||
# Skip if row or column is out of bounds
|
||||
if not (
|
||||
0 <= row < CDG_SCREEN_HEIGHT // CDG_TILE_HEIGHT
|
||||
and 0 <= column < CDG_SCREEN_WIDTH // CDG_TILE_WIDTH
|
||||
):
|
||||
continue
|
||||
|
||||
tile = image.crop((
|
||||
image_x, image_y,
|
||||
image_x + CDG_TILE_WIDTH, image_y + CDG_TILE_HEIGHT,
|
||||
))
|
||||
background_tile = None
|
||||
if background is not None:
|
||||
background_tile = background.crop((
|
||||
image_x, image_y,
|
||||
image_x + CDG_TILE_WIDTH, image_y + CDG_TILE_HEIGHT,
|
||||
))
|
||||
packets[(row, column)] = tile_to_packets(
|
||||
tile, row, column,
|
||||
background_tile=background_tile,
|
||||
)
|
||||
|
||||
return packets
|
||||
|
||||
|
||||
# REVIEW How can I change this function to draw an image over already
|
||||
# existing pixels on the screen? For example, sometimes it would be more
|
||||
# efficient to XOR over existing pixels than to draw a new tile.
|
||||
def tile_to_packets(
|
||||
tile: Image.Image,
|
||||
row: int,
|
||||
column: int,
|
||||
background_tile: Image.Image | None = None,
|
||||
) -> list[CDGPacket]:
|
||||
"""
|
||||
Convert a tile to CDG packets.
|
||||
|
||||
The tile is assumed to be a 6x12 image in `P` mode.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
tile : `PIL.Image.Image`
|
||||
Tile to convert.
|
||||
row : int
|
||||
Row to draw tile on screen.
|
||||
column : int
|
||||
Column to draw tile on screen.
|
||||
|
||||
Returns
|
||||
-------
|
||||
list of CDGPacket
|
||||
CDG packets to draw this tile.
|
||||
"""
|
||||
# If the background tile has the same pixels as the tile we want to
|
||||
# draw, don't draw this tile
|
||||
if (
|
||||
background_tile is not None
|
||||
and list(tile.getdata()) == list(background_tile.getdata())
|
||||
):
|
||||
return []
|
||||
|
||||
# Sort colors in descending order by frequency
|
||||
colors: list[int] = list(map(
|
||||
operator.itemgetter(1),
|
||||
sorted(tile.getcolors(), reverse=True),
|
||||
))
|
||||
|
||||
if len(colors) == 1:
|
||||
# HACK If the only color is 0 (and we're not drawing over a
|
||||
# background tile), we don't draw this tile. This is not always
|
||||
# desirable, but it's fine for our purposes.
|
||||
if background_tile is None and not colors[0]:
|
||||
return []
|
||||
return [
|
||||
tile_block(
|
||||
color0=0, color1=colors[0],
|
||||
row=row, column=column,
|
||||
tile=[CDG_MASK] * CDG_TILE_HEIGHT,
|
||||
),
|
||||
]
|
||||
|
||||
if len(colors) == 2:
|
||||
return [
|
||||
tile_block(
|
||||
color0=colors[1], color1=colors[0],
|
||||
row=row, column=column,
|
||||
tile=image_section_to_tile_data(tile, [colors[0]]),
|
||||
),
|
||||
]
|
||||
|
||||
if len(colors) == 3:
|
||||
return [
|
||||
tile_block(
|
||||
color0=colors[1], color1=colors[0],
|
||||
row=row, column=column,
|
||||
tile=image_section_to_tile_data(tile, [colors[0]]),
|
||||
),
|
||||
tile_block_xor(
|
||||
color0=0, color1=colors[1] ^ colors[2],
|
||||
row=row, column=column,
|
||||
tile=image_section_to_tile_data(tile, [colors[2]]),
|
||||
),
|
||||
]
|
||||
|
||||
colors_or = 0x00
|
||||
colors_xor = 0x00
|
||||
colors_and = 0xff
|
||||
for color in colors:
|
||||
colors_or |= color
|
||||
colors_xor ^= color
|
||||
colors_and &= color
|
||||
and_bits = colors_and.bit_count()
|
||||
or_bits = colors_or.bit_count()
|
||||
used_bits = or_bits - and_bits
|
||||
|
||||
if len(colors) == 4 and used_bits > 2 and colors_xor != 0:
|
||||
return [
|
||||
tile_block(
|
||||
color0=colors[0], color1=colors[1],
|
||||
row=row, column=column,
|
||||
tile=image_section_to_tile_data(
|
||||
tile, [colors[1], colors[2], colors[3]],
|
||||
),
|
||||
),
|
||||
tile_block_xor(
|
||||
color0=0, color1=colors[1] ^ colors[2],
|
||||
row=row, column=column,
|
||||
tile=image_section_to_tile_data(
|
||||
tile, [colors[2]],
|
||||
),
|
||||
),
|
||||
tile_block_xor(
|
||||
color0=0, color1=colors[1] ^ colors[3],
|
||||
row=row, column=column,
|
||||
tile=image_section_to_tile_data(
|
||||
tile, [colors[3]],
|
||||
),
|
||||
),
|
||||
]
|
||||
|
||||
if len(colors) > 4 or colors_xor != 0:
|
||||
tile_packets: list[CDGPacket] = []
|
||||
|
||||
packet_func = tile_block
|
||||
for i in range(4):
|
||||
if not colors_or & (1 << i):
|
||||
continue
|
||||
if colors_and & (1 << i):
|
||||
continue
|
||||
|
||||
color0 = 0
|
||||
color1 = 1 << i
|
||||
if packet_func == tile_block and colors_and:
|
||||
color0 |= colors_and
|
||||
color1 |= colors_and
|
||||
|
||||
tile_packets.append(packet_func(
|
||||
color0=color0, color1=color1,
|
||||
row=row, column=column,
|
||||
tile=image_section_to_tile_data(
|
||||
tile,
|
||||
[color for color in range(16) if color & (1 << i)],
|
||||
),
|
||||
))
|
||||
packet_func = tile_block_xor
|
||||
return tile_packets
|
||||
|
||||
assert colors[2] ^ colors[0] == colors[1] ^ colors[3]
|
||||
return [
|
||||
tile_block(
|
||||
color0=colors[1], color1=colors[0],
|
||||
row=row, column=column,
|
||||
tile=image_section_to_tile_data(
|
||||
tile, [colors[0], colors[2]],
|
||||
),
|
||||
),
|
||||
tile_block_xor(
|
||||
color0=0, color1=colors[2] ^ colors[0],
|
||||
row=row, column=column,
|
||||
tile=image_section_to_tile_data(
|
||||
tile, [colors[2], colors[3]],
|
||||
),
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
__all__ = [
|
||||
"image_section_to_tile_data", "line_image_to_packets",
|
||||
"line_mask_to_packets", "image_to_packets", "tile_to_packets",
|
||||
]
|
||||
@@ -0,0 +1,346 @@
|
||||
from collections.abc import Sequence
|
||||
import itertools as it
|
||||
|
||||
from PIL import Image, ImageChops, ImageDraw, ImageFont
|
||||
|
||||
from .config import *
|
||||
|
||||
|
||||
import logging
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
RENDERED_BLANK = 0
|
||||
RENDERED_MASK = 1
|
||||
RENDERED_FILL = 1
|
||||
RENDERED_STROKE = 2
|
||||
|
||||
|
||||
def get_wrapped_text(
|
||||
text: str,
|
||||
font: ImageFont.FreeTypeFont,
|
||||
width: int,
|
||||
) -> str:
|
||||
"""
|
||||
Add newlines to text such that it fits within the specified width
|
||||
using the specified font.
|
||||
|
||||
Existing newlines are preserved.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
text : str
|
||||
Text to add newlines to.
|
||||
font : `PIL.ImageFont.FreeTypeFont`
|
||||
Font in which text will be rendered.
|
||||
width : int
|
||||
Maximum width of text lines in pixels.
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
Text with inserted newlines.
|
||||
"""
|
||||
lines: list[str] = []
|
||||
for text_line in text.split("\n"):
|
||||
words: list[str] = []
|
||||
for word in text_line.split():
|
||||
if font.getlength(" ".join(words + [word])) > width:
|
||||
lines.append(" ".join(words))
|
||||
words.clear()
|
||||
words.append(word)
|
||||
lines.append(" ".join(words))
|
||||
words.clear()
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
def render_text(
|
||||
text: str,
|
||||
font: ImageFont.FreeTypeFont,
|
||||
fill: int = RENDERED_FILL,
|
||||
stroke_fill: int = RENDERED_STROKE,
|
||||
stroke_width: int = 0,
|
||||
stroke_type: StrokeType = StrokeType.OCTAGON,
|
||||
) -> Image.Image:
|
||||
"""
|
||||
Render one text line as a `PIL.Image.Image` in `P` mode.
|
||||
|
||||
There may be horizontal padding on both sides of the image. However,
|
||||
for the same text prefix or suffix, the padding on that side will be
|
||||
the same.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
text : str
|
||||
Text line to render.
|
||||
font : `PIL.ImageFont.FreeTypeFont`
|
||||
Font to render text with.
|
||||
config : `config.Settings`
|
||||
Config settings.
|
||||
fill : int, default 1
|
||||
Color index of the text fill.
|
||||
stroke_fill : int, default 2
|
||||
Color index of the text stroke.
|
||||
stroke_width : int, default 0
|
||||
Width of the text stroke.
|
||||
stroke_type : `StrokeType`, default `StrokeType.OCTAGON`
|
||||
Stroke type.
|
||||
|
||||
Returns
|
||||
-------
|
||||
`PIL.Image.Image`
|
||||
Image with rendered text.
|
||||
"""
|
||||
# Get relevant dimensions for font
|
||||
_, _, text_width, _ = font.getbbox(text)
|
||||
ascent, descent = font.getmetrics()
|
||||
(_, _), (offset_x, _) = font.font.getsize(text)
|
||||
|
||||
image_width = text_width - offset_x
|
||||
image_height = ascent + descent
|
||||
# Add space on left/right for stroke
|
||||
image_width += 2 * stroke_width
|
||||
# Add space on top/bottom for stroke
|
||||
image_height += 2 * stroke_width
|
||||
# HACK I don't know exactly why, but sometimes a few pixels are cut
|
||||
# off on the sides, so we add some horizontal padding here. (This is
|
||||
# cropped by another function, so it's okay.)
|
||||
padding_x = font.size * 4
|
||||
image_width += padding_x
|
||||
offset_x -= padding_x // 2
|
||||
|
||||
image = Image.new("P", (image_width, image_height), 0)
|
||||
draw = ImageDraw.Draw(image)
|
||||
# Turn off antialiasing
|
||||
draw.fontmode = "1"
|
||||
|
||||
draw_x = stroke_width - offset_x
|
||||
draw_y = stroke_width
|
||||
# If we are to draw a text stroke
|
||||
if stroke_width and stroke_fill is not None:
|
||||
# NOTE PIL allows text to be drawn with a stroke, but this
|
||||
# stroke is anti-aliased, and you can't turn off the anti-
|
||||
# aliasing on it. So instead, we're simulating a stroke by
|
||||
# drawing the text multiple times at various offsets.
|
||||
stroke_coords = list(it.product(
|
||||
range(-stroke_width, stroke_width + 1), repeat=2,
|
||||
))
|
||||
match stroke_type:
|
||||
case StrokeType.CIRCLE:
|
||||
stroke_coords = [
|
||||
(x, y)
|
||||
for x, y in stroke_coords
|
||||
if x**2 + y**2 <= stroke_width ** 2
|
||||
]
|
||||
case StrokeType.SQUARE:
|
||||
pass
|
||||
case StrokeType.OCTAGON:
|
||||
stroke_coords = [
|
||||
(x, y)
|
||||
for x, y in stroke_coords
|
||||
|
||||
if (abs(x) + abs(y)) * 2 <= stroke_width * 3
|
||||
]
|
||||
|
||||
# Create image for text stroke
|
||||
stroke_image = Image.new("P", image.size, 0)
|
||||
stroke_draw = ImageDraw.Draw(stroke_image)
|
||||
# Turn off antialiasing
|
||||
stroke_draw.fontmode = "1"
|
||||
|
||||
# Render text stroke
|
||||
stroke_draw.text((draw_x, draw_y), text, stroke_fill, font)
|
||||
# Create mask for text stroke
|
||||
stroke_mask = stroke_image.point(lambda v: v and 255, mode="1")
|
||||
# Draw text stroke at various offsets
|
||||
for x, y in stroke_coords:
|
||||
image.paste(stroke_image, (x, y), mask=stroke_mask)
|
||||
# NOTE Drawing the stroke once and pasting it multiple times is
|
||||
# faster than drawing the stroke multiple times.
|
||||
|
||||
# Draw text fill
|
||||
draw.text((draw_x, draw_y), text, fill, font)
|
||||
return image
|
||||
|
||||
|
||||
def render_lines_and_masks(
|
||||
lines: Sequence[Sequence[str]],
|
||||
font: ImageFont.FreeTypeFont,
|
||||
stroke_width: int = 0,
|
||||
stroke_type: StrokeType = StrokeType.OCTAGON,
|
||||
render_masks: bool = True,
|
||||
) -> tuple[list[Image.Image], list[list[Image.Image]]]:
|
||||
"""
|
||||
Render set of karaoke lines as `PIL.Image.Image`s, and masks for
|
||||
each syllable as lists of `PIL.Image.Image`s.
|
||||
|
||||
The line images will be cropped as much as possible on the left,
|
||||
right, and bottom sides. The top side of all line images will be
|
||||
cropped by the largest amount that does not shrink any of their
|
||||
bounding boxes.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
lines : list of list of str
|
||||
Lines as lists of syllables.
|
||||
font : `PIL.ImageFont.FreeTypeFont`
|
||||
Font to render text with.
|
||||
stroke_width : int, default 0
|
||||
WIdth of the text stroke.
|
||||
stroke_type : `StrokeType`, default `StrokeType.OCTAGON`
|
||||
Stroke type.
|
||||
render_masks : bool, default True
|
||||
If true, render masks for each line.
|
||||
|
||||
Returns
|
||||
-------
|
||||
list of `PIL.Image.Image`
|
||||
Images with rendered lines.
|
||||
list of list of `PIL.Image.Image`
|
||||
Images with rendered masks for each syllable for each line.
|
||||
"""
|
||||
logger.debug("rendering line images")
|
||||
# Render line images
|
||||
uncropped_line_images = [
|
||||
render_text(
|
||||
text="".join(line),
|
||||
font=font,
|
||||
fill=RENDERED_FILL,
|
||||
stroke_fill=RENDERED_STROKE,
|
||||
stroke_width=stroke_width,
|
||||
stroke_type=stroke_type,
|
||||
)
|
||||
for line in lines
|
||||
]
|
||||
# Calculate how much the tops of the lines can be cropped
|
||||
top_crop = min(
|
||||
(
|
||||
bbox[1]
|
||||
for image in uncropped_line_images
|
||||
if (bbox := image.getbbox()) is not None
|
||||
),
|
||||
default=0,
|
||||
)
|
||||
logger.debug(
|
||||
f"line images will be cropped by {top_crop} pixel(s) on the top"
|
||||
)
|
||||
|
||||
# Crop line images
|
||||
line_images: list[Image.Image] = []
|
||||
bboxes: list[Sequence[int]] = []
|
||||
logger.debug("cropping line images")
|
||||
for image in uncropped_line_images:
|
||||
bbox = image.getbbox()
|
||||
if bbox is None:
|
||||
# Create empty bounding box if image is empty
|
||||
bbox = (0, 0, 0, 0)
|
||||
else:
|
||||
# Crop top of bounding box is image is not empty
|
||||
bbox = list(bbox)
|
||||
bbox[1] = top_crop
|
||||
|
||||
bboxes.append(bbox)
|
||||
line_images.append(image.crop(bbox))
|
||||
|
||||
if not render_masks:
|
||||
logger.debug("not rendering masks")
|
||||
return line_images, []
|
||||
|
||||
# Render mask images
|
||||
line_masks: list[list[Image.Image]] = []
|
||||
logger.debug("rendering/cropping masks")
|
||||
for line, bbox in zip(lines, bboxes):
|
||||
# HACK For whatever reason, the presence or absence of certain
|
||||
# characters of text can cause the rendered text to be 1 pixel
|
||||
# off. We fix this by adding the entire rest of the text after
|
||||
# each rendered part of it, so this mysterious offset is at
|
||||
# least consistent.
|
||||
extra_text = "".join(line)
|
||||
# NOTE We will prefix the extra text with way more spaces than
|
||||
# necessary, so it doesn't show up in the mask images.
|
||||
text_padding = " " * bbox[2]
|
||||
# REVIEW More testing is needed. Which characters does this
|
||||
# happen for? Why does this even happen?
|
||||
# Using Old Sans Black, this happens with at least "t" and "!".
|
||||
|
||||
# Get masks of the line's text from the start up to each
|
||||
# syllable
|
||||
# e.g. ["Don't ", "walk ", "a", "way"] ->
|
||||
# ["Don't ", "Don't walk ", "Don't walk a", "Don't walk away"]
|
||||
full_line_masks = [
|
||||
render_text(
|
||||
text="".join(line[:i+1]) + text_padding + extra_text,
|
||||
font=font,
|
||||
fill=RENDERED_MASK,
|
||||
stroke_fill=RENDERED_MASK,
|
||||
stroke_width=stroke_width,
|
||||
stroke_type=stroke_type,
|
||||
).crop(bbox)
|
||||
for i in range(len(line))
|
||||
]
|
||||
|
||||
line_mask: list[Image.Image] = []
|
||||
# If this line has any syllables
|
||||
if full_line_masks:
|
||||
# Start with the first syllable's mask...
|
||||
line_mask = [full_line_masks[0]] + [
|
||||
# ...then get the pixel-by-pixel difference between each
|
||||
# pair of full-line masks
|
||||
ImageChops.difference(prev_mask, next_mask)
|
||||
for prev_mask, next_mask in it.pairwise(full_line_masks)
|
||||
]
|
||||
# NOTE This will isolate the pixels that make up this syllable,
|
||||
# by basically "cancelling out" the previous syllables of the
|
||||
# line.
|
||||
line_masks.append(line_mask)
|
||||
|
||||
return line_images, line_masks
|
||||
|
||||
|
||||
def render_lines(
|
||||
lines: Sequence[Sequence[str]],
|
||||
font: ImageFont.FreeTypeFont,
|
||||
stroke_width: int = 0,
|
||||
stroke_type: StrokeType = StrokeType.OCTAGON,
|
||||
) -> list[Image.Image]:
|
||||
"""
|
||||
Render set of karaoke lines as `PIL.Image.Image`s.
|
||||
|
||||
The line images will be cropped as much as possible on the left,
|
||||
right, and bottom sides. The top side of all line images will be
|
||||
cropped by the largest amount that does not shrink any of their
|
||||
bounding boxes.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
lines : list of list of str
|
||||
Lines as lists of syllables.
|
||||
font : `PIL.ImageFont.FreeTypeFont`
|
||||
Font to render text with.
|
||||
stroke_width : int, default 0
|
||||
WIdth of the text stroke.
|
||||
stroke_type : `StrokeType`, default `StrokeType.OCTAGON`
|
||||
Stroke type.
|
||||
|
||||
Returns
|
||||
-------
|
||||
list of `PIL.Image.Image`
|
||||
Images with rendered lines.
|
||||
"""
|
||||
images, _ = render_lines_and_masks(
|
||||
lines,
|
||||
font=font,
|
||||
stroke_width=stroke_width,
|
||||
stroke_type=stroke_type,
|
||||
render_masks=False,
|
||||
)
|
||||
return images
|
||||
|
||||
|
||||
__all__ = [
|
||||
"RENDERED_BLANK", "RENDERED_MASK", "RENDERED_FILL",
|
||||
"RENDERED_STROKE",
|
||||
|
||||
"get_wrapped_text", "render_text", "render_lines_and_masks",
|
||||
"render_lines",
|
||||
]
|
||||
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 53 KiB |
|
After Width: | Height: | Size: 9.6 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 9.8 KiB |
|
After Width: | Height: | Size: 8.2 KiB |
@@ -0,0 +1,132 @@
|
||||
from collections.abc import Iterable, Iterator, Sequence
|
||||
import itertools as it
|
||||
import operator
|
||||
from typing import Any, TypeVar, overload
|
||||
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
|
||||
@overload
|
||||
def ceildiv(a: int, b: int) -> int: ...
|
||||
@overload
|
||||
def ceildiv(a: float, b: float) -> float: ...
|
||||
def ceildiv(a, b):
|
||||
"""
|
||||
Return the ceiling of `a / b`.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
a : int or float
|
||||
Dividend.
|
||||
b : int or float
|
||||
Divisor.
|
||||
|
||||
Returns
|
||||
-------
|
||||
int or float
|
||||
The ceiling of the quotient of `a` and `b`.
|
||||
"""
|
||||
return -(a // -b)
|
||||
|
||||
|
||||
def distribute(
|
||||
sequence: Sequence[_T],
|
||||
start: float = 0,
|
||||
stop: float = 1,
|
||||
) -> Iterator[tuple[float, _T]]:
|
||||
"""
|
||||
Enumerate the sequence evenly over the interval (`start`, `stop`).
|
||||
|
||||
Based on https://stackoverflow.com/a/59594546 .
|
||||
|
||||
Parameters
|
||||
----------
|
||||
sequence : array-like
|
||||
Sequence to enumerate.
|
||||
start : float, default 0
|
||||
Start of interval (exclusive).
|
||||
stop : float, default 1
|
||||
End of interval (exclusive).
|
||||
|
||||
Yields
|
||||
------
|
||||
position : float
|
||||
Position of sequence item in interval.
|
||||
item
|
||||
Sequence item.
|
||||
|
||||
Examples
|
||||
--------
|
||||
>>> list(distribute("abc"))
|
||||
[(0.25, 'a'), (0.5, 'b'), (0.75, 'c')]
|
||||
>>> list(distribute("abc", 1, 4))
|
||||
[(1.75, 'a'), (2.5, 'b'), (3.25, 'c')]
|
||||
"""
|
||||
m = len(sequence) + 1
|
||||
for i, v in enumerate(sequence, 1):
|
||||
yield start + (stop - start) * i / m, v
|
||||
|
||||
|
||||
def intersperse(*sequences: Sequence[_T]) -> Iterator[_T]:
|
||||
"""
|
||||
Evenly intersperse the sequences.
|
||||
|
||||
Based on https://stackoverflow.com/a/59594546 .
|
||||
|
||||
Parameters
|
||||
----------
|
||||
*sequences
|
||||
Sequences to intersperse.
|
||||
|
||||
Yields
|
||||
------
|
||||
item
|
||||
Sequence item.
|
||||
|
||||
Examples
|
||||
--------
|
||||
>>> list(intersperse(range(10), "abc"))
|
||||
[0, 1, 'a', 2, 3, 4, 'b', 5, 6, 7, 'c', 8, 9]
|
||||
>>> list(intersperse("XY", range(10), "abc"))
|
||||
[0, 1, 'a', 2, 'X', 3, 4, 'b', 5, 6, 'Y', 7, 'c', 8, 9]
|
||||
>>> "".join(intersperse("hlwl", "eood", "l r!"))
|
||||
'hello world!'
|
||||
"""
|
||||
distributions = map(distribute, sequences)
|
||||
for _, v in sorted(it.chain(*distributions), key=operator.itemgetter(0)):
|
||||
yield v
|
||||
|
||||
|
||||
def pad(
|
||||
iterable: Iterable[_T],
|
||||
size: int,
|
||||
padvalue: Any = None,
|
||||
) -> Iterable[_T]:
|
||||
"""
|
||||
Pad an iterable to a specified size.
|
||||
|
||||
If the iterable is longer than the specified size, it is truncated.
|
||||
If it is shorter, `padvalue` is appended until the specified size is
|
||||
reached.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
iterable : iterable
|
||||
Iterable to pad.
|
||||
size : int
|
||||
Size to pad iterable to.
|
||||
padvalue : any, default None
|
||||
Value to pad iterable with.
|
||||
|
||||
Returns
|
||||
-------
|
||||
iterable
|
||||
Padded iterable.
|
||||
"""
|
||||
return it.islice(it.chain(iterable, it.repeat(padvalue)), size)
|
||||
|
||||
|
||||
__all__ = [
|
||||
"ceildiv", "distribute", "intersperse", "pad",
|
||||
]
|
||||
@@ -0,0 +1,130 @@
|
||||
# Generated by conda-lock.
|
||||
# platform: linux-64
|
||||
# input_hash: f64a1c4f40227315aea520256e9eb1b2ede7cf46e8f7ba4636b8299642464004
|
||||
@EXPLICIT
|
||||
https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2#d7c89558ba9fa0495403155b64376d81
|
||||
https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2023.11.17-hbcca054_0.conda#01ffc8d36f9eba0ce0b3c1955fa780ee
|
||||
https://conda.anaconda.org/conda-forge/linux-64/ld_impl_linux-64-2.40-h41732ed_0.conda#7aca3059a1729aa76c597603f10b0dd3
|
||||
https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-ng-13.2.0-h7e041cc_3.conda#937eaed008f6bf2191c5fe76f87755e9
|
||||
https://conda.anaconda.org/conda-forge/noarch/pybind11-abi-4-hd8ed1ab_3.tar.bz2#878f923dd6acc8aeb47a75da6c4098be
|
||||
https://conda.anaconda.org/conda-forge/linux-64/python_abi-3.12-4_cp312.conda#dccc2d142812964fcc6abdc97b672dff
|
||||
https://conda.anaconda.org/conda-forge/noarch/tzdata-2023d-h0c530f3_0.conda#8dee24b8be2d9ff81e7bd4d7d97ff1b0
|
||||
https://conda.anaconda.org/conda-forge/linux-64/libgomp-13.2.0-h807b86a_3.conda#7124cbb46b13d395bdde68f2d215c989
|
||||
https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2#73aaf86a425cc6e73fcf236a5a46396d
|
||||
https://conda.anaconda.org/conda-forge/linux-64/libgcc-ng-13.2.0-h807b86a_3.conda#23fdf1fef05baeb7eadc2aed5fb0011f
|
||||
https://conda.anaconda.org/conda-forge/linux-64/bzip2-1.0.8-hd590300_5.conda#69b8b6202a07720f448be700e300ccf4
|
||||
https://conda.anaconda.org/conda-forge/linux-64/c-ares-1.25.0-hd590300_0.conda#89e40af02dd3a0846c0c1131c5126706
|
||||
https://conda.anaconda.org/conda-forge/linux-64/fmt-10.1.1-h00ab1b0_1.conda#50a08d74ca45785f3334b175da23fd82
|
||||
https://conda.anaconda.org/conda-forge/linux-64/gettext-0.21.1-h27087fc_0.tar.bz2#14947d8770185e5153fdd04d4673ed37
|
||||
https://conda.anaconda.org/conda-forge/linux-64/icu-73.2-h59595ed_0.conda#cc47e1facc155f91abd89b11e48e72ff
|
||||
https://conda.anaconda.org/conda-forge/linux-64/keyutils-1.6.1-h166bdaf_0.tar.bz2#30186d27e2c9fa62b45fb1476b7200e3
|
||||
https://conda.anaconda.org/conda-forge/linux-64/libev-4.33-hd590300_2.conda#172bf1cd1ff8629f2b1179945ed45055
|
||||
https://conda.anaconda.org/conda-forge/linux-64/libexpat-2.5.0-hcb278e6_1.conda#6305a3dd2752c76335295da4e581f2fd
|
||||
https://conda.anaconda.org/conda-forge/linux-64/libffi-3.4.2-h7f98852_5.tar.bz2#d645c6d2ac96843a2bfaccd2d62b3ac3
|
||||
https://conda.anaconda.org/conda-forge/linux-64/libgfortran5-13.2.0-ha4646dd_3.conda#c714d905cdfa0e70200f68b80cc04764
|
||||
https://conda.anaconda.org/conda-forge/linux-64/libiconv-1.17-hd590300_2.conda#d66573916ffcf376178462f1b61c941e
|
||||
https://conda.anaconda.org/conda-forge/linux-64/libnsl-2.0.1-hd590300_0.conda#30fd6e37fe21f86f4bd26d6ee73eeec7
|
||||
https://conda.anaconda.org/conda-forge/linux-64/libuuid-2.38.1-h0b41bf4_0.conda#40b61aab5c7ba9ff276c41cfffe6b80b
|
||||
https://conda.anaconda.org/conda-forge/linux-64/libxcrypt-4.4.36-hd590300_1.conda#5aa797f8787fe7a17d1b0821485b5adc
|
||||
https://conda.anaconda.org/conda-forge/linux-64/libzlib-1.2.13-hd590300_5.conda#f36c115f1ee199da648e0597ec2047ad
|
||||
https://conda.anaconda.org/conda-forge/linux-64/lz4-c-1.9.4-hcb278e6_0.conda#318b08df404f9c9be5712aaa5a6f0bb0
|
||||
https://conda.anaconda.org/conda-forge/linux-64/lzo-2.10-h516909a_1000.tar.bz2#bb14fcb13341b81d5eb386423b9d2bac
|
||||
https://conda.anaconda.org/conda-forge/linux-64/ncurses-6.4-h59595ed_2.conda#7dbaa197d7ba6032caf7ae7f32c1efa0
|
||||
https://conda.anaconda.org/conda-forge/linux-64/openssl-3.2.0-hd590300_1.conda#603827b39ea2b835268adb8c821b8570
|
||||
https://conda.anaconda.org/conda-forge/linux-64/reproc-14.2.4.post0-hd590300_1.conda#82ca53502dfd5a64a80dee76dae14685
|
||||
https://conda.anaconda.org/conda-forge/linux-64/xz-5.2.6-h166bdaf_0.tar.bz2#2161070d867d1b1204ea749c8eec4ef0
|
||||
https://conda.anaconda.org/conda-forge/linux-64/yaml-cpp-0.8.0-h59595ed_0.conda#965eaacd7c18eb8361fd12bb9e7a57d7
|
||||
https://conda.anaconda.org/conda-forge/linux-64/expat-2.5.0-hcb278e6_1.conda#8b9b5aca60558d02ddaa09d599e55920
|
||||
https://conda.anaconda.org/conda-forge/linux-64/libedit-3.1.20191231-he28a2e2_2.tar.bz2#4d331e44109e3f0e19b4cb8f9b82f3e1
|
||||
https://conda.anaconda.org/conda-forge/linux-64/libgfortran-ng-13.2.0-h69a702a_3.conda#73031c79546ad06f1fe62e57fdd021bc
|
||||
https://conda.anaconda.org/conda-forge/linux-64/libnghttp2-1.58.0-h47da74e_1.conda#700ac6ea6d53d5510591c4344d5c989a
|
||||
https://conda.anaconda.org/conda-forge/linux-64/libsolv-0.7.27-hfc55251_0.conda#7dc82edcd617c399ca7fdb51d993a0c2
|
||||
https://conda.anaconda.org/conda-forge/linux-64/libsqlite-3.44.2-h2797004_0.conda#3b6a9f225c3dbe0d24f4fedd4625c5bf
|
||||
https://conda.anaconda.org/conda-forge/linux-64/libssh2-1.11.0-h0841786_0.conda#1f5a58e686b13bcfde88b93f547d23fe
|
||||
https://conda.anaconda.org/conda-forge/linux-64/libxml2-2.12.3-h232c23b_0.conda#bc6ac4c0cea148d924f621985bc3892b
|
||||
https://conda.anaconda.org/conda-forge/linux-64/pcre2-10.42-hcad00b1_0.conda#679c8961826aa4b50653bce17ee52abe
|
||||
https://conda.anaconda.org/conda-forge/linux-64/readline-8.2-h8228510_1.conda#47d31b792659ce70f470b5c82fdfb7a4
|
||||
https://conda.anaconda.org/conda-forge/linux-64/reproc-cpp-14.2.4.post0-h59595ed_1.conda#715e1d720ec1a03715bebd237972fca5
|
||||
https://conda.anaconda.org/conda-forge/linux-64/tk-8.6.13-noxft_h4845f30_101.conda#d453b98d9c83e71da0741bb0ff4d76bc
|
||||
https://conda.anaconda.org/conda-forge/linux-64/zstd-1.5.5-hfc55251_0.conda#04b88013080254850d6c01ed54810589
|
||||
https://conda.anaconda.org/conda-forge/linux-64/krb5-1.21.2-h659d440_0.conda#cd95826dbd331ed1be26bdf401432844
|
||||
https://conda.anaconda.org/conda-forge/linux-64/libarchive-3.7.2-h2aa1ff5_1.conda#3bf887827d1968275978361a6e405e4f
|
||||
https://conda.anaconda.org/conda-forge/linux-64/libglib-2.78.3-h783c2da_0.conda#9bd06b12bbfa6fd1740fd23af4b0f0c7
|
||||
https://conda.anaconda.org/conda-forge/linux-64/libopenblas-0.3.25-pthreads_h413a1c8_0.conda#d172b34a443b95f86089e8229ddc9a17
|
||||
https://conda.anaconda.org/conda-forge/linux-64/python-3.12.1-hab00c5b_1_cpython.conda#0bab699354cbd66959550eb9b9866620
|
||||
https://conda.anaconda.org/conda-forge/noarch/archspec-0.2.2-pyhd8ed1ab_0.conda#0dc2fce00a160271714647c019e3a8a8
|
||||
https://conda.anaconda.org/conda-forge/noarch/boltons-23.1.1-pyhd8ed1ab_0.conda#56febe65315cc388a5d20adf2b39a74d
|
||||
https://conda.anaconda.org/conda-forge/linux-64/brotli-python-1.1.0-py312h30efb56_1.conda#45801a89533d3336a365284d93298e36
|
||||
https://conda.anaconda.org/conda-forge/noarch/certifi-2023.11.17-pyhd8ed1ab_0.conda#2011bcf45376341dd1d690263fdbc789
|
||||
https://conda.anaconda.org/conda-forge/noarch/charset-normalizer-3.3.2-pyhd8ed1ab_0.conda#7f4a9e3fcff3f6356ae99244a014da6a
|
||||
https://conda.anaconda.org/conda-forge/noarch/colorama-0.4.6-pyhd8ed1ab_0.tar.bz2#3faab06a954c2a04039983f2c4a50d99
|
||||
https://conda.anaconda.org/conda-forge/noarch/crashtest-0.4.1-pyhd8ed1ab_0.tar.bz2#709a2295dd907bb34afb57d54320642f
|
||||
https://conda.anaconda.org/conda-forge/linux-64/dbus-1.13.6-h5008d03_3.tar.bz2#ecfff944ba3960ecb334b9a2663d708d
|
||||
https://conda.anaconda.org/conda-forge/noarch/distlib-0.3.8-pyhd8ed1ab_0.conda#db16c66b759a64dc5183d69cc3745a52
|
||||
https://conda.anaconda.org/conda-forge/noarch/distro-1.9.0-pyhd8ed1ab_0.conda#bbdb409974cd6cb30071b1d978302726
|
||||
https://conda.anaconda.org/conda-forge/noarch/filelock-3.13.1-pyhd8ed1ab_0.conda#0c1729b74a8152fde6a38ba0a2ab9f45
|
||||
https://conda.anaconda.org/conda-forge/noarch/idna-3.6-pyhd8ed1ab_0.conda#1a76f09108576397c41c0b0c5bd84134
|
||||
https://conda.anaconda.org/conda-forge/noarch/jeepney-0.8.0-pyhd8ed1ab_0.tar.bz2#9800ad1699b42612478755a2d26c722d
|
||||
https://conda.anaconda.org/conda-forge/linux-64/jsonpointer-2.4-py312h7900ff3_3.conda#50f62bdb9b60b13c2f6ae69957342e4d
|
||||
https://conda.anaconda.org/conda-forge/linux-64/libblas-3.9.0-20_linux64_openblas.conda#2b7bb4f7562c8cf334fc2e20c2d28abc
|
||||
https://conda.anaconda.org/conda-forge/linux-64/libcurl-8.5.0-hca28451_0.conda#7144d5a828e2cae218e0e3c98d8a0aeb
|
||||
https://conda.anaconda.org/conda-forge/linux-64/menuinst-2.0.2-py312h7900ff3_0.conda#acb03947d606ff797a036d31723490fc
|
||||
https://conda.anaconda.org/conda-forge/noarch/more-itertools-10.2.0-pyhd8ed1ab_0.conda#d5c98e9706fdc5328d49a9bf2ce5fb42
|
||||
https://conda.anaconda.org/conda-forge/linux-64/msgpack-python-1.0.7-py312h8572e83_0.conda#1ae83e30fae86320e888cb4b1f2d3b47
|
||||
https://conda.anaconda.org/conda-forge/noarch/packaging-23.2-pyhd8ed1ab_0.conda#79002079284aa895f883c6b7f3f88fd6
|
||||
https://conda.anaconda.org/conda-forge/noarch/pkginfo-1.9.6-pyhd8ed1ab_0.conda#be1e9f1c65a1ed0f2ae9352fec99db64
|
||||
https://conda.anaconda.org/conda-forge/noarch/pluggy-1.3.0-pyhd8ed1ab_0.conda#2390bd10bed1f3fdc7a537fb5a447d8d
|
||||
https://conda.anaconda.org/conda-forge/noarch/poetry-core-1.8.1-pyhd8ed1ab_0.conda#a013d99ae50670b823c511f7274d2d2a
|
||||
https://conda.anaconda.org/conda-forge/noarch/ptyprocess-0.7.0-pyhd3deb0d_0.tar.bz2#359eeb6536da0e687af562ed265ec263
|
||||
https://conda.anaconda.org/conda-forge/linux-64/pycosat-0.6.6-py312h98912ed_0.conda#8f1c372e7b843167be885dc8229931c1
|
||||
https://conda.anaconda.org/conda-forge/noarch/pycparser-2.21-pyhd8ed1ab_0.tar.bz2#076becd9e05608f8dc72757d5f3a91ff
|
||||
https://conda.anaconda.org/conda-forge/noarch/pysocks-1.7.1-pyha2e5f31_6.tar.bz2#2a7de29fb590ca14b5243c4c812c8025
|
||||
https://conda.anaconda.org/conda-forge/noarch/python-fastjsonschema-2.19.1-pyhd8ed1ab_0.conda#4d3ceee3af4b0f9a1f48f57176bf8625
|
||||
https://conda.anaconda.org/conda-forge/noarch/python-installer-0.7.0-pyhd8ed1ab_0.conda#65dea78f903d686c8b0c2feaf0e15e1f
|
||||
https://conda.anaconda.org/conda-forge/linux-64/ruamel.yaml.clib-0.2.7-py312h98912ed_2.conda#17591efb6a03e1dea6567cb15c619d1c
|
||||
https://conda.anaconda.org/conda-forge/noarch/setuptools-69.0.3-pyhd8ed1ab_0.conda#40695fdfd15a92121ed2922900d0308b
|
||||
https://conda.anaconda.org/conda-forge/noarch/shellingham-1.5.4-pyhd8ed1ab_0.conda#d08db09a552699ee9e7eec56b4eb3899
|
||||
https://conda.anaconda.org/conda-forge/noarch/tomli-2.0.1-pyhd8ed1ab_0.tar.bz2#5844808ffab9ebdb694585b50ba02a96
|
||||
https://conda.anaconda.org/conda-forge/noarch/tomlkit-0.12.3-pyha770c72_0.conda#074d0ce7a6261ab8b497c3518796ef3e
|
||||
https://conda.anaconda.org/conda-forge/noarch/trove-classifiers-2024.1.8-pyhd8ed1ab_0.conda#b120d43603f9b021d252fb7754b35557
|
||||
https://conda.anaconda.org/conda-forge/noarch/truststore-0.8.0-pyhd8ed1ab_0.conda#08316d001eca8854392cf2837828ea11
|
||||
https://conda.anaconda.org/conda-forge/noarch/typing_extensions-4.9.0-pyha770c72_0.conda#a92a6440c3fe7052d63244f3aba2a4a7
|
||||
https://conda.anaconda.org/conda-forge/noarch/wheel-0.42.0-pyhd8ed1ab_0.conda#1cdea58981c5cbc17b51973bcaddcea7
|
||||
https://conda.anaconda.org/conda-forge/noarch/zipp-3.17.0-pyhd8ed1ab_0.conda#2e4d6bc0b14e10f895fc6791a7d9b26a
|
||||
https://conda.anaconda.org/conda-forge/linux-64/cffi-1.16.0-py312hf06ca03_0.conda#56b0ca764ce23cc54f3f7e2a7b970f6d
|
||||
https://conda.anaconda.org/conda-forge/noarch/importlib-metadata-7.0.1-pyha770c72_0.conda#746623a787e06191d80a2133e5daff17
|
||||
https://conda.anaconda.org/conda-forge/noarch/jaraco.classes-3.3.0-pyhd8ed1ab_0.conda#e9f79248d30e942f7c358ff21a1790f5
|
||||
https://conda.anaconda.org/conda-forge/noarch/jsonpatch-1.33-pyhd8ed1ab_0.conda#bfdb7c5c6ad1077c82a69a8642c87aff
|
||||
https://conda.anaconda.org/conda-forge/linux-64/libcblas-3.9.0-20_linux64_openblas.conda#36d486d72ab64ffea932329a1d3729a3
|
||||
https://conda.anaconda.org/conda-forge/linux-64/liblapack-3.9.0-20_linux64_openblas.conda#6fabc51f5e647d09cc010c40061557e0
|
||||
https://conda.anaconda.org/conda-forge/linux-64/libmamba-1.5.6-had39da4_0.conda#d6213d8b3abe12c556f007894752ef41
|
||||
https://conda.anaconda.org/conda-forge/noarch/pexpect-4.8.0-pyh1a96a4e_2.tar.bz2#330448ce4403cc74990ac07c555942a1
|
||||
https://conda.anaconda.org/conda-forge/noarch/pip-23.3.2-pyhd8ed1ab_0.conda#8591c748f98dcc02253003533bc2e4b1
|
||||
https://conda.anaconda.org/conda-forge/noarch/poetry-plugin-export-1.6.0-pyhd8ed1ab_0.conda#1f2184db9f337d1074b1d5769165cac9
|
||||
https://conda.anaconda.org/conda-forge/noarch/pyproject_hooks-1.0.0-pyhd8ed1ab_0.conda#21de50391d584eb7f4441b9de1ad773f
|
||||
https://conda.anaconda.org/conda-forge/linux-64/ruamel.yaml-0.18.5-py312h98912ed_0.conda#631213fb6dee32d9004779c5b6de3c49
|
||||
https://conda.anaconda.org/conda-forge/noarch/tqdm-4.66.1-pyhd8ed1ab_0.conda#03c97908b976498dcae97eb4e4f3149c
|
||||
https://conda.anaconda.org/conda-forge/noarch/typing-extensions-4.9.0-hd8ed1ab_0.conda#c16524c1b7227dc80b36b4fa6f77cc86
|
||||
https://conda.anaconda.org/conda-forge/noarch/urllib3-2.1.0-pyhd8ed1ab_0.conda#f8ced8ee63830dec7ecc1be048d1470a
|
||||
https://conda.anaconda.org/conda-forge/linux-64/cryptography-41.0.7-py312h4742d6a_1.conda#82b6c3083757a04e8a2a4759a33df382
|
||||
https://conda.anaconda.org/conda-forge/linux-64/dulwich-0.21.7-py312h98912ed_0.conda#d9768d62ebbeb330f1b67d8ab4832ff7
|
||||
https://conda.anaconda.org/conda-forge/linux-64/libmambapy-1.5.6-py312hd9e9ff6_0.conda#ff2a396085f25808b6c2a6dea06546fe
|
||||
https://conda.anaconda.org/conda-forge/linux-64/numpy-1.26.3-py312heda63a1_0.conda#8b63634568b70ed9110f4d03dca20988
|
||||
https://conda.anaconda.org/conda-forge/noarch/platformdirs-3.11.0-pyhd8ed1ab_0.conda#8f567c0a74aa44cf732f15773b4083b0
|
||||
https://conda.anaconda.org/conda-forge/noarch/python-build-1.0.3-pyhd8ed1ab_0.conda#d9ccabf228cb98419ca3d5694b25e1a2
|
||||
https://conda.anaconda.org/conda-forge/noarch/requests-2.31.0-pyhd8ed1ab_0.conda#a30144e4156cdbb236f99ebb49828f8b
|
||||
https://conda.anaconda.org/conda-forge/linux-64/zstandard-0.22.0-py312hd58854c_0.conda#6532ce0d6b7b6c77081ba102d3540a81
|
||||
https://conda.anaconda.org/conda-forge/noarch/cachecontrol-0.13.1-pyhd8ed1ab_0.conda#174bd699bb5aa9e2622eb4b288276ff8
|
||||
https://conda.anaconda.org/conda-forge/noarch/conda-package-streaming-0.9.0-pyhd8ed1ab_0.conda#38253361efb303deead3eab39ae9269b
|
||||
https://conda.anaconda.org/conda-forge/linux-64/rapidfuzz-3.6.1-py312h30efb56_0.conda#b04ed89dc0b4f4581f003c3b3b5e85d6
|
||||
https://conda.anaconda.org/conda-forge/noarch/requests-toolbelt-1.0.0-pyhd8ed1ab_0.conda#99c98318c8646b08cc764f90ce98906e
|
||||
https://conda.anaconda.org/conda-forge/linux-64/secretstorage-3.3.3-py312h7900ff3_2.conda#39067833cbb620066d492f8bd6f11dbf
|
||||
https://conda.anaconda.org/conda-forge/noarch/virtualenv-20.25.0-pyhd8ed1ab_0.conda#c119653cba436d8183c27bf6d190e587
|
||||
https://conda.anaconda.org/conda-forge/noarch/cachecontrol-with-filecache-0.13.1-pyhd8ed1ab_0.conda#8c4781ca0893cff3a64423954ce234a1
|
||||
https://conda.anaconda.org/conda-forge/noarch/cleo-2.1.0-pyhd8ed1ab_0.conda#69569ea8a6d1465193345a40421d138b
|
||||
https://conda.anaconda.org/conda-forge/noarch/conda-package-handling-2.2.0-pyh38be061_0.conda#8a3ae7f6318376aa08ea753367bb7dd6
|
||||
https://conda.anaconda.org/conda-forge/linux-64/keyring-24.3.0-py312h7900ff3_0.conda#c303e2ddfc697a70a137940f8a6b2e1d
|
||||
https://conda.anaconda.org/conda-forge/noarch/poetry-1.7.1-linux_pyha804496_0.conda#f4ead25aee9d567898e970a107bcac7e
|
||||
https://conda.anaconda.org/conda-forge/linux-64/conda-23.11.0-py312h7900ff3_1.conda#8dd6aeb5ba421f80d5b47ee253584f20
|
||||
https://conda.anaconda.org/conda-forge/noarch/conda-libmamba-solver-23.12.0-pyhd8ed1ab_0.conda#e877d5150e73a0844ea2939be110c3b1
|
||||
https://conda.anaconda.org/conda-forge/linux-64/mamba-1.5.6-py312h9460a1c_0.conda#055217b5da9f10750a046e9ea10a1756
|
||||
@@ -0,0 +1,129 @@
|
||||
# Generated by conda-lock.
|
||||
# platform: linux-aarch64
|
||||
# input_hash: bc3de0fcb97d5683373c177f2880616dffbe0acedde12d411f84c6ff91b56e83
|
||||
@EXPLICIT
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/ca-certificates-2023.11.17-hcefe29a_0.conda#695a28440b58e3ba920bcac4ac7c73c6
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/ld_impl_linux-aarch64-2.40-h2d8c526_0.conda#16246d69e945d0b1969a6099e7c5d457
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/libgomp-13.2.0-hf8544c7_3.conda#191eb9058c6e97ca5fea3552e348a237
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/libstdcxx-ng-13.2.0-h9a76618_3.conda#7ad2164936c4975d94ca883d34809c0f
|
||||
https://conda.anaconda.org/conda-forge/noarch/pybind11-abi-4-hd8ed1ab_3.tar.bz2#878f923dd6acc8aeb47a75da6c4098be
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/python_abi-3.12-4_cp312.conda#6c09f8e580146d88f649780cebed01de
|
||||
https://conda.anaconda.org/conda-forge/noarch/tzdata-2023d-h0c530f3_0.conda#8dee24b8be2d9ff81e7bd4d7d97ff1b0
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/_openmp_mutex-4.5-2_gnu.tar.bz2#6168d71addc746e8f2b8d57dfd2edcea
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/libgcc-ng-13.2.0-hf8544c7_3.conda#00f021ee1a24c798ae53c87ee79597f1
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/bzip2-1.0.8-h31becfc_5.conda#a64e35f01e0b7a2a152eca87d33b9c87
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/c-ares-1.25.0-h31becfc_0.conda#0892c14dc88498d4cb727098141d365c
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/fmt-10.1.1-h2a328a1_1.conda#49695e320c2a672846a90ca623dce1da
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/gettext-0.21.1-ha18d298_0.tar.bz2#b109f1a4d22966793d61fd7f75b744c3
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/icu-73.2-h787c7f5_0.conda#9d3c29d71f28452a2e843aff8cbe09d2
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/keyutils-1.6.1-h4e544f5_0.tar.bz2#1f24853e59c68892452ef94ddd8afd4b
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/libev-4.33-h31becfc_2.conda#a9a13cb143bbaa477b1ebaefbe47a302
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/libexpat-2.5.0-hd600fc2_1.conda#6cd3d0a28437b3845c260f9d71d434d7
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/libffi-3.4.2-h3557bc0_5.tar.bz2#dddd85f4d52121fab0a8b099c5e06501
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/libgfortran5-13.2.0-h582850c_3.conda#d81dcb787465447542ad9c4cf0bab65e
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/libiconv-1.17-h31becfc_2.conda#9a8eb13f14de7d761555a98712e6df65
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/libnsl-2.0.1-h31becfc_0.conda#c14f32510f694e3185704d89967ec422
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/libuuid-2.38.1-hb4cce97_0.conda#000e30b09db0b7c775b21695dff30969
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/libxcrypt-4.4.36-h31becfc_1.conda#b4df5d7d4b63579d081fd3a4cf99740e
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/libzlib-1.2.13-h31becfc_5.conda#b213aa87eea9491ef7b129179322e955
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/lz4-c-1.9.4-hd600fc2_0.conda#500145a83ed07ce79c8cef24252f366b
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/lzo-2.10-h516909a_1000.tar.bz2#ef5661339990c399c68c71cfb341e6d7
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/ncurses-6.4-h0425590_2.conda#4ff0a396150dedad4269e16e5810f769
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/openssl-3.2.0-h31becfc_1.conda#b24247441ed7ce138382de2ec51200e4
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/reproc-14.2.4.post0-h31becfc_1.conda#c148bb4ba029a018527d3e4d5c7b63fa
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/xz-5.2.6-h9cdd2b7_0.tar.bz2#83baad393a31d59c20b63ba4da6592df
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/yaml-cpp-0.8.0-h2f0025b_0.conda#b5da38ee183c1e50e3e7ffb171a2eca5
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/expat-2.5.0-hd600fc2_1.conda#6dfca4be3e0080934b1105d009747e98
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/libedit-3.1.20191231-he28a2e2_2.tar.bz2#29371161d77933a54fccf1bb66b96529
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/libgfortran-ng-13.2.0-he9431aa_3.conda#6c292066bb9876d7ba35c590868baaeb
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/libnghttp2-1.58.0-hb0e430d_1.conda#8f724cdddffa79152de61f5564a3526b
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/libsolv-0.7.27-hd84c7bf_0.conda#7e092bca53956dd2fddb1eed62c22c29
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/libsqlite-3.44.2-h194ca79_0.conda#464a0dedd1131669324946ee1c13c1a5
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/libssh2-1.11.0-h492db2e_0.conda#45532845e121677ad328c9af9953f161
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/libxml2-2.12.3-h3091e33_0.conda#f7582eb42bcaa458503819687da6a143
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/pcre2-10.42-hd0f9c67_0.conda#683162253dd3b6c4d21bf037e59455f4
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/readline-8.2-h8fc344f_1.conda#105eb1e16bf83bfb2eb380a48032b655
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/reproc-cpp-14.2.4.post0-h2f0025b_1.conda#35148ef0f190022ca52cf6edd6bdc814
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/tk-8.6.13-h194ca79_0.conda#f75105e0585851f818e0009dd1dde4dc
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/zstd-1.5.5-h4c53e97_0.conda#b74eb9dbb5c3c15cb3cee7cbdf198c75
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/krb5-1.21.2-hc419048_0.conda#55b51af37bf6fdcfe06f140e62e8c8db
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/libarchive-3.7.2-hd2f85e0_1.conda#a0f2e7adbcdf4041d6ee273d07ca171e
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/libglib-2.78.3-h311d5f7_0.conda#09e44253dee99895f02cfad44dd8fea4
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/libopenblas-0.3.25-pthreads_h5a5ec62_0.conda#60e86bc93e3f213278dc5081115fb63b
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/python-3.12.1-h43d1f9e_1_cpython.conda#886aaa760e922b4f7e2522e2e0abd778
|
||||
https://conda.anaconda.org/conda-forge/noarch/archspec-0.2.2-pyhd8ed1ab_0.conda#0dc2fce00a160271714647c019e3a8a8
|
||||
https://conda.anaconda.org/conda-forge/noarch/boltons-23.1.1-pyhd8ed1ab_0.conda#56febe65315cc388a5d20adf2b39a74d
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/brotli-python-1.1.0-py312h2aa54b4_1.conda#7253fd6feb797007a3d290bbcfd23a84
|
||||
https://conda.anaconda.org/conda-forge/noarch/certifi-2023.11.17-pyhd8ed1ab_0.conda#2011bcf45376341dd1d690263fdbc789
|
||||
https://conda.anaconda.org/conda-forge/noarch/charset-normalizer-3.3.2-pyhd8ed1ab_0.conda#7f4a9e3fcff3f6356ae99244a014da6a
|
||||
https://conda.anaconda.org/conda-forge/noarch/colorama-0.4.6-pyhd8ed1ab_0.tar.bz2#3faab06a954c2a04039983f2c4a50d99
|
||||
https://conda.anaconda.org/conda-forge/noarch/crashtest-0.4.1-pyhd8ed1ab_0.tar.bz2#709a2295dd907bb34afb57d54320642f
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/dbus-1.13.6-h12b9eeb_3.tar.bz2#f3d63805602166bac09386741e00935e
|
||||
https://conda.anaconda.org/conda-forge/noarch/distlib-0.3.8-pyhd8ed1ab_0.conda#db16c66b759a64dc5183d69cc3745a52
|
||||
https://conda.anaconda.org/conda-forge/noarch/distro-1.9.0-pyhd8ed1ab_0.conda#bbdb409974cd6cb30071b1d978302726
|
||||
https://conda.anaconda.org/conda-forge/noarch/filelock-3.13.1-pyhd8ed1ab_0.conda#0c1729b74a8152fde6a38ba0a2ab9f45
|
||||
https://conda.anaconda.org/conda-forge/noarch/idna-3.6-pyhd8ed1ab_0.conda#1a76f09108576397c41c0b0c5bd84134
|
||||
https://conda.anaconda.org/conda-forge/noarch/jeepney-0.8.0-pyhd8ed1ab_0.tar.bz2#9800ad1699b42612478755a2d26c722d
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/jsonpointer-2.4-py312h996f985_3.conda#9899db49e70426c9d32b027777088fb8
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/libblas-3.9.0-20_linuxaarch64_openblas.conda#11590ed0fb5cebe7bbfa4bab8d8b07f8
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/libcurl-8.5.0-h4e8248e_0.conda#fa0f5edc06ffc25a01eed005c6dc3d8c
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/menuinst-2.0.2-py312h996f985_0.conda#1a67b77c7711209b7bbed395f1a7f57e
|
||||
https://conda.anaconda.org/conda-forge/noarch/more-itertools-10.2.0-pyhd8ed1ab_0.conda#d5c98e9706fdc5328d49a9bf2ce5fb42
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/msgpack-python-1.0.7-py312h721a97f_0.conda#23f5237a0807b8dc739bdb5853d2945c
|
||||
https://conda.anaconda.org/conda-forge/noarch/packaging-23.2-pyhd8ed1ab_0.conda#79002079284aa895f883c6b7f3f88fd6
|
||||
https://conda.anaconda.org/conda-forge/noarch/pkginfo-1.9.6-pyhd8ed1ab_0.conda#be1e9f1c65a1ed0f2ae9352fec99db64
|
||||
https://conda.anaconda.org/conda-forge/noarch/pluggy-1.3.0-pyhd8ed1ab_0.conda#2390bd10bed1f3fdc7a537fb5a447d8d
|
||||
https://conda.anaconda.org/conda-forge/noarch/poetry-core-1.8.1-pyhd8ed1ab_0.conda#a013d99ae50670b823c511f7274d2d2a
|
||||
https://conda.anaconda.org/conda-forge/noarch/ptyprocess-0.7.0-pyhd3deb0d_0.tar.bz2#359eeb6536da0e687af562ed265ec263
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/pycosat-0.6.6-py312hdd3e373_0.conda#368a87e79b0c4bb0f97b103bbd4b5c75
|
||||
https://conda.anaconda.org/conda-forge/noarch/pycparser-2.21-pyhd8ed1ab_0.tar.bz2#076becd9e05608f8dc72757d5f3a91ff
|
||||
https://conda.anaconda.org/conda-forge/noarch/pysocks-1.7.1-pyha2e5f31_6.tar.bz2#2a7de29fb590ca14b5243c4c812c8025
|
||||
https://conda.anaconda.org/conda-forge/noarch/python-fastjsonschema-2.19.1-pyhd8ed1ab_0.conda#4d3ceee3af4b0f9a1f48f57176bf8625
|
||||
https://conda.anaconda.org/conda-forge/noarch/python-installer-0.7.0-pyhd8ed1ab_0.conda#65dea78f903d686c8b0c2feaf0e15e1f
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/ruamel.yaml.clib-0.2.7-py312hdd3e373_2.conda#ea944a8a9fce4de9a84143e3f7128134
|
||||
https://conda.anaconda.org/conda-forge/noarch/setuptools-69.0.3-pyhd8ed1ab_0.conda#40695fdfd15a92121ed2922900d0308b
|
||||
https://conda.anaconda.org/conda-forge/noarch/shellingham-1.5.4-pyhd8ed1ab_0.conda#d08db09a552699ee9e7eec56b4eb3899
|
||||
https://conda.anaconda.org/conda-forge/noarch/tomli-2.0.1-pyhd8ed1ab_0.tar.bz2#5844808ffab9ebdb694585b50ba02a96
|
||||
https://conda.anaconda.org/conda-forge/noarch/tomlkit-0.12.3-pyha770c72_0.conda#074d0ce7a6261ab8b497c3518796ef3e
|
||||
https://conda.anaconda.org/conda-forge/noarch/trove-classifiers-2024.1.8-pyhd8ed1ab_0.conda#b120d43603f9b021d252fb7754b35557
|
||||
https://conda.anaconda.org/conda-forge/noarch/truststore-0.8.0-pyhd8ed1ab_0.conda#08316d001eca8854392cf2837828ea11
|
||||
https://conda.anaconda.org/conda-forge/noarch/typing_extensions-4.9.0-pyha770c72_0.conda#a92a6440c3fe7052d63244f3aba2a4a7
|
||||
https://conda.anaconda.org/conda-forge/noarch/wheel-0.42.0-pyhd8ed1ab_0.conda#1cdea58981c5cbc17b51973bcaddcea7
|
||||
https://conda.anaconda.org/conda-forge/noarch/zipp-3.17.0-pyhd8ed1ab_0.conda#2e4d6bc0b14e10f895fc6791a7d9b26a
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/cffi-1.16.0-py312hf3c74c0_0.conda#2b087fcfbe35a1bb081e1723b8c6362a
|
||||
https://conda.anaconda.org/conda-forge/noarch/importlib-metadata-7.0.1-pyha770c72_0.conda#746623a787e06191d80a2133e5daff17
|
||||
https://conda.anaconda.org/conda-forge/noarch/jaraco.classes-3.3.0-pyhd8ed1ab_0.conda#e9f79248d30e942f7c358ff21a1790f5
|
||||
https://conda.anaconda.org/conda-forge/noarch/jsonpatch-1.33-pyhd8ed1ab_0.conda#bfdb7c5c6ad1077c82a69a8642c87aff
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/libcblas-3.9.0-20_linuxaarch64_openblas.conda#b41e55ae2cb9d3518da2cbe3677b3b3b
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/liblapack-3.9.0-20_linuxaarch64_openblas.conda#e7412a592d9ee7c92026eb1189687271
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/libmamba-1.5.6-hea3be6c_0.conda#feb0be90db1e014dde541cafa78efc15
|
||||
https://conda.anaconda.org/conda-forge/noarch/pexpect-4.8.0-pyh1a96a4e_2.tar.bz2#330448ce4403cc74990ac07c555942a1
|
||||
https://conda.anaconda.org/conda-forge/noarch/pip-23.3.2-pyhd8ed1ab_0.conda#8591c748f98dcc02253003533bc2e4b1
|
||||
https://conda.anaconda.org/conda-forge/noarch/poetry-plugin-export-1.6.0-pyhd8ed1ab_0.conda#1f2184db9f337d1074b1d5769165cac9
|
||||
https://conda.anaconda.org/conda-forge/noarch/pyproject_hooks-1.0.0-pyhd8ed1ab_0.conda#21de50391d584eb7f4441b9de1ad773f
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/ruamel.yaml-0.18.5-py312hdd3e373_0.conda#0e375e2cba5a2501ad822d9deedf9aaf
|
||||
https://conda.anaconda.org/conda-forge/noarch/tqdm-4.66.1-pyhd8ed1ab_0.conda#03c97908b976498dcae97eb4e4f3149c
|
||||
https://conda.anaconda.org/conda-forge/noarch/typing-extensions-4.9.0-hd8ed1ab_0.conda#c16524c1b7227dc80b36b4fa6f77cc86
|
||||
https://conda.anaconda.org/conda-forge/noarch/urllib3-2.1.0-pyhd8ed1ab_0.conda#f8ced8ee63830dec7ecc1be048d1470a
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/cryptography-41.0.7-py312hc709039_1.conda#bd8d4ac4437b00b2f0d00d0e2303f8fd
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/dulwich-0.21.7-py312hdd3e373_0.conda#397a67598654b34b83057ff1a9cfff33
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/libmambapy-1.5.6-py312h1e39527_0.conda#037ef6053fa678b9e7ec1fccc83471e0
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/numpy-1.26.3-py312h470d778_0.conda#df857a4163668a976e4d91c7181514c0
|
||||
https://conda.anaconda.org/conda-forge/noarch/platformdirs-3.11.0-pyhd8ed1ab_0.conda#8f567c0a74aa44cf732f15773b4083b0
|
||||
https://conda.anaconda.org/conda-forge/noarch/python-build-1.0.3-pyhd8ed1ab_0.conda#d9ccabf228cb98419ca3d5694b25e1a2
|
||||
https://conda.anaconda.org/conda-forge/noarch/requests-2.31.0-pyhd8ed1ab_0.conda#a30144e4156cdbb236f99ebb49828f8b
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/zstandard-0.22.0-py312hb120188_0.conda#8d83dc36d9d38c83c3d30dcb0e6c9f2c
|
||||
https://conda.anaconda.org/conda-forge/noarch/cachecontrol-0.13.1-pyhd8ed1ab_0.conda#174bd699bb5aa9e2622eb4b288276ff8
|
||||
https://conda.anaconda.org/conda-forge/noarch/conda-package-streaming-0.9.0-pyhd8ed1ab_0.conda#38253361efb303deead3eab39ae9269b
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/rapidfuzz-3.6.1-py312h2aa54b4_0.conda#f3a808a9b78a2924b7774a8cd3c942bf
|
||||
https://conda.anaconda.org/conda-forge/noarch/requests-toolbelt-1.0.0-pyhd8ed1ab_0.conda#99c98318c8646b08cc764f90ce98906e
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/secretstorage-3.3.3-py312h8025657_2.conda#908598f88d4288b9cabc46ded32c5ee2
|
||||
https://conda.anaconda.org/conda-forge/noarch/virtualenv-20.25.0-pyhd8ed1ab_0.conda#c119653cba436d8183c27bf6d190e587
|
||||
https://conda.anaconda.org/conda-forge/noarch/cachecontrol-with-filecache-0.13.1-pyhd8ed1ab_0.conda#8c4781ca0893cff3a64423954ce234a1
|
||||
https://conda.anaconda.org/conda-forge/noarch/cleo-2.1.0-pyhd8ed1ab_0.conda#69569ea8a6d1465193345a40421d138b
|
||||
https://conda.anaconda.org/conda-forge/noarch/conda-package-handling-2.2.0-pyh38be061_0.conda#8a3ae7f6318376aa08ea753367bb7dd6
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/keyring-24.3.0-py312h996f985_0.conda#a08242a7a02d64380b5cf6a843f4356a
|
||||
https://conda.anaconda.org/conda-forge/noarch/poetry-1.7.1-linux_pyha804496_0.conda#f4ead25aee9d567898e970a107bcac7e
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/conda-23.11.0-py312h996f985_1.conda#6137c0415bccff2c993b1fb7911f846d
|
||||
https://conda.anaconda.org/conda-forge/noarch/conda-libmamba-solver-23.12.0-pyhd8ed1ab_0.conda#e877d5150e73a0844ea2939be110c3b1
|
||||
https://conda.anaconda.org/conda-forge/linux-aarch64/mamba-1.5.6-py312hd80a4d2_0.conda#0b5841ba8450cf2d1f4b8e479ba16bc5
|
||||
@@ -0,0 +1,115 @@
|
||||
# Generated by conda-lock.
|
||||
# platform: osx-64
|
||||
# input_hash: 84c30aa7789ba5570aedb1d84bd49b174515e108c41a4ffa273ec1d9fca574ee
|
||||
@EXPLICIT
|
||||
https://conda.anaconda.org/conda-forge/osx-64/bzip2-1.0.8-h10d778d_5.conda#6097a6ca9ada32699b5fc4312dd6ef18
|
||||
https://conda.anaconda.org/conda-forge/osx-64/c-ares-1.25.0-h10d778d_0.conda#80e97c8f21c33a3b9256504858cf49b6
|
||||
https://conda.anaconda.org/conda-forge/osx-64/ca-certificates-2023.11.17-h8857fd0_0.conda#c687e9d14c49e3d3946d50a413cdbf16
|
||||
https://conda.anaconda.org/conda-forge/osx-64/icu-73.2-hf5e326d_0.conda#5cc301d759ec03f28328428e28f65591
|
||||
https://conda.anaconda.org/conda-forge/osx-64/libcxx-16.0.6-hd57cbcb_0.conda#7d6972792161077908b62971802f289a
|
||||
https://conda.anaconda.org/conda-forge/osx-64/libev-4.33-h10d778d_2.conda#899db79329439820b7e8f8de41bca902
|
||||
https://conda.anaconda.org/conda-forge/osx-64/libexpat-2.5.0-hf0c8a7f_1.conda#6c81cb022780ee33435cca0127dd43c9
|
||||
https://conda.anaconda.org/conda-forge/osx-64/libffi-3.4.2-h0d85af4_5.tar.bz2#ccb34fb14960ad8b125962d3d79b31a9
|
||||
https://conda.anaconda.org/conda-forge/osx-64/libiconv-1.17-hd75f5a5_2.conda#6c3628d047e151efba7cf08c5e54d1ca
|
||||
https://conda.anaconda.org/conda-forge/osx-64/libzlib-1.2.13-h8a1eda9_5.conda#4a3ad23f6e16f99c04e166767193d700
|
||||
https://conda.anaconda.org/conda-forge/osx-64/llvm-openmp-17.0.6-hb6ac08f_0.conda#f260ab897df05f729fc3e65dbb0850ef
|
||||
https://conda.anaconda.org/conda-forge/osx-64/lzo-2.10-haf1e3a3_1000.tar.bz2#0b6bca372a95d6c602c7a922e928ce79
|
||||
https://conda.anaconda.org/conda-forge/noarch/pybind11-abi-4-hd8ed1ab_3.tar.bz2#878f923dd6acc8aeb47a75da6c4098be
|
||||
https://conda.anaconda.org/conda-forge/osx-64/python_abi-3.12-4_cp312.conda#87201ac4314b911b74197e588cca3639
|
||||
https://conda.anaconda.org/conda-forge/osx-64/reproc-14.2.4.post0-h10d778d_1.conda#d7c3258e871481be5bbaf28b4729e29f
|
||||
https://conda.anaconda.org/conda-forge/noarch/tzdata-2023d-h0c530f3_0.conda#8dee24b8be2d9ff81e7bd4d7d97ff1b0
|
||||
https://conda.anaconda.org/conda-forge/osx-64/xz-5.2.6-h775f41a_0.tar.bz2#a72f9d4ea13d55d745ff1ed594747f10
|
||||
https://conda.anaconda.org/conda-forge/osx-64/fmt-10.1.1-h7728843_1.conda#de48ed5d4de16ac68e8d1bd07f02e781
|
||||
https://conda.anaconda.org/conda-forge/osx-64/libgfortran5-13.2.0-h2873a65_1.conda#3af564516b5163cd8cc08820413854bc
|
||||
https://conda.anaconda.org/conda-forge/osx-64/libsolv-0.7.27-hf4d7fad_0.conda#dda8df0e28d488cc20dec52903dddcad
|
||||
https://conda.anaconda.org/conda-forge/osx-64/libsqlite-3.44.2-h92b6c6a_0.conda#d4419f90019e6a2b152cd4d32f73a82f
|
||||
https://conda.anaconda.org/conda-forge/osx-64/libxml2-2.12.3-hc0ae0f7_0.conda#959e8dad65f624a362546d96005e47f6
|
||||
https://conda.anaconda.org/conda-forge/osx-64/lz4-c-1.9.4-hf0c8a7f_0.conda#aa04f7143228308662696ac24023f991
|
||||
https://conda.anaconda.org/conda-forge/osx-64/ncurses-6.4-h93d8f39_2.conda#e58f366bd4d767e9ab97ab8b272e7670
|
||||
https://conda.anaconda.org/conda-forge/osx-64/openssl-3.2.0-hd75f5a5_1.conda#06cb561619487c88891839b9beb5244c
|
||||
https://conda.anaconda.org/conda-forge/osx-64/reproc-cpp-14.2.4.post0-h93d8f39_1.conda#a32e95ada0ee860c91e87266700970c3
|
||||
https://conda.anaconda.org/conda-forge/osx-64/tk-8.6.13-h1abcd95_1.conda#bf830ba5afc507c6232d4ef0fb1a882d
|
||||
https://conda.anaconda.org/conda-forge/osx-64/yaml-cpp-0.8.0-he965462_0.conda#1bb3addc859ed1338370da6e2996ef47
|
||||
https://conda.anaconda.org/conda-forge/osx-64/zstd-1.5.5-h829000d_0.conda#80abc41d0c48b82fe0f04e7f42f5cb7e
|
||||
https://conda.anaconda.org/conda-forge/osx-64/libarchive-3.7.2-hd35d340_1.conda#8c7b79b20a67287a87b39df8a8c8dcc4
|
||||
https://conda.anaconda.org/conda-forge/osx-64/libedit-3.1.20191231-h0678c8f_2.tar.bz2#6016a8a1d0e63cac3de2c352cd40208b
|
||||
https://conda.anaconda.org/conda-forge/osx-64/libgfortran-5.0.0-13_2_0_h97931a8_1.conda#b55fd11ab6318a6e67ac191309701d5a
|
||||
https://conda.anaconda.org/conda-forge/osx-64/libnghttp2-1.58.0-h64cf6d3_1.conda#faecc55c2a8155d9ff1c0ff9a0fef64f
|
||||
https://conda.anaconda.org/conda-forge/osx-64/libssh2-1.11.0-hd019ec5_0.conda#ca3a72efba692c59a90d4b9fc0dfe774
|
||||
https://conda.anaconda.org/conda-forge/osx-64/readline-8.2-h9e318b2_1.conda#f17f77f2acf4d344734bda76829ce14e
|
||||
https://conda.anaconda.org/conda-forge/osx-64/krb5-1.21.2-hb884880_0.conda#80505a68783f01dc8d7308c075261b2f
|
||||
https://conda.anaconda.org/conda-forge/osx-64/libopenblas-0.3.25-openmp_hfef2a42_0.conda#a01b96f00c3155c830d98a518c7dcbfb
|
||||
https://conda.anaconda.org/conda-forge/osx-64/python-3.12.1-h9f0c242_1_cpython.conda#41d5549764b9f37199e6255e5e9daee6
|
||||
https://conda.anaconda.org/conda-forge/noarch/archspec-0.2.2-pyhd8ed1ab_0.conda#0dc2fce00a160271714647c019e3a8a8
|
||||
https://conda.anaconda.org/conda-forge/noarch/boltons-23.1.1-pyhd8ed1ab_0.conda#56febe65315cc388a5d20adf2b39a74d
|
||||
https://conda.anaconda.org/conda-forge/osx-64/brotli-python-1.1.0-py312heafc425_1.conda#a288b88f06b8bfe0dedaf5c4b6ac6b7a
|
||||
https://conda.anaconda.org/conda-forge/noarch/certifi-2023.11.17-pyhd8ed1ab_0.conda#2011bcf45376341dd1d690263fdbc789
|
||||
https://conda.anaconda.org/conda-forge/noarch/charset-normalizer-3.3.2-pyhd8ed1ab_0.conda#7f4a9e3fcff3f6356ae99244a014da6a
|
||||
https://conda.anaconda.org/conda-forge/noarch/colorama-0.4.6-pyhd8ed1ab_0.tar.bz2#3faab06a954c2a04039983f2c4a50d99
|
||||
https://conda.anaconda.org/conda-forge/noarch/crashtest-0.4.1-pyhd8ed1ab_0.tar.bz2#709a2295dd907bb34afb57d54320642f
|
||||
https://conda.anaconda.org/conda-forge/noarch/distlib-0.3.8-pyhd8ed1ab_0.conda#db16c66b759a64dc5183d69cc3745a52
|
||||
https://conda.anaconda.org/conda-forge/noarch/distro-1.9.0-pyhd8ed1ab_0.conda#bbdb409974cd6cb30071b1d978302726
|
||||
https://conda.anaconda.org/conda-forge/noarch/filelock-3.13.1-pyhd8ed1ab_0.conda#0c1729b74a8152fde6a38ba0a2ab9f45
|
||||
https://conda.anaconda.org/conda-forge/noarch/idna-3.6-pyhd8ed1ab_0.conda#1a76f09108576397c41c0b0c5bd84134
|
||||
https://conda.anaconda.org/conda-forge/osx-64/jsonpointer-2.4-py312hb401068_3.conda#637aa8f6c1c61f659f1496e9b2dc7552
|
||||
https://conda.anaconda.org/conda-forge/osx-64/libblas-3.9.0-20_osx64_openblas.conda#1673476d205d14a9042172be795f63cb
|
||||
https://conda.anaconda.org/conda-forge/osx-64/libcurl-8.5.0-h726d00d_0.conda#86d749e27fe00fa6b7d790a6feaa22a2
|
||||
https://conda.anaconda.org/conda-forge/osx-64/menuinst-2.0.2-py312hb401068_0.conda#40fcba89895965e39ea94e53d5588b8d
|
||||
https://conda.anaconda.org/conda-forge/noarch/more-itertools-10.2.0-pyhd8ed1ab_0.conda#d5c98e9706fdc5328d49a9bf2ce5fb42
|
||||
https://conda.anaconda.org/conda-forge/osx-64/msgpack-python-1.0.7-py312hbf0bb39_0.conda#2aa4afb76d89d1241e67385b17f6f6ba
|
||||
https://conda.anaconda.org/conda-forge/noarch/packaging-23.2-pyhd8ed1ab_0.conda#79002079284aa895f883c6b7f3f88fd6
|
||||
https://conda.anaconda.org/conda-forge/noarch/pkginfo-1.9.6-pyhd8ed1ab_0.conda#be1e9f1c65a1ed0f2ae9352fec99db64
|
||||
https://conda.anaconda.org/conda-forge/noarch/pluggy-1.3.0-pyhd8ed1ab_0.conda#2390bd10bed1f3fdc7a537fb5a447d8d
|
||||
https://conda.anaconda.org/conda-forge/noarch/poetry-core-1.8.1-pyhd8ed1ab_0.conda#a013d99ae50670b823c511f7274d2d2a
|
||||
https://conda.anaconda.org/conda-forge/noarch/ptyprocess-0.7.0-pyhd3deb0d_0.tar.bz2#359eeb6536da0e687af562ed265ec263
|
||||
https://conda.anaconda.org/conda-forge/osx-64/pycosat-0.6.6-py312h104f124_0.conda#106c2d37708757f4c23ff1f487bf5a3f
|
||||
https://conda.anaconda.org/conda-forge/noarch/pycparser-2.21-pyhd8ed1ab_0.tar.bz2#076becd9e05608f8dc72757d5f3a91ff
|
||||
https://conda.anaconda.org/conda-forge/noarch/pysocks-1.7.1-pyha2e5f31_6.tar.bz2#2a7de29fb590ca14b5243c4c812c8025
|
||||
https://conda.anaconda.org/conda-forge/noarch/python-fastjsonschema-2.19.1-pyhd8ed1ab_0.conda#4d3ceee3af4b0f9a1f48f57176bf8625
|
||||
https://conda.anaconda.org/conda-forge/noarch/python-installer-0.7.0-pyhd8ed1ab_0.conda#65dea78f903d686c8b0c2feaf0e15e1f
|
||||
https://conda.anaconda.org/conda-forge/osx-64/ruamel.yaml.clib-0.2.7-py312h104f124_2.conda#07c5b620686d2fa9629374e8b4cf29ec
|
||||
https://conda.anaconda.org/conda-forge/noarch/setuptools-69.0.3-pyhd8ed1ab_0.conda#40695fdfd15a92121ed2922900d0308b
|
||||
https://conda.anaconda.org/conda-forge/noarch/shellingham-1.5.4-pyhd8ed1ab_0.conda#d08db09a552699ee9e7eec56b4eb3899
|
||||
https://conda.anaconda.org/conda-forge/noarch/tomli-2.0.1-pyhd8ed1ab_0.tar.bz2#5844808ffab9ebdb694585b50ba02a96
|
||||
https://conda.anaconda.org/conda-forge/noarch/tomlkit-0.12.3-pyha770c72_0.conda#074d0ce7a6261ab8b497c3518796ef3e
|
||||
https://conda.anaconda.org/conda-forge/noarch/trove-classifiers-2024.1.8-pyhd8ed1ab_0.conda#b120d43603f9b021d252fb7754b35557
|
||||
https://conda.anaconda.org/conda-forge/noarch/truststore-0.8.0-pyhd8ed1ab_0.conda#08316d001eca8854392cf2837828ea11
|
||||
https://conda.anaconda.org/conda-forge/noarch/typing_extensions-4.9.0-pyha770c72_0.conda#a92a6440c3fe7052d63244f3aba2a4a7
|
||||
https://conda.anaconda.org/conda-forge/noarch/wheel-0.42.0-pyhd8ed1ab_0.conda#1cdea58981c5cbc17b51973bcaddcea7
|
||||
https://conda.anaconda.org/conda-forge/noarch/zipp-3.17.0-pyhd8ed1ab_0.conda#2e4d6bc0b14e10f895fc6791a7d9b26a
|
||||
https://conda.anaconda.org/conda-forge/osx-64/cffi-1.16.0-py312h38bf5a0_0.conda#a45759c013ab20b9017ef9539d234dd7
|
||||
https://conda.anaconda.org/conda-forge/noarch/importlib-metadata-7.0.1-pyha770c72_0.conda#746623a787e06191d80a2133e5daff17
|
||||
https://conda.anaconda.org/conda-forge/noarch/jaraco.classes-3.3.0-pyhd8ed1ab_0.conda#e9f79248d30e942f7c358ff21a1790f5
|
||||
https://conda.anaconda.org/conda-forge/noarch/jsonpatch-1.33-pyhd8ed1ab_0.conda#bfdb7c5c6ad1077c82a69a8642c87aff
|
||||
https://conda.anaconda.org/conda-forge/osx-64/libcblas-3.9.0-20_osx64_openblas.conda#b324ad206d39ce529fb9073f9d062062
|
||||
https://conda.anaconda.org/conda-forge/osx-64/liblapack-3.9.0-20_osx64_openblas.conda#704bfc2af1288ea973b6755281e6ad32
|
||||
https://conda.anaconda.org/conda-forge/osx-64/libmamba-1.5.6-ha449628_0.conda#549575d7237a1aba16119969b4a6b8a7
|
||||
https://conda.anaconda.org/conda-forge/noarch/pexpect-4.8.0-pyh1a96a4e_2.tar.bz2#330448ce4403cc74990ac07c555942a1
|
||||
https://conda.anaconda.org/conda-forge/noarch/pip-23.3.2-pyhd8ed1ab_0.conda#8591c748f98dcc02253003533bc2e4b1
|
||||
https://conda.anaconda.org/conda-forge/noarch/poetry-plugin-export-1.6.0-pyhd8ed1ab_0.conda#1f2184db9f337d1074b1d5769165cac9
|
||||
https://conda.anaconda.org/conda-forge/noarch/pyproject_hooks-1.0.0-pyhd8ed1ab_0.conda#21de50391d584eb7f4441b9de1ad773f
|
||||
https://conda.anaconda.org/conda-forge/osx-64/ruamel.yaml-0.18.5-py312h41838bb_0.conda#0dcf9f224125a95634f9f29dca9fd7a8
|
||||
https://conda.anaconda.org/conda-forge/noarch/tqdm-4.66.1-pyhd8ed1ab_0.conda#03c97908b976498dcae97eb4e4f3149c
|
||||
https://conda.anaconda.org/conda-forge/noarch/typing-extensions-4.9.0-hd8ed1ab_0.conda#c16524c1b7227dc80b36b4fa6f77cc86
|
||||
https://conda.anaconda.org/conda-forge/noarch/urllib3-2.1.0-pyhd8ed1ab_0.conda#f8ced8ee63830dec7ecc1be048d1470a
|
||||
https://conda.anaconda.org/conda-forge/osx-64/dulwich-0.21.7-py312h41838bb_0.conda#4937c7a86084772c09af1f536a4c5a54
|
||||
https://conda.anaconda.org/conda-forge/osx-64/keyring-24.3.0-py312hb401068_0.conda#5b28534ef3af5f98470c318f29cdc375
|
||||
https://conda.anaconda.org/conda-forge/osx-64/libmambapy-1.5.6-py312h67f5953_0.conda#b173c0334cd59de8a7dda66aa5eddfee
|
||||
https://conda.anaconda.org/conda-forge/osx-64/numpy-1.26.3-py312he3a82b2_0.conda#cc7cfa90fc5c70a62b788daa71b782ef
|
||||
https://conda.anaconda.org/conda-forge/noarch/platformdirs-3.11.0-pyhd8ed1ab_0.conda#8f567c0a74aa44cf732f15773b4083b0
|
||||
https://conda.anaconda.org/conda-forge/noarch/python-build-1.0.3-pyhd8ed1ab_0.conda#d9ccabf228cb98419ca3d5694b25e1a2
|
||||
https://conda.anaconda.org/conda-forge/noarch/requests-2.31.0-pyhd8ed1ab_0.conda#a30144e4156cdbb236f99ebb49828f8b
|
||||
https://conda.anaconda.org/conda-forge/osx-64/xattr-0.10.1-py312h104f124_1.conda#ca6c9e113d77c63aadb75d1ac46fe672
|
||||
https://conda.anaconda.org/conda-forge/osx-64/zstandard-0.22.0-py312h7a629f7_0.conda#04fa0acf5a74339f9228cdfffa78df64
|
||||
https://conda.anaconda.org/conda-forge/noarch/cachecontrol-0.13.1-pyhd8ed1ab_0.conda#174bd699bb5aa9e2622eb4b288276ff8
|
||||
https://conda.anaconda.org/conda-forge/noarch/conda-package-streaming-0.9.0-pyhd8ed1ab_0.conda#38253361efb303deead3eab39ae9269b
|
||||
https://conda.anaconda.org/conda-forge/osx-64/rapidfuzz-3.6.1-py312hede676d_0.conda#c83b7cf56e835950dd5934c2cdea000a
|
||||
https://conda.anaconda.org/conda-forge/noarch/requests-toolbelt-1.0.0-pyhd8ed1ab_0.conda#99c98318c8646b08cc764f90ce98906e
|
||||
https://conda.anaconda.org/conda-forge/noarch/virtualenv-20.25.0-pyhd8ed1ab_0.conda#c119653cba436d8183c27bf6d190e587
|
||||
https://conda.anaconda.org/conda-forge/noarch/cachecontrol-with-filecache-0.13.1-pyhd8ed1ab_0.conda#8c4781ca0893cff3a64423954ce234a1
|
||||
https://conda.anaconda.org/conda-forge/noarch/cleo-2.1.0-pyhd8ed1ab_0.conda#69569ea8a6d1465193345a40421d138b
|
||||
https://conda.anaconda.org/conda-forge/noarch/conda-package-handling-2.2.0-pyh38be061_0.conda#8a3ae7f6318376aa08ea753367bb7dd6
|
||||
https://conda.anaconda.org/conda-forge/noarch/poetry-1.7.1-osx_pyh534df25_0.conda#4ebf180279e2c0274249cafdd29720cf
|
||||
https://conda.anaconda.org/conda-forge/osx-64/conda-23.11.0-py312hb401068_1.conda#2132d58fcb1dfe7f695a7f7e3edd50b9
|
||||
https://conda.anaconda.org/conda-forge/noarch/conda-libmamba-solver-23.12.0-pyhd8ed1ab_0.conda#e877d5150e73a0844ea2939be110c3b1
|
||||
https://conda.anaconda.org/conda-forge/osx-64/mamba-1.5.6-py312ha12221d_0.conda#7d86cab3301c9c3ee0c758c18c46cda9
|
||||
@@ -0,0 +1,115 @@
|
||||
# Generated by conda-lock.
|
||||
# platform: osx-arm64
|
||||
# input_hash: 766e6b133db15eac3b1f267721f23412a76a79b65727237ec5b51312bee1ece3
|
||||
@EXPLICIT
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/bzip2-1.0.8-h93a5062_5.conda#1bbc659ca658bfd49a481b5ef7a0f40f
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/c-ares-1.25.0-h93a5062_0.conda#0a40466cb14b485738f1910340775f71
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/ca-certificates-2023.11.17-hf0a4a13_0.conda#c01da7c77cfcba2107174e25c1d47384
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/icu-73.2-hc8870d7_0.conda#8521bd47c0e11c5902535bb1a17c565f
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/libcxx-16.0.6-h4653b0c_0.conda#9d7d724faf0413bf1dbc5a85935700c8
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/libev-4.33-h93a5062_2.conda#36d33e440c31857372a72137f78bacf5
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/libexpat-2.5.0-hb7217d7_1.conda#5a097ad3d17e42c148c9566280481317
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/libffi-3.4.2-h3422bc3_5.tar.bz2#086914b672be056eb70fd4285b6783b6
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/libiconv-1.17-h0d3ecfb_2.conda#69bda57310071cf6d2b86caf11573d2d
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/libzlib-1.2.13-h53f4e23_5.conda#1a47f5236db2e06a320ffa0392f81bd8
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/llvm-openmp-17.0.6-hcd81f8e_0.conda#52019d2fa0eddbbc4e6dcd30fae0c0a4
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/lzo-2.10-h642e427_1000.tar.bz2#ddab5f96f5573a9bd5e24f9994fd6ec9
|
||||
https://conda.anaconda.org/conda-forge/noarch/pybind11-abi-4-hd8ed1ab_3.tar.bz2#878f923dd6acc8aeb47a75da6c4098be
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/python_abi-3.12-4_cp312.conda#bbb3a02c78b2d8219d7213f76d644a2a
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/reproc-14.2.4.post0-h93a5062_1.conda#ef7ae6d7bb50c8c735551d825e1ea287
|
||||
https://conda.anaconda.org/conda-forge/noarch/tzdata-2023d-h0c530f3_0.conda#8dee24b8be2d9ff81e7bd4d7d97ff1b0
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/xz-5.2.6-h57fd34a_0.tar.bz2#39c6b54e94014701dd157f4f576ed211
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/fmt-10.1.1-h2ffa867_1.conda#16b8a2b5043378a2ee0182833622298b
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/libgfortran5-13.2.0-hf226fd6_1.conda#4480d71b98c87faafab132d33e23135e
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/libsolv-0.7.27-h9e231a4_0.conda#f5568a2094eed1fc5742dc6d4b91e222
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/libsqlite-3.44.2-h091b4b1_0.conda#d7e1af696cfadec251a0abdd7b79ed77
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/libxml2-2.12.3-h0d0cfa8_0.conda#84e330ed40b5bf8e95a65529ccb94a14
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/lz4-c-1.9.4-hb7217d7_0.conda#45505bec548634f7d05e02fb25262cb9
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/ncurses-6.4-h463b476_2.conda#52b6f254a7b9663e854f44b6570ed982
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/openssl-3.2.0-h0d3ecfb_1.conda#47d16d26100f19ca495882882b7bc93b
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/reproc-cpp-14.2.4.post0-h965bd2d_1.conda#f81d00496e13ee828f84b3ef17e41346
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/tk-8.6.13-h5083fa2_1.conda#b50a57ba89c32b62428b71a875291c9b
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/yaml-cpp-0.8.0-h13dd4ca_0.conda#e783a232972a5c7dca549111e63a78b2
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/zstd-1.5.5-h4f39d0f_0.conda#5b212cfb7f9d71d603ad891879dc7933
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/libarchive-3.7.2-hcacb583_1.conda#1c8c447ce71bf5f769674b621142a73a
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/libedit-3.1.20191231-hc8eb9b7_2.tar.bz2#30e4362988a2623e9eb34337b83e01f9
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/libgfortran-5.0.0-13_2_0_hd922786_1.conda#1ad37a5c60c250bb2b4a9f75563e181c
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/libnghttp2-1.58.0-ha4dd798_1.conda#1813e066bfcef82de579a0be8a766df4
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/libssh2-1.11.0-h7a5bd25_0.conda#029f7dc931a3b626b94823bc77830b01
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/readline-8.2-h92ec313_1.conda#8cbb776a2f641b943d413b3e19df71f4
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/krb5-1.21.2-h92f50d5_0.conda#92f1cff174a538e0722bf2efb16fc0b2
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/libopenblas-0.3.25-openmp_h6c19121_0.conda#a1843550403212b9dedeeb31466ade03
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/python-3.12.1-hdf0ec26_1_cpython.conda#7b5d48e25f131864762bfef1914d2014
|
||||
https://conda.anaconda.org/conda-forge/noarch/archspec-0.2.2-pyhd8ed1ab_0.conda#0dc2fce00a160271714647c019e3a8a8
|
||||
https://conda.anaconda.org/conda-forge/noarch/boltons-23.1.1-pyhd8ed1ab_0.conda#56febe65315cc388a5d20adf2b39a74d
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/brotli-python-1.1.0-py312h9f69965_1.conda#1bc01b9ffdf42beb1a9fe4e9222e0567
|
||||
https://conda.anaconda.org/conda-forge/noarch/certifi-2023.11.17-pyhd8ed1ab_0.conda#2011bcf45376341dd1d690263fdbc789
|
||||
https://conda.anaconda.org/conda-forge/noarch/charset-normalizer-3.3.2-pyhd8ed1ab_0.conda#7f4a9e3fcff3f6356ae99244a014da6a
|
||||
https://conda.anaconda.org/conda-forge/noarch/colorama-0.4.6-pyhd8ed1ab_0.tar.bz2#3faab06a954c2a04039983f2c4a50d99
|
||||
https://conda.anaconda.org/conda-forge/noarch/crashtest-0.4.1-pyhd8ed1ab_0.tar.bz2#709a2295dd907bb34afb57d54320642f
|
||||
https://conda.anaconda.org/conda-forge/noarch/distlib-0.3.8-pyhd8ed1ab_0.conda#db16c66b759a64dc5183d69cc3745a52
|
||||
https://conda.anaconda.org/conda-forge/noarch/distro-1.9.0-pyhd8ed1ab_0.conda#bbdb409974cd6cb30071b1d978302726
|
||||
https://conda.anaconda.org/conda-forge/noarch/filelock-3.13.1-pyhd8ed1ab_0.conda#0c1729b74a8152fde6a38ba0a2ab9f45
|
||||
https://conda.anaconda.org/conda-forge/noarch/idna-3.6-pyhd8ed1ab_0.conda#1a76f09108576397c41c0b0c5bd84134
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/jsonpointer-2.4-py312h81bd7bf_3.conda#327361b24f5348cab04ad9b1f74e831d
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/libblas-3.9.0-20_osxarm64_openblas.conda#49bc8dec26663241ee064b2d7116ec2d
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/libcurl-8.5.0-h2d989ff_0.conda#f1211ed00947a84e15a964a8f459f620
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/menuinst-2.0.2-py312h81bd7bf_0.conda#802a33b3ca10e299f2fc9d6783140cc7
|
||||
https://conda.anaconda.org/conda-forge/noarch/more-itertools-10.2.0-pyhd8ed1ab_0.conda#d5c98e9706fdc5328d49a9bf2ce5fb42
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/msgpack-python-1.0.7-py312h76e736e_0.conda#da9f2349c5090c2b26cfac93f50666ab
|
||||
https://conda.anaconda.org/conda-forge/noarch/packaging-23.2-pyhd8ed1ab_0.conda#79002079284aa895f883c6b7f3f88fd6
|
||||
https://conda.anaconda.org/conda-forge/noarch/pkginfo-1.9.6-pyhd8ed1ab_0.conda#be1e9f1c65a1ed0f2ae9352fec99db64
|
||||
https://conda.anaconda.org/conda-forge/noarch/pluggy-1.3.0-pyhd8ed1ab_0.conda#2390bd10bed1f3fdc7a537fb5a447d8d
|
||||
https://conda.anaconda.org/conda-forge/noarch/poetry-core-1.8.1-pyhd8ed1ab_0.conda#a013d99ae50670b823c511f7274d2d2a
|
||||
https://conda.anaconda.org/conda-forge/noarch/ptyprocess-0.7.0-pyhd3deb0d_0.tar.bz2#359eeb6536da0e687af562ed265ec263
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/pycosat-0.6.6-py312h02f2b3b_0.conda#4d07092345b6e66e580ce3cd9141c6da
|
||||
https://conda.anaconda.org/conda-forge/noarch/pycparser-2.21-pyhd8ed1ab_0.tar.bz2#076becd9e05608f8dc72757d5f3a91ff
|
||||
https://conda.anaconda.org/conda-forge/noarch/pysocks-1.7.1-pyha2e5f31_6.tar.bz2#2a7de29fb590ca14b5243c4c812c8025
|
||||
https://conda.anaconda.org/conda-forge/noarch/python-fastjsonschema-2.19.1-pyhd8ed1ab_0.conda#4d3ceee3af4b0f9a1f48f57176bf8625
|
||||
https://conda.anaconda.org/conda-forge/noarch/python-installer-0.7.0-pyhd8ed1ab_0.conda#65dea78f903d686c8b0c2feaf0e15e1f
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/ruamel.yaml.clib-0.2.7-py312h02f2b3b_2.conda#39478f82c46bd2fa4e974ef11cf2c0ae
|
||||
https://conda.anaconda.org/conda-forge/noarch/setuptools-69.0.3-pyhd8ed1ab_0.conda#40695fdfd15a92121ed2922900d0308b
|
||||
https://conda.anaconda.org/conda-forge/noarch/shellingham-1.5.4-pyhd8ed1ab_0.conda#d08db09a552699ee9e7eec56b4eb3899
|
||||
https://conda.anaconda.org/conda-forge/noarch/tomli-2.0.1-pyhd8ed1ab_0.tar.bz2#5844808ffab9ebdb694585b50ba02a96
|
||||
https://conda.anaconda.org/conda-forge/noarch/tomlkit-0.12.3-pyha770c72_0.conda#074d0ce7a6261ab8b497c3518796ef3e
|
||||
https://conda.anaconda.org/conda-forge/noarch/trove-classifiers-2024.1.8-pyhd8ed1ab_0.conda#b120d43603f9b021d252fb7754b35557
|
||||
https://conda.anaconda.org/conda-forge/noarch/truststore-0.8.0-pyhd8ed1ab_0.conda#08316d001eca8854392cf2837828ea11
|
||||
https://conda.anaconda.org/conda-forge/noarch/typing_extensions-4.9.0-pyha770c72_0.conda#a92a6440c3fe7052d63244f3aba2a4a7
|
||||
https://conda.anaconda.org/conda-forge/noarch/wheel-0.42.0-pyhd8ed1ab_0.conda#1cdea58981c5cbc17b51973bcaddcea7
|
||||
https://conda.anaconda.org/conda-forge/noarch/zipp-3.17.0-pyhd8ed1ab_0.conda#2e4d6bc0b14e10f895fc6791a7d9b26a
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/cffi-1.16.0-py312h8e38eb3_0.conda#960ecbd65860d3b1de5e30373e1bffb1
|
||||
https://conda.anaconda.org/conda-forge/noarch/importlib-metadata-7.0.1-pyha770c72_0.conda#746623a787e06191d80a2133e5daff17
|
||||
https://conda.anaconda.org/conda-forge/noarch/jaraco.classes-3.3.0-pyhd8ed1ab_0.conda#e9f79248d30e942f7c358ff21a1790f5
|
||||
https://conda.anaconda.org/conda-forge/noarch/jsonpatch-1.33-pyhd8ed1ab_0.conda#bfdb7c5c6ad1077c82a69a8642c87aff
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/libcblas-3.9.0-20_osxarm64_openblas.conda#89f4718753c08afe8cda4dd5791ba94c
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/liblapack-3.9.0-20_osxarm64_openblas.conda#1fefac78f2315455ce2d7f34782eac0a
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/libmamba-1.5.6-h90c426b_0.conda#d17c7a5761e8983d97ccd650f5e6baaa
|
||||
https://conda.anaconda.org/conda-forge/noarch/pexpect-4.8.0-pyh1a96a4e_2.tar.bz2#330448ce4403cc74990ac07c555942a1
|
||||
https://conda.anaconda.org/conda-forge/noarch/pip-23.3.2-pyhd8ed1ab_0.conda#8591c748f98dcc02253003533bc2e4b1
|
||||
https://conda.anaconda.org/conda-forge/noarch/poetry-plugin-export-1.6.0-pyhd8ed1ab_0.conda#1f2184db9f337d1074b1d5769165cac9
|
||||
https://conda.anaconda.org/conda-forge/noarch/pyproject_hooks-1.0.0-pyhd8ed1ab_0.conda#21de50391d584eb7f4441b9de1ad773f
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/ruamel.yaml-0.18.5-py312he37b823_0.conda#bbda05ac095a271419f91ef133eddac3
|
||||
https://conda.anaconda.org/conda-forge/noarch/tqdm-4.66.1-pyhd8ed1ab_0.conda#03c97908b976498dcae97eb4e4f3149c
|
||||
https://conda.anaconda.org/conda-forge/noarch/typing-extensions-4.9.0-hd8ed1ab_0.conda#c16524c1b7227dc80b36b4fa6f77cc86
|
||||
https://conda.anaconda.org/conda-forge/noarch/urllib3-2.1.0-pyhd8ed1ab_0.conda#f8ced8ee63830dec7ecc1be048d1470a
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/dulwich-0.21.7-py312he37b823_0.conda#4f12a0d01fb466149fe0cd8875c28a59
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/keyring-24.3.0-py312h81bd7bf_0.conda#3a6735f11d9604cbafd0ab1c3e9ac77e
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/libmambapy-1.5.6-py312h344e357_0.conda#1677e62b8f4e1779ee83ce3e2911b73e
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/numpy-1.26.3-py312h8442bc7_0.conda#bb3fc436e78e8bc43af8c672079749ea
|
||||
https://conda.anaconda.org/conda-forge/noarch/platformdirs-3.11.0-pyhd8ed1ab_0.conda#8f567c0a74aa44cf732f15773b4083b0
|
||||
https://conda.anaconda.org/conda-forge/noarch/python-build-1.0.3-pyhd8ed1ab_0.conda#d9ccabf228cb98419ca3d5694b25e1a2
|
||||
https://conda.anaconda.org/conda-forge/noarch/requests-2.31.0-pyhd8ed1ab_0.conda#a30144e4156cdbb236f99ebb49828f8b
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/xattr-0.10.1-py312h02f2b3b_1.conda#9fdf7c6f41ccca372d72951a6f120c7c
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/zstandard-0.22.0-py312h7975427_0.conda#10c282af2c570a5a52173fd571693ec6
|
||||
https://conda.anaconda.org/conda-forge/noarch/cachecontrol-0.13.1-pyhd8ed1ab_0.conda#174bd699bb5aa9e2622eb4b288276ff8
|
||||
https://conda.anaconda.org/conda-forge/noarch/conda-package-streaming-0.9.0-pyhd8ed1ab_0.conda#38253361efb303deead3eab39ae9269b
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/rapidfuzz-3.6.1-py312h20a0b95_0.conda#a359029e6d2b3518c23574def88518d7
|
||||
https://conda.anaconda.org/conda-forge/noarch/requests-toolbelt-1.0.0-pyhd8ed1ab_0.conda#99c98318c8646b08cc764f90ce98906e
|
||||
https://conda.anaconda.org/conda-forge/noarch/virtualenv-20.25.0-pyhd8ed1ab_0.conda#c119653cba436d8183c27bf6d190e587
|
||||
https://conda.anaconda.org/conda-forge/noarch/cachecontrol-with-filecache-0.13.1-pyhd8ed1ab_0.conda#8c4781ca0893cff3a64423954ce234a1
|
||||
https://conda.anaconda.org/conda-forge/noarch/cleo-2.1.0-pyhd8ed1ab_0.conda#69569ea8a6d1465193345a40421d138b
|
||||
https://conda.anaconda.org/conda-forge/noarch/conda-package-handling-2.2.0-pyh38be061_0.conda#8a3ae7f6318376aa08ea753367bb7dd6
|
||||
https://conda.anaconda.org/conda-forge/noarch/poetry-1.7.1-osx_pyh534df25_0.conda#4ebf180279e2c0274249cafdd29720cf
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/conda-23.11.0-py312h81bd7bf_1.conda#8762fef47fc50d0cc3be18ce381264ec
|
||||
https://conda.anaconda.org/conda-forge/noarch/conda-libmamba-solver-23.12.0-pyhd8ed1ab_0.conda#e877d5150e73a0844ea2939be110c3b1
|
||||
https://conda.anaconda.org/conda-forge/osx-arm64/mamba-1.5.6-py312h14bc7db_0.conda#313ba994472a1b9798683efe4c9a28c6
|
||||
@@ -0,0 +1,113 @@
|
||||
# Generated by conda-lock.
|
||||
# platform: win-64
|
||||
# input_hash: ce7b69eb63f85fe9c4f89a148490ec7ea87b2fc66fdef0c7162dcc4e28d78b22
|
||||
@EXPLICIT
|
||||
https://conda.anaconda.org/conda-forge/win-64/ca-certificates-2023.11.17-h56e8100_0.conda#1163114b483f26761f993c709e65271f
|
||||
https://conda.anaconda.org/conda-forge/win-64/intel-openmp-2023.2.0-h57928b3_50497.conda#a401f3cae152deb75bbed766a90a6312
|
||||
https://conda.anaconda.org/conda-forge/win-64/libexpat-2.5.0-h63175ca_1.conda#636cc3cbbd2e28bcfd2f73b2044aac2c
|
||||
https://conda.anaconda.org/conda-forge/noarch/pybind11-abi-4-hd8ed1ab_3.tar.bz2#878f923dd6acc8aeb47a75da6c4098be
|
||||
https://conda.anaconda.org/conda-forge/win-64/python_abi-3.12-4_cp312.conda#17f4ccf6be9ded08bd0a376f489ac1a6
|
||||
https://conda.anaconda.org/conda-forge/noarch/tzdata-2023d-h0c530f3_0.conda#8dee24b8be2d9ff81e7bd4d7d97ff1b0
|
||||
https://conda.anaconda.org/conda-forge/win-64/ucrt-10.0.22621.0-h57928b3_0.tar.bz2#72608f6cd3e5898229c3ea16deb1ac43
|
||||
https://conda.anaconda.org/conda-forge/win-64/vc14_runtime-14.38.33130-h82b7239_18.conda#8be79fdd2725ddf7bbf8a27a4c1f79ba
|
||||
https://conda.anaconda.org/conda-forge/win-64/vc-14.3-hcf57466_18.conda#20e1e652a4c740fa719002a8449994a2
|
||||
https://conda.anaconda.org/conda-forge/win-64/vs2015_runtime-14.38.33130-hcb4865c_18.conda#10d42885e3ed84e575b454db30f1aa93
|
||||
https://conda.anaconda.org/conda-forge/win-64/bzip2-1.0.8-hcfcfb64_5.conda#26eb8ca6ea332b675e11704cce84a3be
|
||||
https://conda.anaconda.org/conda-forge/win-64/fmt-10.1.1-h181d51b_1.conda#78dcab83827f41410cf1e70d39d3b36e
|
||||
https://conda.anaconda.org/conda-forge/win-64/libffi-3.4.2-h8ffe710_5.tar.bz2#2c96d1b6915b408893f9472569dee135
|
||||
https://conda.anaconda.org/conda-forge/win-64/libiconv-1.17-hcfcfb64_2.conda#e1eb10b1cca179f2baa3601e4efc8712
|
||||
https://conda.anaconda.org/conda-forge/win-64/libsqlite-3.44.2-hcfcfb64_0.conda#4a5f5ab56cbf3ccd08d71a1168061213
|
||||
https://conda.anaconda.org/conda-forge/win-64/libzlib-1.2.13-hcfcfb64_5.conda#5fdb9c6a113b6b6cb5e517fd972d5f41
|
||||
https://conda.anaconda.org/conda-forge/win-64/lz4-c-1.9.4-hcfcfb64_0.conda#e34720eb20a33fc3bfb8451dd837ab7a
|
||||
https://conda.anaconda.org/conda-forge/win-64/lzo-2.10-he774522_1000.tar.bz2#d5cf4b7eaa52316f135eed9e8548ad57
|
||||
https://conda.anaconda.org/conda-forge/win-64/openssl-3.2.0-hcfcfb64_1.conda#d10167022f99bad12ee07dea022d5830
|
||||
https://conda.anaconda.org/conda-forge/win-64/pthreads-win32-2.9.1-hfa6e2cd_3.tar.bz2#e2da8758d7d51ff6aa78a14dfb9dbed4
|
||||
https://conda.anaconda.org/conda-forge/win-64/reproc-14.2.4.post0-hcfcfb64_1.conda#887478162e563ea09451b19c22b1605b
|
||||
https://conda.anaconda.org/conda-forge/win-64/tk-8.6.13-h5226925_1.conda#fc048363eb8f03cd1737600a5d08aafe
|
||||
https://conda.anaconda.org/conda-forge/win-64/xz-5.2.6-h8d14728_0.tar.bz2#515d77642eaa3639413c6b1bc3f94219
|
||||
https://conda.anaconda.org/conda-forge/win-64/yaml-cpp-0.8.0-h63175ca_0.conda#9032e2129ea7afcc1a8e3d85715a931d
|
||||
https://conda.anaconda.org/conda-forge/win-64/krb5-1.21.2-heb0366b_0.conda#6e8b0f22b4eef3b3cb3849bb4c3d47f9
|
||||
https://conda.anaconda.org/conda-forge/win-64/libsolv-0.7.27-h12be248_0.conda#a62f8a595db21c4886cedd46cc842d63
|
||||
https://conda.anaconda.org/conda-forge/win-64/libssh2-1.11.0-h7dfc565_0.conda#dc262d03aae04fe26825062879141a41
|
||||
https://conda.anaconda.org/conda-forge/win-64/libxml2-2.11.6-hc3477c8_0.conda#08ffbb4c22dd3622e122058368f8b708
|
||||
https://conda.anaconda.org/conda-forge/win-64/python-3.12.1-h2628c8c_1_cpython.conda#19f49a5c0aea545792ad88bb40dc1ec9
|
||||
https://conda.anaconda.org/conda-forge/win-64/reproc-cpp-14.2.4.post0-h63175ca_1.conda#12fcd53cef836a4128c65c464ebb09d7
|
||||
https://conda.anaconda.org/conda-forge/win-64/zstd-1.5.5-h12be248_0.conda#792bb5da68bf0a6cac6a6072ecb8dbeb
|
||||
https://conda.anaconda.org/conda-forge/noarch/archspec-0.2.2-pyhd8ed1ab_0.conda#0dc2fce00a160271714647c019e3a8a8
|
||||
https://conda.anaconda.org/conda-forge/noarch/boltons-23.1.1-pyhd8ed1ab_0.conda#56febe65315cc388a5d20adf2b39a74d
|
||||
https://conda.anaconda.org/conda-forge/win-64/brotli-python-1.1.0-py312h53d5487_1.conda#d01a6667b99f0e8ad4097af66c938e62
|
||||
https://conda.anaconda.org/conda-forge/noarch/certifi-2023.11.17-pyhd8ed1ab_0.conda#2011bcf45376341dd1d690263fdbc789
|
||||
https://conda.anaconda.org/conda-forge/noarch/charset-normalizer-3.3.2-pyhd8ed1ab_0.conda#7f4a9e3fcff3f6356ae99244a014da6a
|
||||
https://conda.anaconda.org/conda-forge/noarch/colorama-0.4.6-pyhd8ed1ab_0.tar.bz2#3faab06a954c2a04039983f2c4a50d99
|
||||
https://conda.anaconda.org/conda-forge/noarch/crashtest-0.4.1-pyhd8ed1ab_0.tar.bz2#709a2295dd907bb34afb57d54320642f
|
||||
https://conda.anaconda.org/conda-forge/noarch/distlib-0.3.8-pyhd8ed1ab_0.conda#db16c66b759a64dc5183d69cc3745a52
|
||||
https://conda.anaconda.org/conda-forge/noarch/distro-1.9.0-pyhd8ed1ab_0.conda#bbdb409974cd6cb30071b1d978302726
|
||||
https://conda.anaconda.org/conda-forge/noarch/filelock-3.13.1-pyhd8ed1ab_0.conda#0c1729b74a8152fde6a38ba0a2ab9f45
|
||||
https://conda.anaconda.org/conda-forge/noarch/idna-3.6-pyhd8ed1ab_0.conda#1a76f09108576397c41c0b0c5bd84134
|
||||
https://conda.anaconda.org/conda-forge/win-64/jsonpointer-2.4-py312h2e8e312_3.conda#9d9572e257bf4559f20629efb0d3511d
|
||||
https://conda.anaconda.org/conda-forge/win-64/libarchive-3.7.2-h6f8411a_0.conda#ef46bb4b1613b308b957a25407ff6f5b
|
||||
https://conda.anaconda.org/conda-forge/win-64/libcurl-8.5.0-hd5e4a3a_0.conda#c95eb3d60266dd47b8eb864e10d6bcf3
|
||||
https://conda.anaconda.org/conda-forge/win-64/libhwloc-2.9.3-default_haede6df_1009.conda#87da045f6d26ce9fe20ad76a18f6a18a
|
||||
https://conda.anaconda.org/conda-forge/win-64/menuinst-2.0.2-py312h53d5487_0.conda#ca8ca67bb6733fb295abd3c4e749ae13
|
||||
https://conda.anaconda.org/conda-forge/noarch/more-itertools-10.2.0-pyhd8ed1ab_0.conda#d5c98e9706fdc5328d49a9bf2ce5fb42
|
||||
https://conda.anaconda.org/conda-forge/win-64/msgpack-python-1.0.7-py312h0d7def4_0.conda#d99e74b66f04a1413cff5161f65cd4c9
|
||||
https://conda.anaconda.org/conda-forge/noarch/packaging-23.2-pyhd8ed1ab_0.conda#79002079284aa895f883c6b7f3f88fd6
|
||||
https://conda.anaconda.org/conda-forge/noarch/pkginfo-1.9.6-pyhd8ed1ab_0.conda#be1e9f1c65a1ed0f2ae9352fec99db64
|
||||
https://conda.anaconda.org/conda-forge/noarch/pluggy-1.3.0-pyhd8ed1ab_0.conda#2390bd10bed1f3fdc7a537fb5a447d8d
|
||||
https://conda.anaconda.org/conda-forge/noarch/poetry-core-1.8.1-pyhd8ed1ab_0.conda#a013d99ae50670b823c511f7274d2d2a
|
||||
https://conda.anaconda.org/conda-forge/noarch/ptyprocess-0.7.0-pyhd3deb0d_0.tar.bz2#359eeb6536da0e687af562ed265ec263
|
||||
https://conda.anaconda.org/conda-forge/win-64/pycosat-0.6.6-py312he70551f_0.conda#619f8a019eaeffff3c9507fd2f5769c2
|
||||
https://conda.anaconda.org/conda-forge/noarch/pycparser-2.21-pyhd8ed1ab_0.tar.bz2#076becd9e05608f8dc72757d5f3a91ff
|
||||
https://conda.anaconda.org/conda-forge/noarch/python-fastjsonschema-2.19.1-pyhd8ed1ab_0.conda#4d3ceee3af4b0f9a1f48f57176bf8625
|
||||
https://conda.anaconda.org/conda-forge/noarch/python-installer-0.7.0-pyhd8ed1ab_0.conda#65dea78f903d686c8b0c2feaf0e15e1f
|
||||
https://conda.anaconda.org/conda-forge/win-64/pywin32-ctypes-0.2.2-py312h2e8e312_1.conda#93a37178188cd6521e5410763a18aaf4
|
||||
https://conda.anaconda.org/conda-forge/win-64/ruamel.yaml.clib-0.2.7-py312he70551f_2.conda#ef47a90d50c6d69c9697038f9c01a6cb
|
||||
https://conda.anaconda.org/conda-forge/noarch/setuptools-69.0.3-pyhd8ed1ab_0.conda#40695fdfd15a92121ed2922900d0308b
|
||||
https://conda.anaconda.org/conda-forge/noarch/shellingham-1.5.4-pyhd8ed1ab_0.conda#d08db09a552699ee9e7eec56b4eb3899
|
||||
https://conda.anaconda.org/conda-forge/noarch/tomli-2.0.1-pyhd8ed1ab_0.tar.bz2#5844808ffab9ebdb694585b50ba02a96
|
||||
https://conda.anaconda.org/conda-forge/noarch/tomlkit-0.12.3-pyha770c72_0.conda#074d0ce7a6261ab8b497c3518796ef3e
|
||||
https://conda.anaconda.org/conda-forge/noarch/trove-classifiers-2024.1.8-pyhd8ed1ab_0.conda#b120d43603f9b021d252fb7754b35557
|
||||
https://conda.anaconda.org/conda-forge/noarch/truststore-0.8.0-pyhd8ed1ab_0.conda#08316d001eca8854392cf2837828ea11
|
||||
https://conda.anaconda.org/conda-forge/noarch/typing_extensions-4.9.0-pyha770c72_0.conda#a92a6440c3fe7052d63244f3aba2a4a7
|
||||
https://conda.anaconda.org/conda-forge/noarch/wheel-0.42.0-pyhd8ed1ab_0.conda#1cdea58981c5cbc17b51973bcaddcea7
|
||||
https://conda.anaconda.org/conda-forge/noarch/win_inet_pton-1.1.0-pyhd8ed1ab_6.tar.bz2#30878ecc4bd36e8deeea1e3c151b2e0b
|
||||
https://conda.anaconda.org/conda-forge/noarch/zipp-3.17.0-pyhd8ed1ab_0.conda#2e4d6bc0b14e10f895fc6791a7d9b26a
|
||||
https://conda.anaconda.org/conda-forge/win-64/cffi-1.16.0-py312he70551f_0.conda#5a51096925d52332c62bfd8904899055
|
||||
https://conda.anaconda.org/conda-forge/noarch/importlib-metadata-7.0.1-pyha770c72_0.conda#746623a787e06191d80a2133e5daff17
|
||||
https://conda.anaconda.org/conda-forge/noarch/jaraco.classes-3.3.0-pyhd8ed1ab_0.conda#e9f79248d30e942f7c358ff21a1790f5
|
||||
https://conda.anaconda.org/conda-forge/noarch/jsonpatch-1.33-pyhd8ed1ab_0.conda#bfdb7c5c6ad1077c82a69a8642c87aff
|
||||
https://conda.anaconda.org/conda-forge/win-64/libmamba-1.5.6-h3f09ed1_0.conda#b9773f18a59065a8933ba439fe60e2c3
|
||||
https://conda.anaconda.org/conda-forge/noarch/pexpect-4.8.0-pyh1a96a4e_2.tar.bz2#330448ce4403cc74990ac07c555942a1
|
||||
https://conda.anaconda.org/conda-forge/noarch/pip-23.3.2-pyhd8ed1ab_0.conda#8591c748f98dcc02253003533bc2e4b1
|
||||
https://conda.anaconda.org/conda-forge/noarch/poetry-plugin-export-1.6.0-pyhd8ed1ab_0.conda#1f2184db9f337d1074b1d5769165cac9
|
||||
https://conda.anaconda.org/conda-forge/noarch/pyproject_hooks-1.0.0-pyhd8ed1ab_0.conda#21de50391d584eb7f4441b9de1ad773f
|
||||
https://conda.anaconda.org/conda-forge/noarch/pysocks-1.7.1-pyh0701188_6.tar.bz2#56cd9fe388baac0e90c7149cfac95b60
|
||||
https://conda.anaconda.org/conda-forge/win-64/ruamel.yaml-0.18.5-py312he70551f_0.conda#e4d62d455007c8ffc251431a52bd9319
|
||||
https://conda.anaconda.org/conda-forge/win-64/tbb-2021.11.0-h91493d7_0.conda#517c08eba817fb0e56cfd411ed198261
|
||||
https://conda.anaconda.org/conda-forge/noarch/tqdm-4.66.1-pyhd8ed1ab_0.conda#03c97908b976498dcae97eb4e4f3149c
|
||||
https://conda.anaconda.org/conda-forge/noarch/typing-extensions-4.9.0-hd8ed1ab_0.conda#c16524c1b7227dc80b36b4fa6f77cc86
|
||||
https://conda.anaconda.org/conda-forge/win-64/keyring-24.3.0-py312h2e8e312_0.conda#b2ad5f984537e2705416e9de60e9bf52
|
||||
https://conda.anaconda.org/conda-forge/win-64/libmambapy-1.5.6-py312h66cf91f_0.conda#efd9aba451517607304b1934ed4ee494
|
||||
https://conda.anaconda.org/conda-forge/win-64/mkl-2023.2.0-h6a75c08_50497.conda#064cea9f45531e7b53584acf4bd8b044
|
||||
https://conda.anaconda.org/conda-forge/noarch/platformdirs-3.11.0-pyhd8ed1ab_0.conda#8f567c0a74aa44cf732f15773b4083b0
|
||||
https://conda.anaconda.org/conda-forge/noarch/python-build-1.0.3-pyhd8ed1ab_0.conda#d9ccabf228cb98419ca3d5694b25e1a2
|
||||
https://conda.anaconda.org/conda-forge/noarch/urllib3-2.1.0-pyhd8ed1ab_0.conda#f8ced8ee63830dec7ecc1be048d1470a
|
||||
https://conda.anaconda.org/conda-forge/win-64/zstandard-0.22.0-py312h01d794b_0.conda#36f4394759b1d5de1699446cadb2c8f5
|
||||
https://conda.anaconda.org/conda-forge/noarch/conda-package-streaming-0.9.0-pyhd8ed1ab_0.conda#38253361efb303deead3eab39ae9269b
|
||||
https://conda.anaconda.org/conda-forge/win-64/dulwich-0.21.7-py312he70551f_0.conda#1e0108590564c5c3b7235bb735d1b334
|
||||
https://conda.anaconda.org/conda-forge/win-64/libblas-3.9.0-20_win64_mkl.conda#6cad6cd2fbdeef4d651b8f752a4da960
|
||||
https://conda.anaconda.org/conda-forge/noarch/requests-2.31.0-pyhd8ed1ab_0.conda#a30144e4156cdbb236f99ebb49828f8b
|
||||
https://conda.anaconda.org/conda-forge/noarch/virtualenv-20.25.0-pyhd8ed1ab_0.conda#c119653cba436d8183c27bf6d190e587
|
||||
https://conda.anaconda.org/conda-forge/noarch/cachecontrol-0.13.1-pyhd8ed1ab_0.conda#174bd699bb5aa9e2622eb4b288276ff8
|
||||
https://conda.anaconda.org/conda-forge/noarch/conda-package-handling-2.2.0-pyh38be061_0.conda#8a3ae7f6318376aa08ea753367bb7dd6
|
||||
https://conda.anaconda.org/conda-forge/win-64/libcblas-3.9.0-20_win64_mkl.conda#e6d36cfcb2f2dff0f659d2aa0813eb2d
|
||||
https://conda.anaconda.org/conda-forge/win-64/liblapack-3.9.0-20_win64_mkl.conda#9510d07424d70fcac553d86b3e4a7c14
|
||||
https://conda.anaconda.org/conda-forge/noarch/requests-toolbelt-1.0.0-pyhd8ed1ab_0.conda#99c98318c8646b08cc764f90ce98906e
|
||||
https://conda.anaconda.org/conda-forge/noarch/cachecontrol-with-filecache-0.13.1-pyhd8ed1ab_0.conda#8c4781ca0893cff3a64423954ce234a1
|
||||
https://conda.anaconda.org/conda-forge/win-64/numpy-1.26.3-py312h8753938_0.conda#ced1f13bc58bd594257fcd3b1912c450
|
||||
https://conda.anaconda.org/conda-forge/win-64/rapidfuzz-3.6.1-py312h53d5487_0.conda#b01f0ddbb8061d4632b736cc73a5f6aa
|
||||
https://conda.anaconda.org/conda-forge/noarch/cleo-2.1.0-pyhd8ed1ab_0.conda#69569ea8a6d1465193345a40421d138b
|
||||
https://conda.anaconda.org/conda-forge/noarch/poetry-1.7.1-win_pyh7428d3b_0.conda#40353a0da2dabf3c044136c802ff77bb
|
||||
https://conda.anaconda.org/conda-forge/win-64/conda-23.11.0-py312h2e8e312_1.conda#741f165f5dd50d11461b15c123b93782
|
||||
https://conda.anaconda.org/conda-forge/noarch/conda-libmamba-solver-23.12.0-pyhd8ed1ab_0.conda#e877d5150e73a0844ea2939be110c3b1
|
||||
https://conda.anaconda.org/conda-forge/win-64/mamba-1.5.6-py312h5494d5c_0.conda#2b99a1797b991c1c70d54775b8588fc9
|
||||
@@ -0,0 +1,20 @@
|
||||
name: karaoke-prep
|
||||
channels:
|
||||
- conda-forge
|
||||
# We want to have a reproducible setup, so we don't want default channels,
|
||||
# which may be different for different users. All required channels should
|
||||
# be listed explicitly here.
|
||||
- nodefaults
|
||||
dependencies:
|
||||
- python>=3.10,<3.12 # or don't specify the version and use the latest stable Python
|
||||
- mamba
|
||||
- pip # pip must be mentioned explicitly, or conda-lock will fail
|
||||
- poetry
|
||||
|
||||
# Non-standard section listing target platforms for conda-lock:
|
||||
platforms:
|
||||
- linux-64
|
||||
- osx-64
|
||||
- win-64
|
||||
- osx-arm64 # Apple Silicon, e.g. M1/M2
|
||||
- linux-aarch64 # Docker on Apple Silicon
|
||||
@@ -0,0 +1,37 @@
|
||||
# -*- mode: python ; coding: utf-8 -*-
|
||||
|
||||
|
||||
a = Analysis(
|
||||
['karaoke_prep/utils/prep_cli.py'],
|
||||
pathex=[],
|
||||
binaries=[('platform/ffmpeg.exe', '.')],
|
||||
datas=[],
|
||||
hiddenimports=[],
|
||||
hookspath=[],
|
||||
hooksconfig={},
|
||||
runtime_hooks=[],
|
||||
excludes=[],
|
||||
noarchive=False,
|
||||
)
|
||||
pyz = PYZ(a.pure)
|
||||
|
||||
exe = EXE(
|
||||
pyz,
|
||||
a.scripts,
|
||||
a.binaries,
|
||||
a.datas,
|
||||
[],
|
||||
name='karaoke-prep',
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False,
|
||||
upx=True,
|
||||
upx_exclude=[],
|
||||
runtime_tmpdir=None,
|
||||
console=True,
|
||||
disable_windowed_traceback=False,
|
||||
argv_emulation=False,
|
||||
target_arch=None,
|
||||
codesign_identity=None,
|
||||
entitlements_file=None,
|
||||
)
|
||||
@@ -1 +1 @@
|
||||
from .requests_prep import KaraokePrep
|
||||
from .karaoke_prep import KaraokePrep
|
||||
@@ -0,0 +1 @@
|
||||
from .karaoke_finalise import KaraokeFinalise
|
||||
@@ -0,0 +1,938 @@
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
import shlex
|
||||
import logging
|
||||
import zipfile
|
||||
import shutil
|
||||
import re
|
||||
import requests
|
||||
import pickle
|
||||
from lyrics_converter import LyricsConverter
|
||||
from thefuzz import fuzz
|
||||
from googleapiclient.discovery import build
|
||||
from google_auth_oauthlib.flow import InstalledAppFlow
|
||||
from google.auth.transport.requests import Request
|
||||
from googleapiclient.http import MediaFileUpload
|
||||
import subprocess
|
||||
import time
|
||||
from cdgmaker.lrc_to_cdg import generate_cdg
|
||||
from google.oauth2.credentials import Credentials
|
||||
import base64
|
||||
from email.mime.text import MIMEText
|
||||
|
||||
|
||||
class KaraokeFinalise:
|
||||
def __init__(
|
||||
self,
|
||||
log_level=logging.DEBUG,
|
||||
log_formatter=None,
|
||||
dry_run=False,
|
||||
model_name=None,
|
||||
instrumental_format="flac",
|
||||
enable_cdg=False,
|
||||
enable_txt=False,
|
||||
brand_prefix=None,
|
||||
organised_dir=None,
|
||||
organised_dir_rclone_root=None,
|
||||
public_share_dir=None,
|
||||
youtube_client_secrets_file=None,
|
||||
youtube_description_file=None,
|
||||
rclone_destination=None,
|
||||
discord_webhook_url=None,
|
||||
non_interactive=False,
|
||||
email_template_file=None,
|
||||
):
|
||||
self.logger = logging.getLogger(__name__)
|
||||
self.logger.setLevel(log_level)
|
||||
self.log_level = log_level
|
||||
self.log_formatter = log_formatter
|
||||
|
||||
self.log_handler = logging.StreamHandler()
|
||||
|
||||
if self.log_formatter is None:
|
||||
self.log_formatter = logging.Formatter("%(asctime)s - %(levelname)s - %(module)s - %(message)s")
|
||||
|
||||
self.log_handler.setFormatter(self.log_formatter)
|
||||
self.logger.addHandler(self.log_handler)
|
||||
|
||||
self.logger.debug(
|
||||
f"KaraokeFinalise instantiating, dry_run: {dry_run}, model_name: {model_name}, brand_prefix: {brand_prefix}, organised_dir: {organised_dir}, public_share_dir: {public_share_dir}, rclone_destination: {rclone_destination}"
|
||||
)
|
||||
|
||||
# Path to the Windows PyInstaller frozen bundled ffmpeg.exe, or the system-installed FFmpeg binary on Mac/Linux
|
||||
ffmpeg_path = os.path.join(sys._MEIPASS, "ffmpeg.exe") if getattr(sys, "frozen", False) else "ffmpeg"
|
||||
|
||||
self.ffmpeg_base_command = f"{ffmpeg_path} -hide_banner -nostats"
|
||||
|
||||
if self.log_level == logging.DEBUG:
|
||||
self.ffmpeg_base_command += " -loglevel verbose"
|
||||
else:
|
||||
self.ffmpeg_base_command += " -loglevel fatal"
|
||||
|
||||
self.dry_run = dry_run
|
||||
self.model_name = model_name
|
||||
self.instrumental_format = instrumental_format
|
||||
|
||||
self.brand_prefix = brand_prefix
|
||||
self.organised_dir = organised_dir
|
||||
self.organised_dir_rclone_root = organised_dir_rclone_root
|
||||
|
||||
self.public_share_dir = public_share_dir
|
||||
self.youtube_client_secrets_file = youtube_client_secrets_file
|
||||
self.youtube_description_file = youtube_description_file
|
||||
self.rclone_destination = rclone_destination
|
||||
self.discord_webhook_url = discord_webhook_url
|
||||
self.enable_cdg = enable_cdg
|
||||
self.enable_txt = enable_txt
|
||||
|
||||
self.youtube_upload_enabled = False
|
||||
self.discord_notication_enabled = False
|
||||
self.folder_organisation_enabled = False
|
||||
self.public_share_copy_enabled = False
|
||||
self.public_share_rclone_enabled = False
|
||||
|
||||
self.skip_notifications = False
|
||||
self.non_interactive = non_interactive
|
||||
|
||||
self.suffixes = {
|
||||
"title_mov": " (Title).mov",
|
||||
"title_jpg": " (Title).jpg",
|
||||
"end_mov": " (End).mov",
|
||||
"end_jpg": " (End).jpg",
|
||||
"with_vocals_mov": " (With Vocals).mov",
|
||||
"with_vocals_mp4": " (With Vocals).mp4",
|
||||
"karaoke_lrc": " (Karaoke).lrc",
|
||||
"karaoke_cdg": " (Karaoke).cdg",
|
||||
"karaoke_txt": " (Karaoke).txt",
|
||||
"karaoke_mp3": " (Karaoke).mp3",
|
||||
"karaoke_mov": " (Karaoke).mov",
|
||||
"final_karaoke_mp4": " (Final Karaoke).mp4",
|
||||
"final_karaoke_cdg_zip": " (Final Karaoke CDG).zip",
|
||||
"final_karaoke_txt_zip": " (Final Karaoke TXT).zip",
|
||||
"final_karaoke_720p_mp4": " (Final Karaoke 720p).mp4",
|
||||
}
|
||||
|
||||
self.youtube_url_prefix = "https://www.youtube.com/watch?v="
|
||||
|
||||
self.youtube_url = None
|
||||
self.brand_code = None
|
||||
self.new_brand_code_dir = None
|
||||
self.new_brand_code_dir_path = None
|
||||
self.brand_code_dir_sharing_link = None
|
||||
|
||||
self.email_template_file = email_template_file
|
||||
self.gmail_service = None
|
||||
|
||||
def check_input_files_exist(self, base_name, with_vocals_file, instrumental_audio_file):
|
||||
self.logger.info(f"Checking required input files exist...")
|
||||
|
||||
input_files = {
|
||||
"title_mov": f"{base_name}{self.suffixes['title_mov']}",
|
||||
"title_jpg": f"{base_name}{self.suffixes['title_jpg']}",
|
||||
"instrumental_audio": instrumental_audio_file,
|
||||
"with_vocals_mov": with_vocals_file,
|
||||
}
|
||||
|
||||
optional_input_files = {
|
||||
"end_mov": f"{base_name}{self.suffixes['end_mov']}",
|
||||
"end_jpg": f"{base_name}{self.suffixes['end_jpg']}",
|
||||
}
|
||||
|
||||
if self.enable_cdg or self.enable_txt:
|
||||
input_files["karaoke_lrc"] = f"{base_name}{self.suffixes['karaoke_lrc']}"
|
||||
|
||||
for key, file_path in input_files.items():
|
||||
if not os.path.isfile(file_path):
|
||||
raise Exception(f"Input file {key} not found: {file_path}")
|
||||
|
||||
self.logger.info(f" Input file {key} found: {file_path}")
|
||||
|
||||
for key, file_path in optional_input_files.items():
|
||||
if not os.path.isfile(file_path):
|
||||
self.logger.info(f" Optional input file {key} not found: {file_path}")
|
||||
|
||||
self.logger.info(f" Input file {key} found, adding to input_files: {file_path}")
|
||||
input_files[key] = file_path
|
||||
|
||||
return input_files
|
||||
|
||||
def prepare_output_filenames(self, base_name):
|
||||
output_files = {
|
||||
"karaoke_mov": f"{base_name}{self.suffixes['karaoke_mov']}",
|
||||
"karaoke_mp3": f"{base_name}{self.suffixes['karaoke_mp3']}",
|
||||
"with_vocals_mp4": f"{base_name}{self.suffixes['with_vocals_mp4']}",
|
||||
"final_karaoke_mp4": f"{base_name}{self.suffixes['final_karaoke_mp4']}",
|
||||
"final_karaoke_720p_mp4": f"{base_name}{self.suffixes['final_karaoke_720p_mp4']}",
|
||||
}
|
||||
|
||||
if self.enable_cdg:
|
||||
output_files["final_karaoke_cdg_zip"] = f"{base_name}{self.suffixes['final_karaoke_cdg_zip']}"
|
||||
|
||||
if self.enable_txt:
|
||||
output_files["karaoke_txt"] = f"{base_name}{self.suffixes['karaoke_txt']}"
|
||||
output_files["final_karaoke_txt_zip"] = f"{base_name}{self.suffixes['final_karaoke_txt_zip']}"
|
||||
|
||||
return output_files
|
||||
|
||||
def prompt_user_confirmation_or_raise_exception(self, prompt_message, exit_message, allow_empty=False):
|
||||
if not self.prompt_user_bool(prompt_message, allow_empty=allow_empty):
|
||||
self.logger.error(exit_message)
|
||||
raise Exception(exit_message)
|
||||
|
||||
def prompt_user_bool(self, prompt_message, allow_empty=False):
|
||||
if self.non_interactive:
|
||||
self.logger.warning(f"Non-interactive mode, responding True for prompt: {prompt_message}")
|
||||
return True
|
||||
|
||||
options_string = "[y]/n" if allow_empty else "y/[n]"
|
||||
accept_responses = ["y", "yes"]
|
||||
if allow_empty:
|
||||
accept_responses.append("")
|
||||
|
||||
print()
|
||||
response = input(f"{prompt_message} {options_string} ").strip().lower()
|
||||
return response in accept_responses
|
||||
|
||||
def validate_input_parameters_for_features(self):
|
||||
self.logger.info(f"Validating input parameters for enabled features...")
|
||||
|
||||
current_directory = os.getcwd()
|
||||
self.logger.info(f"Current directory to process: {current_directory}")
|
||||
|
||||
# Enable youtube upload if client secrets file is provided and is valid JSON
|
||||
if self.youtube_client_secrets_file is not None and self.youtube_description_file is not None:
|
||||
if not os.path.isfile(self.youtube_client_secrets_file):
|
||||
raise Exception(f"YouTube client secrets file does not exist: {self.youtube_client_secrets_file}")
|
||||
|
||||
if not os.path.isfile(self.youtube_description_file):
|
||||
raise Exception(f"YouTube description file does not exist: {self.youtube_description_file}")
|
||||
|
||||
# Test parsing the file as JSON to check it's valid
|
||||
try:
|
||||
with open(self.youtube_client_secrets_file, "r") as f:
|
||||
json.load(f)
|
||||
except json.JSONDecodeError as e:
|
||||
raise Exception(f"YouTube client secrets file is not valid JSON: {self.youtube_client_secrets_file}") from e
|
||||
|
||||
self.logger.debug(f"YouTube upload checks passed, enabling YouTube upload")
|
||||
self.youtube_upload_enabled = True
|
||||
|
||||
# Enable discord notifications if webhook URL is provided and is valid URL
|
||||
if self.discord_webhook_url is not None:
|
||||
if not self.discord_webhook_url.startswith("https://discord.com/api/webhooks/"):
|
||||
raise Exception(f"Discord webhook URL is not valid: {self.discord_webhook_url}")
|
||||
|
||||
self.logger.debug(f"Discord webhook URL checks passed, enabling Discord notifications")
|
||||
self.discord_notication_enabled = True
|
||||
|
||||
# Enable folder organisation if brand prefix and target directory are provided and target directory is valid
|
||||
if self.brand_prefix is not None and self.organised_dir is not None:
|
||||
if not os.path.isdir(self.organised_dir):
|
||||
raise Exception(f"Target directory does not exist: {self.organised_dir}")
|
||||
|
||||
self.logger.debug(f"Brand prefix and target directory provided, enabling folder organisation")
|
||||
self.folder_organisation_enabled = True
|
||||
|
||||
# Enable public share copy if public share directory is provided and is valid directory with MP4 and CDG subdirectories
|
||||
if self.public_share_dir is not None:
|
||||
if not os.path.isdir(self.public_share_dir):
|
||||
raise Exception(f"Public share directory does not exist: {self.public_share_dir}")
|
||||
|
||||
if not os.path.isdir(os.path.join(self.public_share_dir, "MP4")):
|
||||
raise Exception(f"Public share directory does not contain MP4 subdirectory: {self.public_share_dir}")
|
||||
|
||||
if not os.path.isdir(os.path.join(self.public_share_dir, "CDG")):
|
||||
raise Exception(f"Public share directory does not contain CDG subdirectory: {self.public_share_dir}")
|
||||
|
||||
self.logger.debug(f"Public share directory checks passed, enabling public share copy")
|
||||
self.public_share_copy_enabled = True
|
||||
|
||||
# Enable public share rclone if rclone destination is provided
|
||||
if self.rclone_destination is not None:
|
||||
self.logger.debug(f"Rclone destination provided, enabling rclone sync")
|
||||
self.public_share_rclone_enabled = True
|
||||
|
||||
# Tell user which features are enabled, prompt them to confirm before proceeding
|
||||
self.logger.info(f"Enabled features:")
|
||||
self.logger.info(f" CDG ZIP creation: {self.enable_cdg}")
|
||||
self.logger.info(f" TXT ZIP creation: {self.enable_txt}")
|
||||
self.logger.info(f" YouTube upload: {self.youtube_upload_enabled}")
|
||||
self.logger.info(f" Discord notifications: {self.discord_notication_enabled}")
|
||||
self.logger.info(f" Folder organisation: {self.folder_organisation_enabled}")
|
||||
self.logger.info(f" Public share copy: {self.public_share_copy_enabled}")
|
||||
self.logger.info(f" Public share rclone: {self.public_share_rclone_enabled}")
|
||||
|
||||
self.prompt_user_confirmation_or_raise_exception(
|
||||
f"Confirm features enabled log messages above match your expectations for finalisation?",
|
||||
"Refusing to proceed without user confirmation they're happy with enabled features.",
|
||||
allow_empty=True,
|
||||
)
|
||||
|
||||
def authenticate_youtube(self):
|
||||
"""Authenticate and return a YouTube service object."""
|
||||
credentials = None
|
||||
youtube_token_file = "/tmp/karaoke-finalise-youtube-token.pickle"
|
||||
|
||||
# Token file stores the user's access and refresh tokens for YouTube.
|
||||
if os.path.exists(youtube_token_file):
|
||||
with open(youtube_token_file, "rb") as token:
|
||||
credentials = pickle.load(token)
|
||||
|
||||
# If there are no valid credentials, let the user log in.
|
||||
if not credentials or not credentials.valid:
|
||||
if credentials and credentials.expired and credentials.refresh_token:
|
||||
credentials.refresh(Request())
|
||||
else:
|
||||
flow = InstalledAppFlow.from_client_secrets_file(
|
||||
self.youtube_client_secrets_file, scopes=["https://www.googleapis.com/auth/youtube"]
|
||||
)
|
||||
credentials = flow.run_local_server(port=0) # This will open a browser for authentication
|
||||
|
||||
# Save the credentials for the next run
|
||||
with open(youtube_token_file, "wb") as token:
|
||||
pickle.dump(credentials, token)
|
||||
|
||||
return build("youtube", "v3", credentials=credentials)
|
||||
|
||||
def get_channel_id(self):
|
||||
youtube = self.authenticate_youtube()
|
||||
|
||||
# Get the authenticated user's channel
|
||||
request = youtube.channels().list(part="snippet", mine=True)
|
||||
response = request.execute()
|
||||
|
||||
# Extract the channel ID
|
||||
if "items" in response:
|
||||
channel_id = response["items"][0]["id"]
|
||||
return channel_id
|
||||
else:
|
||||
return None
|
||||
|
||||
def check_if_video_title_exists_on_youtube_channel(self, youtube_title):
|
||||
youtube = self.authenticate_youtube()
|
||||
channel_id = self.get_channel_id()
|
||||
|
||||
self.logger.info(f"Searching YouTube channel {channel_id} for title: {youtube_title}")
|
||||
request = youtube.search().list(part="snippet", channelId=channel_id, q=youtube_title, type="video", maxResults=10)
|
||||
response = request.execute()
|
||||
|
||||
# Check if any videos were found
|
||||
if "items" in response and len(response["items"]) > 0:
|
||||
for item in response["items"]:
|
||||
found_title = item["snippet"]["title"]
|
||||
similarity_score = fuzz.ratio(youtube_title.lower(), found_title.lower())
|
||||
if similarity_score >= 70: # 70% similarity
|
||||
found_id = item["id"]["videoId"]
|
||||
self.logger.info(
|
||||
f"Potential match found on YouTube channel with ID: {found_id} and title: {found_title} (similarity: {similarity_score}%)"
|
||||
)
|
||||
confirmation = input(f"Is '{found_title}' the video you are finalising? (y/n): ").strip().lower()
|
||||
if confirmation == "y":
|
||||
self.youtube_video_id = found_id
|
||||
self.youtube_url = f"{self.youtube_url_prefix}{self.youtube_video_id}"
|
||||
self.skip_notifications = True
|
||||
return True
|
||||
|
||||
self.logger.info(f"No matching video found with title: {youtube_title}")
|
||||
return False
|
||||
|
||||
def truncate_to_nearest_word(self, title, max_length):
|
||||
if len(title) <= max_length:
|
||||
return title
|
||||
truncated_title = title[:max_length].rsplit(" ", 1)[0]
|
||||
if len(truncated_title) < max_length:
|
||||
truncated_title += " ..."
|
||||
return truncated_title
|
||||
|
||||
def upload_final_mp4_to_youtube_with_title_thumbnail(self, artist, title, input_files, output_files):
|
||||
self.logger.info(f"Uploading final MP4 to YouTube with title thumbnail...")
|
||||
if self.dry_run:
|
||||
self.logger.info(
|
||||
f'DRY RUN: Would upload {output_files["final_karaoke_mp4"]} to YouTube with thumbnail {input_files["title_jpg"]} using client secrets file: {self.youtube_client_secrets_file}'
|
||||
)
|
||||
else:
|
||||
youtube_title = f"{artist} - {title} (Karaoke)"
|
||||
|
||||
# Truncate title to the nearest whole word and add ellipsis if needed
|
||||
max_length = 95
|
||||
youtube_title = self.truncate_to_nearest_word(youtube_title, max_length)
|
||||
|
||||
if self.check_if_video_title_exists_on_youtube_channel(youtube_title):
|
||||
self.logger.warning(f"Video already exists on YouTube, skipping upload: {self.youtube_url}")
|
||||
return
|
||||
|
||||
youtube_description = f"Karaoke version of {artist} - {title} created using karaoke-prep python package."
|
||||
if self.youtube_description_file is not None:
|
||||
with open(self.youtube_description_file, "r") as f:
|
||||
youtube_description = f.read()
|
||||
|
||||
youtube_category_id = "10" # Category ID for Music
|
||||
youtube_keywords = ["karaoke", "music", "singing", "instrumental", "lyrics", artist, title]
|
||||
|
||||
self.logger.info(f"Authenticating with YouTube...")
|
||||
# Upload video to YouTube and set thumbnail.
|
||||
youtube = self.authenticate_youtube()
|
||||
|
||||
body = {
|
||||
"snippet": {
|
||||
"title": youtube_title,
|
||||
"description": youtube_description,
|
||||
"tags": youtube_keywords,
|
||||
"categoryId": youtube_category_id,
|
||||
},
|
||||
"status": {"privacyStatus": "public"},
|
||||
}
|
||||
|
||||
# Use MediaFileUpload to handle the video file
|
||||
media_file = MediaFileUpload(output_files["final_karaoke_mp4"], mimetype="video/mp4", resumable=True)
|
||||
|
||||
# Call the API's videos.insert method to create and upload the video.
|
||||
self.logger.info(f"Uploading final MP4 to YouTube...")
|
||||
request = youtube.videos().insert(part="snippet,status", body=body, media_body=media_file)
|
||||
response = request.execute()
|
||||
|
||||
self.youtube_video_id = response.get("id")
|
||||
self.youtube_url = f"{self.youtube_url_prefix}{self.youtube_video_id}"
|
||||
self.logger.info(f"Uploaded video to YouTube: {self.youtube_url}")
|
||||
|
||||
# Uploading the thumbnail
|
||||
if input_files["title_jpg"]:
|
||||
media_thumbnail = MediaFileUpload(input_files["title_jpg"], mimetype="image/jpeg")
|
||||
youtube.thumbnails().set(videoId=self.youtube_video_id, media_body=media_thumbnail).execute()
|
||||
self.logger.info(f"Uploaded thumbnail for video ID {self.youtube_video_id}")
|
||||
|
||||
def get_next_brand_code(self):
|
||||
"""
|
||||
Calculate the next sequence number based on existing directories in the organised_dir.
|
||||
Assumes directories are named with the format: BRAND-XXXX Artist - Title
|
||||
"""
|
||||
max_num = 0
|
||||
pattern = re.compile(rf"^{re.escape(self.brand_prefix)}-(\d{{4}})")
|
||||
|
||||
if not os.path.isdir(self.organised_dir):
|
||||
raise Exception(f"Target directory does not exist: {self.organised_dir}")
|
||||
|
||||
for dir_name in os.listdir(self.organised_dir):
|
||||
match = pattern.match(dir_name)
|
||||
if match:
|
||||
num = int(match.group(1))
|
||||
max_num = max(max_num, num)
|
||||
|
||||
self.logger.info(f"Next sequence number for brand {self.brand_prefix} calculated as: {max_num + 1}")
|
||||
next_seq_number = max_num + 1
|
||||
|
||||
return f"{self.brand_prefix}-{next_seq_number:04d}"
|
||||
|
||||
def post_discord_message(self, message, webhook_url):
|
||||
"""Post a message to a Discord channel via webhook."""
|
||||
data = {"content": message}
|
||||
response = requests.post(webhook_url, json=data)
|
||||
response.raise_for_status() # This will raise an exception if the request failed
|
||||
self.logger.info("Message posted to Discord")
|
||||
|
||||
def find_with_vocals_file(self):
|
||||
self.logger.info("Finding input file in current directory ending (With Vocals).mov or (With Vocals).mp4")
|
||||
|
||||
with_vocals_files = [f for f in os.listdir(".") if self.suffixes["with_vocals_mov"] in f]
|
||||
|
||||
if not with_vocals_files:
|
||||
self.logger.info(f"No with vocals MOV file found, looking for with vocals MP4 file instead")
|
||||
|
||||
with_vocals_files = [f for f in os.listdir(".") if self.suffixes["with_vocals_mp4"] in f]
|
||||
if with_vocals_files:
|
||||
self.logger.info(f"Found with vocals MP4 file: {with_vocals_files[0]}")
|
||||
return with_vocals_files[0]
|
||||
|
||||
if not with_vocals_files:
|
||||
karaoke_files = [f for f in os.listdir(".") if self.suffixes["karaoke_mov"] in f]
|
||||
if karaoke_files:
|
||||
for file in karaoke_files:
|
||||
new_file = file.replace(self.suffixes["karaoke_mov"], self.suffixes["with_vocals_mov"])
|
||||
|
||||
self.prompt_user_confirmation_or_raise_exception(
|
||||
f"Found '{file}' but no '(With Vocals)', rename to {new_file} for vocal input?",
|
||||
"Unable to proceed without With Vocals file or user confirmation of rename.",
|
||||
allow_empty=True,
|
||||
)
|
||||
|
||||
os.rename(file, new_file)
|
||||
self.logger.info(f"Renamed '{file}' to '{new_file}'")
|
||||
return new_file
|
||||
else:
|
||||
raise Exception("No suitable files found for processing.")
|
||||
else:
|
||||
return with_vocals_files[0] # Assuming only one such file is expected
|
||||
|
||||
def choose_instrumental_audio_file(self, base_name):
|
||||
self.logger.info(f"Choosing instrumental audio file to use as karaoke audio...")
|
||||
|
||||
search_string = " (Instrumental "
|
||||
self.logger.info(f"Searching for files in current directory containing {search_string}")
|
||||
|
||||
all_instrumental_files = [f for f in os.listdir(".") if search_string in f]
|
||||
flac_files = set(f.rsplit(".", 1)[0] for f in all_instrumental_files if f.endswith(".flac"))
|
||||
mp3_files = set(f.rsplit(".", 1)[0] for f in all_instrumental_files if f.endswith(".mp3"))
|
||||
|
||||
self.logger.debug(f"FLAC files found: {flac_files}")
|
||||
self.logger.debug(f"MP3 files found: {mp3_files}")
|
||||
|
||||
# Filter out MP3 files if their FLAC counterpart exists
|
||||
filtered_files = [
|
||||
f for f in all_instrumental_files if f.endswith(".flac") or (f.endswith(".mp3") and f.rsplit(".", 1)[0] not in flac_files)
|
||||
]
|
||||
|
||||
self.logger.debug(f"Filtered instrumental files: {filtered_files}")
|
||||
|
||||
if not filtered_files:
|
||||
raise Exception(f"No instrumental audio files found containing {search_string}")
|
||||
|
||||
if len(filtered_files) == 1:
|
||||
return filtered_files[0]
|
||||
|
||||
# Sort the remaining instrumental options alphabetically
|
||||
filtered_files.sort(reverse=True)
|
||||
|
||||
self.logger.info(f"Found multiple files containing {search_string}:")
|
||||
for i, file in enumerate(filtered_files):
|
||||
self.logger.info(f" {i+1}: {file}")
|
||||
|
||||
print()
|
||||
response = input(f"Choose instrumental audio file to use as karaoke audio: [1]/{len(filtered_files)}: ").strip().lower()
|
||||
if response == "":
|
||||
response = "1"
|
||||
|
||||
try:
|
||||
response = int(response)
|
||||
except ValueError:
|
||||
raise Exception(f"Invalid response to instrumental audio file choice prompt: {response}")
|
||||
|
||||
if response < 1 or response > len(filtered_files):
|
||||
raise Exception(f"Invalid response to instrumental audio file choice prompt: {response}")
|
||||
|
||||
return filtered_files[response - 1]
|
||||
|
||||
def get_names_from_withvocals(self, with_vocals_file):
|
||||
self.logger.info(f"Getting artist and title from {with_vocals_file}")
|
||||
|
||||
base_name = with_vocals_file.replace(self.suffixes["with_vocals_mov"], "").replace(self.suffixes["with_vocals_mp4"], "")
|
||||
artist, title = base_name.split(" - ", 1)
|
||||
return base_name, artist, title
|
||||
|
||||
def execute_command(self, command, description):
|
||||
self.logger.info(description)
|
||||
if self.dry_run:
|
||||
self.logger.info(f"DRY RUN: Would run command: {command}")
|
||||
else:
|
||||
self.logger.info(f"Running command: {command}")
|
||||
os.system(command)
|
||||
|
||||
def remux_and_encode_output_video_files(self, with_vocals_file, input_files, output_files):
|
||||
self.logger.info(f"Remuxing and encoding output video files...")
|
||||
|
||||
# Check if output files already exist, if so, ask user to overwrite or skip
|
||||
if os.path.isfile(output_files["karaoke_mov"]) and os.path.isfile(output_files["final_karaoke_mp4"]):
|
||||
if not self.prompt_user_bool(
|
||||
f"Found existing Final Karaoke output file: {output_files['final_karaoke_mp4']}. Overwrite (y) or skip (n)?",
|
||||
):
|
||||
self.logger.info(f"Skipping Karaoke MOV remux and Final MP4 render, existing files will be used.")
|
||||
return
|
||||
|
||||
# Remux the synced video with the instrumental audio to produce an instrumental karaoke MOV file
|
||||
remux_ffmpeg_command = f'{self.ffmpeg_base_command} -an -i "{with_vocals_file}" -vn -i "{input_files["instrumental_audio"]}" -c:v copy -c:a aac "{output_files["karaoke_mov"]}"'
|
||||
self.execute_command(remux_ffmpeg_command, "Remuxing video with instrumental audio")
|
||||
|
||||
# Convert the with vocals video to MP4 if it isn't already
|
||||
if not with_vocals_file.endswith(".mp4"):
|
||||
with_vocals_mp4_command = (
|
||||
f'{self.ffmpeg_base_command} -i "{with_vocals_file}" -c:v libx264 -c:a aac "{output_files["with_vocals_mp4"]}"'
|
||||
)
|
||||
self.execute_command(with_vocals_mp4_command, "Converting with vocals video to MP4")
|
||||
|
||||
# Delete the with vocals mov after successfully converting it to mp4
|
||||
if not self.dry_run and os.path.isfile(with_vocals_file):
|
||||
self.logger.info(f"Deleting with vocals MOV file: {with_vocals_file}")
|
||||
os.remove(with_vocals_file)
|
||||
|
||||
# Quote file paths to handle special characters
|
||||
title_mov_file = shlex.quote(os.path.abspath(input_files["title_mov"]))
|
||||
karaoke_mov_file = shlex.quote(os.path.abspath(output_files["karaoke_mov"]))
|
||||
output_final_mp4_file = shlex.quote(output_files["final_karaoke_mp4"])
|
||||
|
||||
env_mov_input = ""
|
||||
ffmpeg_filter = '-filter_complex "[0:v:0][0:a:0][1:v:0][1:a:0]concat=n=2:v=1:a=1[outv][outa]"'
|
||||
|
||||
# Check if end_mov file exists and include it in the concat command
|
||||
if "end_mov" in input_files and os.path.isfile(input_files["end_mov"]):
|
||||
self.logger.info(f"Found end_mov file: {input_files['end_mov']}, including in final MP4")
|
||||
end_mov_file = shlex.quote(os.path.abspath(input_files["end_mov"]))
|
||||
env_mov_input = f"-i {end_mov_file}"
|
||||
ffmpeg_filter = '-filter_complex "[0:v:0][0:a:0][1:v:0][1:a:0][2:v:0][2:a:0]concat=n=3:v=1:a=1[outv][outa]"'
|
||||
|
||||
aac_codec = "libfdk_aac"
|
||||
|
||||
# Check if aac_at codec is available
|
||||
codec_check_command = f"{self.ffmpeg_base_command} -codecs"
|
||||
result = os.popen(codec_check_command).read()
|
||||
if "aac_at" in result:
|
||||
aac_codec = "aac_at"
|
||||
|
||||
join_ffmpeg_command = f'{self.ffmpeg_base_command} -i {title_mov_file} -i {karaoke_mov_file} {env_mov_input} {ffmpeg_filter} -map "[outv]" -map "[outa]" -c:v libx264 -c:a {aac_codec} -q:a 14 {output_final_mp4_file}'
|
||||
|
||||
self.logger.debug(f"Running command: {join_ffmpeg_command}")
|
||||
self.execute_command(join_ffmpeg_command, "Joining title and instrumental videos")
|
||||
|
||||
# Prompt user to check final MP4 file before proceeding
|
||||
self.prompt_user_confirmation_or_raise_exception(
|
||||
f"Final MP4 file created: {output_files['final_karaoke_mp4']}, please check it! Proceed?",
|
||||
"Refusing to proceed without user confirmation they're happy with the Final MP4.",
|
||||
allow_empty=True,
|
||||
)
|
||||
|
||||
def create_cdg_zip_file(self, input_files, output_files, artist, title):
|
||||
self.logger.info(f"Creating CDG and MP3 files, then zipping them...")
|
||||
|
||||
# Check if CDG file already exists, if so, ask user to overwrite or skip
|
||||
if os.path.isfile(output_files["final_karaoke_cdg_zip"]):
|
||||
if not self.prompt_user_bool(
|
||||
f"Found existing CDG ZIP file: {output_files['final_karaoke_cdg_zip']}. Overwrite (y) or skip (n)?",
|
||||
):
|
||||
self.logger.info(f"Skipping CDG ZIP file creation, existing file will be used.")
|
||||
return
|
||||
|
||||
# Generate CDG and MP3 files
|
||||
if self.dry_run:
|
||||
self.logger.info(f"DRY RUN: Would generate CDG and MP3 files")
|
||||
else:
|
||||
self.logger.info(f"Generating CDG and MP3 files")
|
||||
|
||||
generate_cdg(input_files["karaoke_lrc"], input_files["instrumental_audio"], title, artist)
|
||||
|
||||
# Look for the generated ZIP file
|
||||
expected_zip = f"{artist} - {title} (Karaoke).zip"
|
||||
|
||||
self.logger.info(f"Searching for CDG ZIP file. Expected: {expected_zip}")
|
||||
|
||||
if os.path.isfile(expected_zip):
|
||||
self.logger.info(f"Found expected CDG ZIP file: {expected_zip}")
|
||||
os.rename(expected_zip, output_files["final_karaoke_cdg_zip"])
|
||||
self.logger.info(f"Renamed CDG ZIP file from {expected_zip} to {output_files['final_karaoke_cdg_zip']}")
|
||||
|
||||
if not os.path.isfile(output_files["final_karaoke_cdg_zip"]):
|
||||
self.logger.error(f"Failed to find any CDG ZIP file. Listing directory contents:")
|
||||
for file in os.listdir():
|
||||
self.logger.error(f" - {file}")
|
||||
raise Exception(f"Failed to create CDG ZIP file: {output_files['final_karaoke_cdg_zip']}")
|
||||
|
||||
self.logger.info(f"CDG ZIP file created: {output_files['final_karaoke_cdg_zip']}")
|
||||
|
||||
# Extract the CDG ZIP file
|
||||
self.logger.info(f"Extracting CDG ZIP file: {output_files['final_karaoke_cdg_zip']}")
|
||||
with zipfile.ZipFile(output_files["final_karaoke_cdg_zip"], "r") as zip_ref:
|
||||
zip_ref.extractall()
|
||||
|
||||
if os.path.isfile(output_files["karaoke_mp3"]):
|
||||
self.logger.info(f"Found extracted MP3 file: {output_files['karaoke_mp3']}")
|
||||
else:
|
||||
self.logger.error("Failed to find extracted MP3 file")
|
||||
raise Exception("Failed to extract MP3 file from CDG ZIP")
|
||||
|
||||
def create_txt_zip_file(self, input_files, output_files):
|
||||
self.logger.info(f"Creating TXT ZIP file...")
|
||||
|
||||
# Check if TXT file already exists, if so, ask user to overwrite or skip
|
||||
if os.path.isfile(output_files["final_karaoke_txt_zip"]):
|
||||
if not self.prompt_user_bool(
|
||||
f"Found existing TXT ZIP file: {output_files['final_karaoke_txt_zip']}. Overwrite (y) or skip (n)?",
|
||||
):
|
||||
self.logger.info(f"Skipping TXT ZIP file creation, existing file will be used.")
|
||||
return
|
||||
|
||||
# Create the ZIP file containing the MP3 and TXT files
|
||||
if self.dry_run:
|
||||
self.logger.info(f"DRY RUN: Would create TXT ZIP file: {output_files['final_karaoke_txt_zip']}")
|
||||
else:
|
||||
self.logger.info(f"Running karaoke-converter to convert MidiCo LRC file {input_files['karaoke_lrc']} to TXT format")
|
||||
txt_converter = LyricsConverter(output_format="txt", filepath=input_files["karaoke_lrc"])
|
||||
converted_txt = txt_converter.convert_file()
|
||||
|
||||
with open(output_files["karaoke_txt"], "w") as txt_file:
|
||||
txt_file.write(converted_txt)
|
||||
self.logger.info(f"TXT file written: {output_files['karaoke_txt']}")
|
||||
|
||||
self.logger.info(f"Creating ZIP file containing {output_files['karaoke_mp3']} and {output_files['karaoke_txt']}")
|
||||
with zipfile.ZipFile(output_files["final_karaoke_txt_zip"], "w") as zipf:
|
||||
zipf.write(output_files["karaoke_mp3"], os.path.basename(output_files["karaoke_mp3"]))
|
||||
zipf.write(output_files["karaoke_txt"], os.path.basename(output_files["karaoke_txt"]))
|
||||
|
||||
if not os.path.isfile(output_files["final_karaoke_txt_zip"]):
|
||||
raise Exception(f"Failed to create TXT ZIP file: {output_files['final_karaoke_txt_zip']}")
|
||||
|
||||
self.logger.info(f"TXT ZIP file created: {output_files['final_karaoke_txt_zip']}")
|
||||
|
||||
def encode_720p_version(self, input_file, output_file):
|
||||
ffmpeg_command = (
|
||||
f'{self.ffmpeg_base_command} -i "{input_file}" '
|
||||
f'-c:v libx264 -vf "scale=1280:720" -b:v 200k -preset medium -tune animation '
|
||||
f'-c:a copy "{output_file}"'
|
||||
)
|
||||
|
||||
self.execute_command(ffmpeg_command, "Encoding 720p version of the final video")
|
||||
|
||||
def move_files_to_brand_code_folder(self, brand_code, artist, title, output_files):
|
||||
self.logger.info(f"Moving files to new brand-prefixed directory...")
|
||||
|
||||
self.new_brand_code_dir = f"{brand_code} - {artist} - {title}"
|
||||
self.new_brand_code_dir_path = os.path.join(self.organised_dir, self.new_brand_code_dir)
|
||||
|
||||
self.prompt_user_confirmation_or_raise_exception(
|
||||
f"Move files to new brand-prefixed directory {self.new_brand_code_dir_path} and delete current dir?",
|
||||
"Refusing to move files without user confirmation of move.",
|
||||
allow_empty=True,
|
||||
)
|
||||
|
||||
orig_dir = os.getcwd()
|
||||
os.chdir(os.path.dirname(orig_dir))
|
||||
self.logger.info(f"Changed dir to parent directory: {os.getcwd()}")
|
||||
|
||||
if self.dry_run:
|
||||
self.logger.info(f"DRY RUN: Would move original directory {orig_dir} to: {self.new_brand_code_dir_path}")
|
||||
else:
|
||||
os.rename(orig_dir, self.new_brand_code_dir_path)
|
||||
|
||||
def copy_final_files_to_public_share_dirs(self, brand_code, base_name, output_files):
|
||||
self.logger.info(f"Copying final MP4, 720p MP4, and ZIP to public share directory...")
|
||||
|
||||
# Validate public_share_dir is a valid folder with MP4, MP4-720p, and CDG subdirectories
|
||||
if not os.path.isdir(self.public_share_dir):
|
||||
raise Exception(f"Public share directory does not exist: {self.public_share_dir}")
|
||||
|
||||
if not os.path.isdir(os.path.join(self.public_share_dir, "MP4")):
|
||||
raise Exception(f"Public share directory does not contain MP4 subdirectory: {self.public_share_dir}")
|
||||
|
||||
if not os.path.isdir(os.path.join(self.public_share_dir, "MP4-720p")):
|
||||
raise Exception(f"Public share directory does not contain MP4-720p subdirectory: {self.public_share_dir}")
|
||||
|
||||
if not os.path.isdir(os.path.join(self.public_share_dir, "CDG")):
|
||||
raise Exception(f"Public share directory does not contain CDG subdirectory: {self.public_share_dir}")
|
||||
|
||||
if brand_code is None:
|
||||
raise Exception(f"New track prefix was not set, refusing to copy to public share directory")
|
||||
|
||||
dest_mp4_dir = os.path.join(self.public_share_dir, "MP4")
|
||||
dest_720p_dir = os.path.join(self.public_share_dir, "MP4-720p")
|
||||
dest_cdg_dir = os.path.join(self.public_share_dir, "CDG")
|
||||
os.makedirs(dest_mp4_dir, exist_ok=True)
|
||||
os.makedirs(dest_720p_dir, exist_ok=True)
|
||||
os.makedirs(dest_cdg_dir, exist_ok=True)
|
||||
|
||||
dest_mp4_file = os.path.join(dest_mp4_dir, f"{brand_code} - {base_name}.mp4")
|
||||
dest_720p_mp4_file = os.path.join(dest_720p_dir, f"{brand_code} - {base_name}.mp4")
|
||||
dest_zip_file = os.path.join(dest_cdg_dir, f"{brand_code} - {base_name}.zip")
|
||||
|
||||
if self.dry_run:
|
||||
self.logger.info(
|
||||
f"DRY RUN: Would copy final MP4, 720p MP4, and ZIP to {dest_mp4_file}, {dest_720p_mp4_file}, and {dest_zip_file}"
|
||||
)
|
||||
else:
|
||||
shutil.copy2(output_files["final_karaoke_mp4"], dest_mp4_file)
|
||||
shutil.copy2(output_files["final_karaoke_720p_mp4"], dest_720p_mp4_file)
|
||||
shutil.copy2(output_files["final_karaoke_cdg_zip"], dest_zip_file)
|
||||
self.logger.info(f"Copied final files to public share directory")
|
||||
|
||||
def sync_public_share_dir_to_rclone_destination(self):
|
||||
self.logger.info(f"Syncing public share directory to rclone destination...")
|
||||
|
||||
# Delete .DS_Store files recursively before syncing
|
||||
for root, dirs, files in os.walk(self.public_share_dir):
|
||||
for file in files:
|
||||
if file == ".DS_Store":
|
||||
file_path = os.path.join(root, file)
|
||||
os.remove(file_path)
|
||||
self.logger.info(f"Deleted .DS_Store file: {file_path}")
|
||||
|
||||
rclone_cmd = f"rclone sync -v '{self.public_share_dir}' '{self.rclone_destination}'"
|
||||
self.execute_command(rclone_cmd, "Syncing with cloud destination")
|
||||
|
||||
def post_discord_notification(self):
|
||||
self.logger.info(f"Posting Discord notification...")
|
||||
|
||||
if self.skip_notifications:
|
||||
self.logger.info(f"Skipping Discord notification as video was previously uploaded to YouTube")
|
||||
return
|
||||
|
||||
if self.dry_run:
|
||||
self.logger.info(
|
||||
f"DRY RUN: Would post Discord notification for youtube URL {self.youtube_url} using webhook URL: {self.discord_webhook_url}"
|
||||
)
|
||||
else:
|
||||
discord_message = f"New upload: {self.youtube_url}"
|
||||
self.post_discord_message(discord_message, self.discord_webhook_url)
|
||||
|
||||
def generate_organised_folder_sharing_link(self):
|
||||
self.logger.info(f"Getting Organised Folder sharing link for new brand code directory...")
|
||||
|
||||
rclone_dest = f"{self.organised_dir_rclone_root}/{self.new_brand_code_dir}"
|
||||
rclone_link_cmd = f"rclone link {shlex.quote(rclone_dest)}"
|
||||
|
||||
if self.dry_run:
|
||||
self.logger.info(f"DRY RUN: Would get sharing link with: {rclone_link_cmd}")
|
||||
return "https://file-sharing-service.com/example"
|
||||
|
||||
# Add a 5-second delay to allow dropbox to index the folder before generating a link
|
||||
self.logger.info("Waiting 5 seconds before generating link...")
|
||||
time.sleep(5)
|
||||
|
||||
try:
|
||||
self.logger.info(f"Running command: {rclone_link_cmd}")
|
||||
result = subprocess.run(rclone_link_cmd, shell=True, check=True, capture_output=True, text=True)
|
||||
self.brand_code_dir_sharing_link = result.stdout.strip()
|
||||
self.logger.info(f"Got organised folder sharing link: {self.brand_code_dir_sharing_link}")
|
||||
except subprocess.CalledProcessError as e:
|
||||
self.logger.error(f"Failed to get organised folder sharing link. Exit code: {e.returncode}")
|
||||
self.logger.error(f"Command output (stdout): {e.stdout}")
|
||||
self.logger.error(f"Command output (stderr): {e.stderr}")
|
||||
self.logger.error(f"Full exception: {e}")
|
||||
|
||||
def execute_optional_features(self, artist, title, base_name, input_files, output_files):
|
||||
self.logger.info(f"Executing optional features...")
|
||||
|
||||
if self.youtube_upload_enabled:
|
||||
try:
|
||||
self.upload_final_mp4_to_youtube_with_title_thumbnail(artist, title, input_files, output_files)
|
||||
except Exception as e:
|
||||
self.logger.error(f"Failed to upload video to YouTube: {e}")
|
||||
print("Please manually upload the video to YouTube.")
|
||||
print()
|
||||
self.youtube_video_id = input("Enter the manually uploaded YouTube video ID: ").strip()
|
||||
self.youtube_url = f"{self.youtube_url_prefix}{self.youtube_video_id}"
|
||||
self.logger.info(f"Using manually provided YouTube video ID: {self.youtube_video_id}")
|
||||
|
||||
if self.discord_notication_enabled:
|
||||
self.post_discord_notification()
|
||||
|
||||
if self.folder_organisation_enabled:
|
||||
self.brand_code = self.get_next_brand_code()
|
||||
|
||||
if self.public_share_copy_enabled:
|
||||
self.copy_final_files_to_public_share_dirs(self.brand_code, base_name, output_files)
|
||||
|
||||
if self.public_share_rclone_enabled:
|
||||
self.sync_public_share_dir_to_rclone_destination()
|
||||
|
||||
self.move_files_to_brand_code_folder(self.brand_code, artist, title, output_files)
|
||||
|
||||
self.generate_organised_folder_sharing_link()
|
||||
|
||||
def authenticate_gmail(self):
|
||||
"""Authenticate and return a Gmail service object."""
|
||||
creds = None
|
||||
gmail_token_file = "/tmp/karaoke-finalise-gmail-token.pickle"
|
||||
|
||||
if os.path.exists(gmail_token_file):
|
||||
with open(gmail_token_file, "rb") as token:
|
||||
creds = pickle.load(token)
|
||||
|
||||
if not creds or not creds.valid:
|
||||
if creds and creds.expired and creds.refresh_token:
|
||||
creds.refresh(Request())
|
||||
else:
|
||||
flow = InstalledAppFlow.from_client_secrets_file(
|
||||
self.youtube_client_secrets_file, ["https://www.googleapis.com/auth/gmail.compose"]
|
||||
)
|
||||
creds = flow.run_local_server(port=0)
|
||||
with open(gmail_token_file, "wb") as token:
|
||||
pickle.dump(creds, token)
|
||||
|
||||
return build("gmail", "v1", credentials=creds)
|
||||
|
||||
def draft_completion_email(self, artist, title, youtube_url, dropbox_url):
|
||||
if not self.email_template_file:
|
||||
self.logger.info("Email template file not provided, skipping email draft creation.")
|
||||
return
|
||||
|
||||
with open(self.email_template_file, "r") as f:
|
||||
template = f.read()
|
||||
|
||||
email_body = template.format(youtube_url=youtube_url, dropbox_url=dropbox_url)
|
||||
|
||||
subject = f"{self.brand_code}: {artist} - {title}"
|
||||
|
||||
if self.dry_run:
|
||||
self.logger.info(f"DRY RUN: Would create email draft with subject: {subject}")
|
||||
self.logger.info(f"DRY RUN: Email body:\n{email_body}")
|
||||
else:
|
||||
if not self.gmail_service:
|
||||
self.gmail_service = self.authenticate_gmail()
|
||||
|
||||
message = MIMEText(email_body)
|
||||
message["subject"] = subject
|
||||
raw_message = base64.urlsafe_b64encode(message.as_bytes()).decode("utf-8")
|
||||
draft = self.gmail_service.users().drafts().create(userId="me", body={"message": {"raw": raw_message}}).execute()
|
||||
self.logger.info(f"Email draft created with ID: {draft['id']}")
|
||||
|
||||
def test_email_template(self):
|
||||
if not self.email_template_file:
|
||||
self.logger.error("Email template file not provided. Use --email_template_file to specify the file path.")
|
||||
return
|
||||
|
||||
fake_artist = "Test Artist"
|
||||
fake_title = "Test Song"
|
||||
fake_youtube_url = "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
|
||||
fake_dropbox_url = "https://www.dropbox.com/sh/fake/folder/link"
|
||||
fake_brand_code = "TEST-0001"
|
||||
|
||||
self.brand_code = fake_brand_code
|
||||
self.draft_completion_email(fake_artist, fake_title, fake_youtube_url, fake_dropbox_url)
|
||||
|
||||
self.logger.info("Email template test complete. Check your Gmail drafts for the test email.")
|
||||
|
||||
def process(self):
|
||||
if self.dry_run:
|
||||
self.logger.warning("Dry run enabled. No actions will be performed.")
|
||||
|
||||
# Check required input files and parameters exist, get user to confirm features before proceeding
|
||||
self.validate_input_parameters_for_features()
|
||||
|
||||
with_vocals_file = self.find_with_vocals_file()
|
||||
base_name, artist, title = self.get_names_from_withvocals(with_vocals_file)
|
||||
|
||||
instrumental_audio_file = self.choose_instrumental_audio_file(base_name)
|
||||
|
||||
input_files = self.check_input_files_exist(base_name, with_vocals_file, instrumental_audio_file)
|
||||
output_files = self.prepare_output_filenames(base_name)
|
||||
|
||||
if self.enable_cdg:
|
||||
self.create_cdg_zip_file(input_files, output_files, artist, title)
|
||||
|
||||
if self.enable_txt:
|
||||
self.create_txt_zip_file(input_files, output_files)
|
||||
|
||||
self.remux_and_encode_output_video_files(with_vocals_file, input_files, output_files)
|
||||
self.encode_720p_version(output_files["final_karaoke_mp4"], output_files["final_karaoke_720p_mp4"])
|
||||
|
||||
self.execute_optional_features(artist, title, base_name, input_files, output_files)
|
||||
|
||||
result = {
|
||||
"artist": artist,
|
||||
"title": title,
|
||||
"video_with_vocals": output_files["with_vocals_mp4"],
|
||||
"video_with_instrumental": output_files["karaoke_mov"],
|
||||
"final_video": output_files["final_karaoke_mp4"],
|
||||
"final_video_720p": output_files["final_karaoke_720p_mp4"],
|
||||
"youtube_url": self.youtube_url,
|
||||
"brand_code": self.brand_code,
|
||||
"new_brand_code_dir_path": self.new_brand_code_dir_path,
|
||||
"brand_code_dir_sharing_link": self.brand_code_dir_sharing_link,
|
||||
}
|
||||
|
||||
if self.enable_cdg:
|
||||
result["final_karaoke_cdg_zip"] = output_files["final_karaoke_cdg_zip"]
|
||||
|
||||
if self.enable_txt:
|
||||
result["final_karaoke_txt_zip"] = output_files["final_karaoke_txt_zip"]
|
||||
|
||||
if self.email_template_file:
|
||||
self.draft_completion_email(artist, title, result["youtube_url"], result["brand_code_dir_sharing_link"])
|
||||
|
||||
return result
|
||||
@@ -1,241 +0,0 @@
|
||||
import requests
|
||||
import os
|
||||
import re
|
||||
import glob
|
||||
from bs4 import BeautifulSoup
|
||||
import yt_dlp
|
||||
import logging
|
||||
import lyricsgenius
|
||||
from slugify import slugify
|
||||
from audio_separator import Separator
|
||||
|
||||
|
||||
class KaraokePrep:
|
||||
def __init__(
|
||||
self,
|
||||
url=None,
|
||||
artist=None,
|
||||
title=None,
|
||||
log_level=logging.DEBUG,
|
||||
log_formatter=None,
|
||||
model_name="UVR_MDXNET_KARA_2",
|
||||
model_name_2="UVR-MDX-NET-Inst_HQ_3",
|
||||
model_file_dir="/tmp/audio-separator-models/",
|
||||
output_dir="karaoke",
|
||||
use_cuda=False,
|
||||
use_coreml=False,
|
||||
normalization_enabled=True,
|
||||
denoise_enabled=True,
|
||||
create_track_subfolders=False,
|
||||
):
|
||||
self.logger = logging.getLogger(__name__)
|
||||
self.logger.setLevel(log_level)
|
||||
self.log_level = log_level
|
||||
self.log_formatter = log_formatter
|
||||
|
||||
self.log_handler = logging.StreamHandler()
|
||||
|
||||
if self.log_formatter is None:
|
||||
self.log_formatter = logging.Formatter("%(asctime)s - %(levelname)s - %(module)s - %(message)s")
|
||||
|
||||
self.log_handler.setFormatter(self.log_formatter)
|
||||
self.logger.addHandler(self.log_handler)
|
||||
|
||||
self.logger.debug(f"KaraokePrep instantiating with url: {url} artist: {artist} title: {title}")
|
||||
|
||||
self.url = url
|
||||
self.artist = artist
|
||||
self.title = title
|
||||
self.model_name = model_name
|
||||
self.model_name_2 = model_name_2
|
||||
self.model_file_dir = model_file_dir
|
||||
self.output_dir = output_dir
|
||||
self.use_cuda = use_cuda
|
||||
self.use_coreml = use_coreml
|
||||
self.normalization_enabled = normalization_enabled
|
||||
self.denoise_enabled = denoise_enabled
|
||||
self.create_track_subfolders = create_track_subfolders
|
||||
|
||||
if not os.path.exists(self.output_dir):
|
||||
self.logger.debug(f"Overall output dir {self.output_dir} did not exist, creating")
|
||||
os.makedirs(self.output_dir)
|
||||
else:
|
||||
self.logger.debug(f"Overall output dir {self.output_dir} already exists")
|
||||
|
||||
if artist is None or title is None:
|
||||
raise Exception("Error: You must provide an artist and title.")
|
||||
|
||||
def get_youtube_id_for_top_search_result(self, query):
|
||||
ydl_opts = {"quiet": "True", "format": "bestaudio", "noplaylist": "True", "extract_flat": True}
|
||||
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
|
||||
video = ydl.extract_info(f"ytsearch1:{query}", download=False)["entries"][0]
|
||||
|
||||
if video:
|
||||
youtube_id = video.get("id")
|
||||
return youtube_id
|
||||
else:
|
||||
self.logger.warning(f"No YouTube results found for query: {query}")
|
||||
return None
|
||||
|
||||
def download_audio(self, youtube_id, filename):
|
||||
ydl_opts = {
|
||||
"format": "ba",
|
||||
"postprocessors": [
|
||||
{
|
||||
"key": "FFmpegExtractAudio",
|
||||
"preferredcodec": "wav",
|
||||
"preferredquality": "192",
|
||||
}
|
||||
],
|
||||
"outtmpl": f"{filename}",
|
||||
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36",
|
||||
}
|
||||
|
||||
with yt_dlp.YoutubeDL(ydl_opts) as youtube_dl_instance:
|
||||
youtube_dl_instance.download([f"https://www.youtube.com/watch?v={youtube_id}"])
|
||||
|
||||
def write_lyrics_from_genius(self, artist, title, filename):
|
||||
genius = lyricsgenius.Genius(os.environ["GENIUS_API_TOKEN"])
|
||||
song = genius.search_song(title, artist)
|
||||
if song:
|
||||
lyrics = self.clean_genius_lyrics(song.lyrics)
|
||||
|
||||
with open(filename, "w") as f:
|
||||
f.write(lyrics)
|
||||
|
||||
self.logger.info("Lyrics for %s by %s fetched successfully", title, artist)
|
||||
else:
|
||||
self.logger.warning("Could not find lyrics for %s by %s", title, artist)
|
||||
|
||||
def clean_genius_lyrics(self, lyrics):
|
||||
lyrics = lyrics.replace("\\n", "\n")
|
||||
lyrics = re.sub(r"You might also like", "", lyrics)
|
||||
lyrics = re.sub(
|
||||
r".*?Lyrics([A-Z])", r"\1", lyrics
|
||||
) # Remove the song name and word "Lyrics" if this has a non-newline char at the start
|
||||
lyrics = re.sub(r"[0-9]+Embed$", "", lyrics) # Remove the word "Embed" at end of line with preceding numbers if found
|
||||
lyrics = re.sub(r"(\S)Embed$", r"\1", lyrics) # Remove the word "Embed" if it has been tacked onto a word at the end of a line
|
||||
lyrics = re.sub(r"^Embed$", r"", lyrics) # Remove the word "Embed" if it has been tacked onto a word at the end of a line
|
||||
lyrics = re.sub(r".*?\[.*?\].*?", "", lyrics) # Remove lines containing square brackets
|
||||
# add any additional cleaning rules here
|
||||
return lyrics
|
||||
|
||||
def sanitize_filename(self, filename):
|
||||
"""Replace or remove characters that are unsafe for filenames."""
|
||||
# Replace problematic characters with underscores
|
||||
for char in ["\\", "/", ":", "*", "?", '"', "<", ">", "|"]:
|
||||
filename = filename.replace(char, "_")
|
||||
# Remove any trailing periods or spaces
|
||||
filename = filename.rstrip(". ")
|
||||
return filename
|
||||
|
||||
def separate_audio(self, audio_file, model_name, instrumental_path, vocals_path):
|
||||
if audio_file is None or not os.path.isfile(audio_file):
|
||||
raise Exception("Error: Invalid audio source provided.")
|
||||
|
||||
self.logger.debug(f"audio_file is valid file: {audio_file}")
|
||||
|
||||
self.logger.debug(f"instantiating Separator with model_name: {model_name} and instrumental_path: {instrumental_path}")
|
||||
separator = Separator(
|
||||
audio_file,
|
||||
log_level=self.log_level,
|
||||
log_formatter=self.log_formatter,
|
||||
model_name=model_name,
|
||||
model_file_dir=self.model_file_dir,
|
||||
output_format="FLAC",
|
||||
primary_stem_path=instrumental_path,
|
||||
secondary_stem_path=vocals_path,
|
||||
)
|
||||
_, _ = separator.separate()
|
||||
self.logger.debug(f"Separation complete!")
|
||||
|
||||
def setup_output_paths(self, artist, title):
|
||||
sanitized_artist = self.sanitize_filename(artist)
|
||||
sanitized_title = self.sanitize_filename(title)
|
||||
artist_title = f"{sanitized_artist} - {sanitized_title}"
|
||||
|
||||
track_output_dir = self.output_dir
|
||||
if self.create_track_subfolders:
|
||||
track_output_dir = os.path.join(self.output_dir, f"{artist_title}")
|
||||
|
||||
if not os.path.exists(track_output_dir):
|
||||
self.logger.debug(f"Output dir {track_output_dir} did not exist, creating")
|
||||
os.makedirs(track_output_dir)
|
||||
|
||||
return track_output_dir, artist_title
|
||||
|
||||
def prep(self):
|
||||
artist = self.artist
|
||||
title = self.title
|
||||
|
||||
self.logger.info(f"Downloading inputs for track: {title} by {artist}")
|
||||
track_output_dir, artist_title = self.setup_output_paths(artist, title)
|
||||
processed_track = {
|
||||
"track_output_dir": track_output_dir,
|
||||
"artist": artist,
|
||||
"title": title,
|
||||
}
|
||||
|
||||
yt_filename_pattern = os.path.join(track_output_dir, f"{artist_title} (YouTube *.wav")
|
||||
youtube_audio_files = glob.glob(yt_filename_pattern)
|
||||
youtube_audio_file = None
|
||||
|
||||
if youtube_audio_files:
|
||||
youtube_audio_file = youtube_audio_files[0]
|
||||
self.logger.debug(f"Youtube audio already exists, skipping download: {youtube_audio_file}")
|
||||
else:
|
||||
if self.url is None:
|
||||
self.logger.warn(f"No URL specified - the top result from YouTube will be used.")
|
||||
self.logger.info("Searching YouTube for video ID...")
|
||||
query = f"{artist} {title}"
|
||||
youtube_id = self.get_youtube_id_for_top_search_result(query)
|
||||
else:
|
||||
self.logger.info("Parsing YouTube video ID from URL...")
|
||||
youtube_id = self.url.split("watch?v=")[1]
|
||||
if youtube_id:
|
||||
youtube_audio_file = os.path.join(track_output_dir, f"{artist_title} (YouTube {youtube_id})")
|
||||
|
||||
self.logger.info("Downloading original audio from YouTube to filename {original_audio_filename}")
|
||||
self.download_audio(youtube_id, youtube_audio_file)
|
||||
youtube_audio_file = youtube_audio_file + ".wav"
|
||||
else:
|
||||
self.logger.warning(f"Skipping {title} by {artist} due to missing YouTube ID.")
|
||||
|
||||
processed_track["youtube_audio"] = youtube_audio_file
|
||||
|
||||
lyrics_file = os.path.join(track_output_dir, f"{artist_title} (Lyrics).txt")
|
||||
if os.path.exists(lyrics_file):
|
||||
self.logger.debug(f"Lyrics file already exists, skipping fetch: {lyrics_file}")
|
||||
else:
|
||||
self.logger.info("Fetching lyrics from Genius...")
|
||||
self.write_lyrics_from_genius(artist, title, lyrics_file)
|
||||
|
||||
processed_track["lyrics"] = lyrics_file
|
||||
|
||||
self.logger.info(f"Separating audio twice for track: {title} by {artist}")
|
||||
|
||||
instrumental_path = os.path.join(track_output_dir, f"{artist_title} (Instrumental {self.model_name}).flac")
|
||||
vocals_path = os.path.join(track_output_dir, f"{artist_title} (Vocals {self.model_name}).flac")
|
||||
|
||||
if os.path.isfile(instrumental_path) and os.path.isfile(vocals_path):
|
||||
self.logger.debug(f"Separated audio files already exist in output paths, skipping separation: {instrumental_path}")
|
||||
else:
|
||||
self.separate_audio(processed_track["youtube_audio"], self.model_name, instrumental_path, vocals_path)
|
||||
|
||||
processed_track["instrumental_audio"] = instrumental_path
|
||||
processed_track["vocals_audio"] = vocals_path
|
||||
|
||||
instrumental_path_2 = os.path.join(track_output_dir, f"{artist_title} (Instrumental {self.model_name_2}).flac")
|
||||
vocals_path_2 = os.path.join(track_output_dir, f"{artist_title} (Vocals {self.model_name_2}).flac")
|
||||
|
||||
if os.path.isfile(instrumental_path_2) and os.path.isfile(vocals_path_2):
|
||||
self.logger.debug(f"Separated audio files already exist in output paths, skipping separation: {instrumental_path_2}")
|
||||
else:
|
||||
self.separate_audio(processed_track["youtube_audio"], self.model_name_2, instrumental_path_2, vocals_path_2)
|
||||
|
||||
processed_track["instrumental_audio_2"] = instrumental_path_2
|
||||
processed_track["vocals_audio_2"] = vocals_path_2
|
||||
|
||||
self.logger.info("Script finished, audio downloaded, lyrics fetched and audio separated!")
|
||||
|
||||
return processed_track
|
||||
@@ -1,123 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
import argparse
|
||||
import logging
|
||||
import pkg_resources
|
||||
from karaoke_prep import KaraokePrep
|
||||
|
||||
|
||||
def main():
|
||||
logger = logging.getLogger(__name__)
|
||||
log_handler = logging.StreamHandler()
|
||||
log_formatter = logging.Formatter(fmt="%(asctime)s.%(msecs)03d - %(levelname)s - %(module)s - %(message)s", datefmt="%Y-%m-%d %H:%M:%S")
|
||||
log_handler.setFormatter(log_formatter)
|
||||
logger.addHandler(log_handler)
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Fetch audio and lyrics for a specified song, to prepare karaoke video creation.",
|
||||
formatter_class=lambda prog: argparse.RawTextHelpFormatter(prog, max_help_position=50),
|
||||
)
|
||||
|
||||
parser.add_argument("artist", nargs="?", help="Artist name for the song to prep.", default=argparse.SUPPRESS)
|
||||
parser.add_argument("title", nargs="?", help="Title of the song to prep.", default=argparse.SUPPRESS)
|
||||
parser.add_argument("url", nargs="?", help="YouTube URL of the song to prep.", default=None)
|
||||
|
||||
package_version = pkg_resources.get_distribution("karaoke-prep").version
|
||||
parser.add_argument("-v", "--version", action="version", version=f"%(prog)s {package_version}")
|
||||
|
||||
parser.add_argument(
|
||||
"--log_level",
|
||||
default="info",
|
||||
help="Optional: logging level, e.g. info, debug, warning (default: %(default)s). Example: --log_level=debug",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--model_name",
|
||||
default="UVR_MDXNET_KARA_2",
|
||||
help="Optional: model name to be used for separation (default: %(default)s). Example: --model_name=UVR-MDX-NET-Inst_HQ_3",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--model_file_dir",
|
||||
default="/tmp/audio-separator-models/",
|
||||
help="Optional: model files directory (default: %(default)s). Example: --model_file_dir=/app/models",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--output_dir",
|
||||
default="karaoke",
|
||||
help="Optional: directory to write output files (default: <current dir>/karaoke). Example: --output_dir=/app/karaoke",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--use_cuda",
|
||||
action="store_true",
|
||||
help="Optional: use Nvidia GPU with CUDA for separation (default: %(default)s). Example: --use_cuda=true",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--use_coreml",
|
||||
action="store_true",
|
||||
help="Optional: use Apple Silicon GPU with CoreML for separation (default: %(default)s). Example: --use_coreml=true",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--denoise",
|
||||
type=lambda x: (str(x).lower() == "true"),
|
||||
default=True,
|
||||
help="Optional: enable or disable denoising during separation (default: %(default)s). Example: --denoise=False",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--normalize",
|
||||
type=lambda x: (str(x).lower() == "true"),
|
||||
default=True,
|
||||
help="Optional: enable or disable normalization during separation (default: %(default)s). Example: --normalize=False",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--create_track_subfolders",
|
||||
action="store_true",
|
||||
help="Optional: create subfolders in the output folder for each track (default: %(default)s). Example: --create_track_subfolders=true",
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
log_level = getattr(logging, args.log_level.upper())
|
||||
logger.setLevel(log_level)
|
||||
|
||||
if not hasattr(args, "artist") or not hasattr(args, "title"):
|
||||
parser.print_help()
|
||||
exit(1)
|
||||
|
||||
logger.info(f"KaraokePrep beginning with artist: {args.artist} and title: {args.title} and url: {args.url}")
|
||||
|
||||
kprep = KaraokePrep(
|
||||
artist=args.artist,
|
||||
title=args.title,
|
||||
url=args.url,
|
||||
log_formatter=log_formatter,
|
||||
log_level=log_level,
|
||||
model_name=args.model_name,
|
||||
model_file_dir=args.model_file_dir,
|
||||
output_dir=args.output_dir,
|
||||
use_cuda=args.use_cuda,
|
||||
use_coreml=args.use_coreml,
|
||||
normalization_enabled=args.normalize,
|
||||
denoise_enabled=args.denoise,
|
||||
create_track_subfolders=args.create_track_subfolders,
|
||||
)
|
||||
|
||||
track = kprep.prep()
|
||||
|
||||
logger.info(f"Karaoke Prep complete! Output files:")
|
||||
|
||||
logger.info(f"")
|
||||
logger.info(f"Track: {track['artist']} - {track['title']}")
|
||||
logger.info(f" YouTube Audio: {track['youtube_audio']}")
|
||||
logger.info(f" Lyrics: {track['lyrics']}")
|
||||
logger.info(f" Instrumental: {track['instrumental_audio']}")
|
||||
logger.info(f" Vocals: {track['vocals_audio']}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,181 @@
|
||||
#!/usr/bin/env python
|
||||
import argparse
|
||||
import logging
|
||||
import pkg_resources
|
||||
import os
|
||||
import sys
|
||||
from karaoke_prep.karaoke_finalise import KaraokeFinalise
|
||||
|
||||
|
||||
def main():
|
||||
logger = logging.getLogger(__name__)
|
||||
log_handler = logging.StreamHandler()
|
||||
log_formatter = logging.Formatter(fmt="%(asctime)s.%(msecs)03d - %(levelname)s - %(module)s - %(message)s", datefmt="%Y-%m-%d %H:%M:%S")
|
||||
log_handler.setFormatter(log_formatter)
|
||||
logger.addHandler(log_handler)
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Render, remux and join intermediate files to create final karaoke video, as the third stage after using karaoke-prep. Processes all (Karaoke).mov files in current directory.",
|
||||
formatter_class=lambda prog: argparse.RawTextHelpFormatter(prog, max_help_position=54),
|
||||
)
|
||||
|
||||
package_version = pkg_resources.get_distribution("karaoke-prep").version
|
||||
parser.add_argument("-v", "--version", action="version", version=f"%(prog)s {package_version}")
|
||||
|
||||
parser.add_argument(
|
||||
"--log_level",
|
||||
default="info",
|
||||
help="Optional: logging level, e.g. info, debug, warning (default: %(default)s). Example: --log_level=debug",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--dry_run",
|
||||
"-n",
|
||||
action="store_true",
|
||||
help="Optional: Enable dry run mode to print actions without executing them (default: disabled). Example: -n or --dry_run",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--model_name",
|
||||
default=None,
|
||||
help="Optional: specific model name to be used for separation (default: interactive prompt). Example: --model_name=UVR-MDX-NET-Inst_HQ_3",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--instrumental_format",
|
||||
default="flac",
|
||||
help="Optional: format / file extension for instrumental track to use for remux (default: %(default)s). Example: --instrumental_format=mp3",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--enable_cdg",
|
||||
action="store_true",
|
||||
help="Optional: Enable CDG ZIP generation during finalisation (default: disabled). Example: --enable_cdg",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--enable_txt",
|
||||
action="store_true",
|
||||
help="Optional: Enable TXT ZIP generation during finalisation (default: disabled). Example: --enable_txt",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--brand_prefix",
|
||||
default=None,
|
||||
help="Optional: Your brand prefix to calculate the next sequential number and move the resulting folder. Example: --brand_prefix=BRAND",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--organised_dir",
|
||||
default=None,
|
||||
help="Optional: Target directory where the processed folder will be moved after finalisation. Example: --organised_dir='/path/to/Tracks-Organized'",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--organised_dir_rclone_root",
|
||||
default=None,
|
||||
help="Optional: Rclone path which maps to your organised_dir, to generate a sharing link after adding files to it. Example: --organised_dir_rclone_root='andrewdropbox:Media/Karaoke/Tracks-Organized'",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--public_share_dir",
|
||||
default=None,
|
||||
help="Optional: Public share directory where final MP4 and ZIP files will be copied. Example: --public_share_dir='/path/to/Tracks-PublicShare'",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--youtube_client_secrets_file",
|
||||
default=None,
|
||||
help="Optional: File path to youtube client secrets file. Example: --youtube_client_secrets_file='/path/to/client_secret_1234567890_apps.googleusercontent.com.json'",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--youtube_description_file",
|
||||
default=None,
|
||||
help="Optional: File path to youtube video description text for uploaded videos. Example: --youtube_description_file='/path/to/youtube_description.txt'",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--rclone_destination",
|
||||
default=None,
|
||||
help="Optional: Rclone destination to sync your public_share_dir to after adding files to it. Example: --rclone_destination='googledrive:YourBrandNameFolder'",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--discord_webhook_url",
|
||||
default=None,
|
||||
help="Optional: Discord webhook URL to send notifications to. Example: --discord_webhook_url='https://discord.com/api/webhooks/1234567890/TOKEN/messages",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--email_template_file",
|
||||
default=None,
|
||||
help="Optional: File path to email template for drafting completion email. Example: --email_template_file='/path/to/email_template.txt'",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--test_email_template",
|
||||
action="store_true",
|
||||
help="Optional: Test the email template functionality with fake data. Example: --test_email_template",
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
log_level = getattr(logging, args.log_level.upper())
|
||||
logger.setLevel(log_level)
|
||||
|
||||
logger.info(f"KaraokeFinalise CLI beginning initialisation...")
|
||||
|
||||
kfinalise = KaraokeFinalise(
|
||||
log_formatter=log_formatter,
|
||||
log_level=log_level,
|
||||
dry_run=args.dry_run,
|
||||
model_name=args.model_name,
|
||||
instrumental_format=args.instrumental_format,
|
||||
enable_cdg=args.enable_cdg,
|
||||
enable_txt=args.enable_txt,
|
||||
brand_prefix=args.brand_prefix,
|
||||
organised_dir=args.organised_dir,
|
||||
organised_dir_rclone_root=args.organised_dir_rclone_root,
|
||||
public_share_dir=args.public_share_dir,
|
||||
youtube_client_secrets_file=args.youtube_client_secrets_file,
|
||||
youtube_description_file=args.youtube_description_file,
|
||||
rclone_destination=args.rclone_destination,
|
||||
discord_webhook_url=args.discord_webhook_url,
|
||||
email_template_file=args.email_template_file,
|
||||
)
|
||||
|
||||
if args.test_email_template:
|
||||
logger.info("Testing email template functionality...")
|
||||
kfinalise.test_email_template()
|
||||
else:
|
||||
try:
|
||||
track = kfinalise.process()
|
||||
except Exception as e:
|
||||
logger.error(f"An error occurred during finalisation, see stack trace below: {str(e)}")
|
||||
raise e
|
||||
|
||||
logger.info(f"Karaoke finalisation processing complete! Output files:")
|
||||
logger.info(f"")
|
||||
logger.info(f"Track: {track['artist']} - {track['title']}")
|
||||
logger.info(f" Video With Vocals: {track['video_with_vocals']}")
|
||||
logger.info(f" Video With Instrumental: {track['video_with_instrumental']}")
|
||||
|
||||
if "final_karaoke_cdg_zip" in track:
|
||||
logger.info(f" Final CDG+MP3 ZIP: {track['final_karaoke_cdg_zip']}")
|
||||
|
||||
if "final_karaoke_txt_zip" in track:
|
||||
logger.info(f" Final TXT+MP3 ZIP: {track['final_karaoke_txt_zip']}")
|
||||
|
||||
logger.info(f" Final Video with Title: {track['final_video']}")
|
||||
logger.info(f" Final Video 720p: {track['final_video_720p']}")
|
||||
|
||||
logger.info(f" Brand Code: {track['brand_code']}")
|
||||
logger.info(f" New Brand Code Directory: {track['new_brand_code_dir_path']}")
|
||||
|
||||
logger.info(f" YouTube URL: {track['youtube_url']}")
|
||||
logger.info(f" Folder Sharing Link: {track['brand_code_dir_sharing_link']}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,464 @@
|
||||
#!/usr/bin/env python
|
||||
import argparse
|
||||
import logging
|
||||
import pkg_resources
|
||||
import tempfile
|
||||
import os
|
||||
from karaoke_prep import KaraokePrep
|
||||
|
||||
|
||||
def is_url(string):
|
||||
"""Simple check to determine if a string is a URL."""
|
||||
return string.startswith("http://") or string.startswith("https://")
|
||||
|
||||
|
||||
def is_file(string):
|
||||
"""Check if a string is a valid file."""
|
||||
return os.path.isfile(string)
|
||||
|
||||
|
||||
def main():
|
||||
logger = logging.getLogger(__name__)
|
||||
log_handler = logging.StreamHandler()
|
||||
log_formatter = logging.Formatter(fmt="%(asctime)s.%(msecs)03d - %(levelname)s - %(module)s - %(message)s", datefmt="%Y-%m-%d %H:%M:%S")
|
||||
log_handler.setFormatter(log_formatter)
|
||||
logger.addHandler(log_handler)
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Fetch audio and lyrics for a specified song, to prepare karaoke video creation.",
|
||||
formatter_class=lambda prog: argparse.RawTextHelpFormatter(prog, max_help_position=54),
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"args",
|
||||
nargs="*",
|
||||
help="[Media or playlist URL] [Artist] [Title] of song to prep. If URL is provided, Artist and Title are optional but increase chance of fetching the correct lyrics. If Artist and Title are provided with no URL, the top YouTube search result will be fetched.",
|
||||
)
|
||||
|
||||
package_version = pkg_resources.get_distribution("karaoke-prep").version
|
||||
parser.add_argument("-v", "--version", action="version", version=f"%(prog)s {package_version}")
|
||||
|
||||
parser.add_argument(
|
||||
"--log_level",
|
||||
default="info",
|
||||
help="Optional: logging level, e.g. info, debug, warning (default: %(default)s). Example: --log_level=debug",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--filename_pattern",
|
||||
help="Required if processing a folder: Python regex pattern to extract track names from filenames. Must contain a named group 'title'. Example: --filename_pattern='(?P<index>\\d+) - (?P<title>.+).mp3'",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--dry_run",
|
||||
action="store_true",
|
||||
help="Optional: perform a dry run without making any changes (default: %(default)s). Example: --dry_run=true",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--clean_instrumental_model",
|
||||
default="model_bs_roformer_ep_317_sdr_12.9755.ckpt",
|
||||
help="Optional: Model for clean instrumental separation (default: %(default)s).",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--backing_vocals_models",
|
||||
nargs="+",
|
||||
default=["mel_band_roformer_karaoke_aufr33_viperx_sdr_10.1956.ckpt", "UVR-BVE-4B_SN-44100-1.pth"],
|
||||
help="Optional: List of models for backing vocals separation (default: %(default)s).",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--other_stems_models",
|
||||
nargs="+",
|
||||
default=["htdemucs_6s.yaml"],
|
||||
help="Optional: List of models for other stems separation (default: %(default)s).",
|
||||
)
|
||||
|
||||
default_model_dir_unix = "/tmp/audio-separator-models/"
|
||||
if os.name == "posix" and os.path.exists(default_model_dir_unix):
|
||||
default_model_dir = default_model_dir_unix
|
||||
else:
|
||||
# Use tempfile to get the platform-independent temp directory
|
||||
default_model_dir = os.path.join(tempfile.gettempdir(), "audio-separator-models")
|
||||
|
||||
parser.add_argument(
|
||||
"--model_file_dir",
|
||||
default=default_model_dir,
|
||||
help="Optional: model files directory (default: %(default)s). Example: --model_file_dir=/app/models",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--output_dir",
|
||||
default=".",
|
||||
help="Optional: directory to write output files (default: <current dir>). Example: --output_dir=/app/karaoke",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--lossless_output_format",
|
||||
default="FLAC",
|
||||
help="Optional: lossless output format for separated audio (default: FLAC). Example: --lossless_output_format=WAV",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--use_cuda",
|
||||
action="store_true",
|
||||
help="Optional: use Nvidia GPU with CUDA for separation (default: %(default)s). Example: --use_cuda=true",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--use_coreml",
|
||||
action="store_true",
|
||||
help="Optional: use Apple Silicon GPU with CoreML for separation (default: %(default)s). Example: --use_coreml=true",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--denoise",
|
||||
type=lambda x: (str(x).lower() == "true"),
|
||||
default=True,
|
||||
help="Optional: enable or disable denoising during separation (default: %(default)s). Example: --denoise=False",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--normalize",
|
||||
type=lambda x: (str(x).lower() == "true"),
|
||||
default=True,
|
||||
help="Optional: enable or disable normalization during separation (default: %(default)s). Example: --normalize=False",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--no_track_subfolders",
|
||||
action="store_false",
|
||||
help="Optional: do NOT create a named subfolder for each track. Example: --no_track_subfolders",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--intro_background_color",
|
||||
default="#000000",
|
||||
help="Optional: Background color for intro video (default: black). Example: --intro_background_color=#123456",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--intro_background_image",
|
||||
help="Optional: Path to background image for intro video. Overrides background color if provided. Example: --intro_background_image=path/to/image.jpg",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--intro_font",
|
||||
default="Montserrat-Bold.ttf",
|
||||
help="Optional: Font file for intro video (default: Montserrat-Bold.ttf). Example: --intro_font=AvenirNext-Bold.ttf",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--intro_artist_color",
|
||||
default="#ffdf6b",
|
||||
help="Optional: Font color for intro video artist text (default: #ffdf6b). Example: --intro_artist_color=#123456",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--intro_title_color",
|
||||
default="#ffffff",
|
||||
help="Optional: Font color for intro video title text (default: #ffffff). Example: --intro_title_color=#123456",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--existing_instrumental",
|
||||
help="Optional: Path to an existing instrumental audio file. If provided, audio separation will be skipped.",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--existing_title_image",
|
||||
help="Optional: Path to an existing title image file. If provided, title image generation will be skipped.",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--end_background_color",
|
||||
default="#000000",
|
||||
help="Optional: Background color for end screen video (default: black). Example: --end_background_color=#123456",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--end_background_image",
|
||||
help="Optional: Path to background image for end screen video. Overrides background color if provided. Example: --end_background_image=path/to/image.jpg",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--end_extra_text",
|
||||
default="THANK YOU FOR SINGING!",
|
||||
help="Optional: Extra text to display on the end screen video. Example: --end_extra_text='THANK YOU FOR WATCHING!'",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--end_font",
|
||||
default="Montserrat-Bold.ttf",
|
||||
help="Optional: Font file for end screen video (default: Montserrat-Bold.ttf). Example: --end_font=AvenirNext-Bold.ttf",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--end_extra_text_color",
|
||||
default="#ff7acc",
|
||||
help="Optional: Font color for end screen video text (default: #ffffff). Example: --end_extra_text_color=#123456",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--end_artist_color",
|
||||
default="#ffdf6b",
|
||||
help="Optional: Font color for end screen video artist text (default: #ffdf6b). Example: --end_artist_color=#123456",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--end_title_color",
|
||||
default="#ffffff",
|
||||
help="Optional: Font color for end screen video title text (default: #ffffff). Example: --end_title_color=#123456",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--existing_end_image",
|
||||
help="Optional: Path to an existing end screen image file. If provided, end screen image generation will be skipped.",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--title_video_duration",
|
||||
type=int,
|
||||
default=5,
|
||||
help="Optional: duration of the title video in seconds (default: 5). Example: --title_video_duration=10",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--end_video_duration",
|
||||
type=int,
|
||||
default=5,
|
||||
help="Optional: duration of the end video in seconds (default: 5). Example: --end_video_duration=10",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--title_initial_font_size",
|
||||
type=int,
|
||||
default=500,
|
||||
help="Optional: Initial font size for title video (default: 500). Example: --title_initial_font_size=600",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--title_top_padding",
|
||||
type=int,
|
||||
default=950,
|
||||
help="Optional: Top padding for title video (default: 950). Example: --title_top_padding=1000",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--title_title_padding",
|
||||
type=int,
|
||||
default=400,
|
||||
help="Optional: Title padding for title video (default: 400). Example: --title_title_padding=450",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--title_artist_padding",
|
||||
type=int,
|
||||
default=700,
|
||||
help="Optional: Artist padding for title video (default: 700). Example: --title_artist_padding=750",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--title_fixed_gap",
|
||||
type=int,
|
||||
default=150,
|
||||
help="Optional: Fixed gap for title video (default: 150). Example: --title_fixed_gap=200",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--end_initial_font_size",
|
||||
type=int,
|
||||
default=500,
|
||||
help="Optional: Initial font size for end video (default: 500). Example: --end_initial_font_size=600",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--end_top_padding",
|
||||
type=int,
|
||||
default=950,
|
||||
help="Optional: Top padding for end video (default: 950). Example: --end_top_padding=1000",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--end_title_padding",
|
||||
type=int,
|
||||
default=400,
|
||||
help="Optional: Title padding for end video (default: 400). Example: --end_title_padding=450",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--end_artist_padding",
|
||||
type=int,
|
||||
default=700,
|
||||
help="Optional: Artist padding for end video (default: 700). Example: --end_artist_padding=750",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--end_extra_text_padding",
|
||||
type=int,
|
||||
default=300,
|
||||
help="Optional: Extra text padding for end video (default: 600). Example: --end_extra_text_padding=650",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--end_fixed_gap",
|
||||
type=int,
|
||||
default=150,
|
||||
help="Optional: Fixed gap for end video (default: 150). Example: --end_fixed_gap=200",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--lyrics_artist",
|
||||
help="Optional: Override the artist name used for lyrics search. Example: --lyrics_artist='The Beatles'",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--lyrics_title",
|
||||
help="Optional: Override the song title used for lyrics search. Example: --lyrics_title='Hey Jude'",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--skip_lyrics",
|
||||
action="store_true",
|
||||
help="Optional: Skip fetching and processing lyrics. Example: --skip_lyrics",
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
input_media, artist, title, filename_pattern = None, None, None, None
|
||||
|
||||
if not args.args:
|
||||
parser.print_help()
|
||||
exit(1)
|
||||
|
||||
# Allow 3 forms of positional arguments:
|
||||
# 1. URL or Media File only (may be single track URL, playlist URL, or local file)
|
||||
# 2. Artist and Title only
|
||||
# 3. URL, Artist, and Title
|
||||
if args.args and (is_url(args.args[0]) or is_file(args.args[0])):
|
||||
input_media = args.args[0]
|
||||
if len(args.args) > 2:
|
||||
artist = args.args[1]
|
||||
title = args.args[2]
|
||||
elif len(args.args) > 1:
|
||||
artist = args.args[1]
|
||||
else:
|
||||
logger.warn("Input media provided without Artist and Title, both will be guessed from title")
|
||||
|
||||
elif os.path.isdir(args.args[0]):
|
||||
if not args.filename_pattern:
|
||||
logger.error("Filename pattern is required when processing a folder.")
|
||||
exit(1)
|
||||
if len(args.args) <= 1:
|
||||
logger.error("Second parameter provided must be Artist name; Artist is required when processing a folder.")
|
||||
exit(1)
|
||||
|
||||
input_media = args.args[0]
|
||||
artist = args.args[1]
|
||||
filename_pattern = args.filename_pattern
|
||||
|
||||
elif len(args.args) > 1:
|
||||
artist = args.args[0]
|
||||
title = args.args[1]
|
||||
logger.warn(f"No input media provided, the top YouTube search result for {artist} - {title} will be used.")
|
||||
|
||||
else:
|
||||
parser.print_help()
|
||||
exit(1)
|
||||
|
||||
log_level = getattr(logging, args.log_level.upper())
|
||||
logger.setLevel(log_level)
|
||||
|
||||
if args.existing_instrumental:
|
||||
args.clean_instrumental_model = None
|
||||
args.backing_vocals_models = []
|
||||
args.other_stems_models = []
|
||||
|
||||
logger.info(f"KaraokePrep beginning with input_media: {input_media} artist: {artist} and title: {title}")
|
||||
|
||||
kprep = KaraokePrep(
|
||||
artist=artist,
|
||||
title=title,
|
||||
input_media=input_media,
|
||||
filename_pattern=filename_pattern,
|
||||
dry_run=args.dry_run,
|
||||
log_formatter=log_formatter,
|
||||
log_level=log_level,
|
||||
clean_instrumental_model=args.clean_instrumental_model,
|
||||
backing_vocals_models=args.backing_vocals_models,
|
||||
other_stems_models=args.other_stems_models,
|
||||
model_file_dir=args.model_file_dir,
|
||||
output_dir=args.output_dir,
|
||||
lossless_output_format=args.lossless_output_format,
|
||||
use_cuda=args.use_cuda,
|
||||
use_coreml=args.use_coreml,
|
||||
normalization_enabled=args.normalize,
|
||||
denoise_enabled=args.denoise,
|
||||
create_track_subfolders=args.no_track_subfolders,
|
||||
existing_instrumental=args.existing_instrumental,
|
||||
existing_title_image=args.existing_title_image,
|
||||
existing_end_image=args.existing_end_image,
|
||||
title_video_duration=args.title_video_duration,
|
||||
intro_background_color=args.intro_background_color,
|
||||
intro_background_image=args.intro_background_image,
|
||||
intro_font=args.intro_font,
|
||||
intro_artist_color=args.intro_artist_color,
|
||||
intro_title_color=args.intro_title_color,
|
||||
title_initial_font_size=args.title_initial_font_size,
|
||||
title_top_padding=args.title_top_padding,
|
||||
title_title_padding=args.title_title_padding,
|
||||
title_artist_padding=args.title_artist_padding,
|
||||
title_fixed_gap=args.title_fixed_gap,
|
||||
end_video_duration=args.end_video_duration,
|
||||
end_extra_text=args.end_extra_text,
|
||||
end_background_color=args.end_background_color,
|
||||
end_background_image=args.end_background_image,
|
||||
end_font=args.end_font,
|
||||
end_extra_text_color=args.end_extra_text_color,
|
||||
end_artist_color=args.end_artist_color,
|
||||
end_title_color=args.end_title_color,
|
||||
end_initial_font_size=args.end_initial_font_size,
|
||||
end_top_padding=args.end_top_padding,
|
||||
end_title_padding=args.end_title_padding,
|
||||
end_artist_padding=args.end_artist_padding,
|
||||
end_extra_text_padding=args.end_extra_text_padding,
|
||||
end_fixed_gap=args.end_fixed_gap,
|
||||
lyrics_artist=args.lyrics_artist,
|
||||
lyrics_title=args.lyrics_title,
|
||||
skip_lyrics=args.skip_lyrics,
|
||||
)
|
||||
|
||||
tracks = kprep.process()
|
||||
|
||||
logger.info(f"Karaoke Prep complete! Output files:")
|
||||
|
||||
for track in tracks:
|
||||
logger.info(f"")
|
||||
logger.info(f"Track: {track['artist']} - {track['title']}")
|
||||
logger.info(f" Input Media: {track['input_media']}")
|
||||
logger.info(f" Input WAV Audio: {track['input_audio_wav']}")
|
||||
logger.info(f" Input Still Image: {track['input_still_image']}")
|
||||
logger.info(f" Lyrics: {track['lyrics']}")
|
||||
logger.info(f" Processed Lyrics: {track['processed_lyrics']}")
|
||||
|
||||
logger.info(f" Separated Audio:")
|
||||
|
||||
# Clean Instrumental
|
||||
logger.info(f" Clean Instrumental Model:")
|
||||
for stem_type, file_path in track["separated_audio"]["clean_instrumental"].items():
|
||||
logger.info(f" {stem_type.capitalize()}: {file_path}")
|
||||
|
||||
# Other Stems
|
||||
logger.info(f" Other Stems Models:")
|
||||
for model, stems in track["separated_audio"]["other_stems"].items():
|
||||
logger.info(f" Model: {model}")
|
||||
for stem_type, file_path in stems.items():
|
||||
logger.info(f" {stem_type.capitalize()}: {file_path}")
|
||||
|
||||
# Backing Vocals
|
||||
logger.info(f" Backing Vocals Models:")
|
||||
for model, stems in track["separated_audio"]["backing_vocals"].items():
|
||||
logger.info(f" Model: {model}")
|
||||
for stem_type, file_path in stems.items():
|
||||
logger.info(f" {stem_type.capitalize()}: {file_path}")
|
||||
|
||||
# Combined Instrumentals
|
||||
logger.info(f" Combined Instrumentals:")
|
||||
for model, file_path in track["separated_audio"]["combined_instrumentals"].items():
|
||||
logger.info(f" Model: {model}")
|
||||
logger.info(f" Combined Instrumental: {file_path}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,26 @@
|
||||
import requests
|
||||
|
||||
|
||||
def download_file(url, filename):
|
||||
# Send a GET request to the URL
|
||||
response = requests.get(url, stream=True)
|
||||
|
||||
# Check if the request was successful
|
||||
if response.status_code == 200:
|
||||
# Open a file with the specified filename in binary write mode
|
||||
with open(filename, "wb") as file:
|
||||
# Write the content of the response to the file
|
||||
for chunk in response.iter_content(chunk_size=8192):
|
||||
file.write(chunk)
|
||||
print("Download completed.")
|
||||
else:
|
||||
print(f"Failed to download. Status code: {response.status_code}")
|
||||
|
||||
|
||||
# URL of the file to be downloaded
|
||||
url = "https://github.com/karaokenerds/karaoke-prep/releases/download/v0.8.3/ffmpeg.exe"
|
||||
# Filename to save the downloaded file
|
||||
filename = "platform/ffmpeg.exe"
|
||||
|
||||
# Call the function to download the file
|
||||
download_file(url, filename)
|
||||
@@ -1,29 +1,49 @@
|
||||
[tool.poetry]
|
||||
name = "karaoke-prep"
|
||||
version = "0.1.2"
|
||||
description = "Prepare for karaoke video creation, by downloading audio and lyrics for a specified song."
|
||||
version = "0.29.1"
|
||||
description = "Prepare for karaoke video creation, by downloading audio and lyrics for a specified song or playlist from youtube and separating audio stems. After syncing, finalise the video with a title screen!"
|
||||
authors = ["Andrew Beveridge <andrew@beveridge.uk>"]
|
||||
license = "MIT"
|
||||
readme = "README.md"
|
||||
packages = [{include = "karaoke_prep"}]
|
||||
packages = [{ include = "karaoke_prep" }]
|
||||
homepage = "https://github.com/karaokenerds/karaoke-prep"
|
||||
repository = "https://github.com/karaokenerds/karaoke-prep"
|
||||
documentation = "https://github.com/karaokenerds/karaoke-prep/blob/main/README.md"
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = ">=3.9,<3.11"
|
||||
requests = "^2"
|
||||
beautifulsoup4 = "^4"
|
||||
python = ">=3.10,<3.13"
|
||||
torch = ">=2.3,<2.5"
|
||||
requests = ">=2"
|
||||
beautifulsoup4 = ">=4"
|
||||
yt-dlp = "*"
|
||||
lyricsgenius = "^3"
|
||||
fetch-lyrics-from-genius = "^0.1"
|
||||
audio-separator = "^0.7"
|
||||
lyricsgenius = ">=3"
|
||||
fetch-lyrics-from-genius = ">=0.1"
|
||||
pillow = ">=10.1"
|
||||
pyinstaller = ">=6.3"
|
||||
google-api-python-client = "*"
|
||||
google-auth = "*"
|
||||
google-auth-oauthlib = "*"
|
||||
google-auth-httplib2 = "*"
|
||||
pyperclip = ">=1.8"
|
||||
thefuzz = ">=0.22"
|
||||
numpy = "^1"
|
||||
audio-separator = { version = ">=0.21.0", extras = ["cpu"] }
|
||||
lyrics-converter = ">=0.2.1"
|
||||
lyrics-transcriber = ">=0.18"
|
||||
kbputils = "^0.0.16"
|
||||
karaoke-lyrics-processor = ">=0.4.0"
|
||||
attrs = ">=24.2.0"
|
||||
cattrs = ">=24.1.2"
|
||||
toml = ">=0.10"
|
||||
argparse = ">=1.4.0"
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
black = "^23"
|
||||
black = ">=23"
|
||||
poetry = "*"
|
||||
|
||||
[tool.poetry.scripts]
|
||||
karaoke-prep = 'karaoke_prep.utils.cli:main'
|
||||
karaoke-prep = 'karaoke_prep.utils.prep_cli:main'
|
||||
karaoke-finalise = 'karaoke_prep.utils.finalise_cli:main'
|
||||
|
||||
[tool.black]
|
||||
line-length = 140
|
||||
|
||||