Hi Andrius,

Quoting Andrius Merkys (2020-10-31 07:20:11)
> SVG files sometimes contain licensing information, for example [1]:
> 
>       <cc:Work
>          rdf:about="">
>         <dc:format>image/svg+xml</dc:format>
>         <dc:type
>            rdf:resource="http://purl.org/dc/dcmitype/StillImage"; />
>         <cc:license
>            rdf:resource="http://creativecommons.org/licenses/GPL/2.0/"; />
>         <dc:title>Hard disk</dc:title>
>         <dc:creator>
>           <cc:Agent>
>             <dc:title>Luca Ferretti &lt;elle....@libero.it&gt;</dc:title>
>           </cc:Agent>
>         </dc:creator>
[...]
> It would be nice if licensecheck could extract license and copyright
> owner from this file. To do so, XPath analysis should be sufficient.

Agreed, licensecheck should ideally detect structured licensing data 
like above RDF metadata.

For now, a workaround is to extract such metadata using exiftool (debian 
package libimage-exiftool-perl), e.g. like this:

1>&2 exiftool '-textOut!' %d%f.%e:meta -short -short -recurse -ext svg .
licensecheck --copyright --deb-machine --recursive --lines 0 --check '.*' 
--ignore '.*\.svg$' -- *
find -type f -name '*.svg' -delete

More elaborate use of that workaround (although not for SVG files 
specifically) can be found e.g. here: 
https://sources.debian.org/src/ghostscript/9.53.3%7Edfsg-5/debian/copyright-check/


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

Attachment: signature.asc
Description: signature

Reply via email to