导出supportbee数据以更好地与其他票务工具集成
beedumper的Python项目详细描述
beedumper:备份您的supportbee数据
从SupportBee票务工具备份所有数据的工具
安装
该包在pypi上发布为beedumper,因此您可以在python 3.6环境中运行pip install beedumper
,以安装主命令行界面。或者,您也可以导入beedumper.export.Exporter
类,并直接使用实现的^{
note:此工具需要运行Python3.6或更高版本。
beedumper
cli命令
$ beedumper -h Usage: beedumper [OPTIONS] COMMAND [ARGS]... This command line tool helps you export your SupportBee account data. Options: -l, --loglevel [error|warn|info|debug] -c, --config PATH Defaults to current folder "config.yaml" -v, --version Show the version and exit. -h, --help Show this message and exit. Commands: all Export all account info, both metadata and tickets all-metadata Export all metadata all-tickets Export all ticket info: tickets, replies, comments and... emails Exports the forwarding addresses export-attachments Exports all attachments from the tickets stored export-comments Exports all comments from the tickets stored export-replies Exports all replies from the tickets stored export-tickets Exports all tickets in a folder structure labels Exports the labels snippets Exports the snippets teams Exports the teams users Exports the users
检查example configuration以使用supportbee凭据和其他设置设置设置config.yaml
文件。
某些子命令可能有更多选项,请使用-h
了解更多有关它们的信息。
门票存储
票证存储在定义的输出目录下的文件夹tickets
下。对于每个票证,在中间文件夹下创建一个文件夹,该文件夹的id
是由99
的id模数。也就是说,在票下,你最终会有文件夹从^ {< CD10> }到^ {CD11}}。
在每个票证文件夹下,您最终将以以下结构结束:
ticket.json
:主要信息replies.json
:对请求者的答复数组comments.json
:代理商的评论attachments
:包含原始请求者的附件文件的文件夹attachments_replies
:包含来自回复的附件的文件夹
建议使用
建议首先运行简单的子命令,如users
或labels
,以测试工作是否正常。然后,您可以从export-tickets --since-date
传递最近的日期开始,只下载几张票。然后,您可以依次使用^ {CD20}}、^ {CD21}}和^ {CD22}},因为答复和注释都基于现有的票据,并且附件使用票证和答复JSON文件。
如果在下载这些最近的资产时没有问题,那么可以运行all
来下载票证信息的完整转储,在随后的执行中,使用--since-date
参数仅下载具有早于传递的时间戳的last_activity_at
元数据的票证,以使用最近的更改更新转储。