* caching remote images
@ 2020-11-04 10:14 Jano Kula
0 siblings, 0 replies; only message in thread
From: Jano Kula @ 2020-11-04 10:14 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 993 bytes --]
Hello!
I'd like to cache images (order of hundreds) from a remote location (not
all the time mapped as drive, download speed and amount of data are also
the factors).
\usepath[dirfile://./resources/**] is likely for speeding up searching not
downloading and I don't know when new images are available (when to delete
dirlist.* files), as described in workflows-mkiv.pdf.
Looks like the cache parameter in \externalfigure is used only if some
conversion is going on.
I could create a conversion which does nothing or only envelopes JPG in PDF
as <id>.jpg.pdf (loading could be faster) and then:
if cached file exists
use cached <id>.jpg.pdf
else
if drive is mapped
download, convert and cache <id>.jpg
else
skip file
end
end
The source file with one <id> will never change or I could re-cache from
time to time to have up-to-date images cached.
Before reinventing the wheel: isn't such functionality or part of it
already available?
Thanks,
Jano
[-- Attachment #1.2: Type: text/html, Size: 1903 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-11-04 10:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-04 10:14 caching remote images Jano Kula
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).