null+****@clear*****
null+****@clear*****
2012年 5月 18日 (金) 17:51:06 JST
Kouhei Sutou 2012-05-18 17:51:06 +0900 (Fri, 18 May 2012)
New Revision: 4d087816c4cff3c3ef97e6796990d09b6c6ddd79
Log:
doc: fix execution examples that run command
Modified files:
doc/source/example/tutorial/network-1.log
doc/source/example/tutorial/network-2.log
doc/source/example/tutorial/network-3.log
doc/update_execution_example.py
Modified: doc/source/example/tutorial/network-1.log (+7 -8)
===================================================================
--- doc/source/example/tutorial/network-1.log 2012-05-18 17:39:14 +0900 (3ec2fd3)
+++ doc/source/example/tutorial/network-1.log 2012-05-18 17:51:06 +0900 (38ea28e)
@@ -1,25 +1,24 @@
Execution example::
-% groonga -c
- status
+ % groonga -c
+ status
# [
# [
# 0,
- # 1336611845.44394,
- # 5.60283660888672e-05
+ # 1337330936.85818,
+ # 0.000131368637084961
# ],
# {
# "uptime": 0,
# "max_command_version": 2,
# "n_queries": 0,
# "cache_hit_rate": 0.0,
- # "version": "2.0.2",
+ # "version": "2.0.2-28-g74fc93a",
# "alloc_count": 130,
# "command_version": 1,
- # "starttime": 1336611845,
+ # "starttime": 1337330936,
# "default_command_version": 1
# }
# ]
-> ctrl-d
+ > ctrl-d
%
-
\ No newline at end of file
Modified: doc/source/example/tutorial/network-2.log (+1 -2)
===================================================================
--- doc/source/example/tutorial/network-2.log 2012-05-18 17:39:14 +0900 (186f941)
+++ doc/source/example/tutorial/network-2.log 2012-05-18 17:51:06 +0900 (6cb92e9)
@@ -1,6 +1,5 @@
Execution example::
-% groonga -c
+ % groonga -c
> shutdown
%
-
\ No newline at end of file
Modified: doc/source/example/tutorial/network-3.log (+11 -40)
===================================================================
--- doc/source/example/tutorial/network-3.log 2012-05-18 17:39:14 +0900 (40a1855)
+++ doc/source/example/tutorial/network-3.log 2012-05-18 17:51:06 +0900 (7152268)
@@ -1,35 +1,35 @@
Execution example::
-http://HOST_NAME_OR_IP_ADDRESS[:PORT_NUMBER]/d/status
+ http://HOST_NAME_OR_IP_ADDRESS[:PORT_NUMBER]/d/status
Executed command:
- status
+ status
# [
# [
# 0,
- # 1336611845.64733,
- # 0.000109672546386719
+ # 1337330937.06225,
+ # 0.000124931335449219
# ],
# {
- # "uptime": 0,
+ # "uptime": 1,
# "max_command_version": 2,
# "n_queries": 0,
# "cache_hit_rate": 0.0,
- # "version": "2.0.2",
+ # "version": "2.0.2-28-g74fc93a",
# "alloc_count": 131,
# "command_version": 1,
- # "starttime": 1336611845,
+ # "starttime": 1337330936,
# "default_command_version": 1
# }
# ]
-
+
http://HOST_NAME_OR_IP_ADDRESS[:PORT_NUMBER]/d/select?table=Site&query=title:@this
Executed command:
- select --table Site --query title:@this
+ select --table Site --query title:@this
# [
# [
# 0,
- # 1336611845.84951,
- # 0.00153684616088867
+ # 1337330937.26529,
+ # 0.000821113586425781
# ],
# [
# [
@@ -46,26 +46,6 @@ http://HOST_NAME_OR_IP_ADDRESS[:PORT_NUMBER]/d/status
# "ShortText"
# ],
# [
- # "country",
- # "SiteCountry"
- # ],
- # [
- # "domain",
- # "SiteDomain"
- # ],
- # [
- # "link",
- # "Site"
- # ],
- # [
- # "links",
- # "Site"
- # ],
- # [
- # "location",
- # "WGS84GeoPoint"
- # ],
- # [
# "title",
# "ShortText"
# ]
@@ -73,15 +53,6 @@ http://HOST_NAME_OR_IP_ADDRESS[:PORT_NUMBER]/d/status
# [
# 1,
# "http://example.org/",
- # "japan",
- # ".org",
- # "http://example.net/",
- # [
- # "http://example.net/",
- # "http://example.org/",
- # "http://example.com/"
- # ],
- # "128452975x503157902",
# "This is test record 1!"
# ]
# ]
Modified: doc/update_execution_example.py (+7 -7)
===================================================================
--- doc/update_execution_example.py 2012-05-18 17:39:14 +0900 (3320ee8)
+++ doc/update_execution_example.py 2012-05-18 17:51:06 +0900 (db670a3)
@@ -121,16 +121,16 @@ def readfile(fname, outflag):
print '### write start : ' + a
fout.write("Execution example::\n\n")
elif cmd.startswith('.. % '):
- a = cmd[5:]
+ command_line = cmd[5:]
if fout:
- fout.write(a + "\n ")
- print a
- os.system(a)
+ fout.write(" " + command_line + "\n")
+ print command_line
+ os.system(command_line)
elif cmd.startswith('.. .. '):
- a = cmd[6:]
+ command_line = cmd[6:]
if fout:
- fout.write(a + "\n ")
- print a
+ fout.write(" " + command_line + "\n")
+ print command_line
elif cmd.startswith('..'):
if cmd.replace(' ', '').replace("\t", '') == '..':
while len(dat):