From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/18193 Path: news.gmane.org!.POSTED!not-for-mail From: David Sanson Newsgroups: gmane.text.pandoc Subject: Re: A way to convert PDF to Markdown or other (Solution!) Date: Tue, 19 Sep 2017 17:29:59 -0700 (PDT) Message-ID: <8d8de477-28cb-4c44-8021-803c03baeb69@googlegroups.com> References: <8cd2b406-4f28-4c44-9fe8-2ff183276db8@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_7372_1280582412.1505867400109" X-Trace: blaine.gmane.org 1505867399 7437 195.159.176.226 (20 Sep 2017 00:29:59 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 20 Sep 2017 00:29:59 +0000 (UTC) To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCCNHI63UQBRBCPNQ3HAKGQEDS6C54Y-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Sep 20 02:29:54 2017 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-it0-f55.google.com ([209.85.214.55]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1duStm-0001hi-8G for gtp-pandoc-discuss@m.gmane.org; Wed, 20 Sep 2017 02:29:54 +0200 Original-Received: by mail-it0-f55.google.com with SMTP id i133sf946481ita.14 for ; Tue, 19 Sep 2017 17:30:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=sdOYpVTpPl0y4kjCrFcupb+1Y2YV7iborbGK7n1FDFo=; b=rqKR9KsjhkeHYOX4Qb5dvhkCJxwNPT+ZrQPZ2Dq5y2wxSqPqdHBhKjgnR3CsHh04dN Fie5vhHFJhBiSsN4yXsi8fi/N7dKhShfNtZDr1r+S2lbLDyVXlMO29LZ+pkYpYN/ufJH wKj/BVNgpSWaDex8VG82sfTPVm2o/3rv+URWSV29R4MFMmDbLWDFs4ETmCY7UwCS3nY6 u30x7WXLBGWJSMnUINGqAwpB/LW35sZ55TGsYkvqgv93xGbrABjzfahTeILkFIt8dwyj 37Tqj68SZsLwpa4C3MmPt/dzU/AXuAs7ZrAhkiVpx98pgJ7vTo3UKUtelVL8TvQWzRnv YPbQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=sdOYpVTpPl0y4kjCrFcupb+1Y2YV7iborbGK7n1FDFo=; b=hKORlEarI8PI8yq+nfglWWGPimeYF8DN6+UOORyLEujuWjVqGHx39viYGDlbcMiJrh bcph+OA9v5T9yeKKEMwAzzN2KuspdROGstgD+YvL8vvWOiMnSkIW22hvea1wOzmXklEc uLeE5zhbwEkv/Kcb+RH05j0q2ycJ45q4C0k61dgAugOp9ibWn0iwm8/n8F/7kYujygaF qa4Gx/cLxj11kU4Tw8n9J/Upqxw3yf8xYXcSgZhVCuMyQneuAtN2adVOSdDupZPTr+Gm nKTrnXnZJLE1wXu+YURrPJthhHlKW8zbx+BJyQAB6OivxTDqIJHf4MpC+D5Q6aDP9nSF AvWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=sdOYpVTpPl0y4kjCrFcupb+1Y2YV7iborbGK7n1FDFo=; b=gvlbey0o8NK6PEo9Rc/SR6iWTC+wv0uMpeGurK0Zmm0ZjGyzI8uSFg4pA8A8bYJJ8t mNPW/+y43/wdG+pgrkdcexGsbj4td32C1pCv2d3goYYfH8DQYUQUuZxIAoE8K44Khl/4 Z6Uq2vdTujY/6YHhIgOpDb+LxekWf8pnQz3RDp3JJlKeaQGCezWSrSJ8bsQ6YS+BYYDa 11byvr0E9dI1wrwWwmI5UepgG6Gh1ZVj0Rd7un+R4UTlRI9uZtVz+LZjpB+l2DqYDSva d7xvleVymfUdFWjlO599nhSMyTjwQfMH57oHAMcpmdNCxIm5ozbaiptyMfQeWhHPP/NS p8bQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AHPjjUjUPmBcIbL1VhJzISU5H13H5fYYGuT486ih8CVpdNxwKnGVvOru wrWIa70XkpmdxwEP9EXdZSA= X-Google-Smtp-Source: AOwi7QB8Fy2a40H4biRZbkUbNvGeuxKGo21Yc9DzDhW9jfKxcVbgAOj3NTjGKJJ+nV6A/zZMg43v+g== X-Received: by 10.36.211.15 with SMTP id n15mr16346itg.5.1505867401653; Tue, 19 Sep 2017 17:30:01 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.36.219.5 with SMTP id c5ls521783itg.2.gmail; Tue, 19 Sep 2017 17:30:00 -0700 (PDT) X-Received: by 10.36.86.131 with SMTP id o125mr16355itb.12.1505867400835; Tue, 19 Sep 2017 17:30:00 -0700 (PDT) In-Reply-To: X-Original-Sender: dsanson-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.org gmane.text.pandoc:18193 Archived-At: ------=_Part_7372_1280582412.1505867400109 Content-Type: multipart/alternative; boundary="----=_Part_7373_893655256.1505867400109" ------=_Part_7373_893655256.1505867400109 Content-Type: text/plain; charset="UTF-8" Here is a bash function that does it. It leaves the docx file in your working directory and pipes the markdown to STDOUT. function pdf2md() { key=$(gdrive import "$1" | cut -d' ' -f2) gdrive export "$key" --mime application/vnd.openxmlformats-officedocument.wordprocessingml.document pandoc "$1.docx" -t markdown -s } On Wednesday, September 13, 2017 at 10:20:20 AM UTC-5, Paulo Ney de Souza wrote: > > I would be interested in hearing how! > > Paulo Ney > > On Tue, Sep 12, 2017 at 11:07 PM, Kolen Cheung > wrote: > >> Sounds interesting. >> >> I used a cli tool for Google Drive before (gdrive), and for those who are >> interested, you probably can chain them together to upload a PDF and >> download a docx from it and pipe it from there. >> >> -- >> 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-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org . >> To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org >> . >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/pandoc-discuss/8cd2b406-4f28-4c44-9fe8-2ff183276db8%40googlegroups.com >> . >> For more options, visit https://groups.google.com/d/optout. >> > > -- 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/8d8de477-28cb-4c44-8021-803c03baeb69%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. ------=_Part_7373_893655256.1505867400109 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Here is a bash function that does it. It leaves the docx f= ile in your working directory and pipes the markdown to STDOUT.

