2017/02/08
scary rando stuff
You don’t see stuff like this everyday (I hope).
1
2
3
4
5
6
|
ggrep -E -A1 '(<guid |l_author_byline)' *.wxr \
| ggrep -E '(<guid|<wp:meta_value)' \
| perl -pe 's/.*<guid \D+(\d+).*/$1/g;
s/.*CDATA\[(.*?)\]\].*/$1/g;
s/^(\d+)\n/$1,/mg' > /tmp/id2name
</guid>
|
1
2
3
4
|
cat id2name4 | perl -pe 's/\\/\\ /g;
s/"/\\"/g;
s/^(\d+),(.*)/INSERT into `wp_postmeta` (`post_id`, `meta_key`, `meta_value`) VALUES ($1,"original_author_name","$2")\;/g;' \
> oan.sql
|
scary rando stuff is original content from devolve.