From dfc7cd1e7ee99b41f83549f4d5d3d4fbe503007a Mon Sep 17 00:00:00 2001 From: Bryan Nielsen Date: Mon, 12 Feb 2024 10:44:02 -0500 Subject: [PATCH 1/3] Document new sync:upload-directory CLI command --- .../sync-upload-directory.md | 19 +++++++++++++++++++ docs/cli/intro.md | 1 + 2 files changed, 20 insertions(+) create mode 100644 docs/cli/built-in-commands/sync-upload-directory.md diff --git a/docs/cli/built-in-commands/sync-upload-directory.md b/docs/cli/built-in-commands/sync-upload-directory.md new file mode 100644 index 000000000..9649a3c3e --- /dev/null +++ b/docs/cli/built-in-commands/sync-upload-directory.md @@ -0,0 +1,19 @@ +# `sync:upload-directory` + +This command synchronizes the file records in the database with the files stored in a given upload directory. This functionality is also available through the [File Manager](control-panel/file-manager/synchronizing.md). + +## Options list: + +``` + --upload-id= + -u + Upload Directory ID. If not provided, list of Upload Directories with corresponding IDs will be shown to choose from + + --manipulations= + -m + Image manipulations to regenerate. Comma separated list of manipulation IDs. Use 'all' to regenerate all manipulations. If not provided, a list of available manipulations with corresponding IDs will be shown to choose from +``` + +## Example: + +`php eecli.php sync:upload-directory --upload-id=6 --manipulations=all` \ No newline at end of file diff --git a/docs/cli/intro.md b/docs/cli/intro.md index bc520e5e0..a4bcb1d93 100644 --- a/docs/cli/intro.md +++ b/docs/cli/intro.md @@ -30,6 +30,7 @@ By default the CLI is located `system/ee/eecli.php` . - Sync - [sync:conditional-fields - Sync channel entry conditional logic](cli/built-in-commands/sync-conditional-fields.md) - [sync:reindex - Sync content used in search indexes](cli/built-in-commands/sync-reindex.md) + - [sync:upload-directory - Sync files in an upload directory](cli/built-in-commands/sync-upload-directory.md) - [Update ExpressionEngine](cli/built-in-commands/update.md) - [Creating a Command](cli/creating-a-command.md) - [Defining Input](cli/defining-input.md) From 18420bc0561ebac3aa48aaf464c9340f9826c243 Mon Sep 17 00:00:00 2001 From: Bryan Nielsen Date: Mon, 12 Feb 2024 10:51:53 -0500 Subject: [PATCH 2/3] Add cli command reference on control panel page --- docs/control-panel/file-manager/synchronizing.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/control-panel/file-manager/synchronizing.md b/docs/control-panel/file-manager/synchronizing.md index 5eb7f005f..8602c75dc 100644 --- a/docs/control-panel/file-manager/synchronizing.md +++ b/docs/control-panel/file-manager/synchronizing.md @@ -22,4 +22,6 @@ When submitted, all allowed file types in the directory will be checked against If an image manipulation is missing, it will be generated automatically. However, if you want to regenerate and replace all given manipulations, you can do so by checking the checkbox next to the manipulation name. -Lastly, any records in the database that do not have a corresponding file in the main directory will be highlighted as not found. \ No newline at end of file +Lastly, any records in the database that do not have a corresponding file in the main directory will be highlighted as not found. + +NOTE: This functionality is also available as [CLI command](cli/built-in-commands/sync-upload-directory.md) \ No newline at end of file From 519dbe5b70c5c3eb34daf5e86effce82a2c2d0a8 Mon Sep 17 00:00:00 2001 From: Matt Johnson Date: Mon, 12 Feb 2024 15:05:25 -0600 Subject: [PATCH 3/3] Update synchronizing.md --- docs/control-panel/file-manager/synchronizing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/control-panel/file-manager/synchronizing.md b/docs/control-panel/file-manager/synchronizing.md index 8602c75dc..3ee4ca578 100644 --- a/docs/control-panel/file-manager/synchronizing.md +++ b/docs/control-panel/file-manager/synchronizing.md @@ -24,4 +24,4 @@ If an image manipulation is missing, it will be generated automatically. However Lastly, any records in the database that do not have a corresponding file in the main directory will be highlighted as not found. -NOTE: This functionality is also available as [CLI command](cli/built-in-commands/sync-upload-directory.md) \ No newline at end of file +NOTE: This functionality is also available as a [CLI command](cli/built-in-commands/sync-upload-directory.md)