GithubHelp home page GithubHelp logo

xsmuyu / chinese-poetry-mysql-elastic Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yishui01/chinese-poetry-mysql-elastic

0.0 0.0 0.0 45.99 MB

诗词集 chinese-poetry 的数据导入工具

PHP 96.41% TSQL 3.59%

chinese-poetry-mysql-elastic's Introduction

chinese-poetry-Mysql-Elastic

简介

诗词集 chinese-poetry 的数据导入工具

功能

  • 一键转换 chinese-poetry 仓库里的json数据转换成 sql 文件
  • 一键导入mysql、
  • 一键导入Elasticsearch (需要先导入mysql)

环境

  • php 5.6 +
  • git

使用

目前本仓库内已经转换好了sql文件,可以直接使用,sql内诗词已全部转换为简体中文

将sql文件导入mysql

1、配置conf.php 数据库地址

2、导入到mysql

php Mysql.php

查询mysql数据导入elasticsearch (必须先导入mysql才可导出到ES)

1、配置conf.php 数据库地址

2、导入到ES

php ES.php

转换为.sql文件

1、在当前目录下载要转换的诗词库

git clone https://github.com/chinese-poetry/chinese-poetry.git chinese-poetry

2、安装composer依赖

composer install

3、执行,在当前目录会重新生成sql目录

php Worker.php

chinese-poetry-mysql-elastic's People

Contributors

yishui01 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.