24 lines
859 B
JavaScript
24 lines
859 B
JavaScript
import fs from 'fs'
|
|
import path from 'path'
|
|
|
|
const files = [
|
|
path.join(process.cwd(), 'content', 'consulting', 'ki-experimentierraeume-verwaltung.yaml'),
|
|
path.join(process.cwd(), 'content', 'consulting', 'ki-in-der-praxis.yaml'),
|
|
path.join(process.cwd(), 'content', 'talks', 'mentor-pwc-scale-2021.yaml'),
|
|
path.join(process.cwd(), 'content', 'talks', 'einfachbahn-agiles-arbeiten-2020.yaml')
|
|
]
|
|
|
|
files.forEach(f => {
|
|
if (fs.existsSync(f)) {
|
|
let raw = fs.readFileSync(f, 'utf8')
|
|
// We want to fix the description line which is description: "..."
|
|
// Specifically, any " inside the outer " "
|
|
raw = raw.replace(/^description: "(.*)"$/gm, (match, p1) => {
|
|
// replace " with ' inside p1
|
|
return 'description: "' + p1.replace(/"/g, "'") + '"'
|
|
})
|
|
fs.writeFileSync(f, raw)
|
|
console.log('Fixed:', path.basename(f))
|
|
}
|
|
})
|