Room archiver utility for Webex Teams
Project description
=====================
Webex Teams Archiver
=====================
*Simple utility to archive Webex Teams rooms*
.. image:: https://static.production.devnetcloud.com/codeexchange/assets/images/devnet-published.svg
:target: https://developer.cisco.com/codeexchange/github/repo/CiscoDevNet/webex-teams-archiver
.. image:: https://img.shields.io/badge/license-MIT-blue.svg
:target: https://github.com/CiscoDevNet/webex-teams-archiver/blob/master/LICENSE
.. image:: https://img.shields.io/pypi/v/webexteamsarchiver.svg
:target: https://pypi.python.org/pypi/webexteamsarchiver
-------------------------------------------------------------------------------
Webex Teams Archiver extracts the messages and files out of a Webex Teams room and saves them in text, HTML, and JSON formats.
Example
-------
.. code-block:: python
from webexteamsarchiver import WebexTeamsArchiver
personal_token = "mytoken"
archiver = WebexTeamsArchiver(personal_token)
# room id from https://developer.webex.com/docs/api/v1/rooms/list-rooms
room_id = "Y2lzY29zcGFyazovL3VzL1JPT00vd2ViZXh0ZWFtc2FyY2hpdmVy"
archiver.archive_room(room_id)
Produces the following files:
.. code-block:: bash
$ ls
Title_Timestamp.tgz
Title_Timestamp
$ ls Title_Timestamp/
Title_Timestamp.html
Title_Timestamp.json
Title_Timestamp.txt
attachments/
avatars/
space_details.json
Below is an example of a simple room that got archived.
.. image:: https://raw.githubusercontent.com/CiscoDevNet/webex-teams-archiver/master/sample.png
:scale: 40 %
Note 1: The HTML version of the archive requires Internet connectivity because of the CSS, which is not packaged with the archive because of licensing conflicts.
Note 2: Please note that use of the Webex Teams Archiver may violate the retention policy, if any, applicable to your use of Webex Teams.
Installation
------------
Installing and upgrading is easy:
**Install via PIP**
.. code-block:: bash
$ pip install webexteamsarchiver
**Upgrading to the latest Version**
.. code-block:: bash
$ pip install webexteamsarchiver --upgrade
Options
-------
The `archive_room` method exposes the following options:
+----------------------+-------------------+---------------------------------------------------+
| Argument | Default Value | Description |
+======================+===================+===================================================+
| text_format | True | Create a text version of the archive |
+----------------------+-------------------+---------------------------------------------------+
| html_format | True | Create an HTML version of the archive |
+----------------------+-------------------+---------------------------------------------------+
| json_format | True | Create a JSON version of the archive |
+----------------------+-------------------+---------------------------------------------------+
In addition, the `options` kwargs supports the following additional options today:
+----------------------+-------------------+---------------------------------------------------+
| Argument | Default Value | Description |
+======================+===================+===================================================+
| compress_folder | True | Compress archive folder |
+----------------------+-------------------+---------------------------------------------------+
| delete_folder | False | Delete the archive folder when done |
+----------------------+-------------------+---------------------------------------------------+
| reverse_order | True | Order messages by most recent on the bottom |
+----------------------+-------------------+---------------------------------------------------+
| download_attachments | True | Download attachments sent to the room |
+----------------------+-------------------+---------------------------------------------------+
| download_avatars | True | Download avatar images |
+----------------------+-------------------+---------------------------------------------------+
| download_workers | 15 | Number of download workers for downloading files |
+----------------------+-------------------+---------------------------------------------------+
| timestamp_format | %Y-%m-%dT%H:%M:%S | Timestamp strftime format |
+----------------------+-------------------+---------------------------------------------------+
| file_format | gztar | Archive file format_ |
+----------------------+-------------------+---------------------------------------------------+
Questions, Support & Discussion
-------------------------------
webexteamsarchiver_ is a *community developed* and *community supported* project. Feedback, thoughts, questions, issues can be submitted using the issues_ page.
Contribution
------------
webexteamsarchiver_ is a *community developed* project. Code contributions are welcome via PRs!
*Copyright (c) 2018-2021 Cisco and/or its affiliates.*
.. _webexteamsarchiver: https://github.com/CiscoDevNet/webex-teams-archiver
.. _issues: https://github.com/CiscoDevNet/webex-teams-archiver/issues
.. _format: https://docs.python.org/3/library/shutil.html#shutil.make_archive
Webex Teams Archiver
=====================
*Simple utility to archive Webex Teams rooms*
.. image:: https://static.production.devnetcloud.com/codeexchange/assets/images/devnet-published.svg
:target: https://developer.cisco.com/codeexchange/github/repo/CiscoDevNet/webex-teams-archiver
.. image:: https://img.shields.io/badge/license-MIT-blue.svg
:target: https://github.com/CiscoDevNet/webex-teams-archiver/blob/master/LICENSE
.. image:: https://img.shields.io/pypi/v/webexteamsarchiver.svg
:target: https://pypi.python.org/pypi/webexteamsarchiver
-------------------------------------------------------------------------------
Webex Teams Archiver extracts the messages and files out of a Webex Teams room and saves them in text, HTML, and JSON formats.
Example
-------
.. code-block:: python
from webexteamsarchiver import WebexTeamsArchiver
personal_token = "mytoken"
archiver = WebexTeamsArchiver(personal_token)
# room id from https://developer.webex.com/docs/api/v1/rooms/list-rooms
room_id = "Y2lzY29zcGFyazovL3VzL1JPT00vd2ViZXh0ZWFtc2FyY2hpdmVy"
archiver.archive_room(room_id)
Produces the following files:
.. code-block:: bash
$ ls
Title_Timestamp.tgz
Title_Timestamp
$ ls Title_Timestamp/
Title_Timestamp.html
Title_Timestamp.json
Title_Timestamp.txt
attachments/
avatars/
space_details.json
Below is an example of a simple room that got archived.
.. image:: https://raw.githubusercontent.com/CiscoDevNet/webex-teams-archiver/master/sample.png
:scale: 40 %
Note 1: The HTML version of the archive requires Internet connectivity because of the CSS, which is not packaged with the archive because of licensing conflicts.
Note 2: Please note that use of the Webex Teams Archiver may violate the retention policy, if any, applicable to your use of Webex Teams.
Installation
------------
Installing and upgrading is easy:
**Install via PIP**
.. code-block:: bash
$ pip install webexteamsarchiver
**Upgrading to the latest Version**
.. code-block:: bash
$ pip install webexteamsarchiver --upgrade
Options
-------
The `archive_room` method exposes the following options:
+----------------------+-------------------+---------------------------------------------------+
| Argument | Default Value | Description |
+======================+===================+===================================================+
| text_format | True | Create a text version of the archive |
+----------------------+-------------------+---------------------------------------------------+
| html_format | True | Create an HTML version of the archive |
+----------------------+-------------------+---------------------------------------------------+
| json_format | True | Create a JSON version of the archive |
+----------------------+-------------------+---------------------------------------------------+
In addition, the `options` kwargs supports the following additional options today:
+----------------------+-------------------+---------------------------------------------------+
| Argument | Default Value | Description |
+======================+===================+===================================================+
| compress_folder | True | Compress archive folder |
+----------------------+-------------------+---------------------------------------------------+
| delete_folder | False | Delete the archive folder when done |
+----------------------+-------------------+---------------------------------------------------+
| reverse_order | True | Order messages by most recent on the bottom |
+----------------------+-------------------+---------------------------------------------------+
| download_attachments | True | Download attachments sent to the room |
+----------------------+-------------------+---------------------------------------------------+
| download_avatars | True | Download avatar images |
+----------------------+-------------------+---------------------------------------------------+
| download_workers | 15 | Number of download workers for downloading files |
+----------------------+-------------------+---------------------------------------------------+
| timestamp_format | %Y-%m-%dT%H:%M:%S | Timestamp strftime format |
+----------------------+-------------------+---------------------------------------------------+
| file_format | gztar | Archive file format_ |
+----------------------+-------------------+---------------------------------------------------+
Questions, Support & Discussion
-------------------------------
webexteamsarchiver_ is a *community developed* and *community supported* project. Feedback, thoughts, questions, issues can be submitted using the issues_ page.
Contribution
------------
webexteamsarchiver_ is a *community developed* project. Code contributions are welcome via PRs!
*Copyright (c) 2018-2021 Cisco and/or its affiliates.*
.. _webexteamsarchiver: https://github.com/CiscoDevNet/webex-teams-archiver
.. _issues: https://github.com/CiscoDevNet/webex-teams-archiver/issues
.. _format: https://docs.python.org/3/library/shutil.html#shutil.make_archive
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file webexteamsarchiver-0.11.3.tar.gz
.
File metadata
- Download URL: webexteamsarchiver-0.11.3.tar.gz
- Upload date:
- Size: 1.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
6b38741e3f26355083b1c094138cda06247bcdb898033f33f7721d1521d3b496
|
|
MD5 |
58770c1efff2767b1cb199709f732a45
|
|
BLAKE2b-256 |
2747e882d697a129fbb01c9278f70551983d5796ad8770b0e4436b88d440b654
|
File details
Details for the file webexteamsarchiver-0.11.3-py3-none-any.whl
.
File metadata
- Download URL: webexteamsarchiver-0.11.3-py3-none-any.whl
- Upload date:
- Size: 1.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
75a08b01c61437b4177a7a609f5835b3667d941d467033fb4984c77186389e78
|
|
MD5 |
c17692b5ab51933c0c26da4a76049012
|
|
BLAKE2b-256 |
997f3a93be43a71ec6281bbe9af1fee50eae530a0f3e171cf7dbb94e6a1a5637
|