Module utils

Source

Functionsยง

confirm
Prompt the user for confirmation
detect_content_type
Detect content type from extension or content
edit_entry
Edit an existing entry
first_line
Extract the first line of a string
format_with_tag
Format content with tag
get_title_from_content
Get a title from content (first line or truncated content)
input
Prompt the user for input
open_editor
Open the system editor and return the content
open_editor_with_type
Open the system editor with syntax highlighting hints based on content type
read_file_content
Read content from a file
read_stdin_content
Read content from stdin
select
Prompt the user to select from a list of options
truncate_string
Truncate a string to a maximum length with ellipsis