public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* pandoc.mediabag.lookup() always returns {nil, nil}
@ 2018-07-29 12:04 Axel Rauschmayer
       [not found] ` <7eacbff3-4554-42ac-a388-50575e2e61c7-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Axel Rauschmayer @ 2018-07-29 12:04 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 891 bytes --]

I’ve tried relative paths, but it even fails for me with the absolute path 
of a file that definitely exists:

local mimeType, contents = pandoc.mediabag.lookup(
"/Users/rauschma/tmp/latexboxes/img/icons/lightbulb-regular.jpg")
print(mimeType) -- "nil"

Any ideas as to what I’m doing wrong? Thanks!

-- 
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/7eacbff3-4554-42ac-a388-50575e2e61c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 1703 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: pandoc.mediabag.lookup() always returns {nil, nil}
       [not found] ` <7eacbff3-4554-42ac-a388-50575e2e61c7-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2018-07-29 14:19   ` Albert Krewinkel
       [not found]     ` <87h8kiazuu.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Albert Krewinkel @ 2018-07-29 14:19 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

pandoc.mediabag.lookup is intended to be used if the mediabag has
already been filled, e.g. when pandoc reads a docx document.

It looks like pandoc.mediabag.fetch is the function you are looking for,
possibly in combination with pandoc.mediabag.insert.

HTH

Axel Rauschmayer writes:

> I’ve tried relative paths, but it even fails for me with the absolute path
> of a file that definitely exists:
>
> local mimeType, contents = pandoc.mediabag.lookup(
> "/Users/rauschma/tmp/latexboxes/img/icons/lightbulb-regular.jpg")
> print(mimeType) -- "nil"
>
> Any ideas as to what I’m doing wrong? Thanks!


--
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe  e836 388d c0b2 1f63 1124

-- 
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/87h8kiazuu.fsf%40zeitkraut.de.
For more options, visit https://groups.google.com/d/optout.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: pandoc.mediabag.lookup() always returns {nil, nil}
       [not found]     ` <87h8kiazuu.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
@ 2018-07-29 22:21       ` Axel Rauschmayer
  0 siblings, 0 replies; 3+ messages in thread
From: Axel Rauschmayer @ 2018-07-29 22:21 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 691 bytes --]

Yes, indeed! Thanks for your answer! I had already found my mistake and 
deleted my post – for that reason.

-- 
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/984f31ba-9c36-4895-9f92-de764e4b558b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 1093 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-07-29 22:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-29 12:04 pandoc.mediabag.lookup() always returns {nil, nil} Axel Rauschmayer
     [not found] ` <7eacbff3-4554-42ac-a388-50575e2e61c7-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-07-29 14:19   ` Albert Krewinkel
     [not found]     ` <87h8kiazuu.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2018-07-29 22:21       ` Axel Rauschmayer

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).