Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jadedctrl/dino-chat-export
Exports XMPP logs and uploads from the Dino client. (🪞 Mirror)
https://github.com/jadedctrl/dino-chat-export
chat data-hoarding dino logs xmpp
Last synced: about 1 month ago
JSON representation
Exports XMPP logs and uploads from the Dino client. (🪞 Mirror)
- Host: GitHub
- URL: https://github.com/jadedctrl/dino-chat-export
- Owner: JadedCtrl
- License: gpl-3.0
- Created: 2022-10-02T17:17:58.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-01-30T06:04:45.000Z (12 months ago)
- Last Synced: 2024-11-02T00:42:22.750Z (3 months ago)
- Topics: chat, data-hoarding, dino, logs, xmpp
- Language: Shell
- Homepage: https://hak.xwx.moe/jadedctrl/dino-chat-export
- Size: 626 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING.txt
Awesome Lists containing this project
README
# dino-chat-export
Export chats and files from the XMPP client [Dino](https://dino.im) into a plain-text format.
![A screenshot of the same conversation two windows: Once in Dino, and once in HTML format displayed in Firefox.](res/combined-screenshot.png)
## Usage
`$ ./dino-chat-export /tmp/xmpp-archive/`This script's only non-base requirement is `sqlite3`.
It takes one argument, the output directory. The output tree ends up looking something like this:```
$ tree /tmp/xmpp-archive/
/tmp/xmpp-archive/
└── [email protected]
├── [email protected]
│  ├── files
│  │  ├── sldfj_some_attached_file.pdf
│  │  ├── their_avatar.png
│  │  └── your_avatar.png
│  └── messages.txt
├── [email protected]
│  ├── files
│  │  ├── their_avatar.png
│  │  └── your_avatar.png
│  └── messages.txt
```By default, each message is output in `YYYY-MM-DD <$user> $message` format, but you can customize
the output of this script with environment variables.### Environment variables
| Variable | Description | Example |
| ----------------- | ------------------------------------------------------------- | --------------------------------------- |
| `$DINO_HOME` | Dino data directory | `~/.local/share/Dino` |
| `$MESSAGE_HEADER` | Text preceding each message file, with basic substitutions. | `THEIR_JID` |
| | Substitutions: THEIR_JID, YOUR_JID, THEIR_NICK, YOUR_NICK | |
| `$MESSAGE_FOOTER` | Likewise, but is output to the end of each message file. | `` |
| `$MESSAGE_FORMAT` | Template for message output, in a printf style. | `[%s] <%s>: %s` |
| `$MESSAGE_SLOTS` | Comma-delimited arguments for $MESSAGE_FORMAT | `DATE,JID,BODY` |
| | Valid slots: AVATAR, BODY, DATE, JID | |
| `$IMAGE_FORMAT` | Format for message-bodies containing an image. | `` |
| `$FILE_FORMAT` | Same as `$IMAGE_FORMAT`, but for non-image files. | `Uploaded file` |## Examples
### HTML output
Here are some environment variables you can use to get rudimentary, unstyled HTML output:```shell
'
$ export MESSAGE_FORMAT='
MESSAGE_SLOTS='DATE,AVATAR,JID,BODY'
MESSAGE_HEADER='Conversation with THEIR_JID - YOUR_JID<
'
MESSAGE_FOOTER='
'
IMAGE_FORMAT=''
FILE_FORMAT='%s'
$ ./dino-chat-export ~/Archive/Chats/XMPP/
```Feel free to spice it up with some real CSS!
## Meta
License is the GNU GPLv3+, COPYING.txt.- https://hak.xwx.moe/jadedctrl/dino-chat-export