cli.py
1 import pathlib 2 3 import click 4 5 from tabulator.notes import note_graph 6 from tabulator.tabulature import tab_graph, scoring 7 8 9 @click.command("tabulator") 10 @click.argument( 11 "input-file", 12 type=click.Path(file_okay=True, dir_okay=False, path_type=pathlib.Path), 13 ) 14 def main(input_file: pathlib.Path): 15 notes = note_graph.build_from_file(input_file) 16 tabs = tab_graph.build_from_notes(notes) 17 scores = scoring.ScoreTabDifficulty().visit(tabs) 18 tabber = tab_graph.TxtTab(scores=scores) 19 tab_graph.txt_tab_echo_all(tabs, tabber=tabber) 20 # click.echo(tab_graph.best_guess(tabs))