| 1 | package viewer |
| 2 | |
| 3 | func GetHelpText() (help string) { |
| 4 | help = ` |
| 5 | ##### Help: |
| 6 | -p / database path (absolute) |
| 7 | -d / specifies which database driver to use (sqlite/mysql) |
| 8 | -a / enable ascii mode |
| 9 | -h / prints this message |
| 10 | -t / starts app with specific theme (default, nord, solarized) |
| 11 | ##### Controls: |
| 12 | ###### MOUSE |
| 13 | Scroll up + down to navigate table/text |
| 14 | Move cursor to select cells for full screen viewing |
| 15 | ###### KEYBOARD |
| 16 | [WASD] to move around cells, and also move columns if close to edge |
| 17 | [ENTER] to select selected cell for full screen view |
| 18 | [UP/K and DOWN/J] to navigate schemas |
| 19 | [LEFT/H and RIGHT/L] to navigate columns if there are more than the screen allows. |
| 20 | Also to control the cursor of the text editor in edit mode |
| 21 | [BACKSPACE] to delete text before cursor in edit mode |
| 22 | [M(scroll up) and N(scroll down)] to scroll manually |
| 23 | [Q or CTRL+C] to quit program |
| 24 | [B] to toggle borders! |
| 25 | [C] to expand column |
| 26 | [T] to cycle through themes! |
| 27 | [P] in selection mode to write cell to file, or to print query results as CSV. |
| 28 | [R] to redo actions, if applicable |
| 29 | [U] to undo actions, if applicable |
| 30 | [ESC] to exit full screen view, or to enter edit mode |
| 31 | [PGDOWN] to scroll down one views worth of rows |
| 32 | [PGUP] to scroll up one views worth of rows |
| 33 | ###### EDIT MODE (for quick, single line changes and commands) |
| 34 | [ESC] to enter edit mode with no pre-loaded text input from selection |
| 35 | When a cell is selected, press [:] to enter edit mode with selection pre-loaded |
| 36 | The text field in the header will be populated with the selected cells text. Modifications can be made freely |
| 37 | [ESC] to clear text field in edit mode |
| 38 | [ENTER] to save text. Anything besides one of the reserved strings below will overwrite the current cell |
| 39 | [:q] to exit edit mode/ format mode/ SQL mode |
| 40 | [:s] to save database to a new file (SQLite only) |
| 41 | [:s!] to overwrite original database file (SQLite only). A confirmation dialog will be added soon |
| 42 | [:h] to display help text |
| 43 | [:new] opens current cell with a blank buffer |
| 44 | [:edit] opens current cell in format mode |
| 45 | [:sql] opens blank buffer for creating an SQL statement |
| 46 | [:clip] to open clipboard of SQL queries. [/] to filter, [ENTER] to select. |
| 47 | [HOME] to set cursor to end of the text |
| 48 | [END] to set cursor to the end of the text |
| 49 | ###### FORMAT MODE (for editing lines of text) |
| 50 | [ESC] to move between top control bar and format buffer |
| 51 | [HOME] to set cursor to end of the text |
| 52 | [END] to set cursor to the end of the text |
| 53 | [:wq] to save changes and quit to main table view |
| 54 | [:w] to save changes and remain in format view |
| 55 | [:s] to serialize changes, non-destructive (SQLite only) |
| 56 | [:s!] to serialize changes, overwriting original file (SQLite only) |
| 57 | ###### SQL MODE (for querying database) |
| 58 | [ESC] to move between top control bar and text buffer |
| 59 | [:q] to quit out of statement |
| 60 | [:exec] to execute statement. Errors will be displayed in full screen view. |