Archived
1
0
Fork 0
I need a new VNDB client. :-(
This commit is contained in:
Alexander Yakovlev 2018-05-10 14:31:36 +07:00
parent 136d709b78
commit 4fc40624a2
4 changed files with 183 additions and 55 deletions

28
Source/VNDB.php Normal file
View file

@ -0,0 +1,28 @@
<?php
namespace Source;
use \Game;
class VNDB extends Source {
public $title = "VNDB";
protected function parse() {
global $config;
$client = new Client();
$client->connect();
$client->login($config['VNDB_USER'], $config['VNDB_PASSWORD']);
$date = (new Date("1 week ago"))->format('Y-m-d');
echo $date;
die();
$list = $client->sendCommand('get vn basic (released > "'.$date.'")');
foreach ($list as $gameData) {
$game = new Game;
$game->title = $gameData->title;
$game->author = $gameData->developer->display_name;
$game->date = $gameData->published_on / 1000;
$game->description = $descData->payload->metaDescription;
$game->url = 'https://gamejolt.com/games/'.$gameData->slug.'/'.$gameData->id;
$this->output .= $game->print();
}
}
}

View file

@ -1,4 +1,5 @@
{
"minimum-stability": "dev",
"require": {
"aura/autoload": "^2.0",
"sabre/xml": "^2.0",

207
composer.lock generated
View file

@ -4,11 +4,11 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "b49f035acd8ed8cde4895943e6acc417",
"content-hash": "fd8daa2b9d2821cf7562ec9ec48e8219",
"packages": [
{
"name": "addwiki/mediawiki-api",
"version": "0.7.2",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/addwiki/mediawiki-api.git",
@ -58,16 +58,16 @@
},
{
"name": "addwiki/mediawiki-api-base",
"version": "2.4.0",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/addwiki/mediawiki-api-base.git",
"reference": "33c147e91d05a48e953839fb3ad9e6386cfd85c1"
"reference": "c19b07a9d95665fe43da63b4633589b5a0a317ce"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/addwiki/mediawiki-api-base/zipball/33c147e91d05a48e953839fb3ad9e6386cfd85c1",
"reference": "33c147e91d05a48e953839fb3ad9e6386cfd85c1",
"url": "https://api.github.com/repos/addwiki/mediawiki-api-base/zipball/c19b07a9d95665fe43da63b4633589b5a0a317ce",
"reference": "c19b07a9d95665fe43da63b4633589b5a0a317ce",
"shasum": ""
},
"require": {
@ -87,7 +87,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.4.x-dev"
"dev-master": "2.5.x-dev"
}
},
"autoload": {
@ -108,7 +108,7 @@
"keywords": [
"mediawiki"
],
"time": "2017-11-02T10:53:36+00:00"
"time": "2018-03-20T09:54:40+00:00"
},
{
"name": "addwiki/mediawiki-datamodel",
@ -157,7 +157,7 @@
},
{
"name": "aura/autoload",
"version": "2.0.4",
"version": "2.x-dev",
"source": {
"type": "git",
"url": "https://github.com/auraphp/Aura.Autoload.git",
@ -206,7 +206,7 @@
},
{
"name": "cocur/slugify",
"version": "v3.1",
"version": "3.1.x-dev",
"source": {
"type": "git",
"url": "https://github.com/cocur/slugify.git",
@ -271,16 +271,16 @@
},
{
"name": "guzzlehttp/guzzle",
"version": "6.3.2",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
"reference": "68d0ea14d5a3f42a20e87632a5f84931e2709c90"
"reference": "0773d442aa96baf19d7195f14ba6e9c2da11f8ed"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/68d0ea14d5a3f42a20e87632a5f84931e2709c90",
"reference": "68d0ea14d5a3f42a20e87632a5f84931e2709c90",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/0773d442aa96baf19d7195f14ba6e9c2da11f8ed",
"reference": "0773d442aa96baf19d7195f14ba6e9c2da11f8ed",
"shasum": ""
},
"require": {
@ -290,7 +290,7 @@
},
"require-dev": {
"ext-curl": "*",
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4",
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
"psr/log": "^1.0"
},
"suggest": {
@ -332,27 +332,27 @@
"rest",
"web service"
],
"time": "2018-03-26T16:33:04+00:00"
"time": "2018-04-23T13:18:18+00:00"
},
{
"name": "guzzlehttp/promises",
"version": "v1.3.1",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/guzzle/promises.git",
"reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646"
"reference": "136531aa4e42f9b1971a47fb0faf60da00d2fefa"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646",
"reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646",
"url": "https://api.github.com/repos/guzzle/promises/zipball/136531aa4e42f9b1971a47fb0faf60da00d2fefa",
"reference": "136531aa4e42f9b1971a47fb0faf60da00d2fefa",
"shasum": ""
},
"require": {
"php": ">=5.5.0"
},
"require-dev": {
"phpunit/phpunit": "^4.0"
"phpunit/phpunit": "^4.8.36"
},
"type": "library",
"extra": {
@ -383,25 +383,26 @@
"keywords": [
"promise"
],
"time": "2016-12-20T10:07:11+00:00"
"time": "2018-03-25T01:26:01+00:00"
},
{
"name": "guzzlehttp/psr7",
"version": "1.4.2",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
"reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c"
"reference": "239912a01c502f2d8f3c642eb2fcd4e58cf82a72"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c",
"reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/239912a01c502f2d8f3c642eb2fcd4e58cf82a72",
"reference": "239912a01c502f2d8f3c642eb2fcd4e58cf82a72",
"shasum": ""
},
"require": {
"php": ">=5.4.0",
"psr/http-message": "~1.0"
"psr/http-message": "~1.0",
"ralouphie/getallheaders": "^2.0.5"
},
"provide": {
"psr/http-message-implementation": "1.0"
@ -448,11 +449,11 @@
"uri",
"url"
],
"time": "2017-03-20T17:10:46+00:00"
"time": "2018-04-24T00:35:57+00:00"
},
{
"name": "psr/http-message",
"version": "1.0.1",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/php-fig/http-message.git",
@ -502,16 +503,16 @@
},
{
"name": "psr/log",
"version": "1.0.2",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
"reference": "3490ba5925e6dcbe6de950c5c6b8dce9f6e96eda"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
"url": "https://api.github.com/repos/php-fig/log/zipball/3490ba5925e6dcbe6de950c5c6b8dce9f6e96eda",
"reference": "3490ba5925e6dcbe6de950c5c6b8dce9f6e96eda",
"shasum": ""
},
"require": {
@ -545,7 +546,47 @@
"psr",
"psr-3"
],
"time": "2016-10-10T12:19:37+00:00"
"time": "2018-04-03T15:59:15+00:00"
},
{
"name": "ralouphie/getallheaders",
"version": "2.0.5",
"source": {
"type": "git",
"url": "https://github.com/ralouphie/getallheaders.git",
"reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/5601c8a83fbba7ef674a7369456d12f1e0d0eafa",
"reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa",
"shasum": ""
},
"require": {
"php": ">=5.3"
},
"require-dev": {
"phpunit/phpunit": "~3.7.0",
"satooshi/php-coveralls": ">=1.0"
},
"type": "library",
"autoload": {
"files": [
"src/getallheaders.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Ralph Khattar",
"email": "ralph.khattar@gmail.com"
}
],
"description": "A polyfill for getallheaders.",
"time": "2016-02-11T07:05:27+00:00"
},
{
"name": "ryakad/pandoc-php",
@ -689,16 +730,16 @@
},
{
"name": "symfony/css-selector",
"version": "v4.0.6",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
"reference": "c69f1e93aa898fd9fec627ebef467188151c8dc2"
"reference": "92cce68393667b645b959a9cc5a629e8efb7f294"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/c69f1e93aa898fd9fec627ebef467188151c8dc2",
"reference": "c69f1e93aa898fd9fec627ebef467188151c8dc2",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/92cce68393667b645b959a9cc5a629e8efb7f294",
"reference": "92cce68393667b645b959a9cc5a629e8efb7f294",
"shasum": ""
},
"require": {
@ -707,7 +748,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.0-dev"
"dev-master": "4.2-dev"
}
},
"autoload": {
@ -738,24 +779,25 @@
],
"description": "Symfony CssSelector Component",
"homepage": "https://symfony.com",
"time": "2018-02-03T14:58:37+00:00"
"time": "2018-05-07T14:51:25+00:00"
},
{
"name": "symfony/dom-crawler",
"version": "v4.0.6",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
"reference": "26726ddc01601dc9393f2afc3369ce1ca64e4537"
"reference": "f9cae86c8f7ed57554c9b68fd6776ac641055b93"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/26726ddc01601dc9393f2afc3369ce1ca64e4537",
"reference": "26726ddc01601dc9393f2afc3369ce1ca64e4537",
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/f9cae86c8f7ed57554c9b68fd6776ac641055b93",
"reference": "f9cae86c8f7ed57554c9b68fd6776ac641055b93",
"shasum": ""
},
"require": {
"php": "^7.1.3",
"symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-mbstring": "~1.0"
},
"require-dev": {
@ -767,7 +809,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.0-dev"
"dev-master": "4.2-dev"
}
},
"autoload": {
@ -794,20 +836,75 @@
],
"description": "Symfony DomCrawler Component",
"homepage": "https://symfony.com",
"time": "2018-02-22T10:50:29+00:00"
"time": "2018-05-07T14:51:25+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.7.0",
"name": "symfony/polyfill-ctype",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b"
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/78be803ce01e55d3491c1397cf1c64beb9c1b63b",
"reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/7cc359f1b7b80fc25ed7796be7d96adc9b354bae",
"reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.8-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Ctype\\": ""
},
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
},
{
"name": "Gert de Pagter",
"email": "BackEndTea@gmail.com"
}
],
"description": "Symfony polyfill for ctype functions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"ctype",
"polyfill",
"portable"
],
"time": "2018-04-30T19:57:29+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "3296adf6a6454a050679cde90f95350ad604b171"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171",
"reference": "3296adf6a6454a050679cde90f95350ad604b171",
"shasum": ""
},
"require": {
@ -819,7 +916,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.7-dev"
"dev-master": "1.8-dev"
}
},
"autoload": {
@ -853,12 +950,12 @@
"portable",
"shim"
],
"time": "2018-01-30T19:27:44+00:00"
"time": "2018-04-26T10:06:28+00:00"
}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"minimum-stability": "dev",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,

View file

@ -24,6 +24,7 @@ if ($parsers === 'all' || in_array('all', $parsers)) {
'urq',
'anivisual',
//'kvester',
//'vndb',
'apero',
'instead',
'hyperbook_ru',
@ -58,6 +59,7 @@ check ('Anivisual', 'anivisual');
check ('HyperbookEn', 'hyperbook_en');
check ('Textadventures', 'textadventures');
check ('IFDB', 'ifdb');
check ('VNDB', 'vndb');
//check ('Dashingdon', 'dashingdon');
check ('Itch', 'itch');
check ('Gamejolt', 'gamejolt');