From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 2LdhCb+7nWZlQgAA62LTzQ:P1 (envelope-from ) for ; Mon, 22 Jul 2024 01:54:07 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 2LdhCb+7nWZlQgAA62LTzQ (envelope-from ) for ; Mon, 22 Jul 2024 03:54:07 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=V4KCyE+j; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1721613246; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=OKVwFmkgJ+lr5Qv1mmU+8ACt4AZQjX0eFGSzDsoqIKc=; b=hapSvB5AEngT9oP+iI3enNlq85gMwoDWe6RJWHATVk0wcwpXk18y7Cqcg3eT5ZERcrmkaT pYPUFn13Yc90pZp5fWepS0AeScVId9QWAO78akFqDXlxjiguhsY6CcqUN1SwyoG9NIST+y 6rSjR3JmT1/NeTwc7EUdzt/DSif++K/1zb/YozafEUp0jqm55bXYIaWCgjGddgzEkxTR4V Wp98baEZ3PxGRgnMPPhDQ0N1Dl7nIDFr4YCUW8g37hocGsf2uNlYewru5e8PgsqMxl+0P9 HPsEW0IKGLtAvmOPxA9zJcxaWjXf4apVF1Vx8hZI7ZvzIS9LdL7fWbSdIwibQQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=V4KCyE+j; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1721613246; a=rsa-sha256; cv=none; b=b5A/nxeELjpqi4nzahdaGRv/QHVPLGhgsVm/sieYlGIjgk+PM+787wVwwur9PoACjp4+pb Q0T9MzV+2tXfpX0HdUioAcY0rniSlHxeDq09NVOvYQ/IqwvtKavqRCMhpaknBPpQQ12EIm 7UV2mF/8nwzR+ho2FFRL4DxuLWMuYIMVBm9MHGBcUzlIhgpg0ct9BfVwMCei5OEFXwtK3N Qiaak9z9IYUdipmeNirrHpmuOq5RTTdEz6vua/IDb4nBjmbHMGe9urMwVPDxy7KcH600+v M3BET4fA/cuCDMRff9nXnlTOhZ9Irtg66IZxywRIF4+jwTv0182xIn7TJifZ1w== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B21F326BF9 for ; Mon, 22 Jul 2024 03:54:06 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sViET-0003m9-P6; Sun, 21 Jul 2024 21:52:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sViER-0003lK-RD for emacs-orgmode@gnu.org; Sun, 21 Jul 2024 21:52:55 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sViER-0006bp-Jd for emacs-orgmode@gnu.org; Sun, 21 Jul 2024 21:52:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=To:Subject:Date:From:In-Reply-To:References: MIME-Version; bh=OKVwFmkgJ+lr5Qv1mmU+8ACt4AZQjX0eFGSzDsoqIKc=; b=V4KCyE+j7z1W qGT60HkIOOioRJjXucF435owNFQELSuR33iVYVBehriGO6Fl27VktaVVIoizkZ3FGOFTkRGJFNCAI RF1OvwTK0RWRvnO4ejr00+6Rtex2ak+TMOXffv9aZQ5K3vT89iJqSQ3Bif32BqqCdpXjizTpVQO9n 0//R5JeyrdsM/1F0saZ/cBLMd5suaE8S6gpfl+fBAQNHpGlftmnd3SapTB7n0QAQXhVpb0+bpnyQj 7jodLihtELC+1bY+pGGltqeBTRkMnDCyeIpx7qI7nOFNEi0YGgMqXAAes/w7h6DP7PeLma1gSVinA Gh0Mn28Te6yQ6udFWxB1gg==; X-Gm-Message-State: AOJu0Yxg+9/0S1I6hfsJZgyGfT+34zcoxvXdYOcWjMB0ieFgRTx4DTGw UjUe32ZQ3mcyYWCEvDd1YhGsti5qyo+rSyxn0EFl9U1mP0gYVuoZSY3GlRmD/CPbWMA9XA3smBv 1Zdl96uV7jFRZPDnOrxkcMF/WXJc= X-Google-Smtp-Source: AGHT+IGIsdi+VTPUfyg0Sdw24l+npCxAEmrk8n5f5DJI2lL3EsmgpFAXR8fSnVgmua7HcOcNmme4WwKazsLMSCInoLA= X-Received: by 2002:a05:6102:390b:b0:492:aa07:26da with SMTP id ada2fe7eead31-492aa072969mr196865137.2.1721613174410; Sun, 21 Jul 2024 18:52:54 -0700 (PDT) MIME-Version: 1.0 References: <87r0c2d75g.fsf@k-7.ch> <871q42bo3u.fsf@catsu.it> In-Reply-To: <871q42bo3u.fsf@catsu.it> From: Robert Weiner Date: Sun, 21 Jul 2024 21:52:43 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Capture from Firefox to Org-mode To: Chris Keschnat Cc: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="000000000000b39c2b061dcc4d9f" X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: rswgnu@gmail.com Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -11.14 X-Migadu-Queue-Id: B21F326BF9 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -11.14 X-TUID: iotKuIbxiA+E --000000000000b39c2b061dcc4d9f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jul 9, 2024 at 11:08=E2=80=AFAM Chris Keschnat wro= te: > S=C3=A9bastien Gendre writes: > > Hi, > I'm not actively using this but I had it configured and just tested that > it works. It might not answer you're questions directly, but I hope it > helps. > > > How to capture data from a web page to Org-mode ? > > > > * What I need > > I want to be able to capture different kind of information : > > - Article, to read later > > - Book, with all its metadata (title, author, subject, etc) > > - Magazin, to buy later (title, editor, price, etc) > > - IRL event, that I want to go > > > > For each case, different kind of data is needed to be extracted from th= e > > web page and passed to Org-capture. > > This should all be possible. > > > * Capture Protocol > > > > I know it exist an org-protocol for capture, but after reading the > > manual (section 17.16.2 The capture protocol), there is something > > I did not understand. > > > > On the URL of the capture protocol, key value pairs can be specified. > > But are they a predefined set of keys, independent to the capture > > template, or are they related to the capture template special words (ex= : > > %a) ? > > > > Is it possible, with Org-protocol, to pass data to be stored into org > entry > > properties, or an arbitrary string ? > > Capturing the selection works. > > Sample capture templates: > #+begin_src emacs-lisp > ("p" "Protocol" entry (file+headline ,(concat my-org-dir "inbox.org") > "Inbox") > "* %^{Title}\nSource: %u, %c\n #+BEGIN_QUOTE\n%i\n#+END_QUOTE\n\n\n%?"= ) > > ("L" "Protocol Link" entry (file+headline ,(concat my-org-dir "inbox.or= g") > "Inbox") > "* %? [[%:link][%:description]] \nCaptured On: %U") > #+end_src > > > * Firefox extension for Org capture > > > > I have found 2 extensions for capturing to Org-mode from Firefox: > > > > - Org Capture (by Kosta): > > https://addons.mozilla.org/fr/firefox/addon/org-capture/ > > > > - org-protocol (by Wojciech Siewierski): > > https://addons.mozilla.org/fr/firefox/addon/org-protocol/ > > > > Which one do you suggest ? > > I'm using this one instead. > > Extension: https://github.com/Stebalien/org-capture-extension > Image of configured extension: https://0x0.st/XMHN.png > > PS: > I had also used this in the past. If you're willing to have a local > python script listening on a port instead of using org-protocol, > it might be an alternative. > > https://github.com/karlicoss/grasp > > --000000000000b39c2b061dcc4d9f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Tue, Jul 9, 2024 at 11:08=E2=80=AFAM Chris Keschnat <= chris@catsu.it> wrote:
S=C3=A9bastien Gendre <seb@k-7.ch> writes:

