fix: fix typo and sort order of options

This commit is contained in:
Nathaniel Landau
2023-03-11 16:41:48 -05:00
parent 32a838c8e4
commit 34e7c07dd9
2 changed files with 9 additions and 7 deletions

View File

@@ -124,9 +124,9 @@ class Application:
alerts.usage("Delete either a key and all associated values, or a specific value.") alerts.usage("Delete either a key and all associated values, or a specific value.")
choices = [ choices = [
{"name": "Delete inline tag", "value": "delete_inline_tag"},
{"name": "Delete key", "value": "delete_key"}, {"name": "Delete key", "value": "delete_key"},
{"name": "Delete value", "value": "delete_value"}, {"name": "Delete value", "value": "delete_value"},
{"name": "Delete inline tag", "value": "delete_inline_tag"},
questionary.Separator(), questionary.Separator(),
{"name": "Back", "value": "back"}, {"name": "Back", "value": "back"},
] ]
@@ -147,9 +147,9 @@ class Application:
alerts.usage("Select the type of metadata to rename.") alerts.usage("Select the type of metadata to rename.")
choices = [ choices = [
{"name": "Rename inline tag", "value": "rename_inline_tag"},
{"name": "Rename key", "value": "rename_key"}, {"name": "Rename key", "value": "rename_key"},
{"name": "Rename value", "value": "rename_value"}, {"name": "Rename value", "value": "rename_value"},
{"name": "Rename inline tag", "value": "rename_inline_tag"},
questionary.Separator(), questionary.Separator(),
{"name": "Back", "value": "back"}, {"name": "Back", "value": "back"},
] ]
@@ -283,11 +283,11 @@ class Application:
) )
choices = [ choices = [
{"name": "View all metadata", "value": "all_metadata"},
{"name": "View all frontmatter", "value": "all_frontmatter"}, {"name": "View all frontmatter", "value": "all_frontmatter"},
{"name": "View all inline_metadata", "value": "all_inline"}, {"name": "View all inline metadata", "value": "all_inline"},
{"name": "View all keys", "value": "all_keys"},
{"name": "View all inline tags", "value": "all_tags"}, {"name": "View all inline tags", "value": "all_tags"},
{"name": "View all keys", "value": "all_keys"},
{"name": "View all metadata", "value": "all_metadata"},
questionary.Separator(), questionary.Separator(),
{"name": "Write all metadata to CSV", "value": "export_csv"}, {"name": "Write all metadata to CSV", "value": "export_csv"},
{"name": "Write all metadata to JSON file", "value": "export_json"}, {"name": "Write all metadata to JSON file", "value": "export_json"},
@@ -534,7 +534,7 @@ class Application:
return return
alerts.info(f"Found {len(changed_notes)} changed notes in the vault") alerts.info(f"Found {len(changed_notes)} changed notes in the vault")
choices: list[dict[str, Any] | questionary.Separator] = [questionary.Separator()] choices: list[dict[str, Any] | questionary.Separator] = []
for n, note in enumerate(changed_notes, start=1): for n, note in enumerate(changed_notes, start=1):
_selection = { _selection = {
"name": f"{n}: {note.note_path.relative_to(self.vault.vault_path)}", "name": f"{n}: {note.note_path.relative_to(self.vault.vault_path)}",

View File

@@ -274,12 +274,14 @@ class Questions:
return questionary.select( return questionary.select(
"What do you want to do?", "What do you want to do?",
choices=[ choices=[
questionary.Separator("-------------------------------"),
{"name": "Vault Actions", "value": "vault_actions"}, {"name": "Vault Actions", "value": "vault_actions"},
{"name": "Inspect Metadata", "value": "inspect_metadata"}, {"name": "Inspect Metadata", "value": "inspect_metadata"},
{"name": "Filter Notes in Scope", "value": "filter_notes"}, {"name": "Filter Notes in Scope", "value": "filter_notes"},
questionary.Separator("-------------------------------"),
{"name": "Add Metadata", "value": "add_metadata"}, {"name": "Add Metadata", "value": "add_metadata"},
{"name": "Rename Metadata", "value": "rename_metadata"},
{"name": "Delete Metadata", "value": "delete_metadata"}, {"name": "Delete Metadata", "value": "delete_metadata"},
{"name": "Rename Metadata", "value": "rename_metadata"},
{"name": "Transpose Metadata", "value": "transpose_metadata"}, {"name": "Transpose Metadata", "value": "transpose_metadata"},
questionary.Separator("-------------------------------"), questionary.Separator("-------------------------------"),
{"name": "Review Changes", "value": "review_changes"}, {"name": "Review Changes", "value": "review_changes"},