Coder Social home page Coder Social logo

rdb_to_json's Introduction

rdb_to_json

This script comes from python rdbtools cli command, because rdbtools JSONCallback would't convert utf8 chars printable, so this script rewrite JSONCallback. Otherwise, this script has the same command line parameters with rdbtools cli.

Install dependences

pip install rdbtools python-lzf

Usage

$ ./rdb_to_json.py -c json --key "conf*" ./dump7379.rdb 
[{
"conf:1122330000050:dcs_info":{"conf_start_time":"2018/02/27 12:30:25","dcs_start_time":"2018/02/27 12:30:25","dcs_mode_start_time":"2018/02/27 12:30:25","dcs_mode":"free"},
"conf:1234560000511:live":{"live_name":"测试直播","live_start_time":"2018-2-9 12:30:20","max_user_time":"2018/02/09 13:30:20","max_user_count":"100","star":"4.5"},
"conf:1122330000051:dcs_info":{"conf_start_time":"2018/02/27 12:30:25","dcs_start_time":"2018/02/27 12:30:25","dcs_mode_start_time":"2018/02/27 12:30:25","dcs_mode":"free"},
"conf:1234560000511:dcs_info":{"conf_start_time":"2018/02/06 13:30:31","dcs_start_time":"2018/02/06 13:30:31","dcs_mode":"free","dcs_mode_start_time":"2018/02/06 13:30:31"}}]

rdb_to_json's People

Contributors

hml1006 avatar

Watchers

James Cloos avatar  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.