Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: export / import contacts and correspondence. #1047

Open
NektoNektovich opened this issue May 31, 2022 · 6 comments
Open

feature request: export / import contacts and correspondence. #1047

NektoNektovich opened this issue May 31, 2022 · 6 comments
Labels
enhancement New feature or request

Comments

@NektoNektovich
Copy link

NektoNektovich commented May 31, 2022

Please add for convenience the export / import contacts and correspondence.

@giiutfff
Copy link

I second this.
The current tox export/import doesn't include history and files. which means when switching to a new device, they can't be transferred to new device.
A simple option to archive/restore the whole app data (as a zip file) would be practical and easy to implement.
Kind regards

@robinlinden robinlinden added the enhancement New feature or request label Nov 4, 2022
@robinlinden
Copy link
Collaborator

Yeah, I think that's a reasonable thing to add. @theAkito has added the ability to export your messages (per contact), so I guess we'll continue along that route and add support for importing the same format in the future. :)

@NektoNektovich

This comment was marked as off-topic.

@giiutfff
Copy link

giiutfff commented Nov 5, 2022

Yeah, I think that's a reasonable thing to add. @theAkito has added the ability to export your messages (per contact), so I guess we'll continue along that route and add support for importing the same format in the future. :)

I believe it will be less convenient to import all the data, if one has a long contact list. Although export messages for particular contact(s) could be useful. A method to backup/restore the whole app's data(that also includes transfered files and settings) would be nice.

btw, that json format is not really human readable, and super redundant.

"timestamp" : "2022-10-30T02-32-04",

What time zone is this?

"timestamp" : 1667079807880

And mixed with different time format .

"publicKey" : "4B9CD365CFF0F4BF0A13ACFE71C612AECF26A4699F04D1384AEA8F5A52734106",

Since there is only one contact, no need to include this information for every massage.

Kind regards

@theAkito
Copy link
Collaborator

theAkito commented Nov 5, 2022

btw, that json format is not really human readable, and super redundant.

"timestamp" : "2022-10-30T02-32-04",

What time zone is this?

"timestamp" : 1667079807880

And mixed with different time format .

"publicKey" : "4B9CD365CFF0F4BF0A13ACFE71C612AECF26A4699F04D1384AEA8F5A52734106",

Since there is only one contact, no need to include this information for every massage.

I was aware of that when I implemented it and thought about making it less redundant. However, since I am planning to make these backups importable at some point, I didn't want to change the message format, as long as I don't have a clear plan on how to do the import, so I just kept the messages verbatim, just as they are actually in the app.
Each message object is currently a 1:1 representation of what is actually, in reality, within aTox.

That said, I must emphasize that the Import/Export functionality is obviously overall still a work in progress. Especially, as long as the Import functionality is not yet available, you cannot judge the format as if it would stay the same forever from now on. It will change. Hence there is also a backup version, so the app can import & export older backups.

As for the human readability, I'm not sure if you specifically applied that to the redunandcy or the overall serialization method.

As explained above, the redundancy will be reduced in the future, but the format, i. e. JSON, won't change. It is human readable, when pretty printed, and one of the best methods available.

@giiutfff
Copy link

giiutfff commented Nov 6, 2022

Thanks for your explanation. A human readable format would be something like a HTML document with visual decoration like bubbles in my humble opinion, although it may not suitable for import back. And unix timestamp is absolutely not human readable under any circumstance.
It is understandable that the data stored in app include much more information. However the export function is only use in two ways as I can imagine: 1. for reading the data outside the app; 2. for backup (import back to the app)
For purpose 1, a human readable format is favoured. For 2, a 1:1 copy should do. As your implementation is done as per contact export, so I assume it's for purpose 1. That's why I gabbled about readability.

And one more thing, xml+xsl might be another best method available.
Kind regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants