Updated Tips & tricks (markdown)
parent
a786856eaf
commit
bf194017fa
@ -1,11 +1,13 @@
|
|||||||
The following `bash` function pretty-print the entire comments DB sorted by insertion date.
|
The following `bash` function pretty-print the entire comments DB sorted by insertion date.
|
||||||
|
|
||||||
get_blog_comments () {
|
```sh
|
||||||
ssh $host sqlite3 -line /path/to/isso/isso.db \
|
get_blog_comments () {
|
||||||
"'SELECT t.uri,c.created,c.modified,c.text,c.author,c.email,c.website \
|
ssh $host sqlite3 -line /path/to/isso/isso.db \
|
||||||
FROM comments AS c, threads as t WHERE c.tid = t.id;'" \
|
"'SELECT t.uri,c.created,c.modified,c.text,c.author,c.email,c.website \
|
||||||
| perl -wpe '/(created|modified) = ./&&s/= (.*)/"= ".scalar(localtime($1))/e';
|
FROM comments AS c, threads as t WHERE c.tid = t.id;'" \
|
||||||
}
|
| perl -wpe '/(created|modified) = ./&&s/= (.*)/"= ".scalar(localtime($1))/e';
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
Example output:
|
Example output:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user