-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configurable #7
base: master
Are you sure you want to change the base?
Configurable #7
Conversation
- Added maximum number of songs key to settings-example.cfg - Added playlist ordering key to settings-example.cfg - Added helpful comments to settings-example.cfg - Rewrote createbillboardplaylist.py to read in settings - Did not implement those settings yet.
- Modified createbillboardplaylist.py to filter chart entries down to only include up to the maximum number of videos given in the config, and put them in either ascending or descending order
- Added Charts section and instructions for choosing charts in settings-example - Changed createbillboardplaylist to read in charts_to_create as list - Did not implement using this charts_to_create yet.
- Rewrote createbillboardplaylist to create only charts import from settings.cfg - Hardcoded (incomplete) dictionary object to handle playlist metadata
- Extended ChartData object to have name, url, num_songs_phrase attributes assigned when chart is downloaded - Modified some function declarations and calls to only depend on chart-id - Moved most ChartData logic into BillBoard Adapter Class
A few general notes:
Could you make a new commit that addresses those 3 things? |
I don't know how to run these tests locally.
I also don't like the hard-coded information. I was thinking of keeping the config file simple, with just list of chart-ids, and potentially putting the hardcoded data into a separate file -- like a csv file, that we could make for all possible charts. But that sounds like more work than its worth.
I also wondered about that. What might that look like in the config file? |
Good point. I've just pushed an update to the README with the command you need to run.
That would be easier, but it would make the playlist title pretty ugly. I'm working on a patch to billboard.py right now that will deliver the human-readable title for each playlist, so hopefully that will get merged and we can use that.
With the current config file parser, we might have to do something like this:
Then in the Alternatively, we could switch to the TOML library, which would allow us to do something like this:
|
It took a little while, but my patch got accepted and a new version of billboard.py was released. I've updated the Pipfile in the master branch, so if you merge it into your branch and do
These commands first pull down the newest version of the master branch, then bring in any new things in that branch into your feature branch. If you have uncommitted changes in your local working copy, you'll have to run Once you do this, you can call |
These updates allow the user to configure how the program works in settings.cfg:
These updates also include some reorganization of the ChartData logic so that everything depends on just the chart_id.