Find and remove entries from the library database referencing images that no longer exist in the filesystem. You must close Ansel before running this script.

Цей сценарій можна викликати з такими параметрами командного рядка:

1purge_non_existing_images.sh [-c|--configdir <шлях>]
2                             [-l|--library <шлях>]
3                             [-p|--purge]

Запустіть сценарій без опцій для виконання “сухого запуску”, який формує звіт про відсутні файли без внесення жодних змін до бази даних.

Доступні такі опції:

-c|--configdir <path>
Specify the path to the Ansel configuration directory to be used by the script. If this option is not provided, the default config directory location will be used.
-l|--library <шлях>
Вказує шлях до файлу бази даних library.db для аналізу. Якщо цю опцію не вказано, буде використовуватися розташування файлу library.db за замовчуванням.
-p|--purge
Фактично видаляє будь-які записи в базі даних, які посилаються на неіснуючі файли. Якщо ця опція не надана, звіт буде надруковано без внесення змін до бази даних.

Примітки:

  1. The script must be run in a unix shell, and the sqlite3 client must be available in the command search path. For Linux systems, this will normally not be an issue.

  2. For Windows systems, you will normally need the MSYS2 environment to be installed, as described in the instructions for building Ansel in a Windows environment. If you installed Ansel using the standard Windows installer package, the location of the script would normally be something like: C:\Program Files\Ansel\share\Ansel\tools\purge_non_existing_images.sh.

  3. For macOS systems, the Terminal application provides a shell, and the sqlite3 client is provided by the operating system by default. If Ansel was installed using an application bundle from a dmg image, then the default location for the script would be /Applications/Ansel.app/Contents/Resources/share/Ansel/tools/purge_non_existing_images.sh

  4. The delete operation can’t be undone. It is therefore strongly recommended that you take a backup of the database before purging any entries.