* Easy tool for quick conversions? @ 2022-12-22 22:13 Joseph Reagle [not found] ` <f8025d4d-99d5-dbae-011a-8320fe992cbc-T1oY19WcHSwdnm+yROfE0A@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: Joseph Reagle @ 2022-12-22 22:13 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw I sometimes want to quickly convert one format to another within my clipboard manager. For example, Wikimedia Commons can give you the HTML or BBCode to embed an image, but I prefer markdown. For this, I usually go to <https://pandoc.org/try/>, but I don't see support for parameters in its URL. (If it did, I could define some clipboard manager shortcuts to invoke common conversions via the web.) Or I sometimes want to convert from reference links to inline links or the reverse. I could write a script, making use of pbcopy/pbpaste, but was wondering what others do for these use cases? —Joseph -- 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/f8025d4d-99d5-dbae-011a-8320fe992cbc%40reagle.org. ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <f8025d4d-99d5-dbae-011a-8320fe992cbc-T1oY19WcHSwdnm+yROfE0A@public.gmane.org>]
* Re: Easy tool for quick conversions? [not found] ` <f8025d4d-99d5-dbae-011a-8320fe992cbc-T1oY19WcHSwdnm+yROfE0A@public.gmane.org> @ 2022-12-23 0:14 ` Daniel Staal [not found] ` <3f9886ae-c6f3-3843-d921-058592f28994-Jdbf3xiKgS8@public.gmane.org> 2022-12-23 0:49 ` John MacFarlane 1 sibling, 1 reply; 7+ messages in thread From: Daniel Staal @ 2022-12-23 0:14 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw On 12/22/22 5:13 PM, Joseph Reagle wrote: > I sometimes want to quickly convert one format to another within my > clipboard manager. For example, Wikimedia Commons can give you the HTML > or BBCode to embed an image, but I prefer markdown. > For this, I usually go to <https://pandoc.org/try/>, but I don't see > support for parameters in its URL. (If it did, I could define some > clipboard manager shortcuts to invoke common conversions via the web.) > Or I sometimes want to convert from reference links to inline links or > the reverse. > > I could write a script, making use of pbcopy/pbpaste, but was wondering > what others do for these use cases? > > —Joseph > As a Mac user, I use BBEdit. Paste in, and then feed to a short script that reads the source language from the BBEdit lang. I have several different scripts in the BBEdit scripts folder that I can apply, with different options. Daniel T. Staal -- --------------------------------------------------------------- This email copyright the author. Unless otherwise noted, you are expressly allowed to retransmit, quote, or otherwise use the contents for non-commercial purposes. This copyright will expire 5 years after the author's death, or in 30 years, whichever is longer, unless such a period is in excess of local copyright law. --------------------------------------------------------------- -- 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/3f9886ae-c6f3-3843-d921-058592f28994%40usa.net. ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <3f9886ae-c6f3-3843-d921-058592f28994-Jdbf3xiKgS8@public.gmane.org>]
* Re: Easy tool for quick conversions? [not found] ` <3f9886ae-c6f3-3843-d921-058592f28994-Jdbf3xiKgS8@public.gmane.org> @ 2022-12-23 0:19 ` Leonard Rosenthol 0 siblings, 0 replies; 7+ messages in thread From: Leonard Rosenthol @ 2022-12-23 0:19 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw [-- Attachment #1: Type: text/plain, Size: 2730 bytes --] I do exactly this with the Alfred workflow tool - https://www.alfredapp.com/. I have a variety of workflows setup for various conversions. Here's one for markdown->RTF, for pasting rich text into Office. pbpaste | pandoc --standalone --from=markdown --to=rtf --output=- | pbcopy Leonard On Thu, Dec 22, 2022 at 7:14 PM Daniel Staal <DStaal-Jdbf3xiKgS8@public.gmane.org> wrote: > On 12/22/22 5:13 PM, Joseph Reagle wrote: > > I sometimes want to quickly convert one format to another within my > > clipboard manager. For example, Wikimedia Commons can give you the HTML > > or BBCode to embed an image, but I prefer markdown. > > For this, I usually go to <https://pandoc.org/try/>, but I don't see > > support for parameters in its URL. (If it did, I could define some > > clipboard manager shortcuts to invoke common conversions via the web.) > > Or I sometimes want to convert from reference links to inline links or > > the reverse. > > > > I could write a script, making use of pbcopy/pbpaste, but was wondering > > what others do for these use cases? > > > > —Joseph > > > > As a Mac user, I use BBEdit. Paste in, and then feed to a short script > that reads the source language from the BBEdit lang. > > I have several different scripts in the BBEdit scripts folder that I can > apply, with different options. > > Daniel T. Staal > > -- > --------------------------------------------------------------- > This email copyright the author. Unless otherwise noted, you > are expressly allowed to retransmit, quote, or otherwise use > the contents for non-commercial purposes. This copyright will > expire 5 years after the author's death, or in 30 years, > whichever is longer, unless such a period is in excess of > local copyright law. > --------------------------------------------------------------- > > -- > 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/3f9886ae-c6f3-3843-d921-058592f28994%40usa.net > . > -- 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/CALu%3Dv3%2B_5%3DGYfG7DzfgKgOKOcfRPftwrHpbQd6uZPqiZyfmgDQ%40mail.gmail.com. [-- Attachment #2: Type: text/html, Size: 4010 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Easy tool for quick conversions? [not found] ` <f8025d4d-99d5-dbae-011a-8320fe992cbc-T1oY19WcHSwdnm+yROfE0A@public.gmane.org> 2022-12-23 0:14 ` Daniel Staal @ 2022-12-23 0:49 ` John MacFarlane [not found] ` <FD5D7595-2616-4561-B0DF-2AF5EF87D311-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 1 sibling, 1 reply; 7+ messages in thread From: John MacFarlane @ 2022-12-23 0:49 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw pandoc.org/try does support parameters, e.g. https://pandoc.org/try/?params=%7B%22text%22%3A%22%22%2C%22to%22%3A%22html5%22%2C%22from%22%3A%22markdown%22%2C%22standalone%22%3Afalse%2C%22embed-resources%22%3Afalse%2C%22table-of-contents%22%3Afalse%2C%22number-sections%22%3Afalse%2C%22citeproc%22%3Afalse%2C%22html-math-method%22%3A%22plain%22%2C%22wrap%22%3A%22auto%22%2C%22highlight-style%22%3Anull%2C%22files%22%3A%7B%7D%2C%22template%22%3Anull%7D value of params is a URI-encoded JSON string representing option settings. > On Dec 22, 2022, at 2:13 PM, Joseph Reagle <joseph.2011-T1oY19WcHSwdnm+yROfE0A@public.gmane.org> wrote: > > I sometimes want to quickly convert one format to another within my clipboard manager. For example, Wikimedia Commons can give you the HTML or BBCode to embed an image, but I prefer markdown. > For this, I usually go to <https://pandoc.org/try/>, but I don't see support for parameters in its URL. (If it did, I could define some clipboard manager shortcuts to invoke common conversions via the web.) Or I sometimes want to convert from reference links to inline links or the reverse. > > I could write a script, making use of pbcopy/pbpaste, but was wondering what others do for these use cases? > > —Joseph > > -- > 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/f8025d4d-99d5-dbae-011a-8320fe992cbc%40reagle.org. -- 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/FD5D7595-2616-4561-B0DF-2AF5EF87D311%40gmail.com. ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <FD5D7595-2616-4561-B0DF-2AF5EF87D311-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: Easy tool for quick conversions? [not found] ` <FD5D7595-2616-4561-B0DF-2AF5EF87D311-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2022-12-23 14:53 ` Joseph Reagle [not found] ` <67584db7-8d64-483f-37be-4497ae1d7dcd-T1oY19WcHSwdnm+yROfE0A@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: Joseph Reagle @ 2022-12-23 14:53 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw [-- Attachment #1: Type: text/plain, Size: 1238 bytes --] Thank you all! John, I didn't think pandoc/try supported parameters because the URL doesn't change after the conversion. Clicking your link below doesn't work for me, but perhaps that's because of email/URL character encoding issues? On 12/22/22 19:49, John MacFarlane wrote: > pandoc.org/try does support parameters, e.g. > > https://pandoc.org/try/?params=%7B%22text%22%3A%22%22%2C%22to%22%3A%22html5%22%2C%22from%22%3A%22markdown%22%2C%22standalone%22%3Afalse%2C%22embed-resources%22%3Afalse%2C%22table-of-contents%22%3Afalse%2C%22number-sections%22%3Afalse%2C%22citeproc%22%3Afalse%2C%22html-math-method%22%3A%22plain%22%2C%22wrap%22%3A%22auto%22%2C%22highlight-style%22%3Anull%2C%22files%22%3A%7B%7D%2C%22template%22%3Anull%7D > > value of params is a URI-encoded JSON string representing option settings. > -- 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/67584db7-8d64-483f-37be-4497ae1d7dcd%40reagle.org. [-- Attachment #2: SCR-20221223-dpn.png --] [-- Type: image/png, Size: 14383 bytes --] [-- Attachment #3: SCR-20221223-dpj.png --] [-- Type: image/png, Size: 10210 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <67584db7-8d64-483f-37be-4497ae1d7dcd-T1oY19WcHSwdnm+yROfE0A@public.gmane.org>]
* Re: Easy tool for quick conversions? [not found] ` <67584db7-8d64-483f-37be-4497ae1d7dcd-T1oY19WcHSwdnm+yROfE0A@public.gmane.org> @ 2022-12-26 22:50 ` John MacFarlane [not found] ` <ED5D1559-E16A-4A4D-958A-EB1254955E60-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: John MacFarlane @ 2022-12-26 22:50 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw Click the "permalink" link on the RH side after conversion, and the URL will change. > On Dec 23, 2022, at 6:53 AM, Joseph Reagle <joseph.2011-T1oY19WcHSwdnm+yROfE0A@public.gmane.org> wrote: > > Thank you all! > > John, I didn't think pandoc/try supported parameters because the URL doesn't change after the conversion. Clicking your link below doesn't work for me, but perhaps that's because of email/URL character encoding issues? > > On 12/22/22 19:49, John MacFarlane wrote: >> pandoc.org/try does support parameters, e.g. >> https://pandoc.org/try/?params=%7B%22text%22%3A%22%22%2C%22to%22%3A%22html5%22%2C%22from%22%3A%22markdown%22%2C%22standalone%22%3Afalse%2C%22embed-resources%22%3Afalse%2C%22table-of-contents%22%3Afalse%2C%22number-sections%22%3Afalse%2C%22citeproc%22%3Afalse%2C%22html-math-method%22%3A%22plain%22%2C%22wrap%22%3A%22auto%22%2C%22highlight-style%22%3Anull%2C%22files%22%3A%7B%7D%2C%22template%22%3Anull%7D >> value of params is a URI-encoded JSON string representing option settings. > > -- > 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/67584db7-8d64-483f-37be-4497ae1d7dcd%40reagle.org. > <SCR-20221223-dpn.png><SCR-20221223-dpj.png> -- 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/ED5D1559-E16A-4A4D-958A-EB1254955E60%40gmail.com. ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <ED5D1559-E16A-4A4D-958A-EB1254955E60-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: Easy tool for quick conversions? [not found] ` <ED5D1559-E16A-4A4D-958A-EB1254955E60-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2023-01-02 15:22 ` Joseph Reagle 0 siblings, 0 replies; 7+ messages in thread From: Joseph Reagle @ 2023-01-02 15:22 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw > Click the "permalink" link on the RH side after conversion, and the URL will change. Thank you. Ultimately, I'd like to make a bookmark with a query shortcut (i.e., `%s` in Chrome). The following does work: ``` https://pandoc.org/try/?params={"text":"<b>test</b>","to":"markdown","from":"html","standalone":false,"embed-resources":false,"table-of-contents":false,"number-sections":false,"citeproc":false,"html-math-method":"plain","wrap":"auto","highlight-style":null,"files":{},"template":null} ``` More complicated HTML, such as that given by Wikimedia Commons to embed an image doesn't because of character encoding (especially quotes). Not sure if there's a way around this. ``` <a title="Atanu Bose Photography, CC BY-SA 4.0 <https://creativecommons.org/licenses/by-sa/4.0>, via Wikimedia Commons" href="https://commons.wikimedia.org/wiki/File:Close_wing_position_mud-puddling_and_peeing_activity_of_Papilio_slateri_(Hewitson,1859)_%E2%80%93_Blue-striped_Mime_(Male).jpg"><img width="128" alt="Close wing position mud-puddling and peeing activity of Papilio slateri (Hewitson,1859) – Blue-striped Mime (Male)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c7/Close_wing_position_mud-puddling_and_peeing_activity_of_Papilio_slateri_%28Hewitson%2C1859%29_%E2%80%93_Blue-striped_Mime_%28Male%29.jpg/128px-Close_wing_position_mud-puddling_and_peeing_activity_of_Papilio_slateri_%28Hewitson%2C1859%29_%E2%80%93_Blue-striped_Mime_%28Male%29.jpg"></a> ``` -- 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/14fd90c1-73a2-7a1d-8b70-973b3694ff7b%40reagle.org. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-01-02 15:22 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-12-22 22:13 Easy tool for quick conversions? Joseph Reagle [not found] ` <f8025d4d-99d5-dbae-011a-8320fe992cbc-T1oY19WcHSwdnm+yROfE0A@public.gmane.org> 2022-12-23 0:14 ` Daniel Staal [not found] ` <3f9886ae-c6f3-3843-d921-058592f28994-Jdbf3xiKgS8@public.gmane.org> 2022-12-23 0:19 ` Leonard Rosenthol 2022-12-23 0:49 ` John MacFarlane [not found] ` <FD5D7595-2616-4561-B0DF-2AF5EF87D311-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2022-12-23 14:53 ` Joseph Reagle [not found] ` <67584db7-8d64-483f-37be-4497ae1d7dcd-T1oY19WcHSwdnm+yROfE0A@public.gmane.org> 2022-12-26 22:50 ` John MacFarlane [not found] ` <ED5D1559-E16A-4A4D-958A-EB1254955E60-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2023-01-02 15:22 ` Joseph Reagle
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).