Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Exports XMPP logs and uploads from the Dino client. (🪞 Mirror)

License

NotificationsYou must be signed in to change notification settings

JadedCtrl/dino-chat-export

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Export chats and files from the XMPP clientDino into a plain-text format.

A screenshot of the same conversation two windows: Once in Dino, and once in HTML format displayed in Firefox.

Usage

$ ./dino-chat-export /tmp/xmpp-archive/

This script's only non-base requirement issqlite3.It takes one argument, the output directory. The output tree ends up looking something like this:

$ tree /tmp/xmpp-archive//tmp/xmpp-archive/└── youraccount@domain.tld    ├── yourfriend@otherdomain.tld    │   ├── files    │   │   ├── sldfj_some_attached_file.pdf    │   │   ├── their_avatar.png    │   │   └── your_avatar.png    │   └── messages.txt    ├── evilperson@evilcompany.com    │   ├── files    │   │   ├── their_avatar.png    │   │   └── your_avatar.png    │   └── messages.txt

By default, each message is output inYYYY-MM-DD <$user> $message format, but you can customizethe output of this script with environment variables.

Environment variables

VariableDescriptionExample
$DINO_HOMEDino data directory~/.local/share/Dino
$MESSAGE_HEADERText preceding each message file, with basic substitutions.<html><title>THEIR_JID</title><body>
Substitutions: THEIR_JID, YOUR_JID, THEIR_NICK, YOUR_NICK
$MESSAGE_FOOTERLikewise, but is output to the end of each message file.</body></html>
$MESSAGE_FORMATTemplate for message output, in a printf style.[%s] <%s>: %s
$MESSAGE_SLOTSComma-delimited arguments for $MESSAGE_FORMATDATE,JID,BODY
Valid slots: AVATAR, BODY, DATE, JID
$IMAGE_FORMATFormat for message-bodies containing an image.<img src="%s" />
$FILE_FORMATSame as$IMAGE_FORMAT, but for non-image files.<a href src="%s">Uploaded file</a>

Examples

HTML output

Here are some environment variables you can use to get rudimentary, unstyled HTML output:

$export MESSAGE_FORMAT='<div class='message'><datetime>%s</datetime> <img class='avatar' src="%s" /> <b>%s</b> — <p>%s</p></div>'MESSAGE_SLOTS='DATE,AVATAR,JID,BODY'MESSAGE_HEADER='<!DOCTYPE html><html><head><title>Conversation with THEIR_JID - YOUR_JID</title><<link rel="stylesheet" type="text/css" href="../style.css" /></head><body>'MESSAGE_FOOTER='</body></html>'IMAGE_FORMAT='<img src="%s" />'FILE_FORMAT='<a href="%s" />%s</a>'$ ./dino-chat-export~/Archive/Chats/XMPP/

Feel free to spice it up with some real CSS!

Meta

License is the GNU GPLv3+, COPYING.txt.

About

Exports XMPP logs and uploads from the Dino client. (🪞 Mirror)

Topics

Resources

License

Stars

Watchers

Forks


[8]ページ先頭

©2009-2025 Movatter.jp