summaryrefslogtreecommitdiffstatshomepage
path: root/docs/advanced/import-process.rst
blob: b33a927261b9a665fc4acd1cc353ab13b2c347f7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Import process
==============

When importing a new archive, **hircine** will do the following:

1. Calculate the hash of the archive its contents. See :doc:`/advanced/hashing`.
2. Process each image for display in the application. See :doc:`/advanced/image-processing`.
3. Collate all images in the archive in "natural" sort order. See `natsort
   <https://github.com/SethMMorton/natsort?tab=readme-ov-file#quick-description>`_.
4. Add the images and archive to the database.

Status display
--------------

For each new or updated archive, **hircine** will report its status on the
command line:

+---------+--------------------------------------------------------------------+
| Symbol  | Meaning                                                            |
+=========+====================================================================+
| ``[+]`` | This is a new archive.                                             |
+---------+--------------------------------------------------------------------+
| ``[*]`` | This archive was updated (i.e. its modified time has changed).     |
+---------+--------------------------------------------------------------------+
| ``[>]`` | This archive has been renamed.                                     |
+---------+--------------------------------------------------------------------+
| ``[I]`` | This archive was ignored as it is a duplicate.                     |
+---------+--------------------------------------------------------------------+
| ``[!]`` | This archive conflicts with another archive.                       |
+---------+--------------------------------------------------------------------+
| ``[?]`` | This archive is referenced in the database but could not be found. |
+---------+--------------------------------------------------------------------+
| ``[~]`` | The images from this archive were reprocessed.                     |
+---------+--------------------------------------------------------------------+



Duplicates
----------

**hircine** will not add duplicate archives to its database. If two or more
archives have the same content (i.e. their hashes match), a warning will be
issued.

Conflicts
---------

A conflict occurs when an archive hash in the database no longer matches the
hash of the archive file on disk. **hircine** will take no further action other
than printing an error message including the path of the archive and both
hashes; it is up to the user to reconcile conflicts. An easy (but destructive)
solution is to delete the affected archive in the web application and
reimport it.