Metadata-Version: 2.1
Name: slack-export-viewer
Version: 0.6.0
Summary: Slack Export Archive Viewer
Home-page: https://github.com/hfaran/slack-export-viewer
Author: Hamza Faran
Author-email: hamzafaran@outlook.com
License: MIT License
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Environment :: Web Environment
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Requires-Dist: click
Requires-Dist: flask
Requires-Dist: markdown2
Requires-Dist: emoji

Slack Export Viewer
===================

|Build Status| |PyPI version|

A Slack Export archive viewer that allows you to easily view and share
your Slack team’s export (instead of having to dive into hundreds of
JSON files).

.. figure:: screenshot.png
   :alt: Preview

   Preview

Contents
--------

-  `Overview <#overview>`__
-  `Installation <#installation>`__
-  `Usage <#usage>`__
-  `Acknowledgements <#acknowledgements>`__

Overview
--------

``slack-export-viewer`` is useful for small teams on a free Slack plan
(limited to 10,000 messages) who overrun their budget and ocassionally
need a nice interface to refer back to previous messages. You get a web
interface to easily scroll through all channels in the export without
having to look at individual JSON files per channel per day.

``slack-export-viewer`` can be used locally on one machine for yourself
to explore an export or it can be run on a headless server (as it is a
Flask web app) if you also want to serve the content to the rest of your
team.

Installation
------------

I recommend ```pipsi`` <https://github.com/mitsuhiko/pipsi>`__ for a
nice isolated install.

.. code:: bash

    pipsi install slack-export-viewer

Or just feel free to use ``pip`` as you like.

.. code:: bash

    pip install slack-export-viewer

``slack-export-viewer`` will be installed as an entry-point; run from
anywhere.

.. code:: bash

    $ slack-export-viewer --help
    Usage: slack-export-viewer [OPTIONS]

    Options:
      -p, --port INTEGER  Host port to serve your content on
      -z, --archive PATH  Path to your Slack export archive (.zip file or directory)
                          [required]
      -I, --ip TEXT       Host IP to serve your content on
      --no-browser        If you do not want a browser to open automatically, set
                          this.
      --debug
      --help              Show this message and exit.

Usage
-----

1) Grab your Slack team’s export
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-  Visit https://my.slack.com/services/export
-  Create an export
-  Wait for it to complete
-  Refresh the page and download the export (.zip file) into whatever
   directory

2) Point ``slack-export-viewer`` to it
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Point slack-export-viewer to the .zip file and let it do its magic

.. code:: bash

    slack-export-viewer -z /path/to/export/zip

If everything went well, your archive will have been extracted,
processed, and browser window will have opened showing your *#general*
channel from the export.

CLI
---

There is now a CLI included as well. Currently the one command you can
use is clearing the cache from slack-export-viewer from your %TEMP%
directory; see usage:

::

    └———→ slack-export-viewer-cli --help
    Usage: slack-export-viewer-cli [OPTIONS] COMMAND [ARGS]...

    Options:
      --help  Show this message and exit.

    Commands:
      clean  Cleans up any temporary files (including...

Examples
~~~~~~~~

::

    ┌— hamza@AURORAONE C:\Users\hamza
    └———→ slack-export-viewer-cli clean
    Run with -w to remove C:\Users\hamza\AppData\Local\Temp\_slackviewer
    ┌— hamza@AURORAONE C:\Users\hamza
    └———→ slack-export-viewer-cli clean -w
    Removing C:\Users\hamza\AppData\Local\Temp\_slackviewer...

Acknowledgements
----------------

Credit to Pieter Levels whose `blog
post <https://levels.io/slack-export-to-html/>`__ and PHP script I used
as a jumping off point for this.

Improvements over Pieter’s script
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

``slack-export-viewer`` is similar in core functionality but adds
several things on top to make it nicer to use:

-  An installable application
-  Automated archive extraction and retention
-  A Slack-like sidebar that lets you switch channels easily
-  Much more “sophisticated” rendering of messages
-  A Flask server which lets you serve the archive contents as opposed
   to a PHP script which does static file generation

.. |Build Status| image:: https://travis-ci.org/hfaran/slack-export-viewer.svg?branch=master
   :target: https://travis-ci.org/hfaran/slack-export-viewer
.. |PyPI version| image:: https://badge.fury.io/py/slack-export-viewer.svg
   :target: http://badge.fury.io/py/slack-export-viewer


