Git Product home page Git Product logo

keybase-export's Introduction

keybase-export

npm

A tool to export keybase chats.

Features

  • Configuration file
  • Export to jsonl (json lines)
  • Export to SQLite
  • Export to ElasticSearch
  • Watcher for new messages
  • Attachment downloading
  • Incremental export

Configuration

See config.example.json for a config example and config.ts for the config schema.

Usage

  1. Install Node.js.

  2. Clone the repository from Github and run the installation commands:

git clone https://github.com/Bannerets/keybase-export.git
cd keybase-export
npm install
npm run build
  1. Copy config.example.json to config.json and edit it. At least, chats, username and paperkey should be replaced.

  2. Launch:

$ ./bin/keybase-export
# or: $ node dist

Optionally, the configuration file can be passed as a cli argument:

$ ./bin/keybase-export config-2.json

Debug mode: DEBUG=keybase-export* ./bin/keybase-export


Another way to install is via NPM (not recommended, the version might be outdated):

npm install -g keybase-export
# local installation: $ npm install keybase-export

And launch:

$ keybase-export [<config>]

keybase-export's People

Contributors

bannerets avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

keybase-export's Issues

Error: Cannot find module 'fs/promises'

Having the following issue with the latest master build (wasn't present in b2a9501)

./bin/keybase-export config.json                                     [2023-04-11 13:28:45]
internal/modules/cjs/loader.js:628
    throw err;
    ^

Error: Cannot find module 'fs/promises'
Require stack:
- /Users/ndawsonfresh/dev/keybase-export/dist/index.js
- /Users/ndawsonfresh/dev/keybase-export/bin/keybase-export
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:625:15)
    at Function.Module._load (internal/modules/cjs/loader.js:527:27)
    at Module.require (internal/modules/cjs/loader.js:683:19)
    at require (internal/modules/cjs/helpers.js:16:16)
    at Object.<anonymous> (/Users/ndawsonfresh/dev/keybase-export/dist/index.js:35:36)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:643:32)
    at Function.Module._load (internal/modules/cjs/loader.js:556:12)
    at Module.require (internal/modules/cjs/loader.js:683:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/ndawsonfresh/dev/keybase-export/dist/index.js',
    '/Users/ndawsonfresh/dev/keybase-export/bin/keybase-export'
  ]
}

Need further help how to use it

Hi,

I've downloaded the package and copied the config.example.json to config.json. How do I use it? I ran keybase-export [path-to-config] and there's an error in the elasticsearch

`Elasticsearch INFO: 2020-07-05T21:24:36Z
Adding connection to http://localhost:9200/

Elasticsearch ERROR: 2020-07-05T21:24:36Z
Error: Request error, retrying
HEAD http://localhost:9200/ => connect ECONNREFUSED 127.0.0.1:9200
at Log.error (/usr/local/lib/node_modules/keybase-export/node_modules/elasticsearch/src/lib/log.js:226:56)
at checkRespForFailure (/usr/local/lib/node_modules/keybase-export/node_modules/elasticsearch/src/lib/transport.js:259:18)
at HttpConnector. (/usr/local/lib/node_modules/keybase-export/node_modules/elasticsearch/src/lib/connectors/http.js:164:7)
at ClientRequest.wrapper (/usr/local/lib/node_modules/keybase-export/node_modules/lodash/lodash.js:4929:19)
at ClientRequest.emit (events.js:314:20)
at Socket.socketErrorListener (_http_client.js:469:9)
at Socket.emit (events.js:314:20)
at emitErrorNT (internal/streams/destroy.js:100:8)
at emitErrorCloseNT (internal/streams/destroy.js:68:3)
at processTicksAndRejections (internal/process/task_queues.js:80:21)

Elasticsearch WARNING: 2020-07-05T21:24:36Z
Unable to revive connection: http://localhost:9200/

Elasticsearch WARNING: 2020-07-05T21:24:36Z
No living connections

[FATAL ERROR] Error: Elasticsearch is down: Error: No Living connections
at /usr/local/lib/node_modules/keybase-export/dist/dump.js:36:15
at processTicksAndRejections (internal/process/task_queues.js:93:5)`

Can you help me further explain to use it?

Export all chats

In the config.json file, if I want to export all chats for a user, what are the correct values in the following line:

   "chats": ["you", "you,them"],

The script reports a total of 15 chats, but none are exported.

Thank you,

Kevin

Undefined id property results in Fatal error

This chat extends back several years. I'm unable to create any export due to the following error.

./bin/keybase-export config.json                                     [2023-03-31 19:52:36]

Initializing...
Getting chat list...
Total chats: 25
Started loading messages: tranny_mayhem#general
Received new chunk (304 msgs): tranny_mayhem#general
[Fatal error] TypeError: Cannot read property 'id' of undefined
    at convertMessage (/Users/ndawsonfresh/dev/keybase-export/dist/index.js:97:85)
    at /Users/ndawsonfresh/dev/keybase-export/dist/index.js:268:33
    at Array.map (<anonymous>)
    at /Users/ndawsonfresh/dev/keybase-export/dist/index.js:268:22
    at Generator.next (<anonymous>)
    at fulfilled (/Users/ndawsonfresh/dev/keybase-export/dist/index.js:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:85:5)

Perhaps just print a dump of the object and skip the item?

Can confirm I'm able to successfully export other chats.

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.