From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31895 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "balaj...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" Newsgroups: gmane.text.pandoc Subject: Re: Removing local URL protocols when converting to HTML? Date: Tue, 20 Dec 2022 02:32:23 -0800 (PST) Message-ID: <115263e1-d1c1-45b6-b812-bce6f074f459n@googlegroups.com> References: <732b167f-0380-8ba6-9385-762601ee4b56@gmail.com> <87sfhatx3m.fsf@zeitkraut.de> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_6752_667996363.1671532343564" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35049"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDV6VCFWSEDRBOM6Q2OQMGQEHH4PHAI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Dec 20 11:32:29 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f58.google.com ([209.85.210.58]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1p7ZvA-00090W-Us for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 20 Dec 2022 11:32:28 +0100 Original-Received: by mail-ot1-f58.google.com with SMTP id l31-20020a9d1b22000000b0066c48e9249fsf6805473otl.5 for ; Tue, 20 Dec 2022 02:32:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :sender:from:to:cc:subject:date:message-id:reply-to; bh=3s7zdv9/i4pG56OEiOdiEfry9xrDnE18pGTSCX6ckS0=; b=RorOjZ9H+10zFX0uSLSjc8CXIVjYdoHGC0eHlY89gfqimF5CKqTi4yyTh7jUadTvMu QUwZqGlqhuYrkiBmQO7H1X72hNtHfHY1acPaSmm/M0OPtta4Y+KxgDeY5j4o23GwY28u MA1QLY3iQ5zAXIWiDrn4bQAW5WB9dgbLXukgkly1OcZbc1KToNM0p6qJGtIv5YcPBONC 8lC/+DMFAyQErj3czOOylqrm76uiqQsCHtMSV/5HyhR+xeXiIgXiN9X5K2Zz4TUYaKXN l5Xyms8u6h39zwV5RIa7hKuKaqWLRJFcFh1qSjGszTn7AxmiI2+mQE1PR01ijqXpDuPp ZB0A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=3s7zdv9/i4pG56OEiOdiEfry9xrDnE18pGTSCX6ckS0=; b=M5gm6wluVfInywnxhbByJeQ9tv52bK1xGdiPOxDPW74ZdvlRegZ7a8frt7hil7Bvg8 RA2pc0/yZd4pgUlt1dHSWl0fwFXejN7erIMM0W4uorCS32iESLPpV7Aif5pNuODHTemY 2GydDPBBBXLi80k9JyTJNQ4Cz230KHlUy3R5aUZHJ54KeqLaF6li9mr4UQGpBkO6p3ki qszimP4I0e3x3B+zN/5+AiUxMWm+MkDumy+s9GvqZY3/D+4EOmQ/ugqkZ8/4qKFd2eBj WiMrf7yxnWXdm4TR7lk61yugMIb038l0mVdWm5n7ojP9Dgd/03Wv+shizJxr+eZDy5os YuAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-sender:mime-version:subject:references:in-reply-to :message-id:to:from:date:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=3s7zdv9/i4pG56OEiOdiEfry9xrDnE18pGTSCX6ckS0=; b=GOjuk3gNyHiLEH7vaG9QCY08O+T1SnbZ+ytwEbhRxPLQuE9agO9iiA1/X9epJst9N7 iKiTOgp7qV+AtYGo3V1rqjxLP74gLe2PYUl8xER1n9O/DHsJhEWyL8UQs1IJJkNCHP19 2y/K4HXMzwqkN9/MWbPgNPbi4t39jo0u7HKdVpKsKY79+qeJFZSfUoWV6C5xTJwArchr un6uyW1kyIIroYOy4FyQAyahdgDuqQjBJbFj0UezwVbO/6BJE1X411pCWd//wK1Wggoe fNIJgB7phAAUd9dU1uvXPB9q9x9mebMJZ/9z9jPdZ5WarkoXGbg0eJXaqDWvdben1yn4 UUlQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AFqh2koGJ8TM556k8svaYi3jFJTxnrNbCHgfTv5XfGCSvIfk7xceos/7 LTx+v4JjoF/T4wTOJh0+754= X-Google-Smtp-Source: AMrXdXtjzos72cX8TaaksRy0YCfyKM7ByED/OOVKAQX6996b7/nqOUuqXmAz6UWIAfpMA8inFa/sEg== X-Received: by 2002:a05:6808:1809:b0:360:4555:db0f with SMTP id bh9-20020a056808180900b003604555db0fmr1148941oib.100.1671532347781; Tue, 20 Dec 2022 02:32:27 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6870:8c18:b0:14b:ee4a:23be with SMTP id ec24-20020a0568708c1800b0014bee4a23bels3000952oab.3.-pod-prod-gmail; Tue, 20 Dec 2022 02:32:24 -0800 (PST) X-Received: by 2002:a05:6870:17a9:b0:144:cb2d:1705 with SMTP id r41-20020a05687017a900b00144cb2d1705mr1394549oae.43.1671532344446; Tue, 20 Dec 2022 02:32:24 -0800 (PST) In-Reply-To: <87sfhatx3m.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> X-Original-Sender: balaji.dutt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:31895 Archived-At: ------=_Part_6752_667996363.1671532343564 Content-Type: multipart/alternative; boundary="----=_Part_6753_1344512565.1671532343564" ------=_Part_6753_1344512565.1671532343564 Content-Type: text/plain; charset="UTF-8" Worked well enough for me. Thank you very much! On Tuesday, 20 December 2022 at 14:20:37 UTC+8 Albert Krewinkel wrote: > You probably want a filter like this (untested): > > ``` lua > function Link (link) > if link.target:match '^outlook:' then > return link.content > end > end > ``` > > Balaji Dutt writes: > > > Hello, > > > > > > I am using Dendron as a personal knowledge management solution and > > from time to time, need to send some meeting notes that I take to > > others. Typically, my meeting notes will look something like this: > > > > > > #### Notes > > 1. Steal Underpants > > 2. ??? > > 3. Profit! > > > > #### References > > - [Plan for world domination](outlook:) > > - [Contingency Plan](https://www.example.com) > > > > > > As you can see the "References" section includes a "link" to an > > Outlook GUID. I'm using the Outlook Protocol handler (More info) to > > deep link to specific messages in my Inbox. > > > > Now while this works really nicely for me, it's not very useful when > > I share my notes with others. I'm trying to figure out if there's a > > way for me in Pandoc to setup a filter such that if Pandoc encounters > > these type of "outlook" links, it deletes the link leaving just the > > Link description. In other words, the output HTML for the above > > example would (ideally) look like this: > > > > > >

Contingency Plan > > > > > > > > I've tried various combinations of keywords on "url", "filter", > > "link" etc but that has not yielded much result. I'm pretty sure this > > is not a very common problem and hence I'm hoping the group can help > > me figure out. > > > > I should also say as I'm using pandoc at my $dayjob which is a > > heavily restricted environment, I'm limited to an extremely old > > version of pandoc (v2.2.3) which is very unfortunate but also not > > easily resolvable. > > > > -- > > Balaji Dutt > > > -- > Albert Krewinkel > GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124 > -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/115263e1-d1c1-45b6-b812-bce6f074f459n%40googlegroups.com. ------=_Part_6753_1344512565.1671532343564 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Worked well enough for me. Thank you very much!

On Tuesday, 20 December 2022 = at 14:20:37 UTC+8 Albert Krewinkel wrote:
You probably want a filter like this (untested= ):

``` lua
function Link (link)
if link.target:match '^outlook:' then
return link.content
end
end
```

Balaji Dutt <balaj...@gma= il.com> writes:

> Hello,
>
>
> I am using Dendron as a personal knowledge management solution and
> from time to time, need to send some meeting notes that I take to
> others. Typically, my meeting notes will look something like this:
>
>
> #### Notes
> 1. Steal Underpants
> 2. ???
> 3. Profit!
>
> #### References
> - [Plan for world domination](outlook:<GUID>)
> - [Contingency Plan](https://www.example= .com)
>
>
> As you can see the "References" section includes a "= ;link" to an
> Outlook GUID. I'm using the Outlook Protocol handler (More inf= o) to
> deep link to specific messages in my Inbox.
>
> Now while this works really nicely for me, it's not very usefu= l when
> I share my notes with others. I'm trying to figure out if ther= e's a
> way for me in Pandoc to setup a filter such that if Pandoc encount= ers
> these type of "outlook" links, it deletes the link leavi= ng just the
> Link description. In other words, the output HTML for the above
> example would (ideally) look like this:
>
>
> <h4 id=3D"references>References</h4>
> <ul>
> <li>[Plan for world domination]</li>
> <li><a href=3D"https://www= .example.com>Contingency Plan</a></li>
> </ul>
>
>
> I've tried various combinations of keywords on "url"= , "filter",
> "link" etc but that has not yielded much result. I'm= pretty sure this
> is not a very common problem and hence I'm hoping the group ca= n help
> me figure out.
>
> I should also say as I'm using pandoc at my $dayjob which is a
> heavily restricted environment, I'm limited to an extremely ol= d
> version of pandoc (v2.2.3) which is very unfortunate but also not
> easily resolvable.
>
> --=20
> Balaji Dutt


--=20
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/115263e1-d1c1-45b6-b812-bce6f074f459n%40googlegroups.= com.
------=_Part_6753_1344512565.1671532343564-- ------=_Part_6752_667996363.1671532343564--