You are not logged in.
Pages: 1
I need to extract urls from some html mails. I know it's utterly stupid, but the source doesn't provide any option of plain text mails.
I edit my ~/.muttrc and ~/.config/mutt/mailcap as suggested in http://jasonwryan.com/blog/2012/05/12/mutt/ . The result is very nice. However, urlscan doesn't work correctly, since it tries to parse and extract the original html mail instead of the parsed result by w3m.
If I just copy to text I see in mutt and pipe it to urlscan, it works perfectly. So how can I tell urlscan to work with the parsed messages in plain text?
I have to following setting in my .muttrc, exactly the same as suggested by man urlscan
# urlscan
macro index,pager \cb "<pipe-message> urlscan -c -n<Enter>" "call urlscan to extract URLs out of a message"
macro attach,compose \cb "<pipe-entry> urlscan -c -n<Enter>" "callurlscan to extract URLs out of a message"Last edited by ss (2018-06-24 00:12:38)
Offline
Use extract_url with the --list option.
Offline
I have found a solution which works very well for me. I just pipe the raw message to w3m before urlscan.
$ cat ~/.muttrc
# urlscan
macro index,pager \cb "<pipe-message> w3m -I "utf-8" -T text/html | urlscan<Enter>"
macro attach,compose \cb "<pipe-entry> w3m -I "utf-8" -T text/html | urlscan<Enter>"Apparently, the answer is already in ~/.config/mutt/mailcap, I was too stupid to think of the correlation between them.
$ cat ~/.config/mutt/mailcap
text/html; w3m -I "utf-8" -T text/html; copiousoutput;Offline
Pages: 1