opex-manifest-generator 1.2.3__tar.gz → 1.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. opex_manifest_generator-1.3.0/.github/workflows/pypi-publish.yml +51 -0
  2. {opex_manifest_generator-1.2.3/opex_manifest_generator.egg-info → opex_manifest_generator-1.3.0}/PKG-INFO +59 -34
  3. {opex_manifest_generator-1.2.3 → opex_manifest_generator-1.3.0}/README.md +58 -33
  4. opex_manifest_generator-1.3.0/assets/FullName Column.png +0 -0
  5. {opex_manifest_generator-1.2.3 → opex_manifest_generator-1.3.0}/opex_manifest_generator/cli.py +86 -55
  6. {opex_manifest_generator-1.2.3 → opex_manifest_generator-1.3.0}/opex_manifest_generator/hash.py +6 -7
  7. {opex_manifest_generator-1.2.3 → opex_manifest_generator-1.3.0}/opex_manifest_generator/opex_manifest.py +149 -76
  8. opex_manifest_generator-1.3.0/opex_manifest_generator/options/options.properties +22 -0
  9. {opex_manifest_generator-1.2.3 → opex_manifest_generator-1.3.0/opex_manifest_generator.egg-info}/PKG-INFO +59 -34
  10. {opex_manifest_generator-1.2.3 → opex_manifest_generator-1.3.0}/opex_manifest_generator.egg-info/SOURCES.txt +5 -2
  11. {opex_manifest_generator-1.2.3 → opex_manifest_generator-1.3.0}/pyproject.toml +1 -1
  12. opex_manifest_generator-1.3.0/samples/Sample File 1.jpg.opex +8 -0
  13. opex_manifest_generator-1.3.0/samples/Sample File 2.gif.opex +8 -0
  14. opex_manifest_generator-1.3.0/samples/Sample Folder Manifest.opex +14 -0
  15. opex_manifest_generator-1.3.0/samples/opex_manifest_generator_AutoClass.xlsx +0 -0
  16. opex_manifest_generator-1.2.3/assets/FullName Column.png +0 -0
  17. opex_manifest_generator-1.2.3/opex_manifest_generator/options.properties +0 -13
  18. opex_manifest_generator-1.2.3/samples/Opex.xml +0 -11
  19. opex_manifest_generator-1.2.3/samples/opex_manifest_generator_AutoClass.xlsx +0 -0
  20. {opex_manifest_generator-1.2.3 → opex_manifest_generator-1.3.0}/.github/workflows/codeql.yml +0 -0
  21. {opex_manifest_generator-1.2.3 → opex_manifest_generator-1.3.0}/.gitignore +0 -0
  22. {opex_manifest_generator-1.2.3 → opex_manifest_generator-1.3.0}/LICENSE.md +0 -0
  23. {opex_manifest_generator-1.2.3 → opex_manifest_generator-1.3.0}/assets/Column Headers.png +0 -0
  24. {opex_manifest_generator-1.2.3 → opex_manifest_generator-1.3.0}/assets/Hash Headers.png +0 -0
  25. {opex_manifest_generator-1.2.3 → opex_manifest_generator-1.3.0}/assets/Identifiers Headers.png +0 -0
  26. {opex_manifest_generator-1.2.3 → opex_manifest_generator-1.3.0}/assets/XML Headers.png +0 -0
  27. {opex_manifest_generator-1.2.3 → opex_manifest_generator-1.3.0}/opex_manifest_generator/__init__.py +0 -0
  28. {opex_manifest_generator-1.2.3 → opex_manifest_generator-1.3.0}/opex_manifest_generator/common.py +0 -0
  29. {opex_manifest_generator-1.2.3 → opex_manifest_generator-1.3.0}/opex_manifest_generator/metadata/DublinCore Template.xml +0 -0
  30. {opex_manifest_generator-1.2.3 → opex_manifest_generator-1.3.0}/opex_manifest_generator/metadata/EAD Template.xml +0 -0
  31. {opex_manifest_generator-1.2.3 → opex_manifest_generator-1.3.0}/opex_manifest_generator/metadata/GDPR Template.xml +0 -0
  32. {opex_manifest_generator-1.2.3 → opex_manifest_generator-1.3.0}/opex_manifest_generator/metadata/MODS Template.xml +0 -0
  33. {opex_manifest_generator-1.2.3 → opex_manifest_generator-1.3.0}/opex_manifest_generator.egg-info/dependency_links.txt +0 -0
  34. {opex_manifest_generator-1.2.3 → opex_manifest_generator-1.3.0}/opex_manifest_generator.egg-info/entry_points.txt +0 -0
  35. {opex_manifest_generator-1.2.3 → opex_manifest_generator-1.3.0}/opex_manifest_generator.egg-info/requires.txt +0 -0
  36. {opex_manifest_generator-1.2.3 → opex_manifest_generator-1.3.0}/opex_manifest_generator.egg-info/top_level.txt +0 -0
  37. {opex_manifest_generator-1.2.3 → opex_manifest_generator-1.3.0}/samples/spreads/dctemplate.xlsx +0 -0
  38. {opex_manifest_generator-1.2.3 → opex_manifest_generator-1.3.0}/samples/spreads/eadtemplate.xlsx +0 -0
  39. {opex_manifest_generator-1.2.3 → opex_manifest_generator-1.3.0}/samples/spreads/gdprtemplate.xlsx +0 -0
  40. {opex_manifest_generator-1.2.3 → opex_manifest_generator-1.3.0}/samples/spreads/modstemplate.xlsx +0 -0
  41. {opex_manifest_generator-1.2.3 → opex_manifest_generator-1.3.0}/setup.cfg +0 -0
