Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 1.16 KB

ExportArchiveUnpacker.md

File metadata and controls

29 lines (20 loc) · 1.16 KB

Exported Archives unpacking tool

Anytype allows user to export desired objects whether in JSON or PROTOBUF formats.

Most of exported archives contain objects stored in PROTOBUF format, as it is encoded and lightweight. However, if you need to convert an exported archive to see all objects in JSON format you can use archiveconverter tool.

Program is located in cmd/archiveunpacker folder. CLI can run in two modes:

Unpack

go run main.go -unpack <path_to_zip>

unpack parameter accepts path to the ZIP archive containing PROTOBUF files. Each file should be one of following model:

  • ChangeSnapshot
  • SnapshotWithType
  • Profile

As a result program generates a directory with files in JSON format corresponding to content of input archive. You can edit it freely.

Pack

go run main.go -pack <path_to_directory>

pack parameter accepts path to the directory containing JSON files, that also should be one of models presented in previous paragraph.

In packing mode program does reverse operation and creates an archive with PROTOBUF files corresponding to JSON objects presented in input directory.