Coder Social home page Coder Social logo

slack2pukiwiki's Introduction

Slack2Pukiwiki

Save Slack logs into Pukiwiki.

Settings

Install requirements by pip.

$ pip install -r requirements.txt

Copy (or just only rename) the setting file, and write your own API token and other settings.

$ cp settings.py.original settings.py

How to use

Simply Get Channel History

$ python slackAPI.py

In the default, you can get messages of yesterday. If you want to change the range, you can use --latest and --oldest options as below.

$ python slackAPI.py --oldest 2016-07-23 --latest 2016-07-29

Then, you can get messages from 2016-07-23 to 2016-07-29.

Slack Backup in Pukiwiki

Get channel history by slackAPI.py, then send it to pukiwiki server by txt2pukiwiki.py.

$ python slackAPI.py --format pukiwiki
$ python txt2pukiwiki.py -l slackbackup/filelist.txt

You cannot see any update in pukiwiki notification (the left column by default), but you can see the new page in 'page list' page.

You can use both arguments and settings.py for some options. For example, if you want to use 'pukiwiki' format in slackAPI.py, You may write 'FORMAT': 'pukiwiki' in settings.py, instead of use --format option.

'filelist.txt' is overwritten for each time you use 'slackAPI.py'. If you want to keep it, please rename or move it properly.

What's more, you can use txt2pukiwiki.py not only with slackAPI.py, but also for any text file you want. Please enjoy updating your pukiwiki!

Notice

The scripts are written for Python 3. We coded them to be compatible with Python 2, but there perhaps remain some bugs. Please feel free to ask us if you have trouble using them.

TIPS

'pip install requirements' fails

  • Maybe your account don't have correct permission. Please try using sudo.
$ sudo pip install -r requirements
  • Maybe your pip version is too old. Please try updating pip.
$ pip install pip --upgrade

'import paramiko' error

Maybe 'cryptography' module doesn't work well. Please try reinstalling it.

$ sudo apt-get install build-essential libssl-dev libffi-dev python-dev
$ sudo pip install cryptography --force-reinstall

ssh key not found

Try not using ~/ as $HOME.

slack2pukiwiki's People

Contributors

forest1988 avatar

Watchers

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