public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Anyone using extract_url with mutt?
@ 2020-11-26  7:19 Walter Dnes
  2020-11-26  8:11 ` David Haller
  2021-04-24  7:40 ` Nils Freydank
  0 siblings, 2 replies; 8+ messages in thread
From: Walter Dnes @ 2020-11-26  7:19 UTC (permalink / raw
  To: Gentoo Users List

  urlview has served me faithfully for many years in conjunction with
mutt.  In a recent install, I find it's no longer available (python
2.7?).  extract_url is touted as a drop-in replacement for urlview.  I
emerged it and did some RTFM, ending up more confused than ever.  I want
to display urls on a simple menu, just like urlview, select, and pass
the selected url to my palemoon email profile...

/home/waltdnes/pm/palemoon/palemoon -new-instance -p email

  The man page had example macros for mutt 1.4.x and mutt 1.5.x.  I'm
on 1.14.4, so that doesn't seem to help.  Is anyone running extract_url
with mutt?  If so, what is your macro?

-- 
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] Anyone using extract_url with mutt?
  2020-11-26  7:19 [gentoo-user] Anyone using extract_url with mutt? Walter Dnes
@ 2020-11-26  8:11 ` David Haller
  2021-04-24  7:40 ` Nils Freydank
  1 sibling, 0 replies; 8+ messages in thread
From: David Haller @ 2020-11-26  8:11 UTC (permalink / raw
  To: gentoo-user

Hello,

On Thu, 26 Nov 2020, Walter Dnes wrote:
>  urlview has served me faithfully for many years in conjunction with
>mutt.  In a recent install, I find it's no longer available (python
>2.7?).

Stated reason was "upstream dead" (which seems the case since 2013,
with issues on github[1])...

>extract_url is touted as a drop-in replacement for urlview.  I
>emerged it and did some RTFM, ending up more confused than ever.  I want
>to display urls on a simple menu, just like urlview, select, and pass
>the selected url to my palemoon email profile...
>
>/home/waltdnes/pm/palemoon/palemoon -new-instance -p email

I don't know urlview, but FWIW, I use the mouse or cursor in e.g. 
emacs to select the URL (or just a part) as usual and then
Ctrl+"8th-Button" (actually lower thumb button, use xev / evtest to
find the right button number) to call the browser, done via xbindkeys:

# call browser with selected text as URL
"/home/dh/bin/browser $(xsel -o)"
    Control + b:8

You can use pretty much any unused key-combination with or without the
mouse as trigger.

(that ~/bin/browser is just my little wrapper-shellscript adding e.g. 
a profile option, a '-new-tab' if the browser is already running or
calling another unliked, but needed for some specific pages, browser...)

Ah: x11-misc/xbindkeys x11-misc/xsel

HTH,
-dnh

[1] https://github.com/sigpipe/urlview/issues

-- 
Door: Something a cat wants to be on the other side of


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] Anyone using extract_url with mutt?
  2020-11-26  7:19 [gentoo-user] Anyone using extract_url with mutt? Walter Dnes
  2020-11-26  8:11 ` David Haller
@ 2021-04-24  7:40 ` Nils Freydank
  2021-04-28  1:18   ` Walter Dnes
  1 sibling, 1 reply; 8+ messages in thread
From: Nils Freydank @ 2021-04-24  7:40 UTC (permalink / raw
  To: gentoo-user

Hi Walter,

in case your problem isn't already solved net-mail/urlscan[1] might be an
alternative. Currently I maintain it in my overlay[2]. I just use it with
xdg-open or KDE's URL-click-behaviour, but according to the urlscan readme you
can "Run a command with the selected URL as the argument or pipe the selected
URL to a command." which sounds to me as your workflow.

In neomutt I use the following macro to just get all the URLs printed:
'macro pager \cb "<pipe-message> urlscan<Enter>" "description..."'

I think you could use the '--run' parameter (or the '--pipe' one if palemoon
supports that) and extend my macro to something like this:

macro pager \cb "<pipe-message> urlscan --run \
	 '/home/waltdnes/pm/palemoon/palemoon -new-instance -p email {}' \
	<Enter>" "Open URLs in palemoon in a special profile."

Note that I test neither '--run' nor '--pipe' nor the extended macro.

[1] https://github.com/firecat53/urlscan
[2] https://git.holgersson.xyz/foss/holgersson-overlay/src/branch/master/net-mail/urlscan

Best regards,
Nils


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] Anyone using extract_url with mutt?
  2021-04-24  7:40 ` Nils Freydank
