diff options
Diffstat (limited to 'blm')
-rwxr-xr-x | blm | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1,11 +1,10 @@ #!/bin/sh -# Format Blocket.se search results +# Format Blocket.se search results as mboxu -# Convert json to mbox jq -r '.data[] | "From BLOCKET " + (.list_time | sub("\\+[0-9][0-9]:00$"; "Z") | fromdate | strftime("%a %b %e %T %Y")) + "\n" + - "From: " + .advertiser.name + ", " + .location[0].name + " (" + .advertiser.type + ")\n" + + "From: \"" + .advertiser.name + ", " + .location[0].name + " (" + .advertiser.type + ")\" <noreply@localhost>\n" + "Subject: " + "(" + (.price.value | tostring) + ") " + .subject + "\n" + ([.images[].url] | map("X-Image: " + . + "?type=original") | join("\n")) + "\n" + "\n" + .body + "\n" + |