Bug#973469: licensecheck: extract licenses from SVG files

Jonas Smedegaard jonas at jones.dk
Sat Oct 31 14:55:43 GMT 2020


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 <elle.uca at libero.it></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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-perl-maintainers/attachments/20201031/69b89bb1/attachment.sig>


More information about the pkg-perl-maintainers mailing list