Skip to content

jwestgard/ead-transform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ead-transform

Batch application of regular expressions to transform EAD files.

Original idea: Given a set of match and replacement patterns as a JSON file, the transformer will apply those transformations in series to the set of non-hidden files in a specified import directory.

Update: In practice, encoding of files needs to be sorted out first. Proposed strategy for encoding verification:

  1. open file as binary, read file and decode from UTF-8 (strict).
  2. if illegal characters are found:
  3. store contents decoded from UTF-8 as Python unicode object;
  4. open file, read, and decode from Windows-1252 (or Latin-1);
  5. compare result to UTF-8 version using difflib, and present differences to the user for verification;
  6. repeat as necessary until a valid decoded version is found.

About

Batch transformation of EAD XML files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages