tymbalodeon / tsundeoku Goto Github PK
View Code? Open in Web Editor NEW積んでおく ("tsundeoku"), "to pile up for later": CLI for managing imports from a shared folder to a "beets" library
積んでおく ("tsundeoku"), "to pile up for later": CLI for managing imports from a shared folder to a "beets" library
Add tests for all config import options.
--reformat
and --as-is
update the correctly--ask-before-disc-update
and --auto-update-disc
update the correctly--ask-before-artist-update
and --auto-update-artist
update the correctly--allow-prompt
and --disallow-prompt
update the correctlyhttps://realpython.com/python-toml/#use-toml-as-a-configuration-format
Might help with the shared and ignored directories to have them as proper arrays.
--remove-bracket-years
/ --years-as-is
--remove-bracket-instruments
/ --instruments-as-is
--expand-abbreviations
/ --abbreviations-as-is
It should only reset once, not every run on Monday.
This seems to create a loop. Investigate and fix.
To schedule the command and have it copy files to an external drive, you need to give it permissions or it will throw an error. Can the appropriate settings be changed programmatically? If not, add instructions to README.
Some errors happened during automatic import, but there was no notification. Make sure errors are caught and the notification triggered if so.
Add rule for Recs -> Recordings (without the period)
Add rule to strip bracket years that include a range, e.g., [1945-1950] or [1945-50]
The error import count in the table title is wrong. Also, there should be a way to cancel importing anyway. Should there be a prompt for if you want to import any albums anyway?
Move away from using beets, starting by using mutagen directly, then eventually using my own database to record detailed information.
With the "--skip-albums-requiring-prompt" flag, the "import-new" command can be scheduled. Provide an option (at least on macOS) to manage scheduling the command via the CLI.
Add tests for all config file-system options.
--shared-directories
changes shared directories if good; error message if bad--pickle-file
changes pickle file; error message if bad--ignored-directories
changes ignored directories; error message if bad--music-player
changes music player; error message if bad--add
adds to list--remove
removes from listimport
uses default configimport
imports new albumsimport
imports skips already imported albums--reformat
calls reformat after importing, no matter what is set in config--as-is
does not reformat, no matter what is set in config--ask-before-disc-update
prompts before updating, no matter what is set in config--auto-update-disc
does not prompt, no matter what is set in config--ask-before-artist-update
prompts before updating, no matter what is set in config--auto-update-artist
does not prompt, no matter what is set in config--allow-prompt
prompts, no matter what is set in config--disallow-prompt
skips albums requiring prompt, no matter what is set in config--disallow-prompt
sends notification if set, does not send if not setIs it possible to install beets and a default config with the Makefile? In any case, instructions should be added to the README for setting up beets. Since the default config will likely fail, the CLI should allow for running the help commands without crashing, and display a warning that the config is not set up properly.
The code should be tested!
Use rich to make everything look nicer, especially the error albums display.
Sometimes an album comes in with a blank year tag, but a bracketed year in the album tag.
When stripping years, first check to see if the year tag is blank, and if so, copy the year into the year tag.
If the year tag is not blank, but contains a different year than the bracketed album, prompt the user for a decision to:
Many decisions cannot be made programmatically. (For example, if an album is missing track totals, the program can't decide if it's complete or if more tracks will be syncing in the shared folder--this can only be decided by manually inspecting each case.) Provide an option to skip all imports requiring a human decision and run only imports that can be handled automatically. This way, the script could be run and forgotten about, perhaps on a schedule, and can be run again with prompts when convenient.
When notifying by email, provide details about which albums could not be imported and what the error was.
If this is always going to be built on top of beets, should this be a plugin instead of a separate CLI?
Keeping it separate could mean swapping out beets for some other system, and possibly also using pyinstaller to bundle this for others to install? The query system in beets is nice, but the main purpose of this is to keep track of imports from a shared folder, so it would be easy to set up the pickle file system separately and import via the specified music player rather than through beets. This might make it easier to get going for people that just want to pull in new adds to their music player and who browse there.
If there are a bunch of albums requiring a user decision and some of them you know are good to go, but others you are unsure of, there should be an option to select a subset of the error albums to import and leave the rest alone. Perhaps a table display with indices that can be typed in to select which albums to import.
beets can't handle wav, but I still want to copy wavs to my library path automatically while importing and have it recognized by Swinsian.
Provide an option to copy wavs, perhaps with some config option to set if you want to copy through an app like Swinsian and which app, etc.
Subprocess is a lazy placeholder. Refactor to call beets functions directly instead!
reformat
uses default configreformat
uses custom configreformat --remove-bracket-years
when that isn't set in configreformat --years-as-is
when that isn't set in configreformat --remove-bracket-instruments
when that isn't set in configreformat --instruments-as-is
when that isn't set in configreformat --expand-abbreviations
when that isn't set in configreformat --abbreviations-as-is
when that isn't set in config--on
for daily and hourly--off
schedule
displays current scheduleschedule --logs
shows logsThese two config options are not tested. Add tests for them.
Find a name that doesn't include the word "bros" and replace all instances of "musicbros" in the codebase.
Self-explanatory
Often a bunch of albums will come in that are flagged as errors, either because no track total is provided or else the total tracks doesn't match the track total; but I'm sure everything is synced (we could be correcting metadata on just part of a record, for example).
Currently I can only import all of the error albums or none of them, which means that if I'm not sure they're all good to go, I have to wait on importing all of them. There should be an option to select the ones I know are complete and ignore the others until I have time to check them manually.
Perhaps numbers appearing next to the albums on screen, and selecting which numbers you want to import anyway?
albums often come in with disc numbers blank, but I prefer to see disc 1 of 1 instead of null. add an option to fill in blank disc numbers with disc 1 of 1 (more often than not this is accurate for blank disc numbers, but this can be made optional)
e.g., [2022 EP]. The year should be checked the same as other years and the brackets should be stripped.
Bracketed solo instrument indications should not appear in the artist field; only the artist name should appear there. But this is also useful information. When stripping this from artist fields, preserve it by adding it to the end of the comment and/or to the grouping field.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.