Here is a list of 100 command prompts for formatting output, categorized by their application.
1. General Text & String Formatting
Format the string to all uppercase.Format the string to all lowercase.Format the string to "Title Case" (capitalize the first letter of each word).Format the string to "Sentence case" (capitalize only the first letter of the string).Wrap the text to a maximum width of [80] characters.Strip all leading and trailing whitespace from the output.Remove all newline characters to collapse text into a single line.Replace all instances of [find_string] with [replace_string].Left-pad the string with [character] to a total length of [N].Right-pad the string with [character] to a total length of [N].Format the output using a template string (e.g., "User: {name}, ID: {id}").Remove all punctuation from the string.
2. Numerical Data Formatting
Format the number to [2] decimal places.Format the number as a currency (e.g., $1,234.56).Format the number as a percentage with [1] decimal place (e.g., 25.5%).Add thousand separators to the number (e.g., 1,000,000).Display the number in scientific notation (e.g., 1.23e+6).Pad the integer with leading zeros to a length of [N] (e.g., 007).Align all numbers in a column by the decimal point.Display large numbers using human-readable suffixes (e.g., 1.5M, 2.1K).Format the output to always show the sign (e.g., +1.5, -0.2).Convert the number to its ordinal form (e.g., 1st, 2nd, 3rd).
3. Date & Time Formatting
Format the date as ISO 8601 (YYYY-MM-DD).Format the date in a human-readable format (e.g., "November 11, 2025").Format the date as MM/DD/YYYY.Format the date as DD-MM-YYYY.Format the time in 24-hour format (HH:MM:SS).Format the time in 12-hour format with AM/PM.Display only the day of the week (e.g., "Tuesday").Display only the month name (e.g., "November").Display the output as a relative time (e.g., "2 hours ago").Convert the timestamp to the [UTC/Local] timezone before displaying.Include the UTC offset in the output (e.g., 2025-11-11T09:00:00-05:00).Format the output as a combined date-time string (e.g., "YYYY-MM-DD HH:MM").
4. Data Structure Formatting (Lists, Tables, etc.)
Format the list as a bulleted (unordered) list using [*] or [-].Format the list as a numbered (ordered) list.Format the list as a single comma-separated string.Format the list as a [pipe/semicolon] delimited string.Format the key-value pairs (dictionary) as a simple two-column list (e.g., "Key: Value").Format the nested data structure as an indented tree structure.Format the data as an ASCII table.Set the column widths of the table to [10, 20, 15].Left-align all text columns in the table.Right-align all numerical columns in the table.Center-align the headers of the table.Add a header row and row separators to the table.
5. File & Data Interchange Formats
Serialize the data structure to a JSON string.Format (pretty-print) the JSON output with [4]-space indentation.Minify the JSON output (remove all non-essential whitespace).Sort the keys of the JSON object alphabetically before output.Serialize the data structure to an XML string.Format (pretty-print) the XML output with indentation.Format the data as a CSV (Comma-Separated Values) file.Include the header row (column names) as the first line of the CSV output.Use a [tab/semicolon] as the delimiter for the CSV.Enclose all text fields in the CSV with double quotes.Serialize the data to a YAML string.Generate a properties file format (key=value).Base64 encode the binary data for text-based output.Format the output as a shell-safe string (escape special characters).
6. Command Line Interface (CLI) & Log Formatting
Add ANSI color to the output based on status (e.g., red for error, green for success).Format the [title/key] text as bold.Format the [help/note] text as italic or dimmed.Use a progress bar to show the status of a long-running task.Display a spinner or throbber for indeterminate waiting periods.Format the log message with a timestamp (e.g., [YYYY-MM-DD HH:MM:SS]).Format the log message with the [severity level] (e.g., INFO, WARN, ERROR).Prepend the [module/function name] to the log line.Format the log output as a single-line JSON object for structured logging.Align log messages into columns (e.g., timestamp, level, message) for readability.Indent child processes or sub-tasks in the log output.Paginate the output (e.g., pipe tolessormore).Truncate long strings in CLI table columns to [N] characters.Add an ellipsis (...) to truncated text.Format the output to begrep-able (e.g., consistent, simple lines).
7. Report & Document Formatting (PDF, MD, HTML)
Generate the output as a Markdown (.md) file.Format the data as a Markdown table.Format the [text] as a Markdown blockquote.Format the [code] as a Markdown fenced code block with syntax highlighting.Generate the output as an HTML file.Embed the data within an HTML<table>structure.Format the output into an HTML<ul>or<ol>list.Apply a CSS class to the [main/error] output element.Generate a print-friendly version of the output (e.g., using@media printCSS).Generate the output as a PDF document.Add a header and footer to each page of the PDF.Set the page orientation to [landscape/portrait].Add page numbers to the document output.Format text into [2] columns.Generate a Table of Contents for the document.
8. API, Error & Status Formatting
Wrap the API response in a consistent JSON envelope (e.g.,{"data": ..., "error": ...}).Set the correct HTTPContent-Typeheader (e.g.,application/json,text/plain).Format error responses using a standard (e.g., RFC 7807 problem details).Implement pagination fields in the API response (e.g.,count,next,previous).Format the error message to be user-friendly (avoid technical jargon).Include a unique error code (e.g.,E-1024) in the error output.Provide a verbose/debug version of the output when a [--verbose] flag is set.Format a "success" message with a summary of the action completed.
9. Data Visualization Formatting
Format the chart's Y-axis labels as [currency/percentage].Format the chart's tooltips to show [x-value], [y-value], and [series name].
No comments:
Post a Comment