diff options
author | Yorhel <git@yorhel.nl> | 2021-07-24 09:59:24 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2021-07-24 09:59:31 +0200 |
commit | 408550a8a9d6f6b9d2ba09d0a2efca855ec65826 (patch) | |
tree | 81d69694d92f871b628fc03e9dbe15792b8a9dce | |
parent | 1ac32c2d62ab25ef59c01b078b237a67114b6d39 (diff) |
Fetch 3 more wikidata external identifiers: Soundcloud, Humble Store & Itch.io
Fixes https://vndb.org/t950.981
The Humble store & itch links aren't used at the moment, but they're
still useful for cross-referencing.
-rw-r--r-- | lib/VNDB/ExtLinks.pm | 6 | ||||
-rw-r--r-- | sql/schema.sql | 5 | ||||
-rw-r--r-- | util/updates/2021-07-24-more-wikidata-ids.sql | 3 |
3 files changed, 13 insertions, 1 deletions
diff --git a/lib/VNDB/ExtLinks.pm b/lib/VNDB/ExtLinks.pm index 4a7b0d6e..cd01fd91 100644 --- a/lib/VNDB/ExtLinks.pm +++ b/lib/VNDB/ExtLinks.pm @@ -45,6 +45,10 @@ our %WIKIDATA = ( gog => { type => 'text[]', property => 'P2725', label => 'GOG', fmt => 'https://www.gog.com/game/%s' }, pixiv_user => { type => 'integer[]', property => 'P5435', label => 'Pixiv', fmt => 'https://www.pixiv.net/member.php?id=%d' }, doujinshi_author => { type => 'integer[]', property => 'P7511', label => 'Doujinshi.org', fmt => 'https://www.doujinshi.org/browse/author/%d/' }, + soundcloud => { type => 'text[]', property => 'P3040', label => 'Soundcloud', fmt => 'https://soundcloud.com/%s' }, + humblestore => { type => 'text[]', property => 'P4477', label => undef, fmt => undef }, + itchio => { type => 'text[]', property => 'P7294', label => undef, fmt => undef }, + ); @@ -305,6 +309,7 @@ sub enrich_extlinks { w 'vgmdb_artist'; w 'discogs_artist'; w 'doujinshi_author'; + w 'soundcloud'; } # Producer links @@ -313,6 +318,7 @@ sub enrich_extlinks { w 'mobygames_company'; w 'gamefaqs_company'; w 'doujinshi_author'; + w 'soundcloud'; push @links, [ 'VNStat', sprintf('https://vnstat.net/developer/%d', $obj->{id} =~ s/^.//r), undef ]; } diff --git a/sql/schema.sql b/sql/schema.sql index ecd67b10..3638f2a5 100644 --- a/sql/schema.sql +++ b/sql/schema.sql @@ -1183,5 +1183,8 @@ CREATE TABLE wikidata ( steam integer[], -- [pub] P1733 gog text[], -- [pub] P2725 pixiv_user integer[], -- [pub] P5435 - doujinshi_author integer[] -- [pub] P7511 + doujinshi_author integer[], -- [pub] P7511 + soundcloud text[], -- [pub] P3040 + humblestore text[], -- [pub] P4477 + itchio text[] -- [pub] P7294 ); diff --git a/util/updates/2021-07-24-more-wikidata-ids.sql b/util/updates/2021-07-24-more-wikidata-ids.sql new file mode 100644 index 00000000..e5e80359 --- /dev/null +++ b/util/updates/2021-07-24-more-wikidata-ids.sql @@ -0,0 +1,3 @@ +ALTER TABLE wikidata ADD COLUMN soundcloud text[]; +ALTER TABLE wikidata ADD COLUMN humblestore text[]; +ALTER TABLE wikidata ADD COLUMN itchio text[]; |