Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
axiaoxin committed Apr 2, 2015
1 parent d48dcd3 commit 09c7bf8
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions json2xls/__init__.py
Expand Up @@ -117,11 +117,19 @@ def body_callback(self, data):
命令行::
$ json2xls test.xls '{"a":"a", "b":"b"}'
$ json2xls test.xls '[{"a":"a", "b":"b"},{"a":1, "b":2}]'
$ json2xls test.xls "`cat tests/data.json`"
$ json2xls test.xls tests/data2.json
$ json2xls test.xls http://api.bosonnlp.com/ner/analysis -m post -d '"我是臭流氓"' -h "{'X-Token': 'bosontokenheader'}"
# from json string
json2xls tests/cmd_str_test.xls '{"a":"a", "b":"b"}'
json2xls tests/cmd_str_test1.xls '[{"a":"a", "b":"b"},{"a":1, "b":2}]'
# from file: whole file is a complete json data
json2xls tests/cmd_list_test.xls "`cat tests/list_data.json`"
# from file: each line is a json data
json2xls tests/cmd_line_test.xls tests/line_data.json
# from url
json2xls tests/cmd_get_test.xls http://httpbin.org/get
json2xls tests/cmd_post_test.xls http://httpbin.org/post -m post -d '"hello json2xls"' -h "{'X-Token': 'bolobolomi'}"
"""

Expand Down

0 comments on commit 09c7bf8

Please sign in to comment.