You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+15-5Lines changed: 15 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,8 +31,8 @@ Requirements
31
31
Usage
32
32
-----
33
33
34
-
``atwiki-dump`` Tool
35
-
~~~~~~~~~~~~~~~~~~~~
34
+
``atwiki-dump`` Command
35
+
~~~~~~~~~~~~~~~~~~~~~~~
36
36
37
37
Dump source and page name for each page in the wiki site.
38
38
@@ -53,15 +53,15 @@ Python API provides access to @wiki features.
53
53
54
54
# Show list of tags.
55
55
for tag in api.get_tags():
56
-
print(tag['name'])
56
+
print(tag)
57
57
58
58
# Show list of pages.
59
59
for page in api.get_list():
60
-
print(page['name'])
60
+
print(page)
61
61
62
62
# Show list of pages tagged with 'tag01'.
63
63
for page in api.get_list('tag01'):
64
-
print(page['name'])
64
+
print(page)
65
65
66
66
# Show source of page ID 14.
67
67
print(api.get_source(14))
@@ -70,6 +70,16 @@ Python API provides access to @wiki features.
70
70
for result in api.search('test'):
71
71
print(result)
72
72
73
+
Hints
74
+
-----
75
+
76
+
* Always use an appropraite interval between requests, or your IP address may get banned.
77
+
Empirically, 10 seconds of sleep between API call is sufficient.
78
+
* Your application must expect that entries returned from APIs may be duplicate/missing when pages/tags are added/removed during API call.
79
+
This is because listing requests are internally pagerized and it is costly to guarantee consistency.
80
+
* AtWiki's specification may change anytime.
81
+
If you are going to build an automated system, it is encouraged to run test suites included with the installation of this library (``python -m unittest discover atwiki``) everytime before running your application.
0 commit comments