@@ -0,0 +1,51 @@
1
+ name: Publish Python distribution to PyPI
2
+
3
+ on: push
4
+
5
+ jobs:
6
+ build:
7
+ name: Build distribution
8
+ runs-on: ubuntu-latest
9
+
10
+ steps:
11
+ - uses: actions/checkout@v6
12
+ with:
13
+ persist-credentials: false
14
+ - name: Set up Python
15
+ uses: actions/setup-python@v6
16
+ with:
17
+ python-version: "3.x"
18
+ - name: Install pypa/build
19
+ run: >-
20
+ python3 -m
21
+ pip install
22
+ build
23
+ - name: Build a binary wheel and a source tarball
24
+ run: python3 -m build
25
+ - name: Store the distribution packages
26
+ uses: actions/upload-artifact@v5
27
+ with:
28
+ name: python-package-distributions
29
+ path: dist/
30
+
31
+ publish-to-pypi:
32
+ name: >-
33
+ Publish Python distribution to PyPI
34
+ if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
35
+ needs:
36
+ - build
37
+ runs-on: ubuntu-latest
38
+ environment:
39
+ name: pypi
40
+ url: https://pypi.org/p/opex_manifest_generator # Replace <package-name> with your PyPI project name
41
+ permissions:
42
+ id-token: write # IMPORTANT: mandatory for trusted publishing
43
+
44
+ steps:
45
+ - name: Download all the dists
46
+ uses: actions/download-artifact@v6
47
+ with:
48
+ name: python-package-distributions
49
+ path: dist/
50
+ - name: Publish distribution to PyPI
51
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: opex_manifest_generator
3
- Version: 1.2.3
3
+ Version: 1.3.0
4
4
  Summary: Opex Manifest Generator Tool for use with Opex / Preservica
5
5
  Author-email: Christopher Prince <c.pj.prince@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/CPJPRINCE/opex_manifest_generator
@@ -75,7 +75,7 @@ To install the package, simply run: `pip install -U opex_manifest_generator`. To
75
75
 
76
76
  ## Usage
77
77
 
78
- Useage of the program is from a command line interface / terminal program, such as PowerShell on Windows, Terminal on Mac, or one of the many terminal programs on Linux.
78
+ Usage of the program is from a command line interface / terminal program, such as PowerShell on Windows, Terminal on Mac, or one of the many terminal programs on Linux.
79
79
 
80
80
  ### Folder Manifest Generation
81
81
 
@@ -99,7 +99,7 @@ By default this will run with the SHA-1 algorithm. You can also utilise MD5, SHA
99
99
 
100
100
  `opex_generate "C:\Users\Christopher\Downloads\" -fx SHA-256`
101
101
 
102
- You can also generate multiple fixities, by comma seperation - Shoutout to Andrew Doty for adding this:
102
+ You can also generate multiple fixities, by comma separation - Shout-out to Andrew Doty for adding this:
103
103
 
104
104
  `opex_generate "C:\Users\Christopher\Downloads\" -fx SHA-256,SHA-1`
105
105
 
@@ -107,7 +107,7 @@ You can also enable PAX Fixity generation to generate fixity checks for individu
107
107
 
108
108
  `opex_generate "C:\Users\Christopher\Downloads\" -fx SHA-256 --pax-fixity`
109
109
 
110
- *Sidenote, you can also generate multiple fixites for PAX files*
110
+ *Side-note, you can also generate multiple fixities for PAX files*
111
111
 
112
112
  ### Continuous Generation
113
113
 
@@ -190,7 +190,7 @@ XML metadata template data, from both the default templates and custom templates
190
190
 
191
191
  <details>
192
192
  <summary>
193
- Click to find out more!
193
+ **Click to find out more!**
194
194
  </summary>
195
195
 
196
196
  ### XIP metadata - Title, Description and Security Status
@@ -199,7 +199,7 @@ To use an input override, we need to first create a spreadsheet with the path of
199
199
 
200
200
  `auto_class -p "ARCH" "C:\Users\Christopher\Downloads"`
201
201
 
