diversify icon indicating copy to clipboard operation
diversify copied to clipboard

Add command line interface with click

Open edujtm opened this issue 7 years ago • 2 comments

This project doesn't have much functionality yet, but the little it has is spreaded into the interfacespfy.py, diversify.py, and genetic.py files in the if __name__ == "__main__": methods. Currently they are implemented using argparse, but the interface is quite rudimentary.

It would be good to implement a simple user interface that centralizes the three methods as cli commands like diversify download or diversify playlist playlist_name. To implement the interface, the click framework could be used.

The interface commands should be placed in the diversify.py files and it would be good to have a stub method with a cli.group() (just so that it looks better on the cli) like this:

    @click.group()
    def diversify():
        pass

    @diversify.command()
    def playlist():
        # generates playlist

I don't know exactly all the functionalities that would be available in the cli interface, so I'll try implement this myself. But if you have a good idea, be free to submit a PR. If it's good I'm going to merge it and work with your implementation.

edujtm avatar Oct 03 '19 16:10 edujtm

I would like to help out.

jtryan avatar Oct 04 '19 13:10 jtryan

@jtryan Sure, I'll add you as an assignee. Just submit the PR I'll review it. I don't have any tests, so I'm doing the reviews by hand basically. :sweat_smile:

edujtm avatar Oct 04 '19 21:10 edujtm