@@ -397,33 +397,6 @@ def list_cards(query: str, verbose: bool) -> None:
397397 a .list_cards (query , verbose )
398398
399399
400- @main .command ("list-notes" )
401- @click .argument ("query" , required = False , nargs = - 1 )
402- @click .option ("-c" , "--show-cards" , is_flag = True , help = "Print card specs" )
403- @click .option ("-r" , "--show-raw-fields" , is_flag = True , help = "Print raw field data" )
404- @click .option ("-v" , "--verbose" , is_flag = True , help = "Print note details" )
405- def list_notes (
406- query : str , show_cards : bool , show_raw_fields : bool , verbose : bool
407- ) -> None :
408- """List notes that match QUERY.
409-
410- The default QUERY is "tag:marked OR -flag:0". This default can be
411- customized in the config file `~/.config/apy/apy.json`, e.g. with
412-
413- \b
414- {
415- "query": "tag:marked OR tag:leech"
416- }
417- """
418- if query :
419- query = " " .join (query )
420- else :
421- query = cfg ["query" ]
422-
423- with Anki (** cfg ) as a :
424- a .list_notes (query , show_cards , show_raw_fields , verbose )
425-
426-
427400@main .command ("list-cards-table" )
428401@click .argument ("query" , required = False , nargs = - 1 )
429402@click .option ("-a" , "--show-answer" , is_flag = True , help = "Display answer" )
@@ -473,6 +446,40 @@ def list_cards_table(
473446 )
474447
475448
449+ @main .command ("list-models" )
450+ def list_models () -> None :
451+ """List available models."""
452+ with Anki (** cfg ) as a :
453+ a .list_models ()
454+
455+
456+ @main .command ("list-notes" )
457+ @click .argument ("query" , required = False , nargs = - 1 )
458+ @click .option ("-c" , "--show-cards" , is_flag = True , help = "Print card specs" )
459+ @click .option ("-r" , "--show-raw-fields" , is_flag = True , help = "Print raw field data" )
460+ @click .option ("-v" , "--verbose" , is_flag = True , help = "Print note details" )
461+ def list_notes (
462+ query : str , show_cards : bool , show_raw_fields : bool , verbose : bool
463+ ) -> None :
464+ """List notes that match QUERY.
465+
466+ The default QUERY is "tag:marked OR -flag:0". This default can be
467+ customized in the config file `~/.config/apy/apy.json`, e.g. with
468+
469+ \b
470+ {
471+ "query": "tag:marked OR tag:leech"
472+ }
473+ """
474+ if query :
475+ query = " " .join (query )
476+ else :
477+ query = cfg ["query" ]
478+
479+ with Anki (** cfg ) as a :
480+ a .list_notes (query , show_cards , show_raw_fields , verbose )
481+
482+
476483@main .command ()
477484@click .argument ("query" , required = False , nargs = - 1 )
478485@click .option (
0 commit comments