From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31894 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Albert Krewinkel Newsgroups: gmane.text.pandoc Subject: Re: Removing local URL protocols when converting to HTML? Date: Tue, 20 Dec 2022 07:18:49 +0100 Message-ID: <87sfhatx3m.fsf@zeitkraut.de> References: <732b167f-0380-8ba6-9385-762601ee4b56@gmail.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5656"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCZJF7XJTILRBMVIQWOQMGQE3IO7M3Q-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Dec 20 07:20:39 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ej1-f55.google.com ([209.85.218.55]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1p7VzR-0001Ew-Vq for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 20 Dec 2022 07:20:37 +0100 Original-Received: by mail-ej1-f55.google.com with SMTP id hs18-20020a1709073e9200b007c0f9ac75f9sf7594519ejc.9 for ; Mon, 19 Dec 2022 22:20:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1671517237; cv=pass; d=google.com; s=arc-20160816; b=08tMcSyOgHfpYweOBs5/6RP0LWnPEll2pl1erkjBVPX6T3oB+K7J+1XohTFI5ZSxqa VXQ8bB1wCA7/UiC12gm5esp0APTgcHsfwS244ItV9uB54R9GdxTP5UpcVCUwrY3pFwi6 vBXAcUoEVRImA56zvnz0oYpd+JtAw8ggvdk94CS1wFFKLBKVOsZgDvmk1+K9fmNmrgwJ NlkqHf4w2B0/D0xmaiZUj3vmjY02R8p/r9pRYQ65GP9ienEzdPGTDP2I1hFWmKtTVrhX Icb2ZR52y7wbfvB/rBSrrEkx1AfYwsx+OtTG43Z9t1HNmZIXF004Zptl5tTTIIxwOR8a 32fA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:mime-version:message-id :in-reply-to:date:subject:to:from:references:sender:dkim-signature; bh=SwwiEJHnakK970nIWRirs2DrF8wQzptWD3+O3tY5PyQ=; b=NsA2chkgwSe902ZwEARQsvMZ1Zheajn9pYlHLWAOv/YEJjjiGjvGGryUuZHhCBbALl 9PhBGt87oS6swyrxjqhfO8+ssF6yk05tuaixUrsLwNfzMpvkOqTzx7zo1SrulrmlEQlV NI8wnUoSMtRDJo/ISs5Y2VDVwm8ygJhMmeG9HDPTX2WWR26HKR4b+AVqNb2jAK9/lyu4 nZrx3Behk99WSN1haYgommB0hSYSzp64Fx86zVEAwpRTDO7+lyx6ee4j5+Bb3QqyyLat iWEfzF0zmgVoYNFbfe1MS+dKxYd/y+tqI9uUwzQH++ktsu5zjSfsw3wIxcRR4IfyR+m3 d/gg== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 2001:67c:2050:0:465::202 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org 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-authentication-results:x-original-sender:mime-version :message-id:in-reply-to:date:subject:to:from:references:sender:from :to:cc:subject:date:message-id:reply-to; bh=SwwiEJHnakK970nIWRirs2DrF8wQzptWD3+O3tY5PyQ=; b=RxazJCO8C+vhDWcL0B0drLa/f8FrqcGgV6vBL72ZF9J08AbgzTGI3BC8rOgiQ7EE+B wL1kIv+F6nosyDOHi4EvWZna93njAUV1Wn2lwqRcw9aZ/40ibtTfL6V1Jzb0X2iOxLqJ 3iMWoK32KYZSiORPP6nYBCYlz1TEq2PFHKWQhenwcgXOTPeDKYHvF0Ve7VvILZbcslWw UXWQCVmj9Sd2IsiLXG7FfXGA5JGD/YctN4hAx5P3rQ2fJL4irD2X1hEfMVhQwFWMCGOU +IARqAGWkiniPBuNfx3/QEw2E8cmA78/OtS7hiqcAws1Fd4Pi53sSwhgkoEWbavavEox vVxA== 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-authentication-results:x-original-sender:mime-version :message-id:in-reply-to:date:subject:to:from:references :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=SwwiEJHnakK970nIWRirs2DrF8wQzptWD3+O3tY5PyQ=; b=E3H/em+oM9UKQ0dtJ75hU7Jhaw1xsnqsas7MamfesTenl+CdEzGXFh70+t+3UjoAG0 2k33tKETnMb/lAS87GUc/w3kVMM8mXZTam2P0qWzdLfYUh6B3hvgki7bwk+qgkxV2amt R0Rz2DsIaLwRAIXVio5DaJhTVqmCH85tkAjmQ9WR1AJF9auwQ4/7JtLRU9acWW5tY9cw MqDHPtSpML8f7e8zb5tqraPUUi7zl6Ah4Q7sBZWclrQqOTHICG8Km552QMBOQ90/oVQb p7GdzZuIUjuDGBEBRdAXb3L2MddKZkGut9PP0XKvCKF4GJ Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AFqh2kpzYy1qDv4ZyHqtAyua3pyQk4t7QgHf0ngCiMsLv5WqPo6lgBol KXzF8ZYOJsex/xb9VEHR7cE= X-Google-Smtp-Source: AMrXdXuL/P8TztbeqgNQ/lIgoGUYiyLySpFdZFsgBCLnGcMyHoRVSXaxBwQtKmpXKatougj9jpuukA== X-Received: by 2002:a05:6402:b84:b0:478:5688:7c9d with SMTP id cf4-20020a0564020b8400b0047856887c9dmr874937edb.89.1671517237643; Mon, 19 Dec 2022 22:20:37 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6402:3482:b0:45c:bfd9:fb45 with SMTP id v2-20020a056402348200b0045cbfd9fb45ls3625708edc.3.-pod-prod-gmail; Mon, 19 Dec 2022 22:20:33 -0800 (PST) X-Received: by 2002:a05:6402:3987:b0:467:e9a5:77c4 with SMTP id fk7-20020a056402398700b00467e9a577c4mr39996561edb.14.1671517233090; Mon, 19 Dec 2022 22:20:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671517233; cv=none; d=google.com; s=arc-20160816; b=KPxKtd9TXow4x1FEX4QfhAoW8Dfotsum/07PjzyB0n4RjRmJdBiIQIBEN4EWU7RkyU iLLVKMsumf80sVlOYDML+AVV5bDVT1gL9Kh7wtzTPFyR/HOq6Vjcb0MuT5xL7hkcn2Kj O6az1/n4XtHsk+Wr781fJih1m24QLVDeUY1n1ot9aGYQb3Wx6ohLRkrfkLnK0h7SOH9m Lj2fc1fkjToX1GD5G2IVK4FmZ3S6ZbARH5TrnwvZw/MgNX+DNkdB9pKZkCm8mgQrJ44m /5TxQHQHQNdU1/sFKkoMNPoxbDUj6qWvLBqSwrf1FT58ZL+3ruylG5Rv7aFLHy+ubhNo EeoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:in-reply-to:date:subject:to:from:references; bh=U65KT0hyXLd3xXgJWR0XpW6RSOgBCJeSpF8TdyFePXc=; b=lJhYhD9NwrOQlPeuRFaRaxI/InFATA7nihXc23t7Zi7HBb6r6XG7vT5FeH4CnpA1hw cstc9hRUchXdYrcKH/+8SYhY6XSBp17CV5fUuTwUvgZFO8qB1w57tfgOQpxecOI2NkGm 8uBJIuiqwuiXNUWgLrtb4Jb2Cv5snOvd+eRdw8Ydox9Lr6f3tScOp3ZgaLgIsC5rRUGz G27pAa0ip7HcZRUXCwR9r+UDcAbaSE3ltd3ctOSL/rXm4tcJHHnk85FNyr0/9cdMLn0u fU0sdrQyiP0CKA+4d/ywuZo+onDwfXmfETfbY67fp42uziMu4ZoSjy3eyGtkBmUBGt4i 9etA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 2001:67c:2050:0:465::202 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org Original-Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org. [2001:67c:2050:0:465::202]) by gmr-mx.google.com with ESMTPS id d4-20020aa7d684000000b004704657766csi509676edr.1.2022.12.19.22.20.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Dec 2022 22:20:33 -0800 (PST) Received-SPF: pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 2001:67c:2050:0:465::202 as permitted sender) client-ip=2001:67c:2050:0:465::202; Original-Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4Nbmf64R5xz9sc3 for ; Tue, 20 Dec 2022 07:20:30 +0100 (CET) In-reply-to: <732b167f-0380-8ba6-9385-762601ee4b56-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> X-Original-Sender: albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 2001:67c:2050:0:465::202 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@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:31894 Archived-At: 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