202
- In the resultant spreadsheet, add in "Title", "Description", and "Security" as new columns. The column headers are case-sensistive and have to match exactly. These fields would then be filled in with the relevant data.
202
+ In the resultant spreadsheet, add in "Title", "Description", and "Security" as new columns. The column headers are case-sensitive and have to match exactly. These fields would then be filled in with the relevant data.
203
203
 
204
204
  ![ScreenshotXIPColumns](assets/Column%20Headers.png)
205
205
 
@@ -219,15 +219,15 @@ If there are any changes to the hierarchy data, such as a file/folder (not inclu
219
219
 
220
220
  ### XIP Metadata - Identifiers
221
221
 
222
- Custom Identifiers can be added by adding the columns: `"Archive_Reference", "Accession_Reference", "Identifier", or "Identifer:Keyname"`.
222
+ Custom Identifiers can be added by adding the columns: `"Archive_Reference", "Accession_Reference", "Identifier", or "Identifier:Keyname"`.
223
223
 
224
224
  ![Identifier Screenshot](assets/Identifiers%20Headers.png)
225
225
 
226
- `Archive_Reference` or `Identifier` will default to the keyname `code`; `Accession_Reference` will default to `accref`. When using the Auto Classification Generator it will always generate a column called `Archive_Reference`, but you can simply rename or remove this column as neccessary.
226
+ `Archive_Reference` or `Identifier` will default to the keyname `code`; `Accession_Reference` will default to `accref`. When using the Auto Classification Generator it will always generate a column called `Archive_Reference`, but you can simply rename or remove this column as necessary.
227
227
 
228
- To add a custom identifier import, do so like: `Identifier:{YourIdentifierName}`, without the curly brackets IE: `Identifier:MyCode`. Mulitple identifiers can be added as needed.
228
+ To add a custom identifier import, do so like: `Identifier:{YourIdentifierName}`, without the curly brackets IE: `Identifier:MyCode`. Multiple identifiers can be added as needed.
229
229
 
230
- No additional parameter's need to be set in the command line when using Identifier's, addition is enabled by default. Leaving a cell blank will not add an identifer.
230
+ No additional parameter's need to be set in the command line when using Identifier's, addition is enabled by default. Leaving a cell blank will not add an identifier.
231
231
 
232
232
  ### XIP Metadata - Hashes
233
233
 
@@ -259,7 +259,7 @@ Flatly:
259
259
  mods:recordIdentifier
260
260
  ```
261
261
 
262
- Both cases match to the field `recordIdentifer`. Note that header includes both the namespace and tag, and is also case sensitive.
262
+ Both cases match to the field `recordIdentifier`. Note that header includes both the namespace and tag, and is also case sensitive.
263
263
 
264
264
  While using the `flatly` method is easier, be aware that if there's non-unique tags, such as `mods:note` in the Mods template. This method will only import to the first match, which might not be it's intended destination. Using the `exactly` method resolves this issue.
265
265
 
@@ -282,7 +282,7 @@ Any custom XML template, that is functioning in Preservica will work with this m
282
282
 
283
283
  The default location will be in the installation path of the program, typically under `/path/to/ptyhoninstall/Lib/site-packages/opex_manifest_generator/metadata`. However, you can also utilise the `-mdir` option to set this to a specific folder, to have a dedicated section.
284
284
 
285
- After the xml is added to that directory, all that's required is to add the matching column headers into your spreadsheet. You can also utilise `--print-xmls` to obtian this.
285
+ After the xml is added to that directory, all that's required is to add the matching column headers into your spreadsheet. You can also utilise `--print-xmls` to obtain this.
286
286
 
287
287
  ### Additional Information for Auto Classification
288
288
  #### SourceID
@@ -299,13 +299,13 @@ Removing Files or Folders is also possible, by adding a `Removals` header. When
299
299
 
300
300
  #### Keywords
301
301
 
302
- You can utilise keywords to replace reference numbers with abbreviated characters for instance: `--keywords "Secret Metadata Folder"` will replace the reference number with `"SMF"`. You can also set different modes with `--keywords-mode`. `intialise` will take the intials of each letter like in the previous example; `firstletters` will take the first x number of letters. So the above becomes `"SEC"`. You can set multiple keywords with by comma seperation. If `--keywords` is set without any set strings it will be applied to every word.
302
+ You can utilise keywords to replace reference numbers with abbreviated characters for instance: `--keywords "Secret Metadata Folder"` will replace the reference number with `"SMF"`. You can also set different modes with `--keywords-mode`. `initialise` will take the initials of each letter like in the previous example; `firstletters` will take the first x number of letters. So the above becomes `"SEC"`. You can set multiple keywords with by comma separation. If `--keywords` is set without any set strings it will be applied to every word.
303
303
 
304
304
  There are further details in the Options Section.
305
305
 
306
306
  #### Sorting
307
307
 
308
- You can also sort utilisiing `--sort-by`. There are currently two options: `foldersfirst` and `alphabetical`. Folders first sorts folders first, then files (both alphabetically); alphabetically sorts both folders and files alphabetically.
308
+ You can also sort utilising `--sort-by`. There are currently two options: `foldersfirst` and `alphabetical`. Folders first sorts folders first, then files (both alphabetically); alphabetically sorts both folders and files alphabetically.
309
309
 
310
310
  #### Options File
311
311
 
@@ -316,7 +316,7 @@ You can utilise your own option-file to change the default column headers for th
316
316
  INDEX_FIELD = FullName
317
317
  TITLE_FIELD = Title
318
318
  DESCRIPTION_FIELD = Description
319
- SECUIRTY_FIELD = Security
319
+ SECURITY_FIELD = Security
320
320
  IDENTIFIER_FIELD = Identifier
321
321
  IDENTIFIER_DEFAULT = code
322
322
  REMOVAL_FIELD = Removals
@@ -350,10 +350,19 @@ Options:
350
350
 
351
351
  -v, --version Display version information [boolean flag]
352
352
 
353
+ Required Option:
354
+
355
+ root The path to the root folder you wish to
356
+ Generate a Manifest for. Will recurse through
357
+ the specified folder.
358
+
359
+ If no path is given will utilise the Current
360
+ Working Directory.
361
+
353
362
  Opex Options:
354
363
 
355
364
  -fx, --fixity Generate a Fixity Check for files. [SHA-1,MD5, SHA-256, SHA-512
356
- Can set multiple fixies with comma. | boolean flag]
365
+ Can set multiple fixities with comma. | boolean flag]
357
366
  IE MD5,SHA-1.
358
367
  [Defaults to SHA-1 if not specified]
359
368
 
@@ -368,7 +377,8 @@ Options:
368
377
  -z, --zip Will zip the Opex's with the file itself to create [boolean flag]
369
378
  a zip file. Existing file's are currently not removed.
370
379
  ***Use with caution, repeating the command multiple
371
- times in a row, will break the Opex's.
380
+ times in a row, will break the Opex's / Generally
381
+ cause a mess...
372
382
 
373
383
  --hidden Will generate Opex's for hidden files and directories [boolean flag]
374
384
 
@@ -381,7 +391,7 @@ Options:
381
391
 
382
392
  -c, --autoclass This will utilise the AutoClassification [{catalog, accession,both,
383
393
  module to generate an Auto Class spreadsheet. generic, catalog-generic,
384
- accesison-generic,
394
+ accession-generic,
385
395
  There are several options, {catalog} will generate both-generic}]
386
396
  a Archival Reference following; {accession}
387
397
  will create a running number of files
@@ -393,17 +403,23 @@ Options:
393
403
  {generic-catalog,generic-accession, generic-both}
394
404
  it will do both simultaneously.
395
405
 
396
- --accession-mode Sets whether to have the runnig tally be for {file,folder,both}
406
+ --accession-mode Sets whether to have the running tally be for {file,folder,both}
397
407
  files, folders or both,
398
408
  when utilising the Accession option with
399
409
  autoclass. Default is file.
400
410
 
401
411
  -p, --prefix Assign a prefix to the Auto Classification, [PREFIX]
402
412
  when utilising {both} fill in like:
403
- "catalog-prefix","accession-prefix".
413
+ "catalog-prefix","accession-prefix".
414
+
415
+ -s --suffix Assign a suffix to the Auto Classification [SUFFIX]
416
+ program. By Default only applies to Files
417
+
418
+ --suffix-options Set the Suffix assignment options {apply_to_files, apply_to_folders,
419
+ apply_to_both}
404
420
 
405
- -rme, --remove- Remove and log empty directories in a structure [boolean flag]
406
- empty Log will bee exported to 'meta' / output folder
421
+ --remove-empty Remove and log empty directories in a structure [boolean flag]
422
+ Log will bee exported to 'meta' / output folder
407
423
 
408
424
  -o, --output Set's the output of the 'meta' folder when [PATH/TO/FOLDER]
409
425
  utilising AutoClass.
@@ -423,8 +439,8 @@ Options:
423
439
  spreadsheet and titled exactly as:
424
440
  Title, Description, Security.
425
441
 
426
- -m --metadata Toggles use of the metadata import method. [{none,flat,exact}
427
- | boolean flag]
442
+ -m --metadata Toggles use of the metadata import method. {none,flat,exact}
443
+
428
444
  There are two methods utilised by this:
429
445
  'exact',or 'flat'.
430
446
 
@@ -438,18 +454,18 @@ Options:
438
454
 
439
455
  Enabled with -m.
440
456
  [Defaults to 'exact' method if not
441
- specificed]
457
+ specified]
442
458
 
443
459
  Use of metadata requires, XML documents to
444
460
  be added to the metadata folder, see docs for
445
461
  details.
446
462
 
447
- -mdir --metadata Specify the metadata directroy to pull the XMLs files [PATH/TO/FOLDER]
463
+ -mdir --metadata Specify the metadata directory to pull the XMLs files [PATH/TO/FOLDER]
448
464
  -dir from.
449
465
  [Defaults to lib folder if not set]
450
466
 
451
- -dmd, --disable Will disable the creation of the 'meta' folder. [boolean flag]
452
- -meta-dir Can also be enabled with output.
467
+ --disable-meta-dir Will disable the creation of the 'meta' folder. [boolean flag]
468
+ Can also be enabled with output.
453
469
 
454
470
  -ex --export Set whether to export any Auto Class generation [boolean flag]
455
471
  to a spreadsheet
@@ -471,14 +487,23 @@ Options:
471
487
  Can also be set without specifying any words to
472
488
  apply to everything.
473
489
 
474
- --keym --keywords Specify the mode to use for keywords {intialise,firstletters}
475
- -mode Either 'intialise' taking the first letter of each
490
+ --keym --keywords Specify the mode to use for keywords {initialise,firstletters,from_json}
491
+ -mode Either 'initialise' taking the first letter of each
476
492
  word between spaces IE "Department of Justice" becomes
477
493
  "DOJ".
478
494
 
479
495
  'firstletters' takes the first n amount of letters.
480
496
  The aforementioned becomes "DEP"
481
497
 
498
+ 'from_json'' allows you to enter in the path to a
499
+ JSON file formatted as a Dict. The Key will be
500
+ used as the string to replace and the value,
501
+ what will be used as the replacement.
502
+ IE {'Important Document':'IMD', 'Human Resources': 'HR'}
503
+
504
+ --keywords-case Toggle to enable Case-Sensitivity, by Default
505
+ -sensitive Keywords matching is insensitive
506
+
482
507
  --keywords-retain- Specify if you wish continue or reset reference [boolean flag]
483
508
  -order numbering for references not in keywords.
484
509
 
@@ -491,9 +516,9 @@ Options:
491
516
 
492
517
  --keywords-abbreviation Set the number of characters to abbreviate to for [int]
493
518
  -number keywords option
494
- [Default is 3 first letters, -1 for intialise]
519
+ [Default is 3 first letters, -1 for initialise]
495
520
 
496
- --sort-by Set the method to sort. Can either utilise {foldersfirst,alphabetical}
521
+ --sort-by Set the method to sort. Can either utilise {folders_first,alphabetical}
497
522
  'foldersfirst' to sort folders first then
498
523
  alphabetically or 'alphabetical to sort
499
524
  both folders and files alphabetically
@@ -506,9 +531,9 @@ Options:
506
531
  - ~~Customisable Filtering~~ *Added!*
507
532
  - ~~Adjust Accession so the different modes can utilised from Opex.~~ *Added!*
508
533
  - ~~Add SourceID as option for use with Auto Class Spreadsheets.~~ *Added!*
509
- - ~~Allow for multiple Identifier's to be added with Auto Class Spreadsheets. Currently only 1 or 2 identifiers can be added at a time, under "Archive_Reference" or "Accesion_Refernce". These are also tied to be either "code" or "accref". An Option needs to be added to allow custom setting of identifier...~~ *Added!*
534
+ - ~~Allow for multiple Identifier's to be added with Auto Class Spreadsheets. Currently only 1 or 2 identifiers can be added at a time, under "Archive_Reference" or "Accession_Reference". These are also tied to be either "code" or "accref". An Option needs to be added to allow custom setting of identifier...~~ *Added!*
510
535
  - ~~Add an option / make it a default for Metadata XML's to be located in a specified directory rather than in the package.~~ *Added!*
511
- - Zipping to conform to PAX - Last on the check list; it techincally does...
536
+ - Zipping to conform to PAX - Last on the check list; it technically does...
512
537
  - In theory, this tool should be compatible with any system that makes use of the OPEX standard... But in theory Communism works, in theory...
513
538
 
514
539
  ## Developers
@@ -56,7 +56,7 @@ To install the package, simply run: `pip install -U opex_manifest_generator`. To
56
56
 
57
57
  ## Usage
58
58
 
59
- Useage of the program is from a command line interface / terminal program, such as PowerShell on Windows, Terminal on Mac, or one of the many terminal programs on Linux.
59
+ Usage of the program is from a command line interface / terminal program, such as PowerShell on Windows, Terminal on Mac, or one of the many terminal programs on Linux.
60
60
 
61
61
  ### Folder Manifest Generation
62
62
 
@@ -80,7 +80,7 @@ By default this will run with the SHA-1 algorithm. You can also utilise MD5, SHA
80
80
 
81
81
  `opex_generate "C:\Users\Christopher\Downloads\" -fx SHA-256`
82
82
 
83
- You can also generate multiple fixities, by comma seperation - Shoutout to Andrew Doty for adding this:
83
+ You can also generate multiple fixities, by comma separation - Shout-out to Andrew Doty for adding this:
84
84
 
85
85
  `opex_generate "C:\Users\Christopher\Downloads\" -fx SHA-256,SHA-1`
86
86
 
@@ -88,7 +88,7 @@ You can also enable PAX Fixity generation to generate fixity checks for individu
88
88
 
89
89
  `opex_generate "C:\Users\Christopher\Downloads\" -fx SHA-256 --pax-fixity`
90
90
 
91
- *Sidenote, you can also generate multiple fixites for PAX files*
91
+ *Side-note, you can also generate multiple fixities for PAX files*
92
92
 
93
93
  ### Continuous Generation
94
94
 
@@ -171,7 +171,7 @@ XML metadata template data, from both the default templates and custom templates
171
171
 
172
172
  <details>
173
173
  <summary>
174
- Click to find out more!
174
+ **Click to find out more!**
175
175
  </summary>
176
176
 
177
177
  ### XIP metadata - Title, Description and Security Status
@@ -180,7 +180,7 @@ To use an input override, we need to first create a spreadsheet with the path of
180
180
 
181
181
  `auto_class -p "ARCH" "C:\Users\Christopher\Downloads"`
182
182
 
183
- In the resultant spreadsheet, add in "Title", "Description", and "Security" as new columns. The column headers are case-sensistive and have to match exactly. These fields would then be filled in with the relevant data.
183
+ In the resultant spreadsheet, add in "Title", "Description", and "Security" as new columns. The column headers are case-sensitive and have to match exactly. These fields would then be filled in with the relevant data.
184
184
 
185
185
  ![ScreenshotXIPColumns](assets/Column%20Headers.png)
186
186
 
@@ -200,15 +200,15 @@ If there are any changes to the hierarchy data, such as a file/folder (not inclu
200
200
 
201
201
  ### XIP Metadata - Identifiers
202
202
 
203
- Custom Identifiers can be added by adding the columns: `"Archive_Reference", "Accession_Reference", "Identifier", or "Identifer:Keyname"`.
203
+ Custom Identifiers can be added by adding the columns: `"Archive_Reference", "Accession_Reference", "Identifier", or "Identifier:Keyname"`.
204
204
 
205
205
  ![Identifier Screenshot](assets/Identifiers%20Headers.png)
206
206
 
207
- `Archive_Reference` or `Identifier` will default to the keyname `code`; `Accession_Reference` will default to `accref`. When using the Auto Classification Generator it will always generate a column called `Archive_Reference`, but you can simply rename or remove this column as neccessary.
207
+ `Archive_Reference` or `Identifier` will default to the keyname `code`; `Accession_Reference` will default to `accref`. When using the Auto Classification Generator it will always generate a column called `Archive_Reference`, but you can simply rename or remove this column as necessary.
208
208
 
209
- To add a custom identifier import, do so like: `Identifier:{YourIdentifierName}`, without the curly brackets IE: `Identifier:MyCode`. Mulitple identifiers can be added as needed.
209
+ To add a custom identifier import, do so like: `Identifier:{YourIdentifierName}`, without the curly brackets IE: `Identifier:MyCode`. Multiple identifiers can be added as needed.
210
210
 
211
- No additional parameter's need to be set in the command line when using Identifier's, addition is enabled by default. Leaving a cell blank will not add an identifer.
211
+ No additional parameter's need to be set in the command line when using Identifier's, addition is enabled by default. Leaving a cell blank will not add an identifier.
212
212
 
213
213
  ### XIP Metadata - Hashes
214
214
 
@@ -240,7 +240,7 @@ Flatly:
240
240
  mods:recordIdentifier
241
241
  ```
242
242
 
243
- Both cases match to the field `recordIdentifer`. Note that header includes both the namespace and tag, and is also case sensitive.
243
+ Both cases match to the field `recordIdentifier`. Note that header includes both the namespace and tag, and is also case sensitive.
244
244
 
245
245
  While using the `flatly` method is easier, be aware that if there's non-unique tags, such as `mods:note` in the Mods template. This method will only import to the first match, which might not be it's intended destination. Using the `exactly` method resolves this issue.
246
246
 
@@ -263,7 +263,7 @@ Any custom XML template, that is functioning in Preservica will work with this m
263
263
 
264
264
  The default location will be in the installation path of the program, typically under `/path/to/ptyhoninstall/Lib/site-packages/opex_manifest_generator/metadata`. However, you can also utilise the `-mdir` option to set this to a specific folder, to have a dedicated section.
265
265
 
266
- After the xml is added to that directory, all that's required is to add the matching column headers into your spreadsheet. You can also utilise `--print-xmls` to obtian this.
266
+ After the xml is added to that directory, all that's required is to add the matching column headers into your spreadsheet. You can also utilise `--print-xmls` to obtain this.
267
267
 
268
268
  ### Additional Information for Auto Classification
269
269
  #### SourceID
@@ -280,13 +280,13 @@ Removing Files or Folders is also possible, by adding a `Removals` header. When
280
280
 
281
281
  #### Keywords
282
282
 
283
- You can utilise keywords to replace reference numbers with abbreviated characters for instance: `--keywords "Secret Metadata Folder"` will replace the reference number with `"SMF"`. You can also set different modes with `--keywords-mode`. `intialise` will take the intials of each letter like in the previous example; `firstletters` will take the first x number of letters. So the above becomes `"SEC"`. You can set multiple keywords with by comma seperation. If `--keywords` is set without any set strings it will be applied to every word.
283
+ You can utilise keywords to replace reference numbers with abbreviated characters for instance: `--keywords "Secret Metadata Folder"` will replace the reference number with `"SMF"`. You can also set different modes with `--keywords-mode`. `initialise` will take the initials of each letter like in the previous example; `firstletters` will take the first x number of letters. So the above becomes `"SEC"`. You can set multiple keywords with by comma separation. If `--keywords` is set without any set strings it will be applied to every word.
284
284
 
285
285
  There are further details in the Options Section.
286
286
 
287
287
  #### Sorting
288
288
 
289
- You can also sort utilisiing `--sort-by`. There are currently two options: `foldersfirst` and `alphabetical`. Folders first sorts folders first, then files (both alphabetically); alphabetically sorts both folders and files alphabetically.
289
+ You can also sort utilising `--sort-by`. There are currently two options: `foldersfirst` and `alphabetical`. Folders first sorts folders first, then files (both alphabetically); alphabetically sorts both folders and files alphabetically.
290
290
 
291
291
  #### Options File
292
292
 
@@ -297,7 +297,7 @@ You can utilise your own option-file to change the default column headers for th
297
297
  INDEX_FIELD = FullName
298
298
  TITLE_FIELD = Title
299
299
  DESCRIPTION_FIELD = Description
300
- SECUIRTY_FIELD = Security
300
+ SECURITY_FIELD = Security
301
301
  IDENTIFIER_FIELD = Identifier
302
302
  IDENTIFIER_DEFAULT = code
303
303
  REMOVAL_FIELD = Removals
@@ -331,10 +331,19 @@ Options:
331
331
 
332
332
  -v, --version Display version information [boolean flag]
333
333
 
334
+ Required Option:
335
+
336
+ root The path to the root folder you wish to
337
+ Generate a Manifest for. Will recurse through
338
+ the specified folder.
339
+
340
+ If no path is given will utilise the Current
341
+ Working Directory.
342
+
334
343
  Opex Options:
335
344
 
336
345
  -fx, --fixity Generate a Fixity Check for files. [SHA-1,MD5, SHA-256, SHA-512
337
- Can set multiple fixies with comma. | boolean flag]
346
+ Can set multiple fixities with comma. | boolean flag]
338
347
  IE MD5,SHA-1.
339
348
  [Defaults to SHA-1 if not specified]
340
349
 
@@ -349,7 +358,8 @@ Options:
349
358
  -z, --zip Will zip the Opex's with the file itself to create [boolean flag]
350
359
  a zip file. Existing file's are currently not removed.
351
360
  ***Use with caution, repeating the command multiple
352
- times in a row, will break the Opex's.
361
+ times in a row, will break the Opex's / Generally
362
+ cause a mess...
353
363
 
354
364
  --hidden Will generate Opex's for hidden files and directories [boolean flag]
355
365
 
@@ -362,7 +372,7 @@ Options:
362
372
 
363
373
  -c, --autoclass This will utilise the AutoClassification [{catalog, accession,both,
364
374
  module to generate an Auto Class spreadsheet. generic, catalog-generic,
365
- accesison-generic,
375
+ accession-generic,
366
376
  There are several options, {catalog} will generate both-generic}]
367
377
  a Archival Reference following; {accession}
368
378
  will create a running number of files
@@ -374,17 +384,23 @@ Options:
374
384
  {generic-catalog,generic-accession, generic-both}
375
385
  it will do both simultaneously.
376
386
 
377
- --accession-mode Sets whether to have the runnig tally be for {file,folder,both}
387
+ --accession-mode Sets whether to have the running tally be for {file,folder,both}
378
388
  files, folders or both,
379
389
  when utilising the Accession option with
380
390
  autoclass. Default is file.
381
391
 
382
392
  -p, --prefix Assign a prefix to the Auto Classification, [PREFIX]
383
393
  when utilising {both} fill in like:
384
- "catalog-prefix","accession-prefix".
394
+ "catalog-prefix","accession-prefix".
395
+
396
+ -s --suffix Assign a suffix to the Auto Classification [SUFFIX]
397
+ program. By Default only applies to Files
398
+
399
+ --suffix-options Set the Suffix assignment options {apply_to_files, apply_to_folders,
400
+ apply_to_both}
385
401
 
386
- -rme, --remove- Remove and log empty directories in a structure [boolean flag]
387
- empty Log will bee exported to 'meta' / output folder
402
+ --remove-empty Remove and log empty directories in a structure [boolean flag]
403
+ Log will bee exported to 'meta' / output folder
388
404
 
389
405
  -o, --output Set's the output of the 'meta' folder when [PATH/TO/FOLDER]
390
406
  utilising AutoClass.
@@ -404,8 +420,8 @@ Options:
404
420
  spreadsheet and titled exactly as:
405
421
  Title, Description, Security.
406
422
 
407
- -m --metadata Toggles use of the metadata import method. [{none,flat,exact}
408
- | boolean flag]
423
+ -m --metadata Toggles use of the metadata import method. {none,flat,exact}
424
+
409
425
  There are two methods utilised by this:
410
426
  'exact',or 'flat'.
411
427
 
@@ -419,18 +435,18 @@ Options:
419
435
 
420
436
  Enabled with -m.
421
437
  [Defaults to 'exact' method if not
422
- specificed]
438
+ specified]
423
439
 
424
440
  Use of metadata requires, XML documents to
425
441
  be added to the metadata folder, see docs for
426
442
  details.
427
443
 
428
- -mdir --metadata Specify the metadata directroy to pull the XMLs files [PATH/TO/FOLDER]
444
+ -mdir --metadata Specify the metadata directory to pull the XMLs files [PATH/TO/FOLDER]
429
445
  -dir from.
430
446
  [Defaults to lib folder if not set]
431
447
 
432
- -dmd, --disable Will disable the creation of the 'meta' folder. [boolean flag]
433
- -meta-dir Can also be enabled with output.
448
+ --disable-meta-dir Will disable the creation of the 'meta' folder. [boolean flag]
449
+ Can also be enabled with output.
434
450
 
435
451
  -ex --export Set whether to export any Auto Class generation [boolean flag]
436
452
  to a spreadsheet
@@ -452,14 +468,23 @@ Options:
452
468
  Can also be set without specifying any words to
453
469
  apply to everything.
454
470
 
455
- --keym --keywords Specify the mode to use for keywords {intialise,firstletters}
456
- -mode Either 'intialise' taking the first letter of each
471
+ --keym --keywords Specify the mode to use for keywords {initialise,firstletters,from_json}
472
+ -mode Either 'initialise' taking the first letter of each
457
473
  word between spaces IE "Department of Justice" becomes
458
474
  "DOJ".
459
475
 
460
476
  'firstletters' takes the first n amount of letters.
461
477
  The aforementioned becomes "DEP"
462
478
 
479
+ 'from_json'' allows you to enter in the path to a
480
+ JSON file formatted as a Dict. The Key will be
481
+ used as the string to replace and the value,
482
+ what will be used as the replacement.
483
+ IE {'Important Document':'IMD', 'Human Resources': 'HR'}
484
+
485
+ --keywords-case Toggle to enable Case-Sensitivity, by Default
486
+ -sensitive Keywords matching is insensitive
487
+
463
488
  --keywords-retain- Specify if you wish continue or reset reference [boolean flag]
464
489
  -order numbering for references not in keywords.
465
490
 
@@ -472,9 +497,9 @@ Options:
472
497
 
473
498
  --keywords-abbreviation Set the number of characters to abbreviate to for [int]
474
499
  -number keywords option
475
- [Default is 3 first letters, -1 for intialise]
500
+ [Default is 3 first letters, -1 for initialise]
476
501
 
477
- --sort-by Set the method to sort. Can either utilise {foldersfirst,alphabetical}
502
+ --sort-by Set the method to sort. Can either utilise {folders_first,alphabetical}
478
503
  'foldersfirst' to sort folders first then
479
504
  alphabetically or 'alphabetical to sort
480
505
  both folders and files alphabetically
@@ -487,9 +512,9 @@ Options:
487
512
  - ~~Customisable Filtering~~ *Added!*
488
513
  - ~~Adjust Accession so the different modes can utilised from Opex.~~ *Added!*
489
514
  - ~~Add SourceID as option for use with Auto Class Spreadsheets.~~ *Added!*
490
- - ~~Allow for multiple Identifier's to be added with Auto Class Spreadsheets. Currently only 1 or 2 identifiers can be added at a time, under "Archive_Reference" or "Accesion_Refernce". These are also tied to be either "code" or "accref". An Option needs to be added to allow custom setting of identifier...~~ *Added!*
515
+ - ~~Allow for multiple Identifier's to be added with Auto Class Spreadsheets. Currently only 1 or 2 identifiers can be added at a time, under "Archive_Reference" or "Accession_Reference". These are also tied to be either "code" or "accref". An Option needs to be added to allow custom setting of identifier...~~ *Added!*
491
516
  - ~~Add an option / make it a default for Metadata XML's to be located in a specified directory rather than in the package.~~ *Added!*
492
- - Zipping to conform to PAX - Last on the check list; it techincally does...
517
+ - Zipping to conform to PAX - Last on the check list; it technically does...
493
518
  - In theory, this tool should be compatible with any system that makes use of the OPEX standard... But in theory Communism works, in theory...
494
519
 
495
520
  ## Developers