Hi,
I'm not actively using this but I had it configured and just tested tha= t
it works. It might not answer you're questions directly, but I hope it = helps.

> How to capture data from a web page to Org-mode=C2=A0?
>
> * What I need
> I want to be able to capture different kind of information=C2=A0:
> - Article, to read later
> - Book, with all its metadata (title, author, subject, etc)
> - Magazin, to buy later (title, editor, price, etc)
> - IRL event, that I want to go
>
> For each case, different kind of data is needed to be extracted from t= he
> web page and passed to Org-capture.

This should all be possible.

> * Capture Protocol
>
> I know it exist an org-protocol for capture, but after reading the
> manual (section 17.16.2 The capture protocol), there is something
> I=C2=A0did not understand.
>
> On the URL of the capture protocol, key value pairs can be specified.<= br> > But are they a predefined set of keys, independent to the capture
> template, or are they related to the capture template special words (e= x:
> %a)=C2=A0?
>
> Is it possible, with Org-protocol, to pass data to be stored into org = entry
> properties, or an arbitrary string=C2=A0?

Capturing the selection works.

Sample capture templates:
#+begin_src emacs-lisp
=C2=A0 ("p" "Protocol" entry (file+headline ,(concat my= -org-dir "inbox.org") "Inbox")
=C2=A0 =C2=A0"* %^{Title}\nSource: %u, %c\n #+BEGIN_QUOTE\n%i\n#+END_Q= UOTE\n\n\n%?")

=C2=A0 ("L" "Protocol Link" entry (file+headline ,(conc= at my-org-dir "inbox.org") "Inbox")
=C2=A0 =C2=A0"* %? [[%:link][%:description]] \nCaptured On: %U")<= br> #+end_src

> * Firefox extension for Org capture
>
> I have found 2 extensions for capturing to Org-mode from Firefox:
>
> - Org Capture (by Kosta):
>=C2=A0 =C2=A0https://addons.mozilla.org/= fr/firefox/addon/org-capture/
>
> - org-protocol (by Wojciech Siewierski):
>=C2=A0 =C2=A0https://addons.mozilla.org= /fr/firefox/addon/org-protocol/
>
> Which one do you suggest=C2=A0?

I'm using this one instead.

Extension: https://github.com/Stebalien/org-captur= e-extension
Image of configured extension: https://0x0.st/XMHN.png

PS:
I had also used this in the past. If you're willing to have a local
python script listening on a port instead of using org-protocol,
it might be an alternative.

https://github.com/karlicoss/grasp

--000000000000b39c2b061dcc4d9f--