jeroen/json-dump-data 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jeroen/json-dump-data

Composer 安装命令:

composer require jeroen/json-dump-data

包简介

Wikibase JSON dump data for testing

README 文档

README

Build Status Download count Latest Stable Version

JsonDumpData holds extracts of Wikibase Repository JSON dumps.

Such extracts are often needed when testing code interacting with dumps and can also be useful to import realistic data into a test wiki. Adding the extracts to the VCS repository that holds the code needing them can unreasonably inflate its size. Loading this component via Composer works around that problem.

For more information on the JSON dump format, see the [Wikidata database download page] (https://www.wikidata.org/wiki/Wikidata:Database_download).

Installation

To add this package as a local, per-project dependency to your project, simply add a dependency on jeroen/json-dump-data to your project's composer.json file. Here is a minimal example of a composer.json file that just defines a dependency on JsonDumpData 1.0:

{
    "require": {
        "jeroen/json-dump-data": "1.0.*"
    }
}

Usage

The dump extracts are stored in the data directory, and have stable paths. However, when using PHP, it is recommended to obtain the paths via the JsonDumpData class.

$dumpData = new JsonDumpData();
$dumpData->getFiveEntitiesDumpPath();

The methods in this class return the full path to the relevant file. These methods will return the path to the most recent copy of the data this library holds:

  • getOneItemDumpPath
  • getFiveEntitiesDumpPath
  • getOneThousandEntitiesDumpPath
  • getEmptyDumpPath

This means that new versions of the library can have these methods return paths to files with different content (though always adhering to the contract of the method). To get a fully stable path to a specific version, or to get one for an older version, you can use the methods with time qualification:

  • getOneItemFrom2015DumpPath
  • getFiveEntitiesFrom2014DumpPath
  • ...

Dumps that are compressed can be accessed via the same methods, but then with their file extension before "DumpPath". Currently bz2 (bzip2) and gz (gzip) are included.

  • getFiveEntitiesBz2DumpPath
  • getOneThousandEntitiesFrom2015GzDumpPath
  • ...

Release notes

Version 1.0.0 (2015-11-11)

  • Added files from 2015-11-09 dump
  • Added bz2 files
  • Added gz files
  • Added new path getters for the files from 2014

Version 0.1.0 (2014-10-22)

  • Initial release

统计信息

  • 总下载量: 609
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 3
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2014-10-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固