Revision 1679
Added by Aaron Marcuse-Kubitza over 12 years ago
bin/digir_client | ||
---|---|---|
16 | 16 |
|
17 | 17 |
# Config |
18 | 18 |
timeout = 20 # sec |
19 |
default_schema = 'http://digir.net/schema/conceptual/darwin/full/2003/1.0/darwin2full.xsd' |
|
19 | 20 |
|
20 | 21 |
request_xml_template = '''\ |
21 | 22 |
<?xml version="1.0" encoding="UTF-8"?> |
... | ... | |
44 | 45 |
</equals> |
45 | 46 |
</filter> |
46 | 47 |
<records limit="[count]" start="[start]"> |
47 |
<structure schemaLocation="http://digir.sourceforge.net/schema/conceptual/darwin/full/2003/1.0/darwin2full.xsd"/>
|
|
48 |
<structure schemaLocation="[schema]"/>
|
|
48 | 49 |
</records> |
49 | 50 |
<count>true</count> |
50 | 51 |
</search> |
... | ... | |
60 | 61 |
# Get config from env vars |
61 | 62 |
url = opts.get_env_var('url', None, env_names) |
62 | 63 |
resource = opts.get_env_var('resource', None, env_names) |
64 |
schema = opts.get_env_var('schema', default_schema, env_names) |
|
63 | 65 |
start = util.cast(int, opts.get_env_var('start', 0, env_names)) |
64 | 66 |
count = util.cast(int, opts.get_env_var('n', 1, env_names)) |
65 | 67 |
debug = opts.env_flag('debug', False, env_names) |
... | ... | |
76 | 78 |
.replace('[source]', source) |
77 | 79 |
.replace('[url]', url) |
78 | 80 |
.replace('[resource]', resource) |
81 |
.replace('[schema]', schema) |
|
79 | 82 |
.replace('[count]', str(count)) |
80 | 83 |
) |
81 | 84 |
|
Also available in: Unified diff
digir_client: Made schema customizable