This repository has been archived by the owner on May 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig_example.py
73 lines (61 loc) · 3.53 KB
/
config_example.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# -*- coding: utf-8 -*-
"""
A collection of configuration properties.
"""
from __future__ import absolute_import, division, print_function, unicode_literals
class Config(object):
"""Namespace for configuration parameters. Edit as needed.
All properties are require, however any property can be set to None.
If a property is set to none, then there will be no default for that
command line option.
"""
# pylint: disable=useless-object-inheritance,too-few-public-methods
# Note:
# relative paths are resolved from the working directory of the process that
# executes the script, not necessarily the location of the script. Full paths
# are recommended. Paths can use a unix style forward slash (/) as a directory
# separator otherwise it must be a raw string (prefix with r) to avoid special
# meaning of back slash (\)
# root_directory
# The root_directory to start at when looking for documents to publish.
# root_directory must be a quoted path to a folder or None.
root_directory = "c:/tmp/pub"
# history_file
# The history_file is a path to a csv file with records of the services published.
# This will be used to record what has been published by this app, for the primary
# purpose of identifying services that should be removed (no longer have a source
# document in the root_directory (above). history_file must be a quoted file path or
# None. If no history file is provided, the app will query the server to get a list
# of current services to act as the history list. Any services found on the server
# that are not in the root_folder and/or service_list will be unpublished.
# The file must have a header row and at least 3 columns the first of which must be
# string values for: source_path, service_folder, service_name.
history_file = "c:/tmp/pub/history.csv"
# service_list
# The service_list is a path to a csv file with records of the services to be published.
# This will be considered along with the files found in the root_directory.
# This file allows the user to publish source documents not in the root_folder, provide
# additional or non-default publishing parameters, and to specify if the service should
# be deleted or unconditionally re-published. service_list must be a quoted path or None.
# The file must have a header row and at least XX columns the first of which must be
# string values for: TODO: define the service_list file format.
service_list = "c:/tmp/pub/services.csv"
# server
# The default server type/connection file. Must be a quoted string or None
# A quoted string should be either 'MY_HOSTED_SERVICES' or a valid file path.
# if this setting is missing, None or any other non-valid value, it will default
# to 'MY_HOSTED_SERVICES'.
server = "c:/tmp/pub/server.ags"
# server_url
# The Server URL is used to check if a service exists before publishing,
# And to connect to the server for un-publishing. If the server URL is not
# provided, it will be extracted from the AGS file provided in the service property.
server_url = None
# admin_username / admin_password
# The Admin username and password are used to connect to the server_url with the
# ArcGIS ReST API to Stop/Delete services. Without these properties, the
# un-publish feature will not be available. If they are None or not provided,
# they can be provided on the command line.
# They must be None, or quoted text.
admin_username = "bigwig"
admin_password = "secret"