Giter Club home page Giter Club logo

whatsmapper's Introduction

whatsmapper

Convert Whatsapp to other file formats

Usage

python whatsmap.py
usage: whatsmap [-h] [-t TRANSCRIPT]

utility to map a whatsmap chat transcript to HTML

options:
  -h, --help            show this help message and exit
  -t TRANSCRIPT, --transcript TRANSCRIPT
                        location of the whatsapp transcript file

for more information visit https://github.com/ross-spencer/whatsmapper/

Whatsapp folder structure

An export (with media) should output a zip folder, e.g.

'WhatsApp Chat - Digipres Chat.zip'

Extract the zip. It should should have a structure along the lines of:

WhatsApp Chat - Digipres Chat/
├── 00000002-PHOTO-2017-05-24-06-15-02.jpg
├── 00000006-PHOTO-2017-05-29-03-35-35.mp4
└── _chat.txt

To convert this to html run:

whatsmap -t "/path/to/WhatsApp Chat - Digipres Chat/_chat.txt"

Or:

python3 -m whatsmap.py -t "/path/to/WhatsApp Chat - Digipres Chat/_chat.txt"

And to output to a html file, simply add:

 > whatsapp_chat.html

Providing a custom filename as required, e.g.

whatsmap -t "/path/to/WhatsApp Chat - Digipres Chat/_chat.txt" > my_whatsapp_chat.html

Developer install

pip

Setup a virtual environment venv and install the local development requirements as follows:

python3 -m venv venv
source venv/bin/activate
python -m pip install -r requirements/local.txt

tox

Run tests (all)

python -m tox

Run tests-only

python -m tox -e py3

Run linting-only

python -m tox -e linting

pre-commit

Pre-commit can be used to provide more feedback before committing code. This reduces reduces the number of commits you might want to make when working on code, it's also an alternative to running tox manually.

To set up pre-commit, providing pip install has been run above:

  • pre-commit install

This repository contains a default number of pre-commit hooks, but there may be others suited to different projects. A list of other pre-commit hooks can be found here.

Packaging

The Makefile contains helper functions for packaging and release.

Makefile functions can be reviewed by calling make from the root of this repository:

clean                          Clean the package directory
help                           Print this help message.
package-check                  Check the distribution is valid
package-deps                   Upgrade dependencies for packaging
package-source                 Package the source code
package-upload                 Upload package to pypi
package-upload-test            Upload package to test.pypi
tar-source                     Package repository as tar for easy distribution

pyproject.toml

Packaging consumes the metadata in pyproject.toml which helps to describe the project on the official pypi.org repository. Have a look at the documentation and comments there to help you create a suitably descriptive metadata file.

Local packaging

To create a python wheel for testing locally, or distributing to colleagues run:

  • make package-source

A tar and whl file will be stored in a dist/ directory. The whl file can be installed as follows:

  • pip install <your-package>.whl

Publishing

Publishing for public use can be achieved with:

  • make package-upload-test or make package-upload

make-package-upload-test will upload the package to test.pypi.org which provides a way to look at package metadata and documentation and ensure that it is correct before uploading to the official pypi.org repository using make package-upload.

whatsmapper's People

Contributors

ross-spencer avatar

Watchers

 avatar  avatar

whatsmapper's Issues

Notes on a PRONOM signature for Whatsapp

Would need to grab some earlier exports, and perhaps there are more than one version, but:

Whatsapp e2e encrypted message export

[5/2/17, 00:39:50] Digipres Chat: ‎Messages and calls are end-to-end encrypted. No one outside of this chat, not even WhatsApp, can read or listen to them.
5B 35 2F 32 2F 31 37 2C 20 30 30 3A 33 39 3A 35 30 5D 20 44 69 67 69 70 72 65 73 20 43 68 61 74 3A 20 E2 80 8E 4D 65 73 73 61 67 65 73 20 61 6E 64 20 63 61 6C 6C 73 20 61 72 65 20 65 6E 64 2D 74 6F 2D 65 6E 64 20 65 6E 63 72 79 70 74 65 64 2E 20 4E 6F 20 6F 6E 65 20 6F 75 74 73 69 64 65 20 6F 66 20 74 68 69 73 20 63 68 61 74 2C 20 6E 6F 74 20 65 76 65 6E 20 57 68 61 74 73 41 70 70 2C 20 63 61 6E 20 72 65 61 64 20 6F 72 20 6C 69 73 74 65 6E 20 74 6F 20 74 68 65 6D 2E

Signature

5B {1-2} 2F {1-2} 2F {1-2} 2C 20 {1-2} 3A {1-2} 3A {1-2} 5D 20 {1-30} 3A 20 E2 80 8E 4D 65 73 73 61 67 65 73 20 61 6E 64 20 63 61 6C 6C 73 20 61 72 65 20 65 6E 64 2D 74 6F 2D 65 6E 64 20 65 6E 63 72 79 70 74 65 64 2E 20 4E 6F 20 6F 6E 65 20 6F 75 74 73 69 64 65 20 6F 66 20 74 68 69 73 20 63 68 61 74 2C 20 6E 6F 74 20 65 76 65 6E 20 57 68 61 74 73 41 70 70 2C 20 63 61 6E 20 72 65 61 64 20 6F 72 20 6C 69 73 74 65 6E 20 74 6F 20 74 68 65 6D 2E

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.