@ 2021-04-28  1:18   ` Walter Dnes
  2021-04-28  4:18     ` Steve Kollios
  2021-04-29 12:35     ` Nils Freydank
  0 siblings, 2 replies; 8+ messages in thread
From: Walter Dnes @ 2021-04-28  1:18 UTC (permalink / raw
  To: gentoo-user

On Sat, Apr 24, 2021 at 07:40:35AM +0000, Nils Freydank wrote
> Hi Walter,
> 
> in case your problem isn't already solved net-mail/urlscan[1] might
> be an alternative. Currently I maintain it in my overlay[2]. I just
> use it with xdg-open or KDE's URL-click-behaviour, but according to
> the urlscan readme you can "Run a command with the selected URL as
> the argument or pipe the selected URL to a command." which sounds
> to me as your workflow.

  Thanks.  I simply want a list of URLs that I can select to open in
Pale Moon.  If I can copy URLs into the paste buffer, even better.  It's
been a long while since I last used an overlay.  What are the steps to
setting up "urlscan" in an overlay?  Even more basic, what are the steps
to setting up an overlay?  My /etc/portage/repos.conf/

ll /etc/portage/repos.conf/
total 20
drwxr-xr-x 2 root root 4096 Dec 14 12:31 .
drwxr-xr-x 9 root root 4096 Mar  5 20:41 ..
-rw-r--r-- 1 root root  291 Dec 14 12:31 gentoo.conf
-rw-r--r-- 1 root root   74 Oct 26  2017 local.conf
-rw-r--r-- 1 root root   42 Oct 26  2017 localrepo.conf

=========

cat /etc/portage/repos.conf/gentoo.conf
[DEFAULT]
main-repo = gentoo

[gentoo]
location = /usr/portage
sync-type = rsync
sync-uri = rsync://rsync.gentoo.org/gentoo-portage
auto-sync = yes
sync-rsync-verify-metamanifest = no

# for daily squashfs snapshots
#sync-type = squashdelta
#sync-uri = mirror://gentoo/../snapshots/squashfs

=========

cat /etc/portage/repos.conf/local.conf 
[localrepo]
location = /usr/local/portage
masters = gentoo
auto-sync = no

=========

cat /etc/portage/repos.conf/localrepo.conf 
[localrepo]
location = /usr/local/portage

-- 
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] Anyone using extract_url with mutt?
  2021-04-28  1:18   ` Walter Dnes
@ 2021-04-28  4:18     ` Steve Kollios
  2021-04-30  0:33       ` Walter Dnes
  2021-04-30  0:36       ` Walter Dnes
  2021-04-29 12:35     ` Nils Freydank
  1 sibling, 2 replies; 8+ messages in thread
From: Steve Kollios @ 2021-04-28  4:18 UTC (permalink / raw
  To: gentoo-user

On Tue, Apr 27, 2021 at 09:18:14PM -0400, Walter Dnes wrote:
> On Sat, Apr 24, 2021 at 07:40:35AM +0000, Nils Freydank wrote
> > Hi Walter,
> > 
> > in case your problem isn't already solved net-mail/urlscan[1] might
> > be an alternative. Currently I maintain it in my overlay[2]. I just
> > use it with xdg-open or KDE's URL-click-behaviour, but according to
> > the urlscan readme you can "Run a command with the selected URL as
> > the argument or pipe the selected URL to a command." which sounds
> > to me as your workflow.
> 
>   Thanks.  I simply want a list of URLs that I can select to open in
> Pale Moon.  If I can copy URLs into the paste buffer, even better.  It's
> been a long while since I last used an overlay.  What are the steps to
> setting up "urlscan" in an overlay?  Even more basic, what are the steps
> to setting up an overlay?  My /etc/portage/repos.conf/
> 
> ll /etc/portage/repos.conf/
> total 20
> drwxr-xr-x 2 root root 4096 Dec 14 12:31 .
> drwxr-xr-x 9 root root 4096 Mar  5 20:41 ..
> -rw-r--r-- 1 root root  291 Dec 14 12:31 gentoo.conf
> -rw-r--r-- 1 root root   74 Oct 26  2017 local.conf
> -rw-r--r-- 1 root root   42 Oct 26  2017 localrepo.conf
> 
> =========
> 
> cat /etc/portage/repos.conf/gentoo.conf
> [DEFAULT]
> main-repo = gentoo
> 
> [gentoo]
> location = /usr/portage
> sync-type = rsync
> sync-uri = rsync://rsync.gentoo.org/gentoo-portage
> auto-sync = yes
> sync-rsync-verify-metamanifest = no
> 
> # for daily squashfs snapshots
> #sync-type = squashdelta
> #sync-uri = mirror://gentoo/../snapshots/squashfs
> 
> =========
> 
> cat /etc/portage/repos.conf/local.conf 
> [localrepo]
> location = /usr/local/portage
> masters = gentoo
> auto-sync = no
> 
> =========
> 
> cat /etc/portage/repos.conf/localrepo.conf 
> [localrepo]
> location = /usr/local/portage
> 
> -- 
> Walter Dnes <waltdnes@waltdnes.org>
> I don't run "desktop environments"; I run useful applications
>

Hi Walter, 

I'd be interested to see how this integrates in your workflow, I'm
looking for a similar solution myself. The current functionality of
mutt/neomutt leaves a bit to be desired when using it as described.

P.S thank you Nils for introducing this to me, I will likely take the
plunge in the near future.

- Steve



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] Anyone using extract_url with mutt?
  2021-04-28  1:18   ` Walter Dnes
  2021-04-28  4:18     ` Steve Kollios
