Last active
August 15, 2022 10:21
-
-
Save doshiraki/c28d1d349341b4d205f4324140c24f17 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s/\r$//; | |
/^--------$/{ | |
d; | |
} | |
/^-----$/!{ | |
H; | |
/^BODY:/,/^COMMENT:/{ | |
/^COMMENT:/{ | |
s/.*/ COMMENTS:/; | |
p; | |
} | |
} | |
d; | |
} | |
x; | |
s/^\n//; | |
h; | |
/^AUTHOR:/{ | |
s/^/ /mg; | |
s/^./-/; | |
} | |
/^\(EXTENDED \)\?BODY:/{ | |
s/^.*\?BODY:[^\n]*\n//; | |
s/^/ /mg; | |
x; | |
s/^\(.*\?BODY:[^\n]*\).*/\1 |2/; | |
G; | |
s/^/ /mg; | |
} | |
/^\(RES \)\?COMMENT:/{ | |
s/^.*\?DATE:[^\n]*\n//; | |
s/^/ /mg; | |
s/^/DATA: |2\n/; | |
x; | |
s/^\(RES \)\?COMMENT:\n\(.*\?DATE:[^\n]*\).*/\2/; | |
G; | |
s/^/ /mg; | |
s/^.../ -/; | |
} | |
x; | |
s/.*//; | |
x; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://www.movabletype.jp/documentation/mt7/appendices/export-import-format/
I convert this format.