You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
directory Directory to scan for files to pack into the hyperpage database [required]
44
+
directoriesDirectories to scan for files to pack into the hyperpage database [nargs: 1 or more] [required]
45
45
46
46
Optional arguments:
47
47
-h, --help shows help message and exits
48
+
-v, --version prints version information and exits
48
49
-o, --output Output file for the hyperpage database [nargs=0..1] [default: "hyperpage.db"]
50
+
-v, --verbose Show detailed output information
49
51
```
50
52
51
-
It will iterate through a given directory, storing its files based on
52
-
paths relative to the given directory. It will also detect the mime
53
-
type and store the contents of each file.
53
+
### Note on Overwriting
54
54
55
+
If two or more files share the same **relative subpath** (i.e., the same path within their respective parent directories), the file from the **rightmost directory** specified on the command line will overwrite the others in the final archive.
56
+
57
+
Only **exact path matches** are considered conflicts — differing subdirectories or filenames will coexist as separate entries.
58
+
59
+
#### Example
60
+
61
+
Suppose you run:
62
+
```bash
63
+
hyperpack -o output.hp dir1 dir2 dir3
64
+
```
65
+
And the directories contain:
66
+
```bash
67
+
dir1/Subdir1/index.html
68
+
dir2/Subdir2/index.html
69
+
dir3/Index.html
70
+
```
71
+
These will result in three distinct files inside the archive:
72
+
```bash
73
+
Subdir1/index.html
74
+
/Subdir2/index.html
75
+
/Index.html
76
+
```
77
+
However, if two or more directories contain the same relative path, for example:
78
+
```bash
79
+
dir1/public/index.html
80
+
dir2/public/index.html
81
+
```
82
+
then the file from dir2 (the rightmost one) will overwrite the file from dir1 in the resulting archive entry:
83
+
```bash
84
+
/public/index.html
85
+
```
55
86
### Documentation and Example
56
87
57
88
This is only intended to cover basic usage. For more info about the API,
58
-
see the [docs](https://maxtek6.github.io/docs/hyperpage). To see how hyperpage is used in a basic use case, the [example](https://github.com/maxtek6/hyperpage/tree/master/example) should be helpful.
89
+
see the [docs](https://maxtek6.github.io/docs/hyperpage). To see how hyperpage is used in a basic use case, the [example](https://github.com/maxtek6/hyperpage/tree/master/example) should be helpful.
0 commit comments