Skip to content

Commit

Permalink
FairCopy v1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
NickLaiacona authored Oct 1, 2024
2 parents 1fded05 + 6c47d87 commit e778c42
Show file tree
Hide file tree
Showing 22 changed files with 503 additions and 105 deletions.
9 changes: 9 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@
"<node_internals>/**"
],
"program": "${workspaceFolder}/faircopy_scripts/turtle/element-report.js"
},
{
"type": "node",
"request": "launch",
"name": "Collate Test",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}/faircopy_scripts/collate/index.js"
}
]
}
6 changes: 4 additions & 2 deletions faircopy_scripts/collate/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ const fs = require('fs')
const Diff = require('diff')

function main() {
const one = fs.readFileSync(`temp/testcollation/damozel1855MS.txt`).toString('utf-8')
const other = fs.readFileSync(`temp/testcollation/damozel18701st.txt`).toString('utf-8')
const one = "This is a test."
const other = "This is a fish."

const diff = Diff.diffWords(one, other)

Expand All @@ -15,6 +15,8 @@ function main() {
const color = part.added ? 'green' : part.removed ? 'red' : 'grey'
out.push(`<span style="color: ${color}">${part.value}</span>`)
});

console.log(out)

console.log(Diff.convertChangesToXML(diff))
}
Expand Down
Loading

0 comments on commit e778c42

Please sign in to comment.