function pdf2md() {
=C2=A0 =C2=A0key=3D$(gdrive impo= rt "$1" | cut -d' ' -f2)
=C2=A0 =C2=A0gdrive ex= port "$key" --mime application/vnd.openxmlformats-officedocument.= wordprocessingml.document
=C2=A0 =C2=A0pandoc "$1.docx"= -t markdown -s
}

On Wednesday, September 13, 2017 at 10= :20:20 AM UTC-5, Paulo Ney de Souza wrote:
I would be interested in hearing how!

=
Paulo Ney

On Tue,= Sep 12, 2017 at 11:07 PM, Kolen Cheung <christi...@gmail.c= om> wrote:
Sounds interesti= ng.

I used a cli tool for Google Drive before (gdrive), and for those who are i= nterested, you probably can chain them together to upload a PDF and downloa= d a docx from it and pipe it from there.

--
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 pandoc-discus...@googlegroups.com.
To post to this group, send email to pandoc-...@googlegroups.com.
To view this discussion on the web visit https://groups.g= oogle.com/d/msgid/pandoc-discuss/8cd2b406-4f28-4c44-9fe8-2ff18327= 6db8%40googlegroups.com.
For more options, visit https://groups.g= oogle.com/d/optout.

--
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/= msgid/pandoc-discuss/8d8de477-28cb-4c44-8021-803c03baeb69%40googlegroups.co= m.
For more options, visit http= s://groups.google.com/d/optout.
------=_Part_7373_893655256.1505867400109-- ------=_Part_7372_1280582412.1505867400109--