From c1a8534e483ea1304f2bbb38637898a96e4f042d Mon Sep 17 00:00:00 2001 From: obozdag Date: Sun, 9 Jun 2024 11:02:42 +0200 Subject: [PATCH 1/5] docs: Some typos in cli/cli_library.rst Some typos in cli/cli_library.rst --- user_guide_src/source/cli/cli_library.rst | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/user_guide_src/source/cli/cli_library.rst b/user_guide_src/source/cli/cli_library.rst index d53d9bcdd6cc..7fd570d7dbe0 100644 --- a/user_guide_src/source/cli/cli_library.rst +++ b/user_guide_src/source/cli/cli_library.rst @@ -5,10 +5,10 @@ CLI Library CodeIgniter's CLI library makes creating interactive command-line scripts simple, including: * Prompting the user for more information -* Writing multi-colored text the terminal +* Writing multi-colored text in the terminal * Beeping (be nice!) * Showing progress bars during long tasks -* Wrapping long text lines to fit the window. +* Wrapping long text lines to fit the window .. contents:: :local: @@ -79,7 +79,7 @@ promptByMultipleKeys() .. versionadded:: 4.3.0 -This method is the same as ``promptByKey()``, but it supports multiple value. +This method is the same as ``promptByKey()``, but it supports multiple values. .. literalinclude:: cli_library/023.php @@ -91,7 +91,7 @@ Providing Feedback write() ======= -Several methods are provided for you to provide feedback to your users. This can be as simple as a single status update +There are several methods for you to provide feedback to your users. This can be as simple as a single status update or a complex table of information that wraps to the user's terminal window. At the core of this is the ``write()`` method which takes the string to output as the first parameter: @@ -140,9 +140,9 @@ And a smaller number are available as background colors: print() ======= -Print functions identically to the ``write()`` method, except that it does not force a newline either before or after. -Instead it prints it to the screen wherever the cursor is currently. This allows you to print multiple items all on -the same line, from different calls. This is especially helpful when you want to show a status, do something, then +print() functions identically to the ``write()`` method, except that it does not force a newline either before or after. +Instead it prints output to the screen wherever the cursor currently is. This allows you to print multiple items +from different calls all on the same line. This is especially helpful when you want to show a status, do something, then print "Done" on the same line: .. literalinclude:: cli_library/012.php @@ -152,7 +152,7 @@ print "Done" on the same line: color() ======= -While the ``write()`` command will write a single line to the terminal, ending it with a EOL character, you can +While the ``write()`` command will write a single line to the terminal, ending it with an EOL character, you can use the ``color()`` method to make a string fragment that can be used in the same way, except that it will not force an EOL after printing. This allows you to create multiple outputs on the same row. Or, more commonly, you can use it inside of a ``write()`` method to create a string of a different color inside: @@ -166,7 +166,7 @@ error() ======= If you need to output errors, you should use the appropriately named ``error()`` method. This writes light-red text -to STDERR, instead of STDOUT, like ``write()`` and ``color()`` do. This can be useful if you have scripts watching +to STDERR, instead of STDOUT like ``write()`` and ``color()`` do. This can be useful if you have scripts watching for errors so they don't have to sift through all of the information, only the actual error messages. You use it exactly as you would the ``write()`` method: @@ -203,7 +203,7 @@ Would create something like this: text of the printing and typesetting industry. task1abc Lorem Ipsum has been the - industry's standard dummy + industry standard dummy text ever since the newLine() From 35b8d4b24115e75ac8124373483170d1b8aa58cf Mon Sep 17 00:00:00 2001 From: obozdag Date: Sun, 9 Jun 2024 11:08:50 +0200 Subject: [PATCH 2/5] docs: Change double quates to single in cli/cli_library/017.php Change double quates to single for consistency in cli/cli_library/017.php --- user_guide_src/source/cli/cli_library/017.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/cli/cli_library/017.php b/user_guide_src/source/cli/cli_library/017.php index 095e21c279ec..23a5b0c7eaca 100644 --- a/user_guide_src/source/cli/cli_library/017.php +++ b/user_guide_src/source/cli/cli_library/017.php @@ -8,7 +8,7 @@ ]; $descriptions = [ 'Lorem Ipsum is simply dummy text of the printing and typesetting industry.', - "Lorem Ipsum has been the industry's standard dummy text ever since the", + 'Lorem Ipsum has been the industry standard dummy text ever since the', ]; // Determine the maximum length of all titles From 532da27b0ccfb103ca1b8ac24407f2530223b989 Mon Sep 17 00:00:00 2001 From: obozdag Date: Mon, 10 Jun 2024 20:18:53 +0200 Subject: [PATCH 3/5] docs: Put period at the end of the list in cli/cli_library.rst Put period at the end of the list in cli/cli_library.rst --- user_guide_src/source/cli/cli_library.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/cli/cli_library.rst b/user_guide_src/source/cli/cli_library.rst index 7fd570d7dbe0..ecdd774f7d24 100644 --- a/user_guide_src/source/cli/cli_library.rst +++ b/user_guide_src/source/cli/cli_library.rst @@ -8,7 +8,7 @@ CodeIgniter's CLI library makes creating interactive command-line scripts simple * Writing multi-colored text in the terminal * Beeping (be nice!) * Showing progress bars during long tasks -* Wrapping long text lines to fit the window +* Wrapping long text lines to fit the window. .. contents:: :local: From 988defe229c4bbf3ca9df6f490a36ef8fba94b73 Mon Sep 17 00:00:00 2001 From: obozdag Date: Sun, 23 Jun 2024 16:49:58 +0200 Subject: [PATCH 4/5] docs: Change wrap example text in cli/cli_library/017.php Change wrap example text in cli/cli_library/017.php to avoid debate on the content and keep the attention on what wrap() function does. --- user_guide_src/source/cli/cli_library/017.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/cli/cli_library/017.php b/user_guide_src/source/cli/cli_library/017.php index 23a5b0c7eaca..e6944ef317d1 100644 --- a/user_guide_src/source/cli/cli_library/017.php +++ b/user_guide_src/source/cli/cli_library/017.php @@ -7,8 +7,8 @@ 'task1abc', ]; $descriptions = [ - 'Lorem Ipsum is simply dummy text of the printing and typesetting industry.', - 'Lorem Ipsum has been the industry standard dummy text ever since the', + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris congue est sit amet turpis laoreet porta.', + 'Mauris iaculis eleifend ultricies. Sed mollis urna in ultricies hendrerit. Mauris dictum, est a euismod', ]; // Determine the maximum length of all titles From 10a8216b590a7fe41ac200338429e63858790fab Mon Sep 17 00:00:00 2001 From: obozdag Date: Sun, 23 Jun 2024 16:53:51 +0200 Subject: [PATCH 5/5] docs: Change wrap() output in cli/cli_library.rst Change wrap() output according to the changed example in cli/cli_library.rst --- user_guide_src/source/cli/cli_library.rst | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/user_guide_src/source/cli/cli_library.rst b/user_guide_src/source/cli/cli_library.rst index ecdd774f7d24..d972a8c1972f 100644 --- a/user_guide_src/source/cli/cli_library.rst +++ b/user_guide_src/source/cli/cli_library.rst @@ -199,12 +199,14 @@ Would create something like this: .. code-block:: none - task1a Lorem Ipsum is simply dummy - text of the printing and - typesetting industry. - task1abc Lorem Ipsum has been the - industry standard dummy - text ever since the + task1a Lorem ipsum dolor sit amet, + consectetur adipiscing elit. + Mauris congue est sit amet + turpis laoreet porta. + task1abc Mauris iaculis eleifend + ultricies. Sed mollis urna in + ultricies hendrerit. Mauris + dictum, est a euismod newLine() =========