mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 00:52:16 -06:00
vscode: get no-dbg args from launch.json
This commit is contained in:
parent
c14b17bfaf
commit
a2657887cc
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
|
@ -14,6 +14,8 @@
|
||||||
"-emp",
|
"-emp",
|
||||||
"-e2dsa",
|
"-e2dsa",
|
||||||
"-e2ts",
|
"-e2ts",
|
||||||
|
"-mtp",
|
||||||
|
".bpm=f,bin/mtag/audio-bpm.py",
|
||||||
"-a",
|
"-a",
|
||||||
"ed:wark",
|
"ed:wark",
|
||||||
"-v",
|
"-v",
|
||||||
|
|
26
.vscode/launch.py
vendored
Normal file
26
.vscode/launch.py
vendored
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
# takes arguments from launch.json
|
||||||
|
# is used by no_dbg in tasks.json
|
||||||
|
# launches 10x faster than mspython debugpy
|
||||||
|
# and is stoppable with ^C
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
sys.path.insert(0, os.getcwd())
|
||||||
|
|
||||||
|
import jstyleson
|
||||||
|
from copyparty.__main__ import main as copyparty
|
||||||
|
|
||||||
|
with open(".vscode/launch.json", "r") as f:
|
||||||
|
tj = f.read()
|
||||||
|
|
||||||
|
oj = jstyleson.loads(tj)
|
||||||
|
argv = oj["configurations"][0]["args"]
|
||||||
|
try:
|
||||||
|
copyparty(argv)
|
||||||
|
except SystemExit as ex:
|
||||||
|
if ex.code:
|
||||||
|
raise
|
||||||
|
|
||||||
|
print("\n\033[32mokke\033[0m")
|
||||||
|
sys.exit(1)
|
4
.vscode/tasks.json
vendored
4
.vscode/tasks.json
vendored
|
@ -9,9 +9,7 @@
|
||||||
{
|
{
|
||||||
"label": "no_dbg",
|
"label": "no_dbg",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "${config:python.pythonPath} -m copyparty -ed -emp -e2dsa -e2ts -a ed:wark -v srv::r:aed:cnodupe -v dist:dist:r ;exit 1"
|
"command": "${config:python.pythonPath} .vscode/launch.py"
|
||||||
// -v ~/Music/mt:mt:r:cmtp=.bpm=~/dev/copyparty/bin/mtag/audio-bpm.py:cmtp=key=~/dev/copyparty/bin/mtag/audio-key.py:ce2tsr
|
|
||||||
// -v ~/Music/mt:mt:r:cmtp=.bpm=~/dev/copyparty/bin/mtag/audio-bpm.py:ce2tsr
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
Reference in a new issue