-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replace JS with Python to simplify install; cleanup everything
- Loading branch information
1 parent
480465a
commit ceda8f2
Showing
7 changed files
with
41 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
# node | ||
node_modules | ||
|
||
# idea | ||
.idea | ||
|
||
venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
pyyaml # build.py | ||
|
||
requests # fetchart, lyrics | ||
pylast # lastgenre | ||
discogs-client # discogs | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import yaml | ||
import re | ||
|
||
fConfigMaster = open("./config.yaml", "rt") | ||
fOut = open("../beetsdir/config.yaml", "wt", newline="") | ||
|
||
with open("../customconfig.yaml", "rt") as stream: | ||
dataConfigOwn = yaml.safe_load(stream) | ||
|
||
for line in fConfigMaster: | ||
prog = re.compile("@(.*)@") | ||
match = prog.search(line) | ||
sOut = line | ||
if match: | ||
data = dataConfigOwn.get(match.group(1)) | ||
if data: | ||
# TODO doesnt work if the # isnt the first char in the line, e.g. with indent, for example ` #google_API_key: @google_API_key@` | ||
sOut = line[1:].replace(match.group(), data) | ||
fOut.write(sOut) | ||
|
||
fConfigMaster.close() | ||
fOut.close() |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.