-
Notifications
You must be signed in to change notification settings - Fork 1
/
aims_file_wrangler.rb
executable file
·37 lines (26 loc) · 1.28 KB
/
aims_file_wrangler.rb
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
#!/usr/bin/env ruby
require 'html_to_csv'
require 'reorg_directory'
require 'convert_objects'
#
# This is a set of scripts used to ingest items into the AIMS hydra application. It uses metadata exported from
# Forensic Toolkit as well as items converted using Avantstar transit.
#
#
# Step 1. Process FTK metadata into CSV file
# HtmlToCsv.new("path_to_ftk_bookmark_html_files", "csv_output_file")
step1 = HtmlToCsv.new("/tmp/Chris_08_27/Gould_08_27_html/", "Gouldoutput.csv")
step1.process
# Step 2. Make a new directories for each of the Fedora object
# ReorgDirectory.new("path_to_output_directory", "path_to_ftk_source_objects", "path_to_transit_output", "csv_metadata_file")
step2 = ReorgDirectory.new("/tmp/testout", "/tmp/Chris_08_27/Gould_08_27_xml/", "/tmp/Chris_08_27/Gould_Convert_08_27/", "Gouldoutput.csv")
step2.process
# Step 3. Convert the objects into pdf, jpg2000s, and text files
# ConvertObjects.new("new_path_to_fedora_objects_directories")
step3 = ConvertObjects.new("/tmp/testout")
step3.process
# Step 4. Ingest the object into Fedora
# This script actually has to be run in the rails root, since requires AimDocument model defined.
# Ingestor.new("csv_metadata_file.csv", "path_to_fedora_objects")
# step4 = Ingestor.new("Gouldoutput.csv", "/tmp/objects")
# step4.process