Skip to content

Commit

Permalink
patch
Browse files Browse the repository at this point in the history
  • Loading branch information
owent committed Mar 24, 2018
1 parent f468519 commit 8c08f63
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
15 changes: 10 additions & 5 deletions source/users/output_format.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
数据的输出类型和数据加载
=============================================

所有输出的数据的结构都是按照 https://github.com/xresloader/xresloader/blob/master/header/pb_header_v3.proto 的 ``xresloader_datablocks`` 的结构。
所有输出的数据的结构都是按照 https://github.com/xresloader/xresloader/blob/master/header/pb_header_v3.proto 的 ``xresloader_datablocks`` 的结构。 ::

转表功能和二进制数据读取的示例见: https://github.com/xresloader/xresloader/tree/master/sample
> 转表功能和二进制数据读取的示例: https://github.com/xresloader/xresloader/tree/master/sample
> 文本和Msgpack数据读取示例: https://github.com/xresloader/xresloader/tree/master/loader-binding

文本和Msgpack数据读取示例见: https://github.com/xresloader/xresloader/tree/master/loader-binding

下面我们对转出数据和加载进一步说明。

输出类型
-----------------------------------------------
Expand All @@ -28,16 +26,23 @@
导出为json、xml、lua代码等文本数据 (可选)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

对应 ``-t json`` 、 ``-t xml`` 、 ``-t lua`` 。

对于文本数据,可以通过 ``--pretty 缩进数量`` 来设置格式化输出。

.. _output-format-export msgpack:

导出为Msgpack打包的二进制数据 (可选)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

对应 ``-t msgpack``

.. _output-format-export enum:

导出枚举类型成代码 (可选)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

对于导出的代码,可以通过 ``--pretty 缩进数量`` 来设置格式化输出。

数据加载
-----------------------------------------------
Expand Down
5 changes: 5 additions & 0 deletions source/users/xresloader_core.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ xresloader-可用参数列表
| --javascript-global | 导出javascript全局空间 | 导出数据到全局时,可以指定写入的名字空间 |
+--------------------------------------+----------------------------------+---------------------------------------------------------------+

批处理
---------------------------------------------

如果我们需要一次性转出多个表,可以使用 ``--stdin`` 选项,然后再标准输入里输入其他的配置参数。这时候我们认为每个非空行都是一个数据转换组。

直接使用xresloader
---------------------------------------------

Expand Down

0 comments on commit 8c08f63

Please sign in to comment.