I would like to create sketches from various file formats such as odt, doc (x) and ppt (x), as well as mp4, psd, tiff (and possibly others) from a Python application. As far as I know, for each of these formats there is at least one open source application that can generate preview images / thumbnails (e.g. LibreOffice, ffmpeg) or at least extract embedded thumbnails (e.g. imagemagick).
My main problem is that each of these applications / libraries uses different command-line options, so I'm looking for a Python library (or a unified CLI tool) that provides a high-level API for creating a sketch with the specified parameters, the quality level specified with file name, and invokes the appropriate external tool (ideally, including bycatch exceptions, segfaults, and timeouts). Bonus points if it can generate several thumbnails on demand (for example, one per page, page XY, every Z seconds, but no more than N images).
Does anyone know such a library / utility? (Boundary condition: files can contain sensitive material or can be quite large, so this should work without any network connection, using an external web service is impossible).
If Python doesn't have this kind of thing, a locally installed web service will also be great.
source
share