chiark / gitweb /
media-scraper: wikimedia: Tolerate varying effective licence
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 21 Mar 2021 21:49:45 +0000 (21:49 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 21 Mar 2021 21:50:35 +0000 (21:50 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
media-scraper

index 6ce6a75c6affa45190b2cef5daa9fa6640dc4810..c58443887bb2a7d0ac020603f0d56924b44164d8 100755 (executable)
@@ -81,12 +81,16 @@ sub methodisoffline_none { 0 }
 
 sub methodlic_wikimedia ($) {
   my ($scraper) = @_;
-  return <<END;
+  my $spdx = ${ \ $scraper->('spdx') };
+  return <<END.($spdx =~ m{/} ? <<END : '').<<END;
 These files were all obtained from
     ${ \ $scraper->('site-title') }
 
 They are all available under at least, and distributed here under,
-    ${ \ $scraper->('spdx') }
+    $spdx
+END
+(deepending on the file - consult the source file for details)
+END
 as well as possibly other licences.  There is NO WARRANTY.
 
 See <file>.download-log for the original URL and download timestamp.