From e4f9be64fa10ee1982a95f3d991a50cc80481dfd Mon Sep 17 00:00:00 2001 From: CaiHQ Date: Tue, 4 Jan 2022 13:51:41 +0800 Subject: [PATCH] prune structure --- README.md | 23 +- .../{Introduction.md => 1_Introduction.md} | 13 +- .../{InstallTips.md => 2_InstallTips.md} | 0 .../{IDEUsage.md => 3_IDEUsage.md} | 0 .../{ContractAPI.md => 4_ContractAPI.md} | 0 .../{YJSInDepth.md => 5_YJSInDepth.md} | 0 .../{YJSAPI.md => 6_YJSAPI.md} | 0 markdown/markdown_BDWare/index.rst | 14 +- .../{Introduction.rst => 1_Introduction.rst} | 12 +- source/{InstallTips.rst => 2_InstallTips.rst} | 0 source/{IDEUsage.rst => 3_IDEUsage.rst} | 0 source/{ContractAPI.rst => 4_ContractAPI.rst} | 0 source/{YJSInDepth.rst => 5_YJSInDepth.rst} | 0 source/{YJSAPI.rst => 6_YJSAPI.rst} | 0 source/httpapi.rst | 608 ++++++++++++++++++ source/index.rst | 14 +- toRst.sh | 15 +- 17 files changed, 650 insertions(+), 49 deletions(-) rename markdown/markdown_BDWare/{Introduction.md => 1_Introduction.md} (97%) rename markdown/markdown_BDWare/{InstallTips.md => 2_InstallTips.md} (100%) rename markdown/markdown_BDWare/{IDEUsage.md => 3_IDEUsage.md} (100%) rename markdown/markdown_BDWare/{ContractAPI.md => 4_ContractAPI.md} (100%) rename markdown/markdown_BDWare/{YJSInDepth.md => 5_YJSInDepth.md} (100%) rename markdown/markdown_BDWare/{YJSAPI.md => 6_YJSAPI.md} (100%) rename source/{Introduction.rst => 1_Introduction.rst} (98%) rename source/{InstallTips.rst => 2_InstallTips.rst} (100%) rename source/{IDEUsage.rst => 3_IDEUsage.rst} (100%) rename source/{ContractAPI.rst => 4_ContractAPI.rst} (100%) rename source/{YJSInDepth.rst => 5_YJSInDepth.rst} (100%) rename source/{YJSAPI.rst => 6_YJSAPI.rst} (100%) create mode 100644 source/httpapi.rst diff --git a/README.md b/README.md index 686d51e..e2a2b62 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ -# 环境依赖安装: +# 环境配置 +## 环境依赖安装 ```bash #视情况使用pip/pip3 pip install sphinx @@ -8,26 +9,19 @@ pip install sphinx_markdown_tables pip install sphinx-multiversion ``` -# 建立软链接 -``` -ln -s absolutepath/markdown/ ./soruce/_static -``` - # 更新版本 ``` git tag -a v${version} -m "message" ``` - - - +# 将TAG推送到服务端 +``` +git push --tags +``` # 配置文件说明 - ./source/index.rst ./source/conf.py - # 编写文档 - -前往source/markdown目录,修改xxx.md文件。 +前往markdown/markdown_BDWare目录,修改xxx.md文件。 ## 转换成rst,并生成html。 @@ -43,9 +37,6 @@ sh toRst.sh make latex make latexPdf ``` -## - - # MarkDownTips 1)学习markdown:https://www.runoob.com/markdown/md-tutorial.html diff --git a/markdown/markdown_BDWare/Introduction.md b/markdown/markdown_BDWare/1_Introduction.md similarity index 97% rename from markdown/markdown_BDWare/Introduction.md rename to markdown/markdown_BDWare/1_Introduction.md index ab5dc94..5b6de8c 100644 --- a/markdown/markdown_BDWare/Introduction.md +++ b/markdown/markdown_BDWare/1_Introduction.md @@ -11,13 +11,12 @@ BDContract是一个可信计算框架,计算逻辑以智能合约的方式表 ## 特点 -0. 支持多种执行模式,权衡可用性、可靠性、正确性和效率。 -1. 接入各种数据源。 -2. 支持合约的细粒度监测。 -3. 支持合约的状态。 -4. 访问控制。 -5. 支撑跨语言调用。 - +1. 支持多种执行模式,权衡可用性、可靠性、正确性和效率。 +2. 接入各种数据源。 +3. 支持合约的细粒度监测。 +4. 支持合约的状态。 +5. 访问控制。 +6. 支撑跨语言调用。 - - - diff --git a/markdown/markdown_BDWare/InstallTips.md b/markdown/markdown_BDWare/2_InstallTips.md similarity index 100% rename from markdown/markdown_BDWare/InstallTips.md rename to markdown/markdown_BDWare/2_InstallTips.md diff --git a/markdown/markdown_BDWare/IDEUsage.md b/markdown/markdown_BDWare/3_IDEUsage.md similarity index 100% rename from markdown/markdown_BDWare/IDEUsage.md rename to markdown/markdown_BDWare/3_IDEUsage.md diff --git a/markdown/markdown_BDWare/ContractAPI.md b/markdown/markdown_BDWare/4_ContractAPI.md similarity index 100% rename from markdown/markdown_BDWare/ContractAPI.md rename to markdown/markdown_BDWare/4_ContractAPI.md diff --git a/markdown/markdown_BDWare/YJSInDepth.md b/markdown/markdown_BDWare/5_YJSInDepth.md similarity index 100% rename from markdown/markdown_BDWare/YJSInDepth.md rename to markdown/markdown_BDWare/5_YJSInDepth.md diff --git a/markdown/markdown_BDWare/YJSAPI.md b/markdown/markdown_BDWare/6_YJSAPI.md similarity index 100% rename from markdown/markdown_BDWare/YJSAPI.md rename to markdown/markdown_BDWare/6_YJSAPI.md diff --git a/markdown/markdown_BDWare/index.rst b/markdown/markdown_BDWare/index.rst index 63327bd..c0afa8a 100644 --- a/markdown/markdown_BDWare/index.rst +++ b/markdown/markdown_BDWare/index.rst @@ -3,16 +3,16 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -智融云河大数据区块链-智能合约引擎 文档 +北大数瑞-BDContract 文档 ====================================== .. toctree:: :maxdepth: 3 :caption: 目录 - Introduction.rst - InstallTips.rst - IDEUsage.rst - ContractAPI.rst - YJSInDepth.rst - YJSAPI.rst \ No newline at end of file + 1_Introduction.rst + 2_InstallTips.rst + 3_IDEUsage.rst + 4_ContractAPI.rst + 5_YJSInDepth.rst + 6_YJSAPI.rst \ No newline at end of file diff --git a/source/Introduction.rst b/source/1_Introduction.rst similarity index 98% rename from source/Introduction.rst rename to source/1_Introduction.rst index 70a47d3..a862d57 100644 --- a/source/Introduction.rst +++ b/source/1_Introduction.rst @@ -13,12 +13,12 @@ BDContract是一个可信计算框架,计算逻辑以智能合约的方式表 特点 ---- -0. 支持多种执行模式,权衡可用性、可靠性、正确性和效率。 -1. 接入各种数据源。 -2. 支持合约的细粒度监测。 -3. 支持合约的状态。 -4. 访问控制。 -5. 支撑跨语言调用。 +1. 支持多种执行模式,权衡可用性、可靠性、正确性和效率。 +2. 接入各种数据源。 +3. 支持合约的细粒度监测。 +4. 支持合约的状态。 +5. 访问控制。 +6. 支撑跨语言调用。 -------------- diff --git a/source/InstallTips.rst b/source/2_InstallTips.rst similarity index 100% rename from source/InstallTips.rst rename to source/2_InstallTips.rst diff --git a/source/IDEUsage.rst b/source/3_IDEUsage.rst similarity index 100% rename from source/IDEUsage.rst rename to source/3_IDEUsage.rst diff --git a/source/ContractAPI.rst b/source/4_ContractAPI.rst similarity index 100% rename from source/ContractAPI.rst rename to source/4_ContractAPI.rst diff --git a/source/YJSInDepth.rst b/source/5_YJSInDepth.rst similarity index 100% rename from source/YJSInDepth.rst rename to source/5_YJSInDepth.rst diff --git a/source/YJSAPI.rst b/source/6_YJSAPI.rst similarity index 100% rename from source/YJSAPI.rst rename to source/6_YJSAPI.rst diff --git a/source/httpapi.rst b/source/httpapi.rst new file mode 100644 index 0000000..a2c08fa --- /dev/null +++ b/source/httpapi.rst @@ -0,0 +1,608 @@ +.. code:: yaml + + type: google.api.Service + config_version: 3 + + http: + rules: + - selector: bdware.bdledger.api.Node.ClientVersion + get: /v0/node/version + - selector: bdware.bdledger.api.Ledger.CreateLedger + post: /v0/ledgers + body: "*" + - selector: bdware.bdledger.api.Ledger.GetLedgers + get: /v0/ledgers + - selector: bdware.bdledger.api.Ledger.SendTransaction + post: /v0/ledgers/{ledger}/transactions + body: "*" + - selector: bdware.bdledger.api.Query.GetBlockByHash + get: /v0/ledgers/{ledger}/block + - selector: bdware.bdledger.api.Query.GetBlocks + post: /v0/ledgers/{ledger}/blocks/query + body: "*" + - selector: bdware.bdledger.api.Query.CountBlocks + post: /v0/ledgers/{ledger}/blocks/count + body: "*" + - selector: bdware.bdledger.api.Query.GetRecentBlocks + get: /v0/ledgers/{ledger}/blocks/recent + - selector: bdware.bdledger.api.Query.GetTransactionByHash + get: /v0/ledgers/{ledger}/transaction + - selector: bdware.bdledger.api.Query.GetTransactionByBlockHashAndIndex + get: /v0/ledgers/{ledger}/block/transaction + - selector: bdware.bdledger.api.Query.GetTransactions + post: /v0/ledgers/{ledger}/transactions/query + body: "*" + - selector: bdware.bdledger.api.Query.CountTransactions + post: /v0/ledgers/{ledger}/transactions/count + body: "*" + +.. + + **Note** + + Request/Response data of **bytes** type should/will be encoded with + `Base64 `__. + + **Note** + + When using hash strings in URL, they need to be encoded with + `encodeURIComponent `__. + +Request Examples {#_request_examples} ================ + +Node.ClientVersion {#_node_clientversion} —————— + +Get BDLedger node version + +:: + + GET http://{{IP}}:{{PORT}}/v0/node/version + +**Response.** + +.. code:: json + + { + "version": "dev-210119.a88bf4eb" + } + +Ledger.CreateLedger {#_ledger_createledger} ——————- + +Create a new ledger + +:: + + POST http://{{IP}}:{{PORT}}/v0/ledgers + +**Request body.** + +.. code:: json + + { + "name": "test" + } + +**Response.** + +.. code:: json + + { + "ok": true + } + +Ledger.GetLedgers {#_ledger_getledgers} —————– + +Get all ledgers + +:: + + GET http://{{IP}}:{{PORT}}/v0/ledgers + +**Response.** + +.. code:: json + + { + "ledgers": [ + "default", + "test" + ] + } + +Ledger.SendTransaction {#_ledger_sendtransaction} ———————- + +Send a new transaction + +:: + + POST http://{{IP}}:{{PORT}}/v0/ledgers/test/transactions + +**Request body.** + +.. code:: json + + { + "transaction": { + "type": 0, + "from": "8A3K/vANyv7wDcr+8A3K/vANyv4=", + "nonce": 52, + "data": "lQItWZKS5hlUn6V/DMKKwvZXxvM=" + } + } + +**Response.** + +.. code:: json + + { + "hash": "VQBeA5Ee0Y5hqEileoQuYMHbOSE=" + } + +Query.GetBlockByHash {#_query_getblockbyhash} ——————– + +Get a block identified by its hash + +:: + + GET http://{{IP}}:{{PORT}}/v0/ledgers/test/block?hash=LSKr%2BK079Ax%2BrKdlyYN5ze2YGzo%3D + +**hash** has to be encoded with +`encodeURIComponent `__ + +**Response.** + +.. code:: json + + { + "block": { + "hash": "LSKr+K079Ax+rKdlyYN5ze2YGzo=", + "creator": "", + "nonce": "0", + "parentHashes": [ + "fLX5pMY8M1qSAGZdKT1rWBkdEMo=", + "rk0DWMaUpRG82yVX+cFhbfhPFdw=", + "3XkwkuMBearq8uavN76Te7Zdpl8=" + ], + "witnesses": [], + "timestamp": "1611038043", + "size": "0", + "transactionCount": 1, + "transactionsRoot": "VQBeA5Ee0Y5hqEileoQuYMHbOSE=", + "transactions": [ + { + "blockHash": "", + "blockTimestamp": "0", + "index": 0, + "hash": "VQBeA5Ee0Y5hqEileoQuYMHbOSE=", + "type": "RECORD", + "from": "8A3K/vANyv7wDcr+8A3K/vANyv4=", + "nonce": "0", + "to": "AAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "data": "lQItWZKS5hlUn6V/DMKKwvZXxvM=" + } + ], + "transactionHashes": [ + "VQBeA5Ee0Y5hqEileoQuYMHbOSE=" + ] + } + } + +Query.GetBlocks {#_query_getblocks} ————— + +Get blocks in a timestamp range + +:: + + POST http://{{IP}}:{{PORT}}/v0/ledgers/test/blocks/query + +.. code:: protobuf + + enum IncludeTransactions { + NONE = 0; // Don't include transaction data + HASH = 1; // Include transactions hashes + FULL = 2; // Include full transactions + } + +Requirement: asciimath:["start_timestamp"⇐"end_timestamp"] + +If only **end_timestamp** is not specified, or +asciimath:["end_timestamp"-"start_timestamp">"query.maxDuration"], then +**end_timestamp** will be set to +asciimath:["start_timestamp"+"query.maxDuration"]. + +If only **start_timestamp** is not specified, then **start_timestamp** +will be set to asciimath:["end_timestamp"-"query.maxDuration"]. + +In all cases, **start_timestamp** will never be earlier than the genesis +block’s timestamp, and **end_timestamp** will never be later than the +current timestamp when the node process the query request. + +**Request body 1.** + +.. code:: json + + { + "start_timestamp": 1611038000, + "end_timestamp": 1611039000, + "include_transactions": 0 + } + +**Response 1.** + +.. code:: json + + { + "blocks": [ + { + "hash": "LSKr+K079Ax+rKdlyYN5ze2YGzo=", + "creator": "", + "nonce": "0", + "parentHashes": [ + "fLX5pMY8M1qSAGZdKT1rWBkdEMo=", + "rk0DWMaUpRG82yVX+cFhbfhPFdw=", + "3XkwkuMBearq8uavN76Te7Zdpl8=" + ], + "witnesses": [], + "timestamp": "1611038043", + "size": "0", + "transactionCount": 1, + "transactionsRoot": "VQBeA5Ee0Y5hqEileoQuYMHbOSE=", + "transactions": [], + "transactionHashes": [] + } + ], + "startTimestamp": "1611038043", + "endTimestamp": "1611038043" + } + +**Request body 2.** + +.. code:: json + + { + "start_timestamp": 1611038000, + "end_timestamp": 1611039000, + "include_transactions": 1 + } + +**Response 2.** + +.. code:: json + + { + "blocks": [ + { + "hash": "LSKr+K079Ax+rKdlyYN5ze2YGzo=", + "creator": "", + "nonce": "0", + "parentHashes": [ + "fLX5pMY8M1qSAGZdKT1rWBkdEMo=", + "rk0DWMaUpRG82yVX+cFhbfhPFdw=", + "3XkwkuMBearq8uavN76Te7Zdpl8=" + ], + "witnesses": [], + "timestamp": "1611038043", + "size": "0", + "transactionCount": 1, + "transactionsRoot": "VQBeA5Ee0Y5hqEileoQuYMHbOSE=", + "transactions": [], + "transactionHashes": [ + "VQBeA5Ee0Y5hqEileoQuYMHbOSE=" + ] + } + ], + "startTimestamp": "1611038043", + "endTimestamp": "1611038043" + } + +**Request body 3.** + +.. code:: json + + { + "start_timestamp": 1611038000, + "end_timestamp": 1611039000, + "include_transactions": 2 + } + +**Response 3.** + +.. code:: json + + { + "blocks": [ + { + "hash": "LSKr+K079Ax+rKdlyYN5ze2YGzo=", + "creator": "", + "nonce": "0", + "parentHashes": [ + "fLX5pMY8M1qSAGZdKT1rWBkdEMo=", + "rk0DWMaUpRG82yVX+cFhbfhPFdw=", + "3XkwkuMBearq8uavN76Te7Zdpl8=" + ], + "witnesses": [], + "timestamp": "1611038043", + "size": "0", + "transactionCount": 1, + "transactionsRoot": "VQBeA5Ee0Y5hqEileoQuYMHbOSE=", + "transactions": [ + { + "blockHash": "", + "blockTimestamp": "0", + "index": 0, + "hash": "VQBeA5Ee0Y5hqEileoQuYMHbOSE=", + "type": "RECORD", + "from": "8A3K/vANyv7wDcr+8A3K/vANyv4=", + "nonce": "0", + "to": "AAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "data": "lQItWZKS5hlUn6V/DMKKwvZXxvM=" + } + ], + "transactionHashes": [ + "VQBeA5Ee0Y5hqEileoQuYMHbOSE=" + ] + } + ], + "startTimestamp": "1611038043", + "endTimestamp": "1611038043" + } + +Query.CountBlocks {#_query_countblocks} —————– + +Count all blocks in a ledger, or blocks in a timestamp range + +:: + + POST http://{{IP}}:{{PORT}}/v0/ledgers/test/blocks/count + +Requirement: asciimath:["start_timestamp"⇐"end_timestamp"] + +If neither **start_timestamp** nor **end_timestamp** is specified, then +count all blocks in the specified ledger. + +If only **end_timestamp** is not specified, then count all blocks with +timestamps later than **start_timestamp**. + +If only **start_timestamp** is not specified, then count all blocks with +timestamps earlier than **end_timestamp**. + +In all cases, **start_timestamp** will never be earlier than the genesis +block’s timestamp, and **end_timestamp** will never be later than the +current timestamp when the node process the query request. + +**Request body 1.** + +.. code:: json + + {} + +**Response 1.** + +.. code:: json + + { + "count": "5", + "startTimestamp": "0", + "endTimestamp": "1611039957" + } + +**Request body 2.** + +.. code:: json + + { + "start_timestamp": 1611038000, + "end_timestamp": 1611039000 + } + +**Response 2.** + +.. code:: json + + { + "count": "1", + "startTimestamp": "1611038000", + "endTimestamp": "1611039000" + } + +Query.GetRecentBlocks {#_query_getrecentblocks} ——————— + +Get recent **count** blocks (Only support IncludeTransactions=NONE for +now) + +:: + + GET http://{{IP}}:{{PORT}}/v0/ledgers/test/blocks/recent?count=2 + +**Response.** + +.. code:: json + + { + "blocks": [ + { + "hash": "LSKr+K079Ax+rKdlyYN5ze2YGzo=", + "creator": "", + "nonce": "0", + "parentHashes": [ + "fLX5pMY8M1qSAGZdKT1rWBkdEMo=", + "rk0DWMaUpRG82yVX+cFhbfhPFdw=", + "3XkwkuMBearq8uavN76Te7Zdpl8=" + ], + "witnesses": [], + "timestamp": "1611038043", + "size": "0", + "transactionCount": 1, + "transactionsRoot": "VQBeA5Ee0Y5hqEileoQuYMHbOSE=", + "transactions": [], + "transactionHashes": [] + }, + { + "hash": "rk0DWMaUpRG82yVX+cFhbfhPFdw=", + "creator": "", + "nonce": "0", + "parentHashes": [ + "fLX5pMY8M1qSAGZdKT1rWBkdEMo=", + "3XkwkuMBearq8uavN76Te7Zdpl8=", + "8pZPR74OALIbps5XFb4dL/s0j0M=" + ], + "witnesses": [], + "timestamp": "1610968019", + "size": "0", + "transactionCount": 1, + "transactionsRoot": "LuxttCm/pSHVMOKF0sJExk+DJXc=", + "transactions": [], + "transactionHashes": [] + } + ], + "startTimestamp": "1610968019", + "endTimestamp": "1611038043" + } + +Query.GetTransactionByHash {#_query_gettransactionbyhash} ————————– + +Get a transaction identified by its hash + +:: + + GET http://{{IP}}:{{PORT}}/v0/ledgers/test/transaction?hash=VQBeA5Ee0Y5hqEileoQuYMHbOSE%3D + +**hash** has to be encoded with +`encodeURIComponent `__ + +**Response.** + +.. code:: json + + { + "transaction": { + "blockHash": "LSKr+K079Ax+rKdlyYN5ze2YGzo=", + "blockTimestamp": "1611038043", + "index": 0, + "hash": "VQBeA5Ee0Y5hqEileoQuYMHbOSE=", + "type": "RECORD", + "from": "8A3K/vANyv7wDcr+8A3K/vANyv4=", + "nonce": "0", + "to": "AAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "data": "lQItWZKS5hlUn6V/DMKKwvZXxvM=" + } + } + +Query.GetTransactionByBlockHashAndIndex +{#_query_gettransactionbyblockhashandindex} ————————————— + +Get a transaction identified by hash of the block it belongs to and its +index inside the block + +:: + + GET http://{{IP}}:{{PORT}}/v0/ledgers/test/block/transaction?blockHash=LSKr%2BK079Ax%2BrKdlyYN5ze2YGzo%3D&index=0 + +**blockHash** has to be encoded with +`encodeURIComponent `__ + +**Response.** + +.. code:: json + + { + "transaction": { + "blockHash": "LSKr+K079Ax+rKdlyYN5ze2YGzo=", + "blockTimestamp": "1611038043", + "index": 0, + "hash": "VQBeA5Ee0Y5hqEileoQuYMHbOSE=", + "type": "RECORD", + "from": "8A3K/vANyv7wDcr+8A3K/vANyv4=", + "nonce": "0", + "to": "AAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "data": "lQItWZKS5hlUn6V/DMKKwvZXxvM=" + } + } + +Query.GetTransactions {#_query_gettransactions} ——————— + +Get transactions in a timestamp range + +:: + + POST http://{{IP}}:{{PORT}}/v0/ledgers/test/transactions/query + +**start_timestamp** and **end_timestamp** follow the same requirements +and rules as in `??? <#Query.GetBlocks>`__. + +**Request body.** + +.. code:: json + + { + "start_timestamp": 1611038000, + "end_timestamp": 1611039000 + } + +**Response.** + +.. code:: json + + { + "transactions": [ + { + "blockHash": "", + "blockTimestamp": "0", + "index": 0, + "hash": "VQBeA5Ee0Y5hqEileoQuYMHbOSE=", + "type": "RECORD", + "from": "8A3K/vANyv7wDcr+8A3K/vANyv4=", + "nonce": "0", + "to": "AAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "data": "lQItWZKS5hlUn6V/DMKKwvZXxvM=" + } + ], + "startTimestamp": "1611038043", + "endTimestamp": "1611038043" + } + +Query.CountTransactions {#_query_counttransactions} ———————– + +Count all transactions in a ledger, or transactions in a timestamp range + +:: + + POST http://{{IP}}:{{PORT}}/v0/ledgers/test/transactions/count + +**start_timestamp** and **end_timestamp** follow the same requirements +and rules as in `??? <#Query.CountBlocks>`__. + +**Request body 1.** + +.. code:: json + + {} + +**Response 1.** + +.. code:: json + + { + "count": "4", + "startTimestamp": "0", + "endTimestamp": "1611039957" + } + +**Request body 2.** + +.. code:: json + + { + "start_timestamp": 1611038000, + "end_timestamp": 1611039000 + } + +**Response 2.** + +.. code:: json + + { + "count": "1", + "startTimestamp": "1611038000", + "endTimestamp": "1611039000" + } diff --git a/source/index.rst b/source/index.rst index 63327bd..c0afa8a 100644 --- a/source/index.rst +++ b/source/index.rst @@ -3,16 +3,16 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -智融云河大数据区块链-智能合约引擎 文档 +北大数瑞-BDContract 文档 ====================================== .. toctree:: :maxdepth: 3 :caption: 目录 - Introduction.rst - InstallTips.rst - IDEUsage.rst - ContractAPI.rst - YJSInDepth.rst - YJSAPI.rst \ No newline at end of file + 1_Introduction.rst + 2_InstallTips.rst + 3_IDEUsage.rst + 4_ContractAPI.rst + 5_YJSInDepth.rst + 6_YJSAPI.rst \ No newline at end of file diff --git a/toRst.sh b/toRst.sh index f8f1232..0f983f6 100644 --- a/toRst.sh +++ b/toRst.sh @@ -23,12 +23,15 @@ cp ${src}/conf.py ./conf.py cp ${src}/index.rst ./index.rst cp -r ${src}/_static ./_static -pandoc ${src}/ContractAPI.md -f markdown -t rst -o ContractAPI.rst -pandoc ${src}/IDEUsage.md -f markdown -t rst -o IDEUsage.rst -pandoc ${src}/InstallTips.md -f markdown -t rst -o InstallTips.rst -pandoc ${src}/Introduction.md -f markdown -t rst -o Introduction.rst -pandoc ${src}/YJSAPI.md -f markdown -t rst -o YJSAPI.rst -pandoc ${src}/YJSInDepth.md -f markdown -t rst -o YJSInDepth.rst +for f in `ls ${src} | grep .md ` ; do + echo "convert $f --> ${f/.md/.rst}" + pandoc ${src}/$f -f markdown -t rst -o ${f/.md/.rst} +done +#pandoc ${src}/IDEUsage.md -f markdown -t rst -o IDEUsage.rst +#pandoc ${src}/InstallTips.md -f markdown -t rst -o InstallTips.rst +#pandoc ${src}/Introduction.md -f markdown -t rst -o Introduction.rst +#pandoc ${src}/YJSAPI.md -f markdown -t rst -o YJSAPI.rst +#pandoc ${src}/YJSInDepth.md -f markdown -t rst -o YJSInDepth.rst cd .. make clean #make html