Giter Club home page Giter Club logo

mueller-physics / rocketchat-history-downloader Goto Github PK

View Code? Open in Web Editor NEW

This project forked from willardb/rocketchat-history-downloader

0.0 0.0 0.0 62 KB

Download, export, and preserve Rocket.Chat user-accessible channel logs and history via the Rocket.Chat API. Designed for users who would like to preserve their conversations without having administrative access on a Rocket.Chat server.

License: GNU General Public License v3.0

Python 94.47% CSS 5.53%

rocketchat-history-downloader's Introduction

Export and Download Rocket.Chat Logs and History

The rocketchat-history-downloader downloads and stores raw JSON channel history for joined channels, private groups, and direct messages. It keeps track of what has already been downloaded and supports ongoing periodic retrieval of new history.

Stores one JSON history file per channel per day in a directory of your choice.

Getting Started

Prerequisites

Installing

Install requirements from Pipfile (assuming you have Pipenv installed already)

$ pipenv install

Create a directory to store downloaded history files

$ mkdir history-files

Create and update settings.cfg

$ cp settings.cfg.EXAMPLE settings.cfg

Example settings:

[files]
history_output_dir = ./history-files/
history_statefile = rocketchat-history-statefile.pkl

[rc-api]
user = username_goes_here
pass = pwd_goes_here
server = https://demo.rocket.chat
max_msg_count_per_day = 99999
pause_seconds = 1

Usage

Download all not-previously-downloaded history for all joined channels, private groups, and direct messages.

Note: this updates the state file to record what has been downloaded so that it won't be downloaded again upon subsequent executions.

pipenv run python export-history.py settings.cfg

Download history for a specific time period. Update state file with last-downloaded time for all channels etc.

pipenv run python export-history.py -s 2000-01-01 -e 2018-01-01 settings.cfg

Run a one-off download of history for a specific time period and do not store last-downloaded dates (or anything else) in state file

pipenv run python export-history.py -s 2000-01-01 -e 2018-01-01 -r settings.cfg

Logging

By default, debug and info output from any execution is written to the console and logged to a file called export-history.log

rocketchat-history-downloader's People

Contributors

mueller-physics avatar willardb 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.