From: David Sanson <dsanson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: A way to convert PDF to Markdown or other (Solution!)
Date: Tue, 19 Sep 2017 17:29:59 -0700 (PDT) [thread overview]
Message-ID: <8d8de477-28cb-4c44-8021-803c03baeb69@googlegroups.com> (raw)
In-Reply-To: <CAFVhNZOsud92D-3=vpWWBrzzc2m=HnDhe=pjqM6nPKtKBL90NQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 2013 bytes --]
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 <christi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> <javascript:>> 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 <javascript:>.
>> To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>> <javascript:>.
>> 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.
[-- Attachment #1.2: Type: text/html, Size: 4157 bytes --]
next prev parent reply other threads:[~2017-09-20 0:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-12 13:14 BP Jonsson
[not found] ` <a26eb786-3e48-671b-99ca-dbc3aeb274f5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-09-13 6:07 ` Kolen Cheung
[not found] ` <8cd2b406-4f28-4c44-9fe8-2ff183276db8-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-09-13 15:20 ` Paulo Ney de Souza
[not found] ` <CAFVhNZOsud92D-3=vpWWBrzzc2m=HnDhe=pjqM6nPKtKBL90NQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-09-20 0:29 ` David Sanson [this message]
2017-09-21 11:17 ` CR
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8d8de477-28cb-4c44-8021-803c03baeb69@googlegroups.com \
--to=dsanson-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).