1.1 KiB
Executable File
1.1 KiB
Executable File
Table of Contents
AtoM Tools and Scripts
Corrupt DB
Database Integrity Tool. If AtoM DB is corrputed, use this php tool, provided by Artefactual (worked well for BIS)
- https://groups.google.com/g/ica-atom-users/c/mWPG763-seQ/m/ecTLNBT7AwAJ
6c6f427c9a/01_wip_atom_integrity_tool.php
Powershell Script Refcode to ID,ParentID
$counter = 0
$refcode_delimiter = '.'
$list = [Ordered]@{}
Import-Csv -Path .\997-ordnungssystem.csv -Delimiter "," | sort n | ForEach-Object {
$arr_id_parentid = @()
$counter++
$arr_id_parentid += $counter
$list.add($_.n, $arr_id_parentid)
}
foreach ($h in $list.GetEnumerator() ) {
$key = $h.Name
#Write-Host "key: "$key
if ($key -like '*.*') {
$s = $key.Substring(0, $key.lastIndexOf('.'))
$h.Value += $list[$s][0]
} else {
$h.Value += 'fribourg-archives-numeriques' # slug of existing place in AtoM for the top level descriptions.
}
$a = $h.Value
Write-Host ($a -join ",")
}