27 lines
330 B
Sed
Raw Normal View History

2020-04-12 10:56:18 -04:00
1 {
i +++
/^\[\s\]+:/ {
s/\(.*\): \(.*\)/\1 = \"\2\"/
}
}
/^time: / {
2020-04-12 15:59:04 -04:00
s|.*: \(\[^ \] \(.*\)\)|date = \1T\2Z|
2020-04-12 10:56:18 -04:00
}
/^tags/ s/tags/taxonomies/
/^content-type:/ d
/^content:/ {
i in_search_index = true
i +++
d
q
}
/^\[^:\]+:/ {
s/\(.*\): \(.*\)/\1 = \"\2\"/
}
s/^\s+- \(.+\)/\t\"\1\"\,/