From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yKVaFBUPWGHJUgAAgWs5BA (envelope-from ) for ; Sat, 02 Oct 2021 09:49:41 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 3AHWDxUPWGHlHAAAbx9fmQ (envelope-from ) for ; Sat, 02 Oct 2021 07:49:41 +0000 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 83D512C212 for ; Sat, 2 Oct 2021 09:49:40 +0200 (CEST) Received: from localhost ([::1]:54306 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWZm7-0004vo-KO for larch@yhetil.org; Sat, 02 Oct 2021 03:49:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46470) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWZlT-0004vf-1f for emacs-orgmode@gnu.org; Sat, 02 Oct 2021 03:48:59 -0400 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]:33750) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWZlO-00020n-96 for emacs-orgmode@gnu.org; Sat, 02 Oct 2021 03:48:58 -0400 Received: by mail-pg1-x529.google.com with SMTP id a73so8652216pge.0 for ; Sat, 02 Oct 2021 00:48:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:user-agent:from:to:subject:date:in-reply-to:message-id :mime-version; bh=Rr7hVPTn4oWMtmWyA/dqYfInDlw51o30QxJyWbWI3N8=; b=XHr2JXkBzpnJW2sEauQBh5VAW1QXgHZlQl3LbmufoWDvPSlYDhNoMLYZ/739ddUeBL nOpDBW+IXaECmUJ9enOF1MoAJvylbzlsZeuunISmKSkgGvHh30wJal0+5cPQQ9IdQU11 APDLCJQA0K+OicQ+e6cZ3QbsCHVaLiNxh4gaTniYPlIw7KVX5t18ocjH4hE/m6JxfR9I 8iemGUEmq9tvHGLHNGTMep8q113tRMlEKiYxhsMuuoIJefK265tQjjmoTlxwh4Bj7DmU 8V84zdelj41s+mpKRAi5H2r9MOwcOYsg4wSY5MGycEAwQtvyq8wOq1BabbpcEai38HFC nq7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:references:user-agent:from:to:subject:date :in-reply-to:message-id:mime-version; bh=Rr7hVPTn4oWMtmWyA/dqYfInDlw51o30QxJyWbWI3N8=; b=kh3d+DwMIxfN+t25ZQ9uKNxGwN9CcXQbFV8LmMmeHoBxrnwtLR3EDpEUF33Z62w5g6 OnW6MFlIKnZItJItEkV/O10HcBgFWnXx749s1NeNsfRCn0axmiuG4sGyEsA/DY7y9S7w orGbauDsHs64czKDTvHrGM9lLcdLqXtdxifJBuCkZpReggACh88ICSDBVg+fMfMJnT6K o9RgqcoWgg0rcDYjmKF0xKfZ3V7TSf0srYDGAS77GQPiq0Sm3gm1dXGt88y/NYAaVZU7 sQlk3p95zi4omrXzW8nVYSQurXGcPnMIztFL1YCZ3WInWqLkfX4YTz3jKFANxQhFNVHN E+dw== X-Gm-Message-State: AOAM530vOdRLlhWrV6LHcQF2eYcBvn+8GLxe22njFDpKKZ5oAGkXOacZ 2WPBuoQsuusUCtlpBNWfIF48NVdlb7w= X-Google-Smtp-Source: ABdhPJx9iitt9emS0V1r0coDRPqSF2QOj5tYXIi0ZLudeOL3HYWg9EE7BKHEnYpqduWVuWGdgUZcPA== X-Received: by 2002:a62:cd0f:0:b0:447:b8fe:d6c2 with SMTP id o15-20020a62cd0f000000b00447b8fed6c2mr15174970pfg.70.1633160931936; Sat, 02 Oct 2021 00:48:51 -0700 (PDT) Received: from tim-desktop ([124.149.106.198]) by smtp.gmail.com with ESMTPSA id x8sm8316659pfq.131.2021.10.02.00.48.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Oct 2021 00:48:51 -0700 (PDT) References: <03D77FFE-6631-44E1-A77B-F074588AAB3B@traduction-libre.org> User-agent: mu4e 1.7.0; emacs 28.0.60 From: Tim Cross To: emacs-orgmode@gnu.org Subject: Re: Elegant way to export org to Markdown ? Date: Sat, 02 Oct 2021 17:44:06 +1000 In-reply-to: <03D77FFE-6631-44E1-A77B-F074588AAB3B@traduction-libre.org> Message-ID: <878rzbhnog.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::529; envelope-from=theophilusx@gmail.com; helo=mail-pg1-x529.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1633160980; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=Rr7hVPTn4oWMtmWyA/dqYfInDlw51o30QxJyWbWI3N8=; b=obx7X1npsRMj1b48LMkYAYs0n+cQN2SxFuhI7d/fDUoO/LbbxcdSy/ORwtekXg9pH7lLv/ 0Mx8HfwqWlaQmUPwDr/nisr2THT5AiLvrTrVlXWfj40SQdQ1DfY29P6LclGPlJQM6O2OxL BWvlD+TVRyaNugKsAGAsddyvAO2R+nt9MhbpRoCdHIX6pE57xTTY1MUtvlcm3A38qi+5Us GBpdFRkuH6G4MZ4kNAYwrOraLVPp6FVKKvYCi7079mFg+94JCRRNQjDUfmvB5ZrXiTX230 nwIsgW0KtZ6vSqa9E7lJ6ZN8arBLkjIHu7C7V56Wp38DoHklGXbSLOARitGP4A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633160980; a=rsa-sha256; cv=none; b=t8dcLCmJJoTI71QerT7hvmIOD9mTXSK2k6hMgzF7JNWVv4TtU15wKwvAa59YY0k7Kqghnc aaQdCHuZx76blrtgN0AqE848av1uYlcC0fGp2zKhFEWbgDiAewoXG6M8qVNGxCD2KzPddW /b3A+SJULDjPpK3quqI+SB0jQaRRjLKL56x9O1W8vagI20Dd6oZQv5Muz7jqdLjjcxHJrI Rs8uEHHmAAiTnyZ9e7KHnbycjvZjpvLSL+p+HwRCId0jUIuCN5DV0q0THVUJCSkNtQnygU k8d/WpOBFrOiZ+CUAEH//oWQLjAmYuEbfSrM9f/NmBX+GvtXWY1J/muFCygYMg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=XHr2JXkB; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -0.61 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=XHr2JXkB; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 83D512C212 X-Spam-Score: -0.61 X-Migadu-Scanner: scn0.migadu.com X-TUID: fXGwrODWj+AA Jean-Christophe Helary writes: > I'm trying to work with SourceHut (sr.ht) and right now they only accept Markdown syntax for their readme/wiki files. > > Since I work in Emacs/org-mode to write my documents (and try to stick to that), > I'd like to know if there is an elegant way to export org syntax to MarkDown. > > I was thinking that the export-dispatch had an option for Plain Text / Markdown, but that doesn't seem to be the case. > > As a workaround, I thought I'd work on a README.org file that I export to HTML, > change the name to .md and edit the contents to reduce the markup to the strict > minimum... But when I saw the contents of the HTML, I thought that would be way > too much work. > > *BUT* MarkDown bien basically HTML *without* the head/body tags, it seems to me > that the HTML export-dispatch thing could have a "super simplified MD > compatible" HTML option... > > Either way, I need a method to export to something that sr.ht will recognize and process as MD so: > > 1) is there an external "approved" process to convert org-mode syntaxt to an MD-compatible format ? > 2) if no, what is the not too hard way to hack the HTML output to produce what I need with export-dispatch ? > Org does have an exporter for markdown. You need to enable it (see the manual). Note that 'markdown' is a somewhat generic term - there is no 'standard' for markdown. This means that the markdown generated by org may not be the same syntax as the markdown supported by sourceHut. A similar issue exists with github and as a result, there is also an external package which can add github flavoured markdown to org. If sourceHut markdown is not the same as org's markdown or the github flavored markdown, it may be necessary to write a sourceHut flavored markdown exporter (probably fairly easy to do using the existing ox-md as a starting point).