GithubHelp home page GithubHelp logo

sqlite2json's Introduction

sqlite2json

This script dumps all* the tables in an sqlite database as json.

Usage

sqlite2json sqlitefile.db [--exclude=TABLE]

To dump the sqlite file where iMessages are stored:

sqlite2json ~/Library/Messages/chat.db

Here is a more useful version of the above example:

sqlite2json ~/Library/Messages/chat.db | jq -r .message[].text | grep -i loan

*The script doesn't dump the contents of of the sqlite_master table

Authors

sqlite2json's People

Contributors

john-g-g avatar sneak avatar

Watchers

 avatar  avatar  avatar

sqlite2json's Issues

Fails to read LICENSE

The LICENSE file does not exist in the tar.

Collecting sqlite2json
  Using cached https://files.pythonhosted.org/packages/a0/ad/d913a4bbcc19f6194f10f7dee6da3e64e18bba8530e8da23f6b45536d813/sqlite2json-1.0.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/tmp/pip-build-lIvGsP/sqlite2json/setup.py", line 10, in <module>
        license=open('LICENSE').read(),
    IOError: [Errno 2] No such file or directory: 'LICENSE'
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-lIvGsP/sqlite2json

NameError: name 'exclude_tables' is not defined

tyrell:sms▻ sqlite2json sms.db
Traceback (most recent call last):
  File "/Users/jp/Library/homebrew/bin/sqlite2json", line 9, in <module>
    load_entry_point('sqlite2json==1.0.0', 'console_scripts', 'sqlite2json')()
  File "/Users/jp/Library/homebrew/lib/python2.7/site-packages/pkg_resources/__init__.py", line 549, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/Users/jp/Library/homebrew/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2709, in load_entry_point
    return ep.load()
  File "/Users/jp/Library/homebrew/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2369, in load
    return self.resolve()
  File "/Users/jp/Library/homebrew/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2375, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "build/bdist.macosx-10.11-x86_64/egg/sqlite2json/__init__.py", line 40, in <module>
NameError: name 'exclude_tables' is not defined

does not work on python3 (tested on 3.8.5)

nostromo:~/tmp/sqlite2json$ sqlite2json
Traceback (most recent call last):
  File "/Users/sneak/.local/bin/sqlite2json", line 11, in <module>
    load_entry_point('sqlite2json==1.0.1', 'console_scripts', 'sqlite2json')()
  File "/Users/sneak/.pyenv/versions/3.8.5/lib/python3.8/site-packages/pkg_resources/__init__.py", line 490, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/Users/sneak/.pyenv/versions/3.8.5/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2862, in load_entry_point
    return ep.load()
  File "/Users/sneak/.pyenv/versions/3.8.5/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2462, in load
    return self.resolve()
  File "/Users/sneak/.pyenv/versions/3.8.5/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2468, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/Users/sneak/.local/lib/python3.8/site-packages/sqlite2json/__init__.py", line 23
    print sqlite2json(
          ^
SyntaxError: invalid syntax
nostromo:~/tmp/sqlite2json$

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.