@ 2021-04-29 12:35     ` Nils Freydank
  1 sibling, 0 replies; 8+ messages in thread
From: Nils Freydank @ 2021-04-29 12:35 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1102 bytes --]

Hi Walter,

Am Dienstag, den 27.04.2021 schrieb Walter Dnes <waltdnes@waltdnes.org>:
>   Thanks.  I simply want a list of URLs that I can select to open in
> Pale Moon.  If I can copy URLs into the paste buffer, even better.  It's
> been a long while since I last used an overlay.  What are the steps to
> setting up "urlscan" in an overlay?  Even more basic, what are the steps
> to setting up an overlay?  My /etc/portage/repos.conf/
I just drop you two links to the wiki, which do explain both an overlay from
an external/remote/foreign source aswell as a local-only overlay. I do prefer
app-eselect/eselect-repository over layman, but that is just personal
preference.

remote/foreign source:
https://wiki.gentoo.org/wiki/Ebuild_repository

local only:
https://wiki.gentoo.org/wiki/Custom_ebuild_repository

You already have a local repo in /usr/local/portage, so could use this:
> cat /etc/portage/repos.conf/localrepo.conf 
> [localrepo]
> location = /usr/local/portage

Hope that helps and feel free to come back and ask if you get stuck somewhere.
Best regards,
Nils

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 963 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] Anyone using extract_url with mutt?
  2021-04-28  4:18     ` Steve Kollios
@ 2021-04-30  0:33       ` Walter Dnes
  2021-04-30  0:36       ` Walter Dnes
  1 sibling, 0 replies; 8+ messages in thread
From: Walter Dnes @ 2021-04-30  0:33 UTC (permalink / raw
  To: gentoo-user

On Wed, Apr 28, 2021 at 12:18:42PM +0800, Steve Kollios wrote
> 
> I'd be interested to see how this integrates in your workflow, I'm
> looking for a similar solution myself. The current functionality of
> mutt/neomutt leaves a bit to be desired when using it as described.

 I read email with mutt in an xterm.  Here's my current my current,
deprecated, setup with Urlview.  It's a two-step process...

1) In "~/.mutt/muttrc" in the "Macros" section, as one long line, tell
mutt to feed the message through "urlview" when you hit uppercase U,
either {SHIFT}{U} or "u" with {CAPSLOCK} enabled.

macro pager U ":set pipe_decode\n|urlview\n:unset pipe_decode\n" "extract URLs out of a message"

2) In "~/.urlview" two lines tell Urlview what regexp to match as a URL
and what to do when the user selects a URL.  I don't know if the
"width/height" parameters are honoured any more in Pale Moon

REGEXP (((https?|ftp)|mailto):(//)?[^ >"\t]*|www\.[-a-z0-9.]+)[^ .,;\t>">\):]
COMMAND palemoon -width 950 -height 1050 -P email %s &

  My workflow is...

* I'm reading an email, and I come across a URL I want to look at.

* I hit {SHIFT}{U} and a list of URLS from that email pops up at the top.
  See the attached PNG image.  I'm using a "what's coming soon" email
  from Netflix as an example.

* Use the UP and DOWN keys on the keyboard to select the URL you're
  interested in, i.e the arrow at the left of the image.

* Hit {ENTER} and the selected URL shows up at the bottom of my xterm.
  I can edit the URL if it want to.  Hitting {ENTER} again launches the
  command (i.e. Pale Moon with the the email profile), or {CTRL}{C}
  backs out.

-- 
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] Anyone using extract_url with mutt?
  2021-04-28  4:18     ` Steve Kollios
  2021-04-30  0:33       ` Walter Dnes
@ 2021-04-30  0:36       ` Walter Dnes
  1 sibling, 0 replies; 8+ messages in thread
From: Walter Dnes @ 2021-04-30  0:36 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 214 bytes --]

> I'd be interested to see how this integrates in your workflow,

  Oops, forgote the attachment.  Here it is.

-- 
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications

[-- Attachment #2: urlview.png --]
[-- Type: image/png, Size: 29457 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-04-30  0:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-26  7:19 [gentoo-user] Anyone using extract_url with mutt? Walter Dnes
2020-11-26  8:11 ` David Haller
2021-04-24  7:40 ` Nils Freydank
2021-04-28  1:18   ` Walter Dnes
2021-04-28  4:18     ` Steve Kollios
2021-04-30  0:33       ` Walter Dnes
2021-04-30  0:36       ` Walter Dnes
2021-04-29 12:35     ` Nils Freydank

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox