Skip to content

Commit

Permalink
Merge pull request #11 from kanjieater/respect
Browse files Browse the repository at this point in the history
Allow for matching transcript exactly
  • Loading branch information
kanjieater committed May 23, 2024
2 parents d31aa4e + 336db8d commit 0b9fc08
Show file tree
Hide file tree
Showing 14 changed files with 1,043 additions and 632 deletions.
8 changes: 5 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@
"module": "subplz",
"args": [
"sync",
"--audio ",
"'/mnt/v/test/single/1.mkv'",
"--audio",
"/mnt/v/test/single/1.mkv",
"--text",
"'/mnt/v/test/single/1.srt'",
"/mnt/v/test/single/1.srt",
"--output-format",
"vtt"
// "--audio",
// "/mnt/d/sync/変な家/変な家.m4b",
// "--text",
Expand Down
7 changes: 6 additions & 1 deletion anki_importer/anki-importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import multiprocessing
from tqdm import tqdm
from tqdm.contrib.concurrent import process_map
from utils import grab_files, get_mapping
from subplz.utils import grab_files


ANKI_CONNECT_URL = ""
Expand Down Expand Up @@ -101,6 +101,11 @@ def validate_args(args):
print("[E] --col is only supported with --no-anki-connect")
exit(1)

def get_mapping(mapping_path):
with open(mapping_path) as f:
mapping = json.load(f)
print(f"Reading mapping: {mapping}")
return mapping

def parse_ac_response(response):
if len(response) != 2:
Expand Down
Loading

0 comments on commit 0b9fc08

Please sign in to comment.