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
<divclass="line">directory Directory to scan for files to pack into the hyperpage database [required]</div>
125
+
<divclass="line">directoriesDirectories to scan for files to pack into the hyperpage database [nargs: 1 or more] [required]</div>
126
126
<divclass="line"></div>
127
127
<divclass="line">Optional arguments:</div>
128
128
<divclass="line"> -h, --help shows help message and exits</div>
129
+
<divclass="line"> -v, --version prints version information and exits</div>
129
130
<divclass="line"> -o, --output Output file for the hyperpage database [nargs=0..1] [default: "hyperpage.db"]</div>
130
-
</div><!-- fragment --><p>It will iterate through a given directory, storing its files based on paths relative to the given directory. It will also detect the mime type and store the contents of each file.</p>
<divclass="line"> -v, --verbose Show detailed output information</div>
132
+
</div><!-- fragment --><h2class="doxsection"><aclass="anchor" id="autotoc_md5"></a>
133
+
Note on Overwriting</h2>
134
+
<p>If two or more files share the same <b>relative subpath</b> (i.e., the same path within their respective parent directories), the file from the <b>rightmost directory</b> specified on the command line will overwrite the others in the final archive.</p>
135
+
<p>Only <b>exact path matches</b> are considered conflicts — differing subdirectories or filenames will coexist as separate entries.</p>
<p>Suppose you run: </p><divclass="fragment"><divclass="line">hyperpack -o output.hp dir1 dir2 dir3</div>
139
+
</div><!-- fragment --><p> And the directories contain: </p><divclass="fragment"><divclass="line">dir1/Subdir1/index.html</div>
140
+
<divclass="line">dir2/Subdir2/index.html</div>
141
+
<divclass="line">dir3/Index.html</div>
142
+
</div><!-- fragment --><p> These will result in three distinct files inside the archive: </p><divclass="fragment"><divclass="line">Subdir1/index.html</div>
143
+
<divclass="line">/Subdir2/index.html</div>
144
+
<divclass="line">/Index.html</div>
145
+
</div><!-- fragment --><p> However, if two or more directories contain the same relative path, for example: </p><divclass="fragment"><divclass="line">dir1/public/index.html</div>
146
+
<divclass="line">dir2/public/index.html</div>
147
+
</div><!-- fragment --><p> then the file from dir2 (the rightmost one) will overwrite the file from dir1 in the resulting archive entry: </p><divclass="fragment"><divclass="line">/public/index.html</div>
148
+
</div><!-- fragment --><h2class="doxsection"><aclass="anchor" id="autotoc_md7"></a>
132
149
Documentation and Example</h2>
133
150
<p>This is only intended to cover basic usage. For more info about the API, see the <ahref="https://maxtek6.github.io/docs/hyperpage">docs</a>. To see how hyperpage is used in a basic use case, the <ahref="https://github.com/maxtek6/hyperpage/tree/master/example">example</a> should be helpful. </p>
0 commit comments