├── helpDoc
├── _build
│ ├── _static
│ │ └── empty.txt
│ ├── _templates
│ │ └── empty.txt
│ ├── modules.rst
│ ├── _build
│ │ ├── html
│ │ │ ├── objects.inv
│ │ │ ├── _sources
│ │ │ │ ├── modules.txt
│ │ │ │ ├── index.txt
│ │ │ │ └── hermes.txt
│ │ │ ├── _static
│ │ │ │ ├── down.png
│ │ │ │ ├── file.png
│ │ │ │ ├── plus.png
│ │ │ │ ├── up.png
│ │ │ │ ├── minus.png
│ │ │ │ ├── comment.png
│ │ │ │ ├── ajax-loader.gif
│ │ │ │ ├── up-pressed.png
│ │ │ │ ├── comment-bright.png
│ │ │ │ ├── comment-close.png
│ │ │ │ ├── down-pressed.png
│ │ │ │ ├── pygments.css
│ │ │ │ ├── doctools.js
│ │ │ │ ├── underscore.js
│ │ │ │ ├── alabaster.css
│ │ │ │ ├── basic.css
│ │ │ │ └── searchtools.js
│ │ │ ├── .buildinfo
│ │ │ ├── _modules
│ │ │ │ ├── index.html
│ │ │ │ └── hermes
│ │ │ │ │ └── common.html
│ │ │ ├── searchindex.js
│ │ │ ├── search.html
│ │ │ ├── modules.html
│ │ │ ├── py-modindex.html
│ │ │ ├── index.html
│ │ │ ├── genindex.html
│ │ │ └── hermes.html
│ │ └── doctrees
│ │ │ ├── hermes.doctree
│ │ │ ├── index.doctree
│ │ │ ├── modules.doctree
│ │ │ └── environment.pickle
│ ├── index.rst
│ ├── hermes.rst
│ ├── make.bat
│ ├── Makefile
│ └── conf.py
├── readme.txt
└── usecases.txt
├── .gitattributes
├── data
└── ArcGIS Metadata Details.xls
├── contributing.md
├── samples
├── basicuse.py
├── dataset_properties.py
├── metadata_edit.py
├── metadata_edit_published_service.py
└── metadata_walker.py
├── src
└── hermes
│ ├── version.py
│ ├── __init__.py
│ ├── common.py
│ └── paperwork.py
├── test
└── test.py
├── setup.py
├── README.md
├── .gitignore
└── LICENSE
/helpDoc/_build/_static/empty.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/helpDoc/_build/_templates/empty.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | helpDoc/* linguist-documentation
--------------------------------------------------------------------------------
/helpDoc/readme.txt:
--------------------------------------------------------------------------------
1 | See the github page: http://www.github.com/ArcGIS/hermes for help.
2 |
3 |
--------------------------------------------------------------------------------
/helpDoc/_build/modules.rst:
--------------------------------------------------------------------------------
1 | src
2 | ===
3 |
4 | .. toctree::
5 | :maxdepth: 4
6 |
7 | hermes
8 |
--------------------------------------------------------------------------------
/data/ArcGIS Metadata Details.xls:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/hermes/HEAD/data/ArcGIS Metadata Details.xls
--------------------------------------------------------------------------------
/helpDoc/_build/_build/html/objects.inv:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/hermes/HEAD/helpDoc/_build/_build/html/objects.inv
--------------------------------------------------------------------------------
/helpDoc/_build/_build/html/_sources/modules.txt:
--------------------------------------------------------------------------------
1 | src
2 | ===
3 |
4 | .. toctree::
5 | :maxdepth: 4
6 |
7 | hermes
8 |
--------------------------------------------------------------------------------
/helpDoc/_build/_build/html/_static/down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/hermes/HEAD/helpDoc/_build/_build/html/_static/down.png
--------------------------------------------------------------------------------
/helpDoc/_build/_build/html/_static/file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/hermes/HEAD/helpDoc/_build/_build/html/_static/file.png
--------------------------------------------------------------------------------
/helpDoc/_build/_build/html/_static/plus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/hermes/HEAD/helpDoc/_build/_build/html/_static/plus.png
--------------------------------------------------------------------------------
/helpDoc/_build/_build/html/_static/up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/hermes/HEAD/helpDoc/_build/_build/html/_static/up.png
--------------------------------------------------------------------------------
/helpDoc/_build/_build/doctrees/hermes.doctree:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/hermes/HEAD/helpDoc/_build/_build/doctrees/hermes.doctree
--------------------------------------------------------------------------------
/helpDoc/_build/_build/doctrees/index.doctree:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/hermes/HEAD/helpDoc/_build/_build/doctrees/index.doctree
--------------------------------------------------------------------------------
/helpDoc/_build/_build/html/_static/minus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/hermes/HEAD/helpDoc/_build/_build/html/_static/minus.png
--------------------------------------------------------------------------------
/helpDoc/_build/_build/doctrees/modules.doctree:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/hermes/HEAD/helpDoc/_build/_build/doctrees/modules.doctree
--------------------------------------------------------------------------------
/helpDoc/_build/_build/html/_static/comment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/hermes/HEAD/helpDoc/_build/_build/html/_static/comment.png
--------------------------------------------------------------------------------
/helpDoc/_build/_build/doctrees/environment.pickle:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/hermes/HEAD/helpDoc/_build/_build/doctrees/environment.pickle
--------------------------------------------------------------------------------
/helpDoc/_build/_build/html/_static/ajax-loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/hermes/HEAD/helpDoc/_build/_build/html/_static/ajax-loader.gif
--------------------------------------------------------------------------------
/helpDoc/_build/_build/html/_static/up-pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/hermes/HEAD/helpDoc/_build/_build/html/_static/up-pressed.png
--------------------------------------------------------------------------------
/contributing.md:
--------------------------------------------------------------------------------
1 | Esri welcomes contributions from anyone and everyone. Please see our [guidelines for contributing](https://github.com/esri/contributing).
--------------------------------------------------------------------------------
/helpDoc/_build/_build/html/_static/comment-bright.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/hermes/HEAD/helpDoc/_build/_build/html/_static/comment-bright.png
--------------------------------------------------------------------------------
/helpDoc/_build/_build/html/_static/comment-close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/hermes/HEAD/helpDoc/_build/_build/html/_static/comment-close.png
--------------------------------------------------------------------------------
/helpDoc/_build/_build/html/_static/down-pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Esri/hermes/HEAD/helpDoc/_build/_build/html/_static/down-pressed.png
--------------------------------------------------------------------------------
/samples/basicuse.py:
--------------------------------------------------------------------------------
1 | import hermes
2 | if __name__ == "__main__":
3 | fc = r"c:\data_and_maps\usa\census\blkgrp.sdc\blkgrp"
4 | paperwork = hermes.Paperwork(dataset=fc)
5 | data = paperwork.convert()
6 | for k,v in data.iteritems():
7 | print k, v
--------------------------------------------------------------------------------
/helpDoc/_build/_build/html/.buildinfo:
--------------------------------------------------------------------------------
1 | # Sphinx build info version 1
2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3 | config: d5f80781e7718b2e061e6501b622ada9
4 | tags: 645f666f9bcd5a90fca523b33c5a78b7
5 |
--------------------------------------------------------------------------------
/samples/dataset_properties.py:
--------------------------------------------------------------------------------
1 | """
2 | Hermes allows users to return a standard set of information about a given
3 | dataset. This example shows how to get the dataset properties.
4 | """
5 | import hermes
6 | import os
7 |
8 | if __name__ == "__main__":
9 | fc = r"c:\temp\scratch.gdb\somedataset"
10 | metadata = hermes.Paperwork(dataset=fc)
11 | print metadata.datasetProperties
--------------------------------------------------------------------------------
/helpDoc/_build/index.rst:
--------------------------------------------------------------------------------
1 | .. hermes documentation master file, created by
2 | sphinx-quickstart on Sun Sep 13 10:13:40 2015.
3 | You can adapt this file completely to your liking, but it should at least
4 | contain the root `toctree` directive.
5 |
6 | Welcome to hermes's documentation!
7 | =====================================
8 |
9 | Contents:
10 |
11 | .. toctree::
12 | :maxdepth: 4
13 |
14 | hermes
15 |
16 |
17 | Indices and tables
18 | ==================
19 |
20 | * :ref:`genindex`
21 | * :ref:`modindex`
22 | * :ref:`search`
23 |
--------------------------------------------------------------------------------
/helpDoc/_build/_build/html/_sources/index.txt:
--------------------------------------------------------------------------------
1 | .. hermes documentation master file, created by
2 | sphinx-quickstart on Sun Sep 13 10:13:40 2015.
3 | You can adapt this file completely to your liking, but it should at least
4 | contain the root `toctree` directive.
5 |
6 | Welcome to hermes's documentation!
7 | =====================================
8 |
9 | Contents:
10 |
11 | .. toctree::
12 | :maxdepth: 4
13 |
14 | hermes
15 |
16 |
17 | Indices and tables
18 | ==================
19 |
20 | * :ref:`genindex`
21 | * :ref:`modindex`
22 | * :ref:`search`
23 |
--------------------------------------------------------------------------------
/src/hermes/version.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright 2015 Esri
3 | Licensed under the Apache License, Version 2.0 (the 'License');
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 | http://www.apache.org/licenses/LICENSE-2.0
7 | Unless required by applicable law or agreed to in writing, software
8 | distributed under the License is distributed on an 'AS IS' BASIS,
9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | See the License for the specific language governing permissions and
11 | limitations under the License.
12 | """
13 | __version__ = "1.1.2"
14 |
--------------------------------------------------------------------------------
/samples/metadata_edit.py:
--------------------------------------------------------------------------------
1 | """
2 | This sample shows how to use Hermes to edit metadata
3 | """
4 | import hermes
5 | import os
6 |
7 |
8 | if __name__ == "__main__":
9 | fc = r"c:\temp\scratch.gdb\sampledata"
10 | # Access the item's metadata
11 | #
12 | metadata = hermes.Paperwork(dataset=fc)
13 | # convert the XML to a dictionary
14 | #
15 | data = metadata.convert()
16 | # Make some generic changes
17 | #
18 | data['metadata']['idinfo']['descript']['abstract'] = "Hermes Was Here - changed an abstract"
19 | data['metadata']['idinfo']['descript']['purpose'] = "Hermes Was Here - changed purpose"
20 | # Save the changes back into the metadata
21 | #
22 | metadata.save(d=data)
23 | del metadata
--------------------------------------------------------------------------------
/helpDoc/_build/hermes.rst:
--------------------------------------------------------------------------------
1 | hermes package
2 | ==============
3 |
4 | Submodules
5 | ----------
6 |
7 | hermes.common module
8 | --------------------
9 |
10 | .. automodule:: hermes.common
11 | :members:
12 | :undoc-members:
13 | :show-inheritance:
14 |
15 | hermes.paperwork module
16 | -----------------------
17 |
18 | .. automodule:: hermes.paperwork
19 | :members:
20 | :undoc-members:
21 | :show-inheritance:
22 |
23 | hermes.version module
24 | ---------------------
25 |
26 | .. automodule:: hermes.version
27 | :members:
28 | :undoc-members:
29 | :show-inheritance:
30 |
31 |
32 | Module contents
33 | ---------------
34 |
35 | .. automodule:: hermes
36 | :members:
37 | :undoc-members:
38 | :show-inheritance:
39 |
--------------------------------------------------------------------------------
/helpDoc/usecases.txt:
--------------------------------------------------------------------------------
1 | Test Cases:
2 | 1 - Get common information
3 | (reader)
4 | - shapefile
5 | - fgdb fc
6 | - sde fc
7 | 2 - Get specific information
8 | (reader)
9 | - shapefile
10 | - fgdb fc
11 | - sde fc
12 | 3 - Update Attribute
13 | (writer)
14 | - shapefile
15 | - fgdb fc
16 | - sde fc
17 | 4. Create Attribute
18 | (writer)
19 | - shapefile
20 | - fgdb fc
21 | - sde fc
22 | 5. Create node
23 | (writer)
24 | - shapefile
25 | - fgdb fc
26 | - sde fc
27 | 6. Validate metadata/Save to dataset
28 | (writer)
29 | - shapefile
30 | - fgdb fc
31 | - sde fc
32 |
--------------------------------------------------------------------------------
/helpDoc/_build/_build/html/_sources/hermes.txt:
--------------------------------------------------------------------------------
1 | hermes package
2 | ==============
3 |
4 | Submodules
5 | ----------
6 |
7 | hermes.common module
8 | --------------------
9 |
10 | .. automodule:: hermes.common
11 | :members:
12 | :undoc-members:
13 | :show-inheritance:
14 |
15 | hermes.paperwork module
16 | -----------------------
17 |
18 | .. automodule:: hermes.paperwork
19 | :members:
20 | :undoc-members:
21 | :show-inheritance:
22 |
23 | hermes.version module
24 | ---------------------
25 |
26 | .. automodule:: hermes.version
27 | :members:
28 | :undoc-members:
29 | :show-inheritance:
30 |
31 |
32 | Module contents
33 | ---------------
34 |
35 | .. automodule:: hermes
36 | :members:
37 | :undoc-members:
38 | :show-inheritance:
39 |
--------------------------------------------------------------------------------
/src/hermes/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright 2015 Esri
3 | Licensed under the Apache License, Version 2.0 (the 'License');
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 | http://www.apache.org/licenses/LICENSE-2.0
7 | Unless required by applicable law or agreed to in writing, software
8 | distributed under the License is distributed on an 'AS IS' BASIS,
9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | See the License for the specific language governing permissions and
11 | limitations under the License.
12 | """
13 | from __future__ import absolute_import
14 | from __future__ import print_function
15 | from .common import HermesErrorHandler, trace
16 | from .paperwork import Paperwork
17 | from .version import __version__
18 |
--------------------------------------------------------------------------------
/samples/metadata_edit_published_service.py:
--------------------------------------------------------------------------------
1 | """
2 | Hermes allows users to update and edit published services on ArcGIS Server
3 | This example will show how users can import data from the local shapefile
4 | to the service.
5 | """
6 |
7 | import hermes
8 | import os
9 |
10 | if __name__ == "__main__":
11 | service = r"GIS Servers\agsconnection\Hosted\USStatesBlue.MapServer"
12 | sourceFC = r"c:\temp\states.shp"
13 | # Access each dataset's metadata
14 | #
15 | serviceMD = hermes.Paperwork(dataset=service)
16 | fcMD = hermes.Paperwork(dataset=sourceFC)
17 | # Convert the local FC to the dictionary
18 | localMetadata = fcMD.convert()
19 | # Load the local FC metadata into the Hosted Feature Service
20 | serviceMD.save(d=localMetadata)
21 | del serviceMD
22 | del fcMD
23 | del localMetadata
24 |
--------------------------------------------------------------------------------
/test/test.py:
--------------------------------------------------------------------------------
1 | from __future__ import print_function
2 | import hermes
3 |
4 | pw = hermes.Paperwork(dataset=r"C:\temp\scratch.gdb\parcels_no_flood") # passed
5 | print( pw.json) # passed
6 | print( pw.dataset) # passed
7 | print( pw.datasetProperties) # passed
8 | print( pw.xmlfile) # passed
9 | print( pw.save_location) # passed
10 | pw.dataset = r"C:\temp\scratch.gdb\parcels_no_flood" # passed
11 | val = pw.convert() # passed
12 | pw.save() # passed
13 | pw.save(d=val) # passed
14 | try:
15 | pw.dataset = None # raised error, passed
16 | print ("no error, this is incorrect")
17 | except:
18 | print ('error raised, all is well with pw.dataset = None')
19 | try:
20 | pw.save(d="TESTdafsdalfsdkafjs") # passed raised error
21 | print ("no error, this is incorrect")
22 | except:
23 | print ('error raised, all is well with pw.save(d="TESTdafsdalfsdkafjs")')
--------------------------------------------------------------------------------
/samples/metadata_walker.py:
--------------------------------------------------------------------------------
1 | """
2 | This sample shows how users can walk a metadata structure to find the
3 | information they need quickly. This sample shows only the XPath to each
4 | item in the metadata and prints it out to the screen.
5 | """
6 | import hermes
7 | import os
8 |
9 | def listKeyValues(d, path=""):
10 | """ simple recursive print function to walk the metadata structure"""
11 | for k,v in d.iteritems():
12 | if path != "":
13 | path += "/%s" % k
14 | else:
15 | path = k
16 | print "Key - %s" % path
17 | if isinstance(v, dict):
18 | listKeyValues(v, path)
19 | if __name__ == "__main__":
20 | arcpy.env.workspace = r"c:\temp\scratch.gdb"
21 | for fc in arcpy.ListFeatureClasses():
22 | data = hermes.Paperwork(dataset=os.path.join(arcpy.env.workspace, fc)).convert()
23 | listKeyValues(data)
--------------------------------------------------------------------------------
/setup.py:
--------------------------------------------------------------------------------
1 | from setuptools import setup,find_packages
2 |
3 |
4 | with open('src/hermes/version.py') as fin: exec(fin.read())
5 |
6 | setup(
7 | name='esri-hermes',
8 | version=__version__,
9 |
10 | package_dir={'':'src'},
11 | packages=find_packages('src'),
12 | include_package_data=True,
13 |
14 | # PyPI MetaData
15 | author='achapkowski',
16 | author_email='achapkowski@esri.com',
17 | description='Collection of Utilities to Read/Write a Dataset\'s Metadata',
18 | license='Apache License - 2.0',
19 | keywords='esri,arcpy,metadata',
20 | url='https://github.com/Esri/hermes',
21 | classifiers=(
22 | 'Development Status :: 5 - Production/Stable',
23 | 'Intended Audience :: Developers',
24 | 'Natural Language :: English',
25 | 'Operating System :: OS Independent',
26 | 'Programming Language :: Python',
27 | 'Programming Language :: Python :: 2',
28 | 'Programming Language :: Python :: 2.7',
29 | 'License :: OSI Approved :: Apache Software License',
30 | 'Topic :: Software Development :: Libraries :: Python Modules',
31 | ),
32 |
33 | zip_safe=False,
34 | )
35 |
--------------------------------------------------------------------------------
/src/hermes/common.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright 2015 Esri
3 | Licensed under the Apache License, Version 2.0 (the 'License');
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 | http://www.apache.org/licenses/LICENSE-2.0
7 | Unless required by applicable law or agreed to in writing, software
8 | distributed under the License is distributed on an 'AS IS' BASIS,
9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | See the License for the specific language governing permissions and
11 | limitations under the License.
12 | """
13 |
14 | from __future__ import absolute_import
15 | from __future__ import print_function
16 | import traceback
17 | import sys
18 | import os
19 | from .version import __version__
20 |
21 | def trace():
22 | """
23 | trace finds the line, the filename
24 | and error message and returns it
25 | to the user
26 | """
27 |
28 | tb = sys.exc_info()[2]
29 | info = sys.exc_info()
30 | extracttb = traceback.extract_tb(info[2])
31 | fileName = os.path.basename(extracttb[0][0])
32 | tbinfo = traceback.format_tb(tb)[0]
33 | # script name + line number
34 | line = tbinfo.split(", ")[1]
35 | # Get Python syntax error
36 | #
37 | synerror = traceback.format_exc().splitlines()[-1]
38 | return line, fileName, synerror
39 | #--------------------------------------------------------------------------
40 | class HermesErrorHandler(Exception):
41 | """Error handler for hermes package"""
42 | pass
43 | #--------------------------------------------------------------------------
44 | def safe_unicode(obj, *args):
45 | """ return the unicode representation of obj """
46 | try:
47 | return unicode(obj, *args)
48 | except UnicodeDecodeError:
49 | # obj is byte string
50 | ascii_text = str(obj).encode('string_escape')
51 | return unicode(ascii_text)
52 | #--------------------------------------------------------------------------
53 | def safe_str(obj):
54 | """ return the byte string representation of obj """
55 | try:
56 | return str(obj)
57 | except UnicodeEncodeError:
58 | # obj is unicode
59 | return unicode(obj).encode('unicode_escape')
60 |
61 |
62 |
--------------------------------------------------------------------------------
/helpDoc/_build/_build/html/_modules/index.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Overview: module code — src documentation
10 |
11 |
12 |
13 |
14 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
All modules for which code is available
40 |
43 |
44 |
45 |
46 |
47 |
70 |
71 |
72 |
80 |
81 |
82 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/helpDoc/_build/_build/html/searchindex.js:
--------------------------------------------------------------------------------
1 | Search.setIndex({envversion:46,filenames:["hermes","index","modules"],objects:{"":{hermes:[0,0,0,"-"]},"hermes.common":{HermesErrorHandler:[0,5,1,""],safe_str:[0,3,1,""],safe_unicode:[0,3,1,""],trace:[0,3,1,""]},"hermes.paperwork":{Paperwork:[0,4,1,""]},"hermes.paperwork.Paperwork":{convert:[0,2,1,""],dataset:[0,1,1,""],datasetProperties:[0,1,1,""],exportToXML:[0,2,1,""],importXMLFile:[0,2,1,""],json:[0,1,1,""],save:[0,2,1,""],save_location:[0,1,1,""],setSyncMethod:[0,2,1,""],xmlfile:[0,1,1,""]},hermes:{common:[0,0,0,"-"],paperwork:[0,0,0,"-"],version:[0,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","attribute","Python attribute"],"2":["py","method","Python method"],"3":["py","function","Python function"],"4":["py","class","Python class"],"5":["py","exception","Python exception"]},objtypes:{"0":"py:module","1":"py:attribute","2":"py:method","3":"py:function","4":"py:class","5":"py:exception"},terms:{"byte":0,"class":0,"default":0,"export":0,"function":0,"import":0,"new":0,"return":0,about:0,access:0,actual:0,add:0,affect:0,agre:0,all:0,allow:0,alreadi:0,also:0,alwai:0,ani:0,anyon:0,apach:0,appli:0,applic:0,arcgi:0,arg:0,attribut:0,automat:0,back:0,base:0,basi:0,befor:0,begin:0,between:0,call:0,can:0,chang:0,collect:0,commit:0,complianc:0,condit:0,conrad:0,contain:0,convert:0,copi:0,copyright:0,creat:0,current:0,data:0,dataidinfo:0,dataset:0,datasetproperti:0,deault:0,describ:0,dictionari:0,distribut:0,doe:0,doesn:0,easi:0,easili:0,either:0,element:0,emp:0,empmymetadata:0,empscratch:0,error:0,esri:0,exampl:0,except:0,exist:0,explain:0,exporttoxml:0,express:0,featur:0,file:0,filenam:0,find:0,fish:0,folder:0,format:0,forth:0,from:0,gdb:0,gdbstate:0,gener:0,get:0,given:0,govern:0,handler:0,have:0,heart:0,hermeserrorhandl:0,how:0,http:0,impli:0,importxmlfil:0,includ:0,index:1,inform:0,input:0,insid:0,item:0,json:0,just:0,kei:0,keyword:0,kind:0,languag:0,last:0,law:0,licens:0,like:0,limit:0,line:0,locat:0,love:0,mai:0,manag:0,mean:0,messag:0,metadata:0,metdata:0,method:0,modifi:0,much:0,myvalu:0,name:0,newli:0,none:0,not_creat:0,obj:0,object:0,obtain:0,off:0,old:0,oper:0,option:0,org:0,ouput:0,outfold:0,outnam:0,output:0,overwrit:0,overwritten:0,page:1,pars:0,pass:0,path:0,permiss:0,person:0,place:0,print:0,project:0,properti:0,provid:0,push:0,python:0,rais:0,randomli:0,reader:0,record:0,referenc:0,replac:0,represent:0,requir:0,result:0,run:0,safe_str:0,safe_unicod:0,same:0,save:0,save_loc:0,scratch:0,script:0,search:1,searchkei:0,see:0,select:0,set:0,setsyncmethod:0,sinc:0,softwar:0,someel:0,sourc:0,specif:0,state:0,string:0,subel:0,support:0,synchron:0,system:0,system_shel:0,tag:0,take:0,target:0,temp:0,temporari:0,text:0,them:0,thi:0,titl:0,tool:0,trace:0,turn:0,type:0,under:0,unicod:0,unless:0,updat:0,upgrad:0,usa:0,usag:0,user:0,val:0,valid:0,valu:0,view:0,warranti:0,when:0,where:0,who:0,without:0,work:0,workspac:0,write:0,www:0,xml:0,xmlfile:0,you:0},titles:["hermes package","Welcome to hermes’s documentation!","src"],titleterms:{common:0,content:0,document:1,herm:[0,1],indic:1,modul:0,packag:0,paperwork:0,src:2,submodul:0,tabl:1,version:0,welcom:1}})
--------------------------------------------------------------------------------
/helpDoc/_build/_build/html/search.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Search — src documentation
10 |
11 |
12 |
13 |
14 |
23 |
24 |
25 |
26 |
27 |
28 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
Search
48 |
49 |
50 |
51 | Please activate JavaScript to enable the search
52 | functionality.
53 |
54 |
55 |
56 | From here you can search these documents. Enter your search
57 | words into the box below and click "search". Note that the search
58 | function will automatically search for all of the words. Pages
59 | containing fewer words won't appear in the result list.
60 |
61 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
84 |
85 |
86 |
94 |
95 |
96 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # hermes
2 | Collection of Utilities to Read/Write a Dataset's Metadata.
3 | Allows users to easily create and modify the metadata from the feature
4 | class. The data will be returned as a dictionary object for easy of
5 | use. This means users can modify values and push them back into the
6 | metadata by referencing the key names.
7 |
8 | # Why use hermes?
9 | Metadata is the way users describe their data. XML is hard, but this tool
10 | converts the XML to a Python dictionary. This means metadata is easy to
11 | modify, change and add.
12 |
13 | # What inspired hermes?
14 | The name was inspired by Hermes Conrad from Futurama and his love of filing paperwork.
15 | It also was developed to help people deal with metadata in the Python environment.
16 |
17 | # Requirements
18 | - ArcGIS Desktop 10.3.x+
19 | - Python 2.7.x (32-bit)
20 |
21 | To use, just pass in the path of a feature class or table. The dataset
22 | can be any support ArcGIS format that support metadata.
23 |
24 | Usage Reader Example:
25 |
26 | >>> fc =r"c:\temp\scratch.gdb\states"
27 | >>> pw = Paperwork(dataset=fc)
28 | >>> print pw.convert()
29 |
30 | Usage Update Example (add searchKeys to the metadata):
31 |
32 | >>> fc = r"c:\temp\scratch.gdb\states"
33 | >>> pw = Paperwork(dataset=fc)
34 | >>> val = pw.convert()
35 | >>> val['metadata']['dataIdInfo']['searchKeys'] = {}
36 | >>> val['metadata']['dataIdInfo']['searchKeys']['keywords'] = ['states', 'USA']
37 | >>> pw.save(d=val)
38 |
39 | The dictionary results explained:
40 |
41 | All attributes begin with a '@' and will be inside the element tag.
42 | All text values will be stated as: #text :
43 | Example:
44 | ```xmli heart paperwork ```
45 |
46 | Results in:
47 |
48 | {'someelement': { '@myValue' : 1,
49 | '#text' : 'i heart paperwork'
50 | }
51 | }
52 |
53 | Example 2:
54 | ```xml
55 |
56 | my value
57 |
58 | ```
59 |
60 | Results:
61 |
62 | {'someelement': { '@myValue' : 1,
63 | "subelement" : {'@tags' : "fish",
64 | '#text' : 'my value'
65 | }
66 | }
67 | }
68 |
69 | ## Issues
70 |
71 | Find a bug or want to request a new feature? Please let us know by submitting an issue.
72 |
73 | ## Contributing
74 |
75 | Esri welcomes contributions from anyone and everyone. Please see our [guidelines for contributing](https://github.com/esri/contributing).
76 |
77 | ## Licensing
78 | Copyright 2015 Esri
79 |
80 | Licensed under the Apache License, Version 2.0 (the "License");
81 | you may not use this file except in compliance with the License.
82 | You may obtain a copy of the License at
83 |
84 | http://www.apache.org/licenses/LICENSE-2.0
85 |
86 | Unless required by applicable law or agreed to in writing, software
87 | distributed under the License is distributed on an "AS IS" BASIS,
88 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
89 | See the License for the specific language governing permissions and
90 | limitations under the License.
91 |
92 | A copy of the license is available in the repository's license file.
93 |
94 | [](Esri Tags: hermes)
95 | [](Esri Language: Python)
96 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | #################
2 | ## Eclipse
3 | #################
4 |
5 | *.pydevproject
6 | .project
7 | .metadata
8 | bin/
9 | tmp/
10 | *.tmp
11 | *.bak
12 | *.swp
13 | *~.nib
14 | local.properties
15 | .classpath
16 | .settings/
17 | .loadpath
18 |
19 | # External tool builders
20 | .externalToolBuilders/
21 |
22 | # Locally stored "Eclipse launch configurations"
23 | *.launch
24 |
25 | # CDT-specific
26 | .cproject
27 |
28 | # PDT-specific
29 | .buildpath
30 |
31 |
32 | #################
33 | ## Visual Studio
34 | #################
35 |
36 | ## Ignore Visual Studio temporary files, build results, and
37 | ## files generated by popular Visual Studio add-ons.
38 |
39 | # User-specific files
40 | *.suo
41 | *.user
42 | *.sln.docstates
43 |
44 | # Build results
45 |
46 | [Dd]ebug/
47 | [Rr]elease/
48 | x64/
49 | build/
50 | [Bb]in/
51 | [Oo]bj/
52 |
53 | # MSTest test Results
54 | [Tt]est[Rr]esult*/
55 | [Bb]uild[Ll]og.*
56 |
57 | *_i.c
58 | *_p.c
59 | *.ilk
60 | *.meta
61 | *.obj
62 | *.pch
63 | *.pdb
64 | *.pgc
65 | *.pgd
66 | *.rsp
67 | *.sbr
68 | *.tlb
69 | *.tli
70 | *.tlh
71 | *.tmp
72 | *.tmp_proj
73 | *.log
74 | *.vspscc
75 | *.vssscc
76 | .builds
77 | *.pidb
78 | *.log
79 | *.scc
80 |
81 | # Visual C++ cache files
82 | ipch/
83 | *.aps
84 | *.ncb
85 | *.opensdf
86 | *.sdf
87 | *.cachefile
88 |
89 | # Visual Studio profiler
90 | *.psess
91 | *.vsp
92 | *.vspx
93 |
94 | # Guidance Automation Toolkit
95 | *.gpState
96 |
97 | # ReSharper is a .NET coding add-in
98 | _ReSharper*/
99 | *.[Rr]e[Ss]harper
100 |
101 | # TeamCity is a build add-in
102 | _TeamCity*
103 |
104 | # DotCover is a Code Coverage Tool
105 | *.dotCover
106 |
107 | # NCrunch
108 | *.ncrunch*
109 | .*crunch*.local.xml
110 |
111 | # Installshield output folder
112 | [Ee]xpress/
113 |
114 | # DocProject is a documentation generator add-in
115 | DocProject/buildhelp/
116 | DocProject/Help/*.HxT
117 | DocProject/Help/*.HxC
118 | DocProject/Help/*.hhc
119 | DocProject/Help/*.hhk
120 | DocProject/Help/*.hhp
121 | DocProject/Help/Html2
122 | DocProject/Help/html
123 |
124 | # Click-Once directory
125 | publish/
126 |
127 | # Publish Web Output
128 | *.Publish.xml
129 | *.pubxml
130 |
131 | # NuGet Packages Directory
132 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line
133 | #packages/
134 |
135 | # Windows Azure Build Output
136 | csx
137 | *.build.csdef
138 |
139 | # Windows Store app package directory
140 | AppPackages/
141 |
142 | # Others
143 | sql/
144 | *.Cache
145 | ClientBin/
146 | [Ss]tyle[Cc]op.*
147 | ~$*
148 | *~
149 | *.dbmdl
150 | *.[Pp]ublish.xml
151 | *.pfx
152 | *.publishsettings
153 |
154 | # WING IDE Files
155 | *.wpu
156 | *.wpr
157 |
158 | # RIA/Silverlight projects
159 | Generated_Code/
160 |
161 | # Backup & report files from converting an old project file to a newer
162 | # Visual Studio version. Backup files are not needed, because we have git ;-)
163 | _UpgradeReport_Files/
164 | Backup*/
165 | UpgradeLog*.XML
166 | UpgradeLog*.htm
167 |
168 | # SQL Server files
169 | App_Data/*.mdf
170 | App_Data/*.ldf
171 |
172 | #############
173 | ## Windows detritus
174 | #############
175 |
176 | # Windows image file caches
177 | Thumbs.db
178 | ehthumbs.db
179 |
180 | # Folder config file
181 | Desktop.ini
182 |
183 | # Recycle Bin used on file shares
184 | $RECYCLE.BIN/
185 |
186 | # Mac crap
187 | .DS_Store
188 |
189 |
190 | #############
191 | ## Python
192 | #############
193 |
194 | *.py[co]
195 | *.pyc
196 | # Packages
197 | *.egg
198 | *.egg-info
199 | dist/
200 | build/
201 | eggs/
202 | parts/
203 | var/
204 | sdist/
205 | develop-eggs/
206 | .installed.cfg
207 |
208 | # Installer logs
209 | pip-log.txt
210 |
211 | # Unit test / coverage reports
212 | .coverage
213 | .tox
214 |
215 | #Translations
216 | *.mo
217 |
218 | #Mr Developer
219 | .mr.developer.cfg
220 |
221 | # Tools, notes, outputs
222 | ___*.*
223 | ___*
224 | *.log
225 |
226 | [Ss]ampleData/
227 | source/[Ss]ampleData/
228 | source/[Tt]est[Cc]onfigs/
229 | src/service_monitor
230 | *.pyc
231 | error.txt
232 |
--------------------------------------------------------------------------------
/helpDoc/_build/_build/html/modules.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | src — src documentation
10 |
11 |
12 |
13 |
14 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
91 |
102 |
103 |
104 |
105 |
106 |
107 |
--------------------------------------------------------------------------------
/helpDoc/_build/_build/html/_static/pygments.css:
--------------------------------------------------------------------------------
1 | .highlight .hll { background-color: #ffffcc }
2 | .highlight { background: #eeffcc; }
3 | .highlight .c { color: #408090; font-style: italic } /* Comment */
4 | .highlight .err { border: 1px solid #FF0000 } /* Error */
5 | .highlight .k { color: #007020; font-weight: bold } /* Keyword */
6 | .highlight .o { color: #666666 } /* Operator */
7 | .highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */
8 | .highlight .cp { color: #007020 } /* Comment.Preproc */
9 | .highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */
10 | .highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */
11 | .highlight .gd { color: #A00000 } /* Generic.Deleted */
12 | .highlight .ge { font-style: italic } /* Generic.Emph */
13 | .highlight .gr { color: #FF0000 } /* Generic.Error */
14 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
15 | .highlight .gi { color: #00A000 } /* Generic.Inserted */
16 | .highlight .go { color: #333333 } /* Generic.Output */
17 | .highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
18 | .highlight .gs { font-weight: bold } /* Generic.Strong */
19 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
20 | .highlight .gt { color: #0044DD } /* Generic.Traceback */
21 | .highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */
22 | .highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
23 | .highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
24 | .highlight .kp { color: #007020 } /* Keyword.Pseudo */
25 | .highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
26 | .highlight .kt { color: #902000 } /* Keyword.Type */
27 | .highlight .m { color: #208050 } /* Literal.Number */
28 | .highlight .s { color: #4070a0 } /* Literal.String */
29 | .highlight .na { color: #4070a0 } /* Name.Attribute */
30 | .highlight .nb { color: #007020 } /* Name.Builtin */
31 | .highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */
32 | .highlight .no { color: #60add5 } /* Name.Constant */
33 | .highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
34 | .highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */
35 | .highlight .ne { color: #007020 } /* Name.Exception */
36 | .highlight .nf { color: #06287e } /* Name.Function */
37 | .highlight .nl { color: #002070; font-weight: bold } /* Name.Label */
38 | .highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
39 | .highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */
40 | .highlight .nv { color: #bb60d5 } /* Name.Variable */
41 | .highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */
42 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */
43 | .highlight .mb { color: #208050 } /* Literal.Number.Bin */
44 | .highlight .mf { color: #208050 } /* Literal.Number.Float */
45 | .highlight .mh { color: #208050 } /* Literal.Number.Hex */
46 | .highlight .mi { color: #208050 } /* Literal.Number.Integer */
47 | .highlight .mo { color: #208050 } /* Literal.Number.Oct */
48 | .highlight .sb { color: #4070a0 } /* Literal.String.Backtick */
49 | .highlight .sc { color: #4070a0 } /* Literal.String.Char */
50 | .highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
51 | .highlight .s2 { color: #4070a0 } /* Literal.String.Double */
52 | .highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
53 | .highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */
54 | .highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
55 | .highlight .sx { color: #c65d09 } /* Literal.String.Other */
56 | .highlight .sr { color: #235388 } /* Literal.String.Regex */
57 | .highlight .s1 { color: #4070a0 } /* Literal.String.Single */
58 | .highlight .ss { color: #517918 } /* Literal.String.Symbol */
59 | .highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
60 | .highlight .vc { color: #bb60d5 } /* Name.Variable.Class */
61 | .highlight .vg { color: #bb60d5 } /* Name.Variable.Global */
62 | .highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */
63 | .highlight .il { color: #208050 } /* Literal.Number.Integer.Long */
--------------------------------------------------------------------------------
/helpDoc/_build/_build/html/py-modindex.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Python Module Index — src documentation
10 |
11 |
12 |
13 |
14 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
Python Module Index
44 |
45 |
48 |
49 |
75 |
76 |
77 |
78 |
79 |
80 |
103 |
104 |
105 |
113 |
114 |
115 |
116 |
117 |
118 |
--------------------------------------------------------------------------------
/helpDoc/_build/_build/html/index.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Welcome to hermes’s documentation! — src documentation
10 |
11 |
12 |
13 |
14 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
Welcome to hermes’s documentation!
42 |
Contents:
43 |
55 |
56 |
57 |
Indices and tables
58 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
106 |
107 |
108 |
119 |
120 |
121 |
122 |
123 |
124 |
--------------------------------------------------------------------------------
/helpDoc/_build/_build/html/genindex.html:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | Index — src documentation
11 |
12 |
13 |
14 |
15 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
Index
42 |
43 |
44 |
C
45 | |
D
46 | |
E
47 | |
H
48 | |
I
49 | |
J
50 | |
P
51 | |
S
52 | |
T
53 | |
X
54 |
55 |
56 |
C
57 |
65 |
66 |
D
67 |
81 |
82 |
E
83 |
91 |
92 |
H
93 |
119 |
120 |
I
121 |
129 |
130 |
J
131 |
139 |
140 |
P
141 |
149 |
150 |
S
151 |
177 |
178 |
T
179 |
187 |
188 |
X
189 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
229 |
230 |
231 |
239 |
240 |
241 |
242 |
243 |
244 |
--------------------------------------------------------------------------------
/helpDoc/_build/make.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 |
3 | REM Command file for Sphinx documentation
4 |
5 | if "%SPHINXBUILD%" == "" (
6 | set SPHINXBUILD=sphinx-build.exe
7 | )
8 | set BUILDDIR=_build
9 | set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
10 | set I18NSPHINXOPTS=%SPHINXOPTS% .
11 | if NOT "%PAPER%" == "" (
12 | set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
13 | set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
14 | )
15 |
16 | if "%1" == "" goto help
17 |
18 | if "%1" == "help" (
19 | :help
20 | echo.Please use `make ^` where ^ is one of
21 | echo. html to make standalone HTML files
22 | echo. dirhtml to make HTML files named index.html in directories
23 | echo. singlehtml to make a single large HTML file
24 | echo. pickle to make pickle files
25 | echo. json to make JSON files
26 | echo. htmlhelp to make HTML files and a HTML help project
27 | echo. qthelp to make HTML files and a qthelp project
28 | echo. devhelp to make HTML files and a Devhelp project
29 | echo. epub to make an epub
30 | echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
31 | echo. text to make text files
32 | echo. man to make manual pages
33 | echo. texinfo to make Texinfo files
34 | echo. gettext to make PO message catalogs
35 | echo. changes to make an overview over all changed/added/deprecated items
36 | echo. xml to make Docutils-native XML files
37 | echo. pseudoxml to make pseudoxml-XML files for display purposes
38 | echo. linkcheck to check all external links for integrity
39 | echo. doctest to run all doctests embedded in the documentation if enabled
40 | echo. coverage to run coverage check of the documentation if enabled
41 | goto end
42 | )
43 |
44 | if "%1" == "clean" (
45 | for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
46 | del /q /s %BUILDDIR%\*
47 | goto end
48 | )
49 |
50 |
51 | REM Check if sphinx-build is available and fallback to Python version if any
52 | %SPHINXBUILD% 1>NUL 2>NUL
53 | if errorlevel 9009 goto sphinx_python
54 | goto sphinx_ok
55 |
56 | :sphinx_python
57 |
58 | set SPHINXBUILD=python -m sphinx.__init__
59 | %SPHINXBUILD% 2> nul
60 | if errorlevel 9009 (
61 | echo.
62 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
63 | echo.installed, then set the SPHINXBUILD environment variable to point
64 | echo.to the full path of the 'sphinx-build' executable. Alternatively you
65 | echo.may add the Sphinx directory to PATH.
66 | echo.
67 | echo.If you don't have Sphinx installed, grab it from
68 | echo.http://sphinx-doc.org/
69 | exit /b 1
70 | )
71 |
72 | :sphinx_ok
73 |
74 |
75 | if "%1" == "html" (
76 | %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
77 | if errorlevel 1 exit /b 1
78 | echo.
79 | echo.Build finished. The HTML pages are in %BUILDDIR%/html.
80 | goto end
81 | )
82 |
83 | if "%1" == "dirhtml" (
84 | %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
85 | if errorlevel 1 exit /b 1
86 | echo.
87 | echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
88 | goto end
89 | )
90 |
91 | if "%1" == "singlehtml" (
92 | %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
93 | if errorlevel 1 exit /b 1
94 | echo.
95 | echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
96 | goto end
97 | )
98 |
99 | if "%1" == "pickle" (
100 | %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
101 | if errorlevel 1 exit /b 1
102 | echo.
103 | echo.Build finished; now you can process the pickle files.
104 | goto end
105 | )
106 |
107 | if "%1" == "json" (
108 | %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
109 | if errorlevel 1 exit /b 1
110 | echo.
111 | echo.Build finished; now you can process the JSON files.
112 | goto end
113 | )
114 |
115 | if "%1" == "htmlhelp" (
116 | %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
117 | if errorlevel 1 exit /b 1
118 | echo.
119 | echo.Build finished; now you can run HTML Help Workshop with the ^
120 | .hhp project file in %BUILDDIR%/htmlhelp.
121 | goto end
122 | )
123 |
124 | if "%1" == "qthelp" (
125 | %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
126 | if errorlevel 1 exit /b 1
127 | echo.
128 | echo.Build finished; now you can run "qcollectiongenerator" with the ^
129 | .qhcp project file in %BUILDDIR%/qthelp, like this:
130 | echo.^> qcollectiongenerator %BUILDDIR%\qthelp\src.qhcp
131 | echo.To view the help file:
132 | echo.^> assistant -collectionFile %BUILDDIR%\qthelp\src.ghc
133 | goto end
134 | )
135 |
136 | if "%1" == "devhelp" (
137 | %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
138 | if errorlevel 1 exit /b 1
139 | echo.
140 | echo.Build finished.
141 | goto end
142 | )
143 |
144 | if "%1" == "epub" (
145 | %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
146 | if errorlevel 1 exit /b 1
147 | echo.
148 | echo.Build finished. The epub file is in %BUILDDIR%/epub.
149 | goto end
150 | )
151 |
152 | if "%1" == "latex" (
153 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
154 | if errorlevel 1 exit /b 1
155 | echo.
156 | echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
157 | goto end
158 | )
159 |
160 | if "%1" == "latexpdf" (
161 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
162 | cd %BUILDDIR%/latex
163 | make all-pdf
164 | cd %~dp0
165 | echo.
166 | echo.Build finished; the PDF files are in %BUILDDIR%/latex.
167 | goto end
168 | )
169 |
170 | if "%1" == "latexpdfja" (
171 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
172 | cd %BUILDDIR%/latex
173 | make all-pdf-ja
174 | cd %~dp0
175 | echo.
176 | echo.Build finished; the PDF files are in %BUILDDIR%/latex.
177 | goto end
178 | )
179 |
180 | if "%1" == "text" (
181 | %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
182 | if errorlevel 1 exit /b 1
183 | echo.
184 | echo.Build finished. The text files are in %BUILDDIR%/text.
185 | goto end
186 | )
187 |
188 | if "%1" == "man" (
189 | %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
190 | if errorlevel 1 exit /b 1
191 | echo.
192 | echo.Build finished. The manual pages are in %BUILDDIR%/man.
193 | goto end
194 | )
195 |
196 | if "%1" == "texinfo" (
197 | %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
198 | if errorlevel 1 exit /b 1
199 | echo.
200 | echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
201 | goto end
202 | )
203 |
204 | if "%1" == "gettext" (
205 | %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
206 | if errorlevel 1 exit /b 1
207 | echo.
208 | echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
209 | goto end
210 | )
211 |
212 | if "%1" == "changes" (
213 | %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
214 | if errorlevel 1 exit /b 1
215 | echo.
216 | echo.The overview file is in %BUILDDIR%/changes.
217 | goto end
218 | )
219 |
220 | if "%1" == "linkcheck" (
221 | %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
222 | if errorlevel 1 exit /b 1
223 | echo.
224 | echo.Link check complete; look for any errors in the above output ^
225 | or in %BUILDDIR%/linkcheck/output.txt.
226 | goto end
227 | )
228 |
229 | if "%1" == "doctest" (
230 | %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
231 | if errorlevel 1 exit /b 1
232 | echo.
233 | echo.Testing of doctests in the sources finished, look at the ^
234 | results in %BUILDDIR%/doctest/output.txt.
235 | goto end
236 | )
237 |
238 | if "%1" == "coverage" (
239 | %SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage
240 | if errorlevel 1 exit /b 1
241 | echo.
242 | echo.Testing of coverage in the sources finished, look at the ^
243 | results in %BUILDDIR%/coverage/python.txt.
244 | goto end
245 | )
246 |
247 | if "%1" == "xml" (
248 | %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
249 | if errorlevel 1 exit /b 1
250 | echo.
251 | echo.Build finished. The XML files are in %BUILDDIR%/xml.
252 | goto end
253 | )
254 |
255 | if "%1" == "pseudoxml" (
256 | %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
257 | if errorlevel 1 exit /b 1
258 | echo.
259 | echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
260 | goto end
261 | )
262 |
263 | :end
264 |
--------------------------------------------------------------------------------
/helpDoc/_build/Makefile:
--------------------------------------------------------------------------------
1 | # Makefile for Sphinx documentation
2 | #
3 |
4 | # You can set these variables from the command line.
5 | SPHINXOPTS =
6 | SPHINXBUILD = sphinx-build
7 | PAPER =
8 | BUILDDIR = _build
9 |
10 | # User-friendly check for sphinx-build
11 | ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
12 | $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
13 | endif
14 |
15 | # Internal variables.
16 | PAPEROPT_a4 = -D latex_paper_size=a4
17 | PAPEROPT_letter = -D latex_paper_size=letter
18 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
19 | # the i18n builder cannot share the environment and doctrees with the others
20 | I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
21 |
22 | .PHONY: help
23 | help:
24 | @echo "Please use \`make ' where is one of"
25 | @echo " html to make standalone HTML files"
26 | @echo " dirhtml to make HTML files named index.html in directories"
27 | @echo " singlehtml to make a single large HTML file"
28 | @echo " pickle to make pickle files"
29 | @echo " json to make JSON files"
30 | @echo " htmlhelp to make HTML files and a HTML help project"
31 | @echo " qthelp to make HTML files and a qthelp project"
32 | @echo " applehelp to make an Apple Help Book"
33 | @echo " devhelp to make HTML files and a Devhelp project"
34 | @echo " epub to make an epub"
35 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
36 | @echo " latexpdf to make LaTeX files and run them through pdflatex"
37 | @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
38 | @echo " text to make text files"
39 | @echo " man to make manual pages"
40 | @echo " texinfo to make Texinfo files"
41 | @echo " info to make Texinfo files and run them through makeinfo"
42 | @echo " gettext to make PO message catalogs"
43 | @echo " changes to make an overview of all changed/added/deprecated items"
44 | @echo " xml to make Docutils-native XML files"
45 | @echo " pseudoxml to make pseudoxml-XML files for display purposes"
46 | @echo " linkcheck to check all external links for integrity"
47 | @echo " doctest to run all doctests embedded in the documentation (if enabled)"
48 | @echo " coverage to run coverage check of the documentation (if enabled)"
49 |
50 | .PHONY: clean
51 | clean:
52 | rm -rf $(BUILDDIR)/*
53 |
54 | .PHONY: html
55 | html:
56 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
57 | @echo
58 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
59 |
60 | .PHONY: dirhtml
61 | dirhtml:
62 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
63 | @echo
64 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
65 |
66 | .PHONY: singlehtml
67 | singlehtml:
68 | $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
69 | @echo
70 | @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
71 |
72 | .PHONY: pickle
73 | pickle:
74 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
75 | @echo
76 | @echo "Build finished; now you can process the pickle files."
77 |
78 | .PHONY: json
79 | json:
80 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
81 | @echo
82 | @echo "Build finished; now you can process the JSON files."
83 |
84 | .PHONY: htmlhelp
85 | htmlhelp:
86 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
87 | @echo
88 | @echo "Build finished; now you can run HTML Help Workshop with the" \
89 | ".hhp project file in $(BUILDDIR)/htmlhelp."
90 |
91 | .PHONY: qthelp
92 | qthelp:
93 | $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
94 | @echo
95 | @echo "Build finished; now you can run "qcollectiongenerator" with the" \
96 | ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
97 | @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/src.qhcp"
98 | @echo "To view the help file:"
99 | @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/src.qhc"
100 |
101 | .PHONY: applehelp
102 | applehelp:
103 | $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
104 | @echo
105 | @echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
106 | @echo "N.B. You won't be able to view it unless you put it in" \
107 | "~/Library/Documentation/Help or install it in your application" \
108 | "bundle."
109 |
110 | .PHONY: devhelp
111 | devhelp:
112 | $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
113 | @echo
114 | @echo "Build finished."
115 | @echo "To view the help file:"
116 | @echo "# mkdir -p $$HOME/.local/share/devhelp/src"
117 | @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/src"
118 | @echo "# devhelp"
119 |
120 | .PHONY: epub
121 | epub:
122 | $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
123 | @echo
124 | @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
125 |
126 | .PHONY: latex
127 | latex:
128 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
129 | @echo
130 | @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
131 | @echo "Run \`make' in that directory to run these through (pdf)latex" \
132 | "(use \`make latexpdf' here to do that automatically)."
133 |
134 | .PHONY: latexpdf
135 | latexpdf:
136 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
137 | @echo "Running LaTeX files through pdflatex..."
138 | $(MAKE) -C $(BUILDDIR)/latex all-pdf
139 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
140 |
141 | .PHONY: latexpdfja
142 | latexpdfja:
143 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
144 | @echo "Running LaTeX files through platex and dvipdfmx..."
145 | $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
146 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
147 |
148 | .PHONY: text
149 | text:
150 | $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
151 | @echo
152 | @echo "Build finished. The text files are in $(BUILDDIR)/text."
153 |
154 | .PHONY: man
155 | man:
156 | $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
157 | @echo
158 | @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
159 |
160 | .PHONY: texinfo
161 | texinfo:
162 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
163 | @echo
164 | @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
165 | @echo "Run \`make' in that directory to run these through makeinfo" \
166 | "(use \`make info' here to do that automatically)."
167 |
168 | .PHONY: info
169 | info:
170 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
171 | @echo "Running Texinfo files through makeinfo..."
172 | make -C $(BUILDDIR)/texinfo info
173 | @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
174 |
175 | .PHONY: gettext
176 | gettext:
177 | $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
178 | @echo
179 | @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
180 |
181 | .PHONY: changes
182 | changes:
183 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
184 | @echo
185 | @echo "The overview file is in $(BUILDDIR)/changes."
186 |
187 | .PHONY: linkcheck
188 | linkcheck:
189 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
190 | @echo
191 | @echo "Link check complete; look for any errors in the above output " \
192 | "or in $(BUILDDIR)/linkcheck/output.txt."
193 |
194 | .PHONY: doctest
195 | doctest:
196 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
197 | @echo "Testing of doctests in the sources finished, look at the " \
198 | "results in $(BUILDDIR)/doctest/output.txt."
199 |
200 | .PHONY: coverage
201 | coverage:
202 | $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
203 | @echo "Testing of coverage in the sources finished, look at the " \
204 | "results in $(BUILDDIR)/coverage/python.txt."
205 |
206 | .PHONY: xml
207 | xml:
208 | $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
209 | @echo
210 | @echo "Build finished. The XML files are in $(BUILDDIR)/xml."
211 |
212 | .PHONY: pseudoxml
213 | pseudoxml:
214 | $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
215 | @echo
216 | @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
217 |
--------------------------------------------------------------------------------
/helpDoc/_build/_build/html/_static/doctools.js:
--------------------------------------------------------------------------------
1 | /*
2 | * doctools.js
3 | * ~~~~~~~~~~~
4 | *
5 | * Sphinx JavaScript utilities for all documentation.
6 | *
7 | * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
8 | * :license: BSD, see LICENSE for details.
9 | *
10 | */
11 |
12 | /**
13 | * select a different prefix for underscore
14 | */
15 | $u = _.noConflict();
16 |
17 | /**
18 | * make the code below compatible with browsers without
19 | * an installed firebug like debugger
20 | if (!window.console || !console.firebug) {
21 | var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
22 | "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
23 | "profile", "profileEnd"];
24 | window.console = {};
25 | for (var i = 0; i < names.length; ++i)
26 | window.console[names[i]] = function() {};
27 | }
28 | */
29 |
30 | /**
31 | * small helper function to urldecode strings
32 | */
33 | jQuery.urldecode = function(x) {
34 | return decodeURIComponent(x).replace(/\+/g, ' ');
35 | };
36 |
37 | /**
38 | * small helper function to urlencode strings
39 | */
40 | jQuery.urlencode = encodeURIComponent;
41 |
42 | /**
43 | * This function returns the parsed url parameters of the
44 | * current request. Multiple values per key are supported,
45 | * it will always return arrays of strings for the value parts.
46 | */
47 | jQuery.getQueryParameters = function(s) {
48 | if (typeof s == 'undefined')
49 | s = document.location.search;
50 | var parts = s.substr(s.indexOf('?') + 1).split('&');
51 | var result = {};
52 | for (var i = 0; i < parts.length; i++) {
53 | var tmp = parts[i].split('=', 2);
54 | var key = jQuery.urldecode(tmp[0]);
55 | var value = jQuery.urldecode(tmp[1]);
56 | if (key in result)
57 | result[key].push(value);
58 | else
59 | result[key] = [value];
60 | }
61 | return result;
62 | };
63 |
64 | /**
65 | * highlight a given string on a jquery object by wrapping it in
66 | * span elements with the given class name.
67 | */
68 | jQuery.fn.highlightText = function(text, className) {
69 | function highlight(node) {
70 | if (node.nodeType == 3) {
71 | var val = node.nodeValue;
72 | var pos = val.toLowerCase().indexOf(text);
73 | if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) {
74 | var span = document.createElement("span");
75 | span.className = className;
76 | span.appendChild(document.createTextNode(val.substr(pos, text.length)));
77 | node.parentNode.insertBefore(span, node.parentNode.insertBefore(
78 | document.createTextNode(val.substr(pos + text.length)),
79 | node.nextSibling));
80 | node.nodeValue = val.substr(0, pos);
81 | }
82 | }
83 | else if (!jQuery(node).is("button, select, textarea")) {
84 | jQuery.each(node.childNodes, function() {
85 | highlight(this);
86 | });
87 | }
88 | }
89 | return this.each(function() {
90 | highlight(this);
91 | });
92 | };
93 |
94 | /*
95 | * backward compatibility for jQuery.browser
96 | * This will be supported until firefox bug is fixed.
97 | */
98 | if (!jQuery.browser) {
99 | jQuery.uaMatch = function(ua) {
100 | ua = ua.toLowerCase();
101 |
102 | var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
103 | /(webkit)[ \/]([\w.]+)/.exec(ua) ||
104 | /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
105 | /(msie) ([\w.]+)/.exec(ua) ||
106 | ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
107 | [];
108 |
109 | return {
110 | browser: match[ 1 ] || "",
111 | version: match[ 2 ] || "0"
112 | };
113 | };
114 | jQuery.browser = {};
115 | jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
116 | }
117 |
118 | /**
119 | * Small JavaScript module for the documentation.
120 | */
121 | var Documentation = {
122 |
123 | init : function() {
124 | this.fixFirefoxAnchorBug();
125 | this.highlightSearchWords();
126 | this.initIndexTable();
127 | },
128 |
129 | /**
130 | * i18n support
131 | */
132 | TRANSLATIONS : {},
133 | PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; },
134 | LOCALE : 'unknown',
135 |
136 | // gettext and ngettext don't access this so that the functions
137 | // can safely bound to a different name (_ = Documentation.gettext)
138 | gettext : function(string) {
139 | var translated = Documentation.TRANSLATIONS[string];
140 | if (typeof translated == 'undefined')
141 | return string;
142 | return (typeof translated == 'string') ? translated : translated[0];
143 | },
144 |
145 | ngettext : function(singular, plural, n) {
146 | var translated = Documentation.TRANSLATIONS[singular];
147 | if (typeof translated == 'undefined')
148 | return (n == 1) ? singular : plural;
149 | return translated[Documentation.PLURALEXPR(n)];
150 | },
151 |
152 | addTranslations : function(catalog) {
153 | for (var key in catalog.messages)
154 | this.TRANSLATIONS[key] = catalog.messages[key];
155 | this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');
156 | this.LOCALE = catalog.locale;
157 | },
158 |
159 | /**
160 | * add context elements like header anchor links
161 | */
162 | addContextElements : function() {
163 | $('div[id] > :header:first').each(function() {
164 | $('').
165 | attr('href', '#' + this.id).
166 | attr('title', _('Permalink to this headline')).
167 | appendTo(this);
168 | });
169 | $('dt[id]').each(function() {
170 | $('').
171 | attr('href', '#' + this.id).
172 | attr('title', _('Permalink to this definition')).
173 | appendTo(this);
174 | });
175 | },
176 |
177 | /**
178 | * workaround a firefox stupidity
179 | * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075
180 | */
181 | fixFirefoxAnchorBug : function() {
182 | if (document.location.hash)
183 | window.setTimeout(function() {
184 | document.location.href += '';
185 | }, 10);
186 | },
187 |
188 | /**
189 | * highlight the search words provided in the url in the text
190 | */
191 | highlightSearchWords : function() {
192 | var params = $.getQueryParameters();
193 | var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
194 | if (terms.length) {
195 | var body = $('div.body');
196 | if (!body.length) {
197 | body = $('body');
198 | }
199 | window.setTimeout(function() {
200 | $.each(terms, function() {
201 | body.highlightText(this.toLowerCase(), 'highlighted');
202 | });
203 | }, 10);
204 | $('' + _('Hide Search Matches') + '
')
206 | .appendTo($('#searchbox'));
207 | }
208 | },
209 |
210 | /**
211 | * init the domain index toggle buttons
212 | */
213 | initIndexTable : function() {
214 | var togglers = $('img.toggler').click(function() {
215 | var src = $(this).attr('src');
216 | var idnum = $(this).attr('id').substr(7);
217 | $('tr.cg-' + idnum).toggle();
218 | if (src.substr(-9) == 'minus.png')
219 | $(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
220 | else
221 | $(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
222 | }).css('display', '');
223 | if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {
224 | togglers.click();
225 | }
226 | },
227 |
228 | /**
229 | * helper function to hide the search marks again
230 | */
231 | hideSearchWords : function() {
232 | $('#searchbox .highlight-link').fadeOut(300);
233 | $('span.highlighted').removeClass('highlighted');
234 | },
235 |
236 | /**
237 | * make the url absolute
238 | */
239 | makeURL : function(relativeURL) {
240 | return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
241 | },
242 |
243 | /**
244 | * get the current relative url
245 | */
246 | getCurrentURL : function() {
247 | var path = document.location.pathname;
248 | var parts = path.split(/\//);
249 | $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
250 | if (this == '..')
251 | parts.pop();
252 | });
253 | var url = parts.join('/');
254 | return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
255 | }
256 | };
257 |
258 | // quick alias for translations
259 | _ = Documentation.gettext;
260 |
261 | $(document).ready(function() {
262 | Documentation.init();
263 | });
264 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License - 2.0
2 |
3 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
4 |
5 | 1. Definitions.
6 |
7 | "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
8 |
9 | "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
10 |
11 | "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control
12 | with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management
13 | of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial
14 | ownership of such entity.
15 |
16 | "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
17 |
18 | "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source,
19 | and configuration files.
20 |
21 | "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to
22 | compiled object code, generated documentation, and conversions to other media types.
23 |
24 | "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice
25 | that is included in or attached to the work (an example is provided in the Appendix below).
26 |
27 | "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the
28 | editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes
29 | of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of,
30 | the Work and Derivative Works thereof.
31 |
32 | "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work
33 | or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual
34 | or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of
35 | electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on
36 | electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for
37 | the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing
38 | by the copyright owner as "Not a Contribution."
39 |
40 | "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and
41 | subsequently incorporated within the Work.
42 |
43 | 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual,
44 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display,
45 | publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
46 |
47 | 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide,
48 | non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell,
49 | sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are
50 | necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was
51 | submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work
52 | or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You
53 | under this License for that Work shall terminate as of the date such litigation is filed.
54 |
55 | 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications,
56 | and in Source or Object form, provided that You meet the following conditions:
57 |
58 | 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and
59 |
60 | 2. You must cause any modified files to carry prominent notices stating that You changed the files; and
61 |
62 | 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices
63 | from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
64 |
65 | 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a
66 | readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the
67 | Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the
68 | Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever
69 | such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License.
70 | You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work,
71 | provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to
72 | Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your
73 | modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with
74 | the conditions stated in this License.
75 |
76 | 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You
77 | to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above,
78 | nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
79 |
80 | 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except
81 | as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
82 |
83 | 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides
84 | its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation,
85 | any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for
86 | determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under
87 | this License.
88 |
89 | 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required
90 | by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages,
91 | including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the
92 | use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or
93 | any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
94 |
95 | 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a
96 | fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting
97 | such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree
98 | to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your
99 | accepting any such warranty or additional liability.
100 |
101 | END OF TERMS AND CONDITIONS
--------------------------------------------------------------------------------
/helpDoc/_build/_build/html/_modules/hermes/common.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | hermes.common — src documentation
10 |
11 |
12 |
13 |
14 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
Source code for hermes.common
41 | """
42 | Copyright 2015 Esri
43 | Licensed under the Apache License, Version 2.0 (the 'License');
44 | you may not use this file except in compliance with the License.
45 | You may obtain a copy of the License at
46 | http://www.apache.org/licenses/LICENSE-2.0
47 | Unless required by applicable law or agreed to in writing, software
48 | distributed under the License is distributed on an 'AS IS' BASIS,
49 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
50 | See the License for the specific language governing permissions and
51 | limitations under the License.
52 | """
53 |
54 | from __future__ import absolute_import
55 | from __future__ import print_function
56 | import traceback
57 | import sys
58 | import os
59 | __version__ = "1.1.0"
60 |
61 | [docs] def trace ():
62 |
"""
63 |
trace finds the line, the filename
64 |
and error message and returns it
65 |
to the user
66 |
"""
67 |
68 |
tb = sys . exc_info ()[ 2 ]
69 |
info = sys . exc_info ()
70 |
extracttb = traceback . extract_tb ( info [ 2 ])
71 |
fileName = os . path . basename ( extracttb [ 0 ][ 0 ])
72 |
tbinfo = traceback . format_tb ( tb )[ 0 ]
73 |
# script name + line number
74 |
line = tbinfo . split ( ", " )[ 1 ]
75 |
# Get Python syntax error
76 |
#
77 |
synerror = traceback . format_exc () . splitlines ()[ - 1 ]
78 |
return line , fileName , synerror
79 | #--------------------------------------------------------------------------
80 | [docs] class HermesErrorHandler ( Exception ):
81 |
"""Error handler for hermes package"""
82 |
pass
83 | #--------------------------------------------------------------------------
84 | [docs] def safe_unicode ( obj , * args ):
85 |
""" return the unicode representation of obj """
86 |
try :
87 |
return unicode ( obj , * args )
88 |
except UnicodeDecodeError :
89 |
# obj is byte string
90 |
ascii_text = str ( obj ) . encode ( 'string_escape' )
91 |
return unicode ( ascii_text )
92 | #--------------------------------------------------------------------------
93 | [docs] def safe_str ( obj ):
94 |
""" return the byte string representation of obj """
95 |
try :
96 |
return str ( obj )
97 |
except UnicodeEncodeError :
98 |
# obj is unicode
99 |
return unicode ( obj ) . encode ( 'unicode_escape' )
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
132 |
133 |
134 |
142 |
143 |
144 |
145 |
146 |
147 |
--------------------------------------------------------------------------------
/helpDoc/_build/_build/html/_static/underscore.js:
--------------------------------------------------------------------------------
1 | // Underscore.js 1.3.1
2 | // (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
3 | // Underscore is freely distributable under the MIT license.
4 | // Portions of Underscore are inspired or borrowed from Prototype,
5 | // Oliver Steele's Functional, and John Resig's Micro-Templating.
6 | // For all details and documentation:
7 | // http://documentcloud.github.com/underscore
8 | (function(){function q(a,c,d){if(a===c)return a!==0||1/a==1/c;if(a==null||c==null)return a===c;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(a.isEqual&&b.isFunction(a.isEqual))return a.isEqual(c);if(c.isEqual&&b.isFunction(c.isEqual))return c.isEqual(a);var e=l.call(a);if(e!=l.call(c))return false;switch(e){case "[object String]":return a==String(c);case "[object Number]":return a!=+a?c!=+c:a==0?1/a==1/c:a==+c;case "[object Date]":case "[object Boolean]":return+a==+c;case "[object RegExp]":return a.source==
9 | c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase}if(typeof a!="object"||typeof c!="object")return false;for(var f=d.length;f--;)if(d[f]==a)return true;d.push(a);var f=0,g=true;if(e=="[object Array]"){if(f=a.length,g=f==c.length)for(;f--;)if(!(g=f in a==f in c&&q(a[f],c[f],d)))break}else{if("constructor"in a!="constructor"in c||a.constructor!=c.constructor)return false;for(var h in a)if(b.has(a,h)&&(f++,!(g=b.has(c,h)&&q(a[h],c[h],d))))break;if(g){for(h in c)if(b.has(c,
10 | h)&&!f--)break;g=!f}}d.pop();return g}var r=this,G=r._,n={},k=Array.prototype,o=Object.prototype,i=k.slice,H=k.unshift,l=o.toString,I=o.hasOwnProperty,w=k.forEach,x=k.map,y=k.reduce,z=k.reduceRight,A=k.filter,B=k.every,C=k.some,p=k.indexOf,D=k.lastIndexOf,o=Array.isArray,J=Object.keys,s=Function.prototype.bind,b=function(a){return new m(a)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=b;exports._=b}else r._=b;b.VERSION="1.3.1";var j=b.each=
11 | b.forEach=function(a,c,d){if(a!=null)if(w&&a.forEach===w)a.forEach(c,d);else if(a.length===+a.length)for(var e=0,f=a.length;e2;a==
12 | null&&(a=[]);if(y&&a.reduce===y)return e&&(c=b.bind(c,e)),f?a.reduce(c,d):a.reduce(c);j(a,function(a,b,i){f?d=c.call(e,d,a,b,i):(d=a,f=true)});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(z&&a.reduceRight===z)return e&&(c=b.bind(c,e)),f?a.reduceRight(c,d):a.reduceRight(c);var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return f?b.reduce(g,c,d,e):b.reduce(g,c)};b.find=b.detect=
13 | function(a,c,b){var e;E(a,function(a,g,h){if(c.call(b,a,g,h))return e=a,true});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(A&&a.filter===A)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(B&&a.every===B)return a.every(c,b);j(a,function(a,g,h){if(!(e=
14 | e&&c.call(b,a,g,h)))return n});return e};var E=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return e;if(C&&a.some===C)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return n});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;return p&&a.indexOf===p?a.indexOf(c)!=-1:b=E(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(b.isFunction(c)?c||a:a[c]).apply(a,d)})};b.pluck=
15 | function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;bd?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex=function(a,
17 | c,d){d||(d=b.identity);for(var e=0,f=a.length;e>1;d(a[g])=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1));return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e=0;d--)b=[a[d].apply(this,b)];return b[0]}};
24 | b.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=J||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var c=[],d;for(d in a)b.has(a,d)&&(c[c.length]=d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]=b[d]});return a};b.defaults=function(a){j(i.call(arguments,
25 | 1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return q(a,b,[])};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(b.has(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=o||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a===Object(a)};
26 | b.isArguments=function(a){return l.call(a)=="[object Arguments]"};if(!b.isArguments(arguments))b.isArguments=function(a){return!(!a||!b.has(a,"callee"))};b.isFunction=function(a){return l.call(a)=="[object Function]"};b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)=="[object Date]"};
27 | b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.has=function(a,b){return I.call(a,b)};b.noConflict=function(){r._=G;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e /g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};b.mixin=function(a){j(b.functions(a),
28 | function(c){K(c,b[c]=a[c])})};var L=0;b.uniqueId=function(a){var b=L++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var t=/.^/,u=function(a){return a.replace(/\\\\/g,"\\").replace(/\\'/g,"'")};b.template=function(a,c){var d=b.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.escape||t,function(a,b){return"',_.escape("+
29 | u(b)+"),'"}).replace(d.interpolate||t,function(a,b){return"',"+u(b)+",'"}).replace(d.evaluate||t,function(a,b){return"');"+u(b).replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",e=new Function("obj","_",d);return c?e(c,b):function(a){return e.call(this,a,b)}};b.chain=function(a){return b(a).chain()};var m=function(a){this._wrapped=a};b.prototype=m.prototype;var v=function(a,c){return c?b(a).chain():a},K=function(a,c){m.prototype[a]=
30 | function(){var a=i.call(arguments);H.call(a,this._wrapped);return v(c.apply(b,a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];m.prototype[a]=function(){var d=this._wrapped;b.apply(d,arguments);var e=d.length;(a=="shift"||a=="splice")&&e===0&&delete d[0];return v(d,this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];m.prototype[a]=function(){return v(b.apply(this._wrapped,arguments),this._chain)}});m.prototype.chain=function(){this._chain=
31 | true;return this};m.prototype.value=function(){return this._wrapped}}).call(this);
32 |
--------------------------------------------------------------------------------
/helpDoc/_build/_build/html/_static/alabaster.css:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | @import url("basic.css");
19 |
20 | /* -- page layout ----------------------------------------------------------- */
21 |
22 | body {
23 | font-family: 'goudy old style', 'minion pro', 'bell mt', Georgia, 'Hiragino Mincho Pro', serif;
24 | font-size: 17px;
25 | background-color: white;
26 | color: #000;
27 | margin: 0;
28 | padding: 0;
29 | }
30 |
31 | div.document {
32 | width: 940px;
33 | margin: 30px auto 0 auto;
34 | }
35 |
36 | div.documentwrapper {
37 | float: left;
38 | width: 100%;
39 | }
40 |
41 | div.bodywrapper {
42 | margin: 0 0 0 220px;
43 | }
44 |
45 | div.sphinxsidebar {
46 | width: 220px;
47 | }
48 |
49 | hr {
50 | border: 1px solid #B1B4B6;
51 | }
52 |
53 | div.body {
54 | background-color: #ffffff;
55 | color: #3E4349;
56 | padding: 0 30px 0 30px;
57 | }
58 |
59 | div.footer {
60 | width: 940px;
61 | margin: 20px auto 30px auto;
62 | font-size: 14px;
63 | color: #888;
64 | text-align: right;
65 | }
66 |
67 | div.footer a {
68 | color: #888;
69 | }
70 |
71 |
72 | div.relations {
73 | display: none;
74 | }
75 |
76 |
77 | div.sphinxsidebar a {
78 | color: #444;
79 | text-decoration: none;
80 | border-bottom: 1px dotted #999;
81 | }
82 |
83 | div.sphinxsidebar a:hover {
84 | border-bottom: 1px solid #999;
85 | }
86 |
87 | div.sphinxsidebar {
88 | font-size: 14px;
89 | line-height: 1.5;
90 | }
91 |
92 | div.sphinxsidebarwrapper {
93 | padding: 18px 10px;
94 | }
95 |
96 | div.sphinxsidebarwrapper p.logo {
97 | padding: 0;
98 | margin: -10px 0 0 0px;
99 | text-align: center;
100 | }
101 |
102 | div.sphinxsidebarwrapper h1.logo {
103 | margin-top: -10px;
104 | text-align: center;
105 | margin-bottom: 5px;
106 | text-align: left;
107 | }
108 |
109 | div.sphinxsidebarwrapper h1.logo-name {
110 | margin-top: 0px;
111 | }
112 |
113 | div.sphinxsidebarwrapper p.blurb {
114 | margin-top: 0;
115 | font-style: normal;
116 | }
117 |
118 | div.sphinxsidebar h3,
119 | div.sphinxsidebar h4 {
120 | font-family: 'Garamond', 'Georgia', serif;
121 | color: #444;
122 | font-size: 24px;
123 | font-weight: normal;
124 | margin: 0 0 5px 0;
125 | padding: 0;
126 | }
127 |
128 | div.sphinxsidebar h4 {
129 | font-size: 20px;
130 | }
131 |
132 | div.sphinxsidebar h3 a {
133 | color: #444;
134 | }
135 |
136 | div.sphinxsidebar p.logo a,
137 | div.sphinxsidebar h3 a,
138 | div.sphinxsidebar p.logo a:hover,
139 | div.sphinxsidebar h3 a:hover {
140 | border: none;
141 | }
142 |
143 | div.sphinxsidebar p {
144 | color: #555;
145 | margin: 10px 0;
146 | }
147 |
148 | div.sphinxsidebar ul {
149 | margin: 10px 0;
150 | padding: 0;
151 | color: #000;
152 | }
153 |
154 | div.sphinxsidebar ul li.toctree-l1 > a {
155 | font-size: 120%;
156 | }
157 |
158 | div.sphinxsidebar ul li.toctree-l2 > a {
159 | font-size: 110%;
160 | }
161 |
162 | div.sphinxsidebar input {
163 | border: 1px solid #CCC;
164 | font-family: 'goudy old style', 'minion pro', 'bell mt', Georgia, 'Hiragino Mincho Pro', serif;
165 | font-size: 1em;
166 | }
167 |
168 | div.sphinxsidebar hr {
169 | border: none;
170 | height: 1px;
171 | color: #999;
172 | background: #999;
173 |
174 | text-align: left;
175 | margin-left: 0;
176 | width: 50%;
177 | }
178 |
179 | /* -- body styles ----------------------------------------------------------- */
180 |
181 | a {
182 | color: #004B6B;
183 | text-decoration: underline;
184 | }
185 |
186 | a:hover {
187 | color: #6D4100;
188 | text-decoration: underline;
189 | }
190 |
191 | div.body h1,
192 | div.body h2,
193 | div.body h3,
194 | div.body h4,
195 | div.body h5,
196 | div.body h6 {
197 | font-family: 'Garamond', 'Georgia', serif;
198 | font-weight: normal;
199 | margin: 30px 0px 10px 0px;
200 | padding: 0;
201 | }
202 |
203 | div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; }
204 | div.body h2 { font-size: 180%; }
205 | div.body h3 { font-size: 150%; }
206 | div.body h4 { font-size: 130%; }
207 | div.body h5 { font-size: 100%; }
208 | div.body h6 { font-size: 100%; }
209 |
210 | a.headerlink {
211 | color: #DDD;
212 | padding: 0 4px;
213 | text-decoration: none;
214 | }
215 |
216 | a.headerlink:hover {
217 | color: #444;
218 | background: #EAEAEA;
219 | }
220 |
221 | div.body p, div.body dd, div.body li {
222 | line-height: 1.4em;
223 | }
224 |
225 | div.admonition {
226 | margin: 20px 0px;
227 | padding: 10px 30px;
228 | background-color: #FCC;
229 | border: 1px solid #FAA;
230 | }
231 |
232 | div.admonition tt.xref, div.admonition a tt {
233 | border-bottom: 1px solid #fafafa;
234 | }
235 |
236 | dd div.admonition {
237 | margin-left: -60px;
238 | padding-left: 60px;
239 | }
240 |
241 | div.admonition p.admonition-title {
242 | font-family: 'Garamond', 'Georgia', serif;
243 | font-weight: normal;
244 | font-size: 24px;
245 | margin: 0 0 10px 0;
246 | padding: 0;
247 | line-height: 1;
248 | }
249 |
250 | div.admonition p.last {
251 | margin-bottom: 0;
252 | }
253 |
254 | div.highlight {
255 | background-color: white;
256 | }
257 |
258 | dt:target, .highlight {
259 | background: #FAF3E8;
260 | }
261 |
262 | div.note {
263 | background-color: #EEE;
264 | border: 1px solid #CCC;
265 | }
266 |
267 | div.seealso {
268 | background-color: #EEE;
269 | border: 1px solid #CCC;
270 | }
271 |
272 | div.topic {
273 | background-color: #eee;
274 | }
275 |
276 | p.admonition-title {
277 | display: inline;
278 | }
279 |
280 | p.admonition-title:after {
281 | content: ":";
282 | }
283 |
284 | pre, tt, code {
285 | font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
286 | font-size: 0.9em;
287 | }
288 |
289 | .hll {
290 | background-color: #FFC;
291 | margin: 0 -12px;
292 | padding: 0 12px;
293 | display: block;
294 | }
295 |
296 | img.screenshot {
297 | }
298 |
299 | tt.descname, tt.descclassname, code.descname, code.descclassname {
300 | font-size: 0.95em;
301 | }
302 |
303 | tt.descname, code.descname {
304 | padding-right: 0.08em;
305 | }
306 |
307 | img.screenshot {
308 | -moz-box-shadow: 2px 2px 4px #eee;
309 | -webkit-box-shadow: 2px 2px 4px #eee;
310 | box-shadow: 2px 2px 4px #eee;
311 | }
312 |
313 | table.docutils {
314 | border: 1px solid #888;
315 | -moz-box-shadow: 2px 2px 4px #eee;
316 | -webkit-box-shadow: 2px 2px 4px #eee;
317 | box-shadow: 2px 2px 4px #eee;
318 | }
319 |
320 | table.docutils td, table.docutils th {
321 | border: 1px solid #888;
322 | padding: 0.25em 0.7em;
323 | }
324 |
325 | table.field-list, table.footnote {
326 | border: none;
327 | -moz-box-shadow: none;
328 | -webkit-box-shadow: none;
329 | box-shadow: none;
330 | }
331 |
332 | table.footnote {
333 | margin: 15px 0;
334 | width: 100%;
335 | border: 1px solid #EEE;
336 | background: #FDFDFD;
337 | font-size: 0.9em;
338 | }
339 |
340 | table.footnote + table.footnote {
341 | margin-top: -15px;
342 | border-top: none;
343 | }
344 |
345 | table.field-list th {
346 | padding: 0 0.8em 0 0;
347 | }
348 |
349 | table.field-list td {
350 | padding: 0;
351 | }
352 |
353 | table.footnote td.label {
354 | width: 0px;
355 | padding: 0.3em 0 0.3em 0.5em;
356 | }
357 |
358 | table.footnote td {
359 | padding: 0.3em 0.5em;
360 | }
361 |
362 | dl {
363 | margin: 0;
364 | padding: 0;
365 | }
366 |
367 | dl dd {
368 | margin-left: 30px;
369 | }
370 |
371 | blockquote {
372 | margin: 0 0 0 30px;
373 | padding: 0;
374 | }
375 |
376 | ul, ol {
377 | margin: 10px 0 10px 30px;
378 | padding: 0;
379 | }
380 |
381 | pre {
382 | background: #EEE;
383 | padding: 7px 30px;
384 | margin: 15px 0px;
385 | line-height: 1.3em;
386 | }
387 |
388 | dl pre, blockquote pre, li pre {
389 | margin-left: 0;
390 | padding-left: 30px;
391 | }
392 |
393 | dl dl pre {
394 | margin-left: -90px;
395 | padding-left: 90px;
396 | }
397 |
398 | tt, code {
399 | background-color: #ecf0f3;
400 | color: #222;
401 | /* padding: 1px 2px; */
402 | }
403 |
404 | tt.xref, code.xref, a tt {
405 | background-color: #FBFBFB;
406 | border-bottom: 1px solid white;
407 | }
408 |
409 | a.reference {
410 | text-decoration: none;
411 | border-bottom: 1px dotted #004B6B;
412 | }
413 |
414 | a.reference:hover {
415 | border-bottom: 1px solid #6D4100;
416 | }
417 |
418 | a.footnote-reference {
419 | text-decoration: none;
420 | font-size: 0.7em;
421 | vertical-align: top;
422 | border-bottom: 1px dotted #004B6B;
423 | }
424 |
425 | a.footnote-reference:hover {
426 | border-bottom: 1px solid #6D4100;
427 | }
428 |
429 | a:hover tt, a:hover code {
430 | background: #EEE;
431 | }
432 |
433 |
434 | @media screen and (max-width: 870px) {
435 |
436 | div.sphinxsidebar {
437 | display: none;
438 | }
439 |
440 | div.document {
441 | width: 100%;
442 |
443 | }
444 |
445 | div.documentwrapper {
446 | margin-left: 0;
447 | margin-top: 0;
448 | margin-right: 0;
449 | margin-bottom: 0;
450 | }
451 |
452 | div.bodywrapper {
453 | margin-top: 0;
454 | margin-right: 0;
455 | margin-bottom: 0;
456 | margin-left: 0;
457 | }
458 |
459 | ul {
460 | margin-left: 0;
461 | }
462 |
463 | .document {
464 | width: auto;
465 | }
466 |
467 | .footer {
468 | width: auto;
469 | }
470 |
471 | .bodywrapper {
472 | margin: 0;
473 | }
474 |
475 | .footer {
476 | width: auto;
477 | }
478 |
479 | .github {
480 | display: none;
481 | }
482 |
483 |
484 |
485 | }
486 |
487 |
488 |
489 | @media screen and (max-width: 875px) {
490 |
491 | body {
492 | margin: 0;
493 | padding: 20px 30px;
494 | }
495 |
496 | div.documentwrapper {
497 | float: none;
498 | background: white;
499 | }
500 |
501 | div.sphinxsidebar {
502 | display: block;
503 | float: none;
504 | width: 102.5%;
505 | margin: 50px -30px -20px -30px;
506 | padding: 10px 20px;
507 | background: #333;
508 | color: #FFF;
509 | }
510 |
511 | div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p,
512 | div.sphinxsidebar h3 a {
513 | color: white;
514 | }
515 |
516 | div.sphinxsidebar a {
517 | color: #AAA;
518 | }
519 |
520 | div.sphinxsidebar p.logo {
521 | display: none;
522 | }
523 |
524 | div.document {
525 | width: 100%;
526 | margin: 0;
527 | }
528 |
529 | div.footer {
530 | display: none;
531 | }
532 |
533 | div.bodywrapper {
534 | margin: 0;
535 | }
536 |
537 | div.body {
538 | min-height: 0;
539 | padding: 0;
540 | }
541 |
542 | .rtd_doc_footer {
543 | display: none;
544 | }
545 |
546 | .document {
547 | width: auto;
548 | }
549 |
550 | .footer {
551 | width: auto;
552 | }
553 |
554 | .footer {
555 | width: auto;
556 | }
557 |
558 | .github {
559 | display: none;
560 | }
561 | }
562 |
563 |
564 | /* misc. */
565 |
566 | .revsys-inline {
567 | display: none!important;
568 | }
569 |
570 | /* Make nested-list/multi-paragraph items look better in Releases changelog
571 | * pages. Without this, docutils' magical list fuckery causes inconsistent
572 | * formatting between different release sub-lists.
573 | */
574 | div#changelog > div.section > ul > li > p:only-child {
575 | margin-bottom: 0;
576 | }
577 |
578 | /* Hide fugly table cell borders in ..bibliography:: directive output */
579 | table.docutils.citation, table.docutils.citation td, table.docutils.citation th {
580 | border: none;
581 | /* Below needed in some edge cases; if not applied, bottom shadows appear */
582 | -moz-box-shadow: none;
583 | -webkit-box-shadow: none;
584 | box-shadow: none;
585 | }
--------------------------------------------------------------------------------
/helpDoc/_build/_build/html/_static/basic.css:
--------------------------------------------------------------------------------
1 | /*
2 | * basic.css
3 | * ~~~~~~~~~
4 | *
5 | * Sphinx stylesheet -- basic theme.
6 | *
7 | * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
8 | * :license: BSD, see LICENSE for details.
9 | *
10 | */
11 |
12 | /* -- main layout ----------------------------------------------------------- */
13 |
14 | div.clearer {
15 | clear: both;
16 | }
17 |
18 | /* -- relbar ---------------------------------------------------------------- */
19 |
20 | div.related {
21 | width: 100%;
22 | font-size: 90%;
23 | }
24 |
25 | div.related h3 {
26 | display: none;
27 | }
28 |
29 | div.related ul {
30 | margin: 0;
31 | padding: 0 0 0 10px;
32 | list-style: none;
33 | }
34 |
35 | div.related li {
36 | display: inline;
37 | }
38 |
39 | div.related li.right {
40 | float: right;
41 | margin-right: 5px;
42 | }
43 |
44 | /* -- sidebar --------------------------------------------------------------- */
45 |
46 | div.sphinxsidebarwrapper {
47 | padding: 10px 5px 0 10px;
48 | }
49 |
50 | div.sphinxsidebar {
51 | float: left;
52 | width: 230px;
53 | margin-left: -100%;
54 | font-size: 90%;
55 | }
56 |
57 | div.sphinxsidebar ul {
58 | list-style: none;
59 | }
60 |
61 | div.sphinxsidebar ul ul,
62 | div.sphinxsidebar ul.want-points {
63 | margin-left: 20px;
64 | list-style: square;
65 | }
66 |
67 | div.sphinxsidebar ul ul {
68 | margin-top: 0;
69 | margin-bottom: 0;
70 | }
71 |
72 | div.sphinxsidebar form {
73 | margin-top: 10px;
74 | }
75 |
76 | div.sphinxsidebar input {
77 | border: 1px solid #98dbcc;
78 | font-family: sans-serif;
79 | font-size: 1em;
80 | }
81 |
82 | div.sphinxsidebar #searchbox input[type="text"] {
83 | width: 170px;
84 | }
85 |
86 | div.sphinxsidebar #searchbox input[type="submit"] {
87 | width: 30px;
88 | }
89 |
90 | img {
91 | border: 0;
92 | max-width: 100%;
93 | }
94 |
95 | /* -- search page ----------------------------------------------------------- */
96 |
97 | ul.search {
98 | margin: 10px 0 0 20px;
99 | padding: 0;
100 | }
101 |
102 | ul.search li {
103 | padding: 5px 0 5px 20px;
104 | background-image: url(file.png);
105 | background-repeat: no-repeat;
106 | background-position: 0 7px;
107 | }
108 |
109 | ul.search li a {
110 | font-weight: bold;
111 | }
112 |
113 | ul.search li div.context {
114 | color: #888;
115 | margin: 2px 0 0 30px;
116 | text-align: left;
117 | }
118 |
119 | ul.keywordmatches li.goodmatch a {
120 | font-weight: bold;
121 | }
122 |
123 | /* -- index page ------------------------------------------------------------ */
124 |
125 | table.contentstable {
126 | width: 90%;
127 | }
128 |
129 | table.contentstable p.biglink {
130 | line-height: 150%;
131 | }
132 |
133 | a.biglink {
134 | font-size: 1.3em;
135 | }
136 |
137 | span.linkdescr {
138 | font-style: italic;
139 | padding-top: 5px;
140 | font-size: 90%;
141 | }
142 |
143 | /* -- general index --------------------------------------------------------- */
144 |
145 | table.indextable {
146 | width: 100%;
147 | }
148 |
149 | table.indextable td {
150 | text-align: left;
151 | vertical-align: top;
152 | }
153 |
154 | table.indextable dl, table.indextable dd {
155 | margin-top: 0;
156 | margin-bottom: 0;
157 | }
158 |
159 | table.indextable tr.pcap {
160 | height: 10px;
161 | }
162 |
163 | table.indextable tr.cap {
164 | margin-top: 10px;
165 | background-color: #f2f2f2;
166 | }
167 |
168 | img.toggler {
169 | margin-right: 3px;
170 | margin-top: 3px;
171 | cursor: pointer;
172 | }
173 |
174 | div.modindex-jumpbox {
175 | border-top: 1px solid #ddd;
176 | border-bottom: 1px solid #ddd;
177 | margin: 1em 0 1em 0;
178 | padding: 0.4em;
179 | }
180 |
181 | div.genindex-jumpbox {
182 | border-top: 1px solid #ddd;
183 | border-bottom: 1px solid #ddd;
184 | margin: 1em 0 1em 0;
185 | padding: 0.4em;
186 | }
187 |
188 | /* -- general body styles --------------------------------------------------- */
189 |
190 | a.headerlink {
191 | visibility: hidden;
192 | }
193 |
194 | h1:hover > a.headerlink,
195 | h2:hover > a.headerlink,
196 | h3:hover > a.headerlink,
197 | h4:hover > a.headerlink,
198 | h5:hover > a.headerlink,
199 | h6:hover > a.headerlink,
200 | dt:hover > a.headerlink,
201 | caption:hover > a.headerlink,
202 | p.caption:hover > a.headerlink,
203 | div.code-block-caption:hover > a.headerlink {
204 | visibility: visible;
205 | }
206 |
207 | div.body p.caption {
208 | text-align: inherit;
209 | }
210 |
211 | div.body td {
212 | text-align: left;
213 | }
214 |
215 | .field-list ul {
216 | padding-left: 1em;
217 | }
218 |
219 | .first {
220 | margin-top: 0 !important;
221 | }
222 |
223 | p.rubric {
224 | margin-top: 30px;
225 | font-weight: bold;
226 | }
227 |
228 | img.align-left, .figure.align-left, object.align-left {
229 | clear: left;
230 | float: left;
231 | margin-right: 1em;
232 | }
233 |
234 | img.align-right, .figure.align-right, object.align-right {
235 | clear: right;
236 | float: right;
237 | margin-left: 1em;
238 | }
239 |
240 | img.align-center, .figure.align-center, object.align-center {
241 | display: block;
242 | margin-left: auto;
243 | margin-right: auto;
244 | }
245 |
246 | .align-left {
247 | text-align: left;
248 | }
249 |
250 | .align-center {
251 | text-align: center;
252 | }
253 |
254 | .align-right {
255 | text-align: right;
256 | }
257 |
258 | /* -- sidebars -------------------------------------------------------------- */
259 |
260 | div.sidebar {
261 | margin: 0 0 0.5em 1em;
262 | border: 1px solid #ddb;
263 | padding: 7px 7px 0 7px;
264 | background-color: #ffe;
265 | width: 40%;
266 | float: right;
267 | }
268 |
269 | p.sidebar-title {
270 | font-weight: bold;
271 | }
272 |
273 | /* -- topics ---------------------------------------------------------------- */
274 |
275 | div.topic {
276 | border: 1px solid #ccc;
277 | padding: 7px 7px 0 7px;
278 | margin: 10px 0 10px 0;
279 | }
280 |
281 | p.topic-title {
282 | font-size: 1.1em;
283 | font-weight: bold;
284 | margin-top: 10px;
285 | }
286 |
287 | /* -- admonitions ----------------------------------------------------------- */
288 |
289 | div.admonition {
290 | margin-top: 10px;
291 | margin-bottom: 10px;
292 | padding: 7px;
293 | }
294 |
295 | div.admonition dt {
296 | font-weight: bold;
297 | }
298 |
299 | div.admonition dl {
300 | margin-bottom: 0;
301 | }
302 |
303 | p.admonition-title {
304 | margin: 0px 10px 5px 0px;
305 | font-weight: bold;
306 | }
307 |
308 | div.body p.centered {
309 | text-align: center;
310 | margin-top: 25px;
311 | }
312 |
313 | /* -- tables ---------------------------------------------------------------- */
314 |
315 | table.docutils {
316 | border: 0;
317 | border-collapse: collapse;
318 | }
319 |
320 | table caption span.caption-number {
321 | font-style: italic;
322 | }
323 |
324 | table caption span.caption-text {
325 | }
326 |
327 | table.docutils td, table.docutils th {
328 | padding: 1px 8px 1px 5px;
329 | border-top: 0;
330 | border-left: 0;
331 | border-right: 0;
332 | border-bottom: 1px solid #aaa;
333 | }
334 |
335 | table.field-list td, table.field-list th {
336 | border: 0 !important;
337 | }
338 |
339 | table.footnote td, table.footnote th {
340 | border: 0 !important;
341 | }
342 |
343 | th {
344 | text-align: left;
345 | padding-right: 5px;
346 | }
347 |
348 | table.citation {
349 | border-left: solid 1px gray;
350 | margin-left: 1px;
351 | }
352 |
353 | table.citation td {
354 | border-bottom: none;
355 | }
356 |
357 | /* -- figures --------------------------------------------------------------- */
358 |
359 | div.figure {
360 | margin: 0.5em;
361 | padding: 0.5em;
362 | }
363 |
364 | div.figure p.caption {
365 | padding: 0.3em;
366 | }
367 |
368 | div.figure p.caption span.caption-number {
369 | font-style: italic;
370 | }
371 |
372 | div.figure p.caption span.caption-text {
373 | }
374 |
375 |
376 | /* -- other body styles ----------------------------------------------------- */
377 |
378 | ol.arabic {
379 | list-style: decimal;
380 | }
381 |
382 | ol.loweralpha {
383 | list-style: lower-alpha;
384 | }
385 |
386 | ol.upperalpha {
387 | list-style: upper-alpha;
388 | }
389 |
390 | ol.lowerroman {
391 | list-style: lower-roman;
392 | }
393 |
394 | ol.upperroman {
395 | list-style: upper-roman;
396 | }
397 |
398 | dl {
399 | margin-bottom: 15px;
400 | }
401 |
402 | dd p {
403 | margin-top: 0px;
404 | }
405 |
406 | dd ul, dd table {
407 | margin-bottom: 10px;
408 | }
409 |
410 | dd {
411 | margin-top: 3px;
412 | margin-bottom: 10px;
413 | margin-left: 30px;
414 | }
415 |
416 | dt:target, .highlighted {
417 | background-color: #fbe54e;
418 | }
419 |
420 | dl.glossary dt {
421 | font-weight: bold;
422 | font-size: 1.1em;
423 | }
424 |
425 | .field-list ul {
426 | margin: 0;
427 | padding-left: 1em;
428 | }
429 |
430 | .field-list p {
431 | margin: 0;
432 | }
433 |
434 | .optional {
435 | font-size: 1.3em;
436 | }
437 |
438 | .sig-paren {
439 | font-size: larger;
440 | }
441 |
442 | .versionmodified {
443 | font-style: italic;
444 | }
445 |
446 | .system-message {
447 | background-color: #fda;
448 | padding: 5px;
449 | border: 3px solid red;
450 | }
451 |
452 | .footnote:target {
453 | background-color: #ffa;
454 | }
455 |
456 | .line-block {
457 | display: block;
458 | margin-top: 1em;
459 | margin-bottom: 1em;
460 | }
461 |
462 | .line-block .line-block {
463 | margin-top: 0;
464 | margin-bottom: 0;
465 | margin-left: 1.5em;
466 | }
467 |
468 | .guilabel, .menuselection {
469 | font-family: sans-serif;
470 | }
471 |
472 | .accelerator {
473 | text-decoration: underline;
474 | }
475 |
476 | .classifier {
477 | font-style: oblique;
478 | }
479 |
480 | abbr, acronym {
481 | border-bottom: dotted 1px;
482 | cursor: help;
483 | }
484 |
485 | /* -- code displays --------------------------------------------------------- */
486 |
487 | pre {
488 | overflow: auto;
489 | overflow-y: hidden; /* fixes display issues on Chrome browsers */
490 | }
491 |
492 | td.linenos pre {
493 | padding: 5px 0px;
494 | border: 0;
495 | background-color: transparent;
496 | color: #aaa;
497 | }
498 |
499 | table.highlighttable {
500 | margin-left: 0.5em;
501 | }
502 |
503 | table.highlighttable td {
504 | padding: 0 0.5em 0 0.5em;
505 | }
506 |
507 | div.code-block-caption {
508 | padding: 2px 5px;
509 | font-size: small;
510 | }
511 |
512 | div.code-block-caption code {
513 | background-color: transparent;
514 | }
515 |
516 | div.code-block-caption + div > div.highlight > pre {
517 | margin-top: 0;
518 | }
519 |
520 | div.code-block-caption span.caption-number {
521 | padding: 0.1em 0.3em;
522 | font-style: italic;
523 | }
524 |
525 | div.code-block-caption span.caption-text {
526 | }
527 |
528 | div.literal-block-wrapper {
529 | padding: 1em 1em 0;
530 | }
531 |
532 | div.literal-block-wrapper div.highlight {
533 | margin: 0;
534 | }
535 |
536 | code.descname {
537 | background-color: transparent;
538 | font-weight: bold;
539 | font-size: 1.2em;
540 | }
541 |
542 | code.descclassname {
543 | background-color: transparent;
544 | }
545 |
546 | code.xref, a code {
547 | background-color: transparent;
548 | font-weight: bold;
549 | }
550 |
551 | h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
552 | background-color: transparent;
553 | }
554 |
555 | .viewcode-link {
556 | float: right;
557 | }
558 |
559 | .viewcode-back {
560 | float: right;
561 | font-family: sans-serif;
562 | }
563 |
564 | div.viewcode-block:target {
565 | margin: -1px -10px;
566 | padding: 0 10px;
567 | }
568 |
569 | /* -- math display ---------------------------------------------------------- */
570 |
571 | img.math {
572 | vertical-align: middle;
573 | }
574 |
575 | div.body div.math p {
576 | text-align: center;
577 | }
578 |
579 | span.eqno {
580 | float: right;
581 | }
582 |
583 | /* -- printout stylesheet --------------------------------------------------- */
584 |
585 | @media print {
586 | div.document,
587 | div.documentwrapper,
588 | div.bodywrapper {
589 | margin: 0 !important;
590 | width: 100%;
591 | }
592 |
593 | div.sphinxsidebar,
594 | div.related,
595 | div.footer,
596 | #top-link {
597 | display: none;
598 | }
599 | }
--------------------------------------------------------------------------------
/helpDoc/_build/conf.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | #
3 | # src documentation build configuration file, created by
4 | # sphinx-quickstart on Wed Feb 10 11:52:44 2016.
5 | #
6 | # This file is execfile()d with the current directory set to its
7 | # containing dir.
8 | #
9 | # Note that not all possible configuration values are present in this
10 | # autogenerated file.
11 | #
12 | # All configuration values have a default; values that are commented out
13 | # serve to show the default.
14 |
15 | import sys
16 | import os
17 |
18 | # If extensions (or modules to document with autodoc) are in another directory,
19 | # add these directories to sys.path here. If the directory is relative to the
20 | # documentation root, use os.path.abspath to make it absolute, like shown here.
21 | sys.path.insert(0, "C:\\SVN Repositories\\git_hub\\CIGTDCTools\\hermes_sphinx\\hermes\\src")
22 | #os.path.abspath('.'))
23 |
24 | # -- General configuration ------------------------------------------------
25 |
26 | # If your documentation needs a minimal Sphinx version, state it here.
27 | #needs_sphinx = '1.0'
28 |
29 | # Add any Sphinx extension module names here, as strings. They can be
30 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
31 | # ones.
32 | extensions = [
33 | 'sphinx.ext.autodoc',
34 | 'sphinx.ext.todo',
35 | 'sphinx.ext.viewcode',
36 | ]
37 |
38 | # Add any paths that contain templates here, relative to this directory.
39 | templates_path = ['_templates']
40 |
41 | # The suffix(es) of source filenames.
42 | # You can specify multiple suffix as a list of string:
43 | # source_suffix = ['.rst', '.md']
44 | source_suffix = '.rst'
45 |
46 | # The encoding of source files.
47 | #source_encoding = 'utf-8-sig'
48 |
49 | # The master toctree document.
50 | master_doc = 'index'
51 |
52 | # General information about the project.
53 | project = u'src'
54 | copyright = u'2016, Author'
55 | author = u'Author'
56 |
57 | # The version info for the project you're documenting, acts as replacement for
58 | # |version| and |release|, also used in various other places throughout the
59 | # built documents.
60 | #
61 | # The short X.Y version.
62 | version = u''
63 | # The full version, including alpha/beta/rc tags.
64 | release = u''
65 |
66 | # The language for content autogenerated by Sphinx. Refer to documentation
67 | # for a list of supported languages.
68 | #
69 | # This is also used if you do content translation via gettext catalogs.
70 | # Usually you set "language" from the command line for these cases.
71 | language = 'en'
72 |
73 | # There are two options for replacing |today|: either, you set today to some
74 | # non-false value, then it is used:
75 | #today = ''
76 | # Else, today_fmt is used as the format for a strftime call.
77 | #today_fmt = '%B %d, %Y'
78 |
79 | # List of patterns, relative to source directory, that match files and
80 | # directories to ignore when looking for source files.
81 | exclude_patterns = ['_build']
82 |
83 | # The reST default role (used for this markup: `text`) to use for all
84 | # documents.
85 | #default_role = None
86 |
87 | # If true, '()' will be appended to :func: etc. cross-reference text.
88 | #add_function_parentheses = True
89 |
90 | # If true, the current module name will be prepended to all description
91 | # unit titles (such as .. function::).
92 | #add_module_names = True
93 |
94 | # If true, sectionauthor and moduleauthor directives will be shown in the
95 | # output. They are ignored by default.
96 | #show_authors = False
97 |
98 | # The name of the Pygments (syntax highlighting) style to use.
99 | pygments_style = 'sphinx'
100 |
101 | # A list of ignored prefixes for module index sorting.
102 | #modindex_common_prefix = []
103 |
104 | # If true, keep warnings as "system message" paragraphs in the built documents.
105 | #keep_warnings = False
106 |
107 | # If true, `todo` and `todoList` produce output, else they produce nothing.
108 | todo_include_todos = True
109 |
110 |
111 | # -- Options for HTML output ----------------------------------------------
112 |
113 | # The theme to use for HTML and HTML Help pages. See the documentation for
114 | # a list of builtin themes.
115 | html_theme = 'alabaster'
116 |
117 | # Theme options are theme-specific and customize the look and feel of a theme
118 | # further. For a list of options available for each theme, see the
119 | # documentation.
120 | #html_theme_options = {}
121 |
122 | # Add any paths that contain custom themes here, relative to this directory.
123 | #html_theme_path = []
124 |
125 | # The name for this set of Sphinx documents. If None, it defaults to
126 | # " v documentation".
127 | #html_title = None
128 |
129 | # A shorter title for the navigation bar. Default is the same as html_title.
130 | #html_short_title = None
131 |
132 | # The name of an image file (relative to this directory) to place at the top
133 | # of the sidebar.
134 | #html_logo = None
135 |
136 | # The name of an image file (within the static path) to use as favicon of the
137 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
138 | # pixels large.
139 | #html_favicon = None
140 |
141 | # Add any paths that contain custom static files (such as style sheets) here,
142 | # relative to this directory. They are copied after the builtin static files,
143 | # so a file named "default.css" will overwrite the builtin "default.css".
144 | html_static_path = ['_static']
145 |
146 | # Add any extra paths that contain custom files (such as robots.txt or
147 | # .htaccess) here, relative to this directory. These files are copied
148 | # directly to the root of the documentation.
149 | #html_extra_path = []
150 |
151 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
152 | # using the given strftime format.
153 | #html_last_updated_fmt = '%b %d, %Y'
154 |
155 | # If true, SmartyPants will be used to convert quotes and dashes to
156 | # typographically correct entities.
157 | #html_use_smartypants = True
158 |
159 | # Custom sidebar templates, maps document names to template names.
160 | #html_sidebars = {}
161 |
162 | # Additional templates that should be rendered to pages, maps page names to
163 | # template names.
164 | #html_additional_pages = {}
165 |
166 | # If false, no module index is generated.
167 | #html_domain_indices = True
168 |
169 | # If false, no index is generated.
170 | #html_use_index = True
171 |
172 | # If true, the index is split into individual pages for each letter.
173 | #html_split_index = False
174 |
175 | # If true, links to the reST sources are added to the pages.
176 | #html_show_sourcelink = True
177 |
178 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
179 | #html_show_sphinx = True
180 |
181 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
182 | #html_show_copyright = True
183 |
184 | # If true, an OpenSearch description file will be output, and all pages will
185 | # contain a tag referring to it. The value of this option must be the
186 | # base URL from which the finished HTML is served.
187 | #html_use_opensearch = ''
188 |
189 | # This is the file name suffix for HTML files (e.g. ".xhtml").
190 | #html_file_suffix = None
191 |
192 | # Language to be used for generating the HTML full-text search index.
193 | # Sphinx supports the following languages:
194 | # 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
195 | # 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
196 | #html_search_language = 'en'
197 |
198 | # A dictionary with options for the search language support, empty by default.
199 | # Now only 'ja' uses this config value
200 | #html_search_options = {'type': 'default'}
201 |
202 | # The name of a javascript file (relative to the configuration directory) that
203 | # implements a search results scorer. If empty, the default will be used.
204 | #html_search_scorer = 'scorer.js'
205 |
206 | # Output file base name for HTML help builder.
207 | htmlhelp_basename = 'srcdoc'
208 |
209 | # -- Options for LaTeX output ---------------------------------------------
210 |
211 | latex_elements = {
212 | # The paper size ('letterpaper' or 'a4paper').
213 | #'papersize': 'letterpaper',
214 |
215 | # The font size ('10pt', '11pt' or '12pt').
216 | #'pointsize': '10pt',
217 |
218 | # Additional stuff for the LaTeX preamble.
219 | #'preamble': '',
220 |
221 | # Latex figure (float) alignment
222 | #'figure_align': 'htbp',
223 | }
224 |
225 | # Grouping the document tree into LaTeX files. List of tuples
226 | # (source start file, target name, title,
227 | # author, documentclass [howto, manual, or own class]).
228 | latex_documents = [
229 | (master_doc, 'src.tex', u'src Documentation',
230 | u'Author', 'manual'),
231 | ]
232 |
233 | # The name of an image file (relative to this directory) to place at the top of
234 | # the title page.
235 | #latex_logo = None
236 |
237 | # For "manual" documents, if this is true, then toplevel headings are parts,
238 | # not chapters.
239 | #latex_use_parts = False
240 |
241 | # If true, show page references after internal links.
242 | #latex_show_pagerefs = False
243 |
244 | # If true, show URL addresses after external links.
245 | #latex_show_urls = False
246 |
247 | # Documents to append as an appendix to all manuals.
248 | #latex_appendices = []
249 |
250 | # If false, no module index is generated.
251 | #latex_domain_indices = True
252 |
253 |
254 | # -- Options for manual page output ---------------------------------------
255 |
256 | # One entry per manual page. List of tuples
257 | # (source start file, name, description, authors, manual section).
258 | man_pages = [
259 | (master_doc, 'src', u'src Documentation',
260 | [author], 1)
261 | ]
262 |
263 | # If true, show URL addresses after external links.
264 | #man_show_urls = False
265 |
266 |
267 | # -- Options for Texinfo output -------------------------------------------
268 |
269 | # Grouping the document tree into Texinfo files. List of tuples
270 | # (source start file, target name, title, author,
271 | # dir menu entry, description, category)
272 | texinfo_documents = [
273 | (master_doc, 'src', u'src Documentation',
274 | author, 'src', 'One line description of project.',
275 | 'Miscellaneous'),
276 | ]
277 |
278 | # Documents to append as an appendix to all manuals.
279 | #texinfo_appendices = []
280 |
281 | # If false, no module index is generated.
282 | #texinfo_domain_indices = True
283 |
284 | # How to display URL addresses: 'footnote', 'no', or 'inline'.
285 | #texinfo_show_urls = 'footnote'
286 |
287 | # If true, do not generate a @detailmenu in the "Top" node's menu.
288 | #texinfo_no_detailmenu = False
289 |
290 |
291 | # -- Options for Epub output ----------------------------------------------
292 |
293 | # Bibliographic Dublin Core info.
294 | epub_title = project
295 | epub_author = author
296 | epub_publisher = author
297 | epub_copyright = copyright
298 |
299 | # The basename for the epub file. It defaults to the project name.
300 | #epub_basename = project
301 |
302 | # The HTML theme for the epub output. Since the default themes are not
303 | # optimized for small screen space, using the same theme for HTML and epub
304 | # output is usually not wise. This defaults to 'epub', a theme designed to save
305 | # visual space.
306 | #epub_theme = 'epub'
307 |
308 | # The language of the text. It defaults to the language option
309 | # or 'en' if the language is not set.
310 | #epub_language = ''
311 |
312 | # The scheme of the identifier. Typical schemes are ISBN or URL.
313 | #epub_scheme = ''
314 |
315 | # The unique identifier of the text. This can be a ISBN number
316 | # or the project homepage.
317 | #epub_identifier = ''
318 |
319 | # A unique identification for the text.
320 | #epub_uid = ''
321 |
322 | # A tuple containing the cover image and cover page html template filenames.
323 | #epub_cover = ()
324 |
325 | # A sequence of (type, uri, title) tuples for the guide element of content.opf.
326 | #epub_guide = ()
327 |
328 | # HTML files that should be inserted before the pages created by sphinx.
329 | # The format is a list of tuples containing the path and title.
330 | #epub_pre_files = []
331 |
332 | # HTML files that should be inserted after the pages created by sphinx.
333 | # The format is a list of tuples containing the path and title.
334 | #epub_post_files = []
335 |
336 | # A list of files that should not be packed into the epub file.
337 | epub_exclude_files = ['search.html']
338 |
339 | # The depth of the table of contents in toc.ncx.
340 | #epub_tocdepth = 3
341 |
342 | # Allow duplicate toc entries.
343 | #epub_tocdup = True
344 |
345 | # Choose between 'default' and 'includehidden'.
346 | #epub_tocscope = 'default'
347 |
348 | # Fix unsupported image types using the Pillow.
349 | #epub_fix_images = False
350 |
351 | # Scale large images.
352 | #epub_max_image_width = 0
353 |
354 | # How to display URL addresses: 'footnote', 'no', or 'inline'.
355 | #epub_show_urls = 'inline'
356 |
357 | # If false, no index is generated.
358 | #epub_use_index = True
359 |
--------------------------------------------------------------------------------
/helpDoc/_build/_build/html/_static/searchtools.js:
--------------------------------------------------------------------------------
1 | /*
2 | * searchtools.js_t
3 | * ~~~~~~~~~~~~~~~~
4 | *
5 | * Sphinx JavaScript utilties for the full-text search.
6 | *
7 | * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
8 | * :license: BSD, see LICENSE for details.
9 | *
10 | */
11 |
12 |
13 | /* Non-minified version JS is _stemmer.js if file is provided */
14 | /**
15 | * Porter Stemmer
16 | */
17 | var Stemmer = function() {
18 |
19 | var step2list = {
20 | ational: 'ate',
21 | tional: 'tion',
22 | enci: 'ence',
23 | anci: 'ance',
24 | izer: 'ize',
25 | bli: 'ble',
26 | alli: 'al',
27 | entli: 'ent',
28 | eli: 'e',
29 | ousli: 'ous',
30 | ization: 'ize',
31 | ation: 'ate',
32 | ator: 'ate',
33 | alism: 'al',
34 | iveness: 'ive',
35 | fulness: 'ful',
36 | ousness: 'ous',
37 | aliti: 'al',
38 | iviti: 'ive',
39 | biliti: 'ble',
40 | logi: 'log'
41 | };
42 |
43 | var step3list = {
44 | icate: 'ic',
45 | ative: '',
46 | alize: 'al',
47 | iciti: 'ic',
48 | ical: 'ic',
49 | ful: '',
50 | ness: ''
51 | };
52 |
53 | var c = "[^aeiou]"; // consonant
54 | var v = "[aeiouy]"; // vowel
55 | var C = c + "[^aeiouy]*"; // consonant sequence
56 | var V = v + "[aeiou]*"; // vowel sequence
57 |
58 | var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0
59 | var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1
60 | var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1
61 | var s_v = "^(" + C + ")?" + v; // vowel in stem
62 |
63 | this.stemWord = function (w) {
64 | var stem;
65 | var suffix;
66 | var firstch;
67 | var origword = w;
68 |
69 | if (w.length < 3)
70 | return w;
71 |
72 | var re;
73 | var re2;
74 | var re3;
75 | var re4;
76 |
77 | firstch = w.substr(0,1);
78 | if (firstch == "y")
79 | w = firstch.toUpperCase() + w.substr(1);
80 |
81 | // Step 1a
82 | re = /^(.+?)(ss|i)es$/;
83 | re2 = /^(.+?)([^s])s$/;
84 |
85 | if (re.test(w))
86 | w = w.replace(re,"$1$2");
87 | else if (re2.test(w))
88 | w = w.replace(re2,"$1$2");
89 |
90 | // Step 1b
91 | re = /^(.+?)eed$/;
92 | re2 = /^(.+?)(ed|ing)$/;
93 | if (re.test(w)) {
94 | var fp = re.exec(w);
95 | re = new RegExp(mgr0);
96 | if (re.test(fp[1])) {
97 | re = /.$/;
98 | w = w.replace(re,"");
99 | }
100 | }
101 | else if (re2.test(w)) {
102 | var fp = re2.exec(w);
103 | stem = fp[1];
104 | re2 = new RegExp(s_v);
105 | if (re2.test(stem)) {
106 | w = stem;
107 | re2 = /(at|bl|iz)$/;
108 | re3 = new RegExp("([^aeiouylsz])\\1$");
109 | re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
110 | if (re2.test(w))
111 | w = w + "e";
112 | else if (re3.test(w)) {
113 | re = /.$/;
114 | w = w.replace(re,"");
115 | }
116 | else if (re4.test(w))
117 | w = w + "e";
118 | }
119 | }
120 |
121 | // Step 1c
122 | re = /^(.+?)y$/;
123 | if (re.test(w)) {
124 | var fp = re.exec(w);
125 | stem = fp[1];
126 | re = new RegExp(s_v);
127 | if (re.test(stem))
128 | w = stem + "i";
129 | }
130 |
131 | // Step 2
132 | re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
133 | if (re.test(w)) {
134 | var fp = re.exec(w);
135 | stem = fp[1];
136 | suffix = fp[2];
137 | re = new RegExp(mgr0);
138 | if (re.test(stem))
139 | w = stem + step2list[suffix];
140 | }
141 |
142 | // Step 3
143 | re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
144 | if (re.test(w)) {
145 | var fp = re.exec(w);
146 | stem = fp[1];
147 | suffix = fp[2];
148 | re = new RegExp(mgr0);
149 | if (re.test(stem))
150 | w = stem + step3list[suffix];
151 | }
152 |
153 | // Step 4
154 | re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
155 | re2 = /^(.+?)(s|t)(ion)$/;
156 | if (re.test(w)) {
157 | var fp = re.exec(w);
158 | stem = fp[1];
159 | re = new RegExp(mgr1);
160 | if (re.test(stem))
161 | w = stem;
162 | }
163 | else if (re2.test(w)) {
164 | var fp = re2.exec(w);
165 | stem = fp[1] + fp[2];
166 | re2 = new RegExp(mgr1);
167 | if (re2.test(stem))
168 | w = stem;
169 | }
170 |
171 | // Step 5
172 | re = /^(.+?)e$/;
173 | if (re.test(w)) {
174 | var fp = re.exec(w);
175 | stem = fp[1];
176 | re = new RegExp(mgr1);
177 | re2 = new RegExp(meq1);
178 | re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
179 | if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
180 | w = stem;
181 | }
182 | re = /ll$/;
183 | re2 = new RegExp(mgr1);
184 | if (re.test(w) && re2.test(w)) {
185 | re = /.$/;
186 | w = w.replace(re,"");
187 | }
188 |
189 | // and turn initial Y back to y
190 | if (firstch == "y")
191 | w = firstch.toLowerCase() + w.substr(1);
192 | return w;
193 | }
194 | }
195 |
196 |
197 |
198 | /**
199 | * Simple result scoring code.
200 | */
201 | var Scorer = {
202 | // Implement the following function to further tweak the score for each result
203 | // The function takes a result array [filename, title, anchor, descr, score]
204 | // and returns the new score.
205 | /*
206 | score: function(result) {
207 | return result[4];
208 | },
209 | */
210 |
211 | // query matches the full name of an object
212 | objNameMatch: 11,
213 | // or matches in the last dotted part of the object name
214 | objPartialMatch: 6,
215 | // Additive scores depending on the priority of the object
216 | objPrio: {0: 15, // used to be importantResults
217 | 1: 5, // used to be objectResults
218 | 2: -5}, // used to be unimportantResults
219 | // Used when the priority is not in the mapping.
220 | objPrioDefault: 0,
221 |
222 | // query found in title
223 | title: 15,
224 | // query found in terms
225 | term: 5
226 | };
227 |
228 |
229 | /**
230 | * Search Module
231 | */
232 | var Search = {
233 |
234 | _index : null,
235 | _queued_query : null,
236 | _pulse_status : -1,
237 |
238 | init : function() {
239 | var params = $.getQueryParameters();
240 | if (params.q) {
241 | var query = params.q[0];
242 | $('input[name="q"]')[0].value = query;
243 | this.performSearch(query);
244 | }
245 | },
246 |
247 | loadIndex : function(url) {
248 | $.ajax({type: "GET", url: url, data: null,
249 | dataType: "script", cache: true,
250 | complete: function(jqxhr, textstatus) {
251 | if (textstatus != "success") {
252 | document.getElementById("searchindexloader").src = url;
253 | }
254 | }});
255 | },
256 |
257 | setIndex : function(index) {
258 | var q;
259 | this._index = index;
260 | if ((q = this._queued_query) !== null) {
261 | this._queued_query = null;
262 | Search.query(q);
263 | }
264 | },
265 |
266 | hasIndex : function() {
267 | return this._index !== null;
268 | },
269 |
270 | deferQuery : function(query) {
271 | this._queued_query = query;
272 | },
273 |
274 | stopPulse : function() {
275 | this._pulse_status = 0;
276 | },
277 |
278 | startPulse : function() {
279 | if (this._pulse_status >= 0)
280 | return;
281 | function pulse() {
282 | var i;
283 | Search._pulse_status = (Search._pulse_status + 1) % 4;
284 | var dotString = '';
285 | for (i = 0; i < Search._pulse_status; i++)
286 | dotString += '.';
287 | Search.dots.text(dotString);
288 | if (Search._pulse_status > -1)
289 | window.setTimeout(pulse, 500);
290 | }
291 | pulse();
292 | },
293 |
294 | /**
295 | * perform a search for something (or wait until index is loaded)
296 | */
297 | performSearch : function(query) {
298 | // create the required interface elements
299 | this.out = $('#search-results');
300 | this.title = $('' + _('Searching') + ' ').appendTo(this.out);
301 | this.dots = $(' ').appendTo(this.title);
302 | this.status = $('
').appendTo(this.out);
303 | this.output = $('').appendTo(this.out);
304 |
305 | $('#search-progress').text(_('Preparing search...'));
306 | this.startPulse();
307 |
308 | // index already loaded, the browser was quick!
309 | if (this.hasIndex())
310 | this.query(query);
311 | else
312 | this.deferQuery(query);
313 | },
314 |
315 | /**
316 | * execute search (requires search index to be loaded)
317 | */
318 | query : function(query) {
319 | var i;
320 | var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
321 |
322 | // stem the searchterms and add them to the correct list
323 | var stemmer = new Stemmer();
324 | var searchterms = [];
325 | var excluded = [];
326 | var hlterms = [];
327 | var tmp = query.split(/\s+/);
328 | var objectterms = [];
329 | for (i = 0; i < tmp.length; i++) {
330 | if (tmp[i] !== "") {
331 | objectterms.push(tmp[i].toLowerCase());
332 | }
333 |
334 | if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i].match(/^\d+$/) ||
335 | tmp[i] === "") {
336 | // skip this "word"
337 | continue;
338 | }
339 | // stem the word
340 | var word = stemmer.stemWord(tmp[i].toLowerCase());
341 | var toAppend;
342 | // select the correct list
343 | if (word[0] == '-') {
344 | toAppend = excluded;
345 | word = word.substr(1);
346 | }
347 | else {
348 | toAppend = searchterms;
349 | hlterms.push(tmp[i].toLowerCase());
350 | }
351 | // only add if not already in the list
352 | if (!$u.contains(toAppend, word))
353 | toAppend.push(word);
354 | }
355 | var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
356 |
357 | // console.debug('SEARCH: searching for:');
358 | // console.info('required: ', searchterms);
359 | // console.info('excluded: ', excluded);
360 |
361 | // prepare search
362 | var terms = this._index.terms;
363 | var titleterms = this._index.titleterms;
364 |
365 | // array of [filename, title, anchor, descr, score]
366 | var results = [];
367 | $('#search-progress').empty();
368 |
369 | // lookup as object
370 | for (i = 0; i < objectterms.length; i++) {
371 | var others = [].concat(objectterms.slice(0, i),
372 | objectterms.slice(i+1, objectterms.length));
373 | results = results.concat(this.performObjectSearch(objectterms[i], others));
374 | }
375 |
376 | // lookup as search terms in fulltext
377 | results = results.concat(this.performTermsSearch(searchterms, excluded, terms, titleterms));
378 |
379 | // let the scorer override scores with a custom scoring function
380 | if (Scorer.score) {
381 | for (i = 0; i < results.length; i++)
382 | results[i][4] = Scorer.score(results[i]);
383 | }
384 |
385 | // now sort the results by score (in opposite order of appearance, since the
386 | // display function below uses pop() to retrieve items) and then
387 | // alphabetically
388 | results.sort(function(a, b) {
389 | var left = a[4];
390 | var right = b[4];
391 | if (left > right) {
392 | return 1;
393 | } else if (left < right) {
394 | return -1;
395 | } else {
396 | // same score: sort alphabetically
397 | left = a[1].toLowerCase();
398 | right = b[1].toLowerCase();
399 | return (left > right) ? -1 : ((left < right) ? 1 : 0);
400 | }
401 | });
402 |
403 | // for debugging
404 | //Search.lastresults = results.slice(); // a copy
405 | //console.info('search results:', Search.lastresults);
406 |
407 | // print the results
408 | var resultCount = results.length;
409 | function displayNextItem() {
410 | // results left, load the summary and display it
411 | if (results.length) {
412 | var item = results.pop();
413 | var listItem = $(' ');
414 | if (DOCUMENTATION_OPTIONS.FILE_SUFFIX === '') {
415 | // dirhtml builder
416 | var dirname = item[0] + '/';
417 | if (dirname.match(/\/index\/$/)) {
418 | dirname = dirname.substring(0, dirname.length-6);
419 | } else if (dirname == 'index/') {
420 | dirname = '';
421 | }
422 | listItem.append($(' ').attr('href',
423 | DOCUMENTATION_OPTIONS.URL_ROOT + dirname +
424 | highlightstring + item[2]).html(item[1]));
425 | } else {
426 | // normal html builders
427 | listItem.append($(' ').attr('href',
428 | item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
429 | highlightstring + item[2]).html(item[1]));
430 | }
431 | if (item[3]) {
432 | listItem.append($(' (' + item[3] + ') '));
433 | Search.output.append(listItem);
434 | listItem.slideDown(5, function() {
435 | displayNextItem();
436 | });
437 | } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
438 | $.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' + item[0] + '.txt',
439 | dataType: "text",
440 | complete: function(jqxhr, textstatus) {
441 | var data = jqxhr.responseText;
442 | if (data !== '' && data !== undefined) {
443 | listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));
444 | }
445 | Search.output.append(listItem);
446 | listItem.slideDown(5, function() {
447 | displayNextItem();
448 | });
449 | }});
450 | } else {
451 | // no source available, just display title
452 | Search.output.append(listItem);
453 | listItem.slideDown(5, function() {
454 | displayNextItem();
455 | });
456 | }
457 | }
458 | // search finished, update title and status message
459 | else {
460 | Search.stopPulse();
461 | Search.title.text(_('Search Results'));
462 | if (!resultCount)
463 | Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.'));
464 | else
465 | Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount));
466 | Search.status.fadeIn(500);
467 | }
468 | }
469 | displayNextItem();
470 | },
471 |
472 | /**
473 | * search for object names
474 | */
475 | performObjectSearch : function(object, otherterms) {
476 | var filenames = this._index.filenames;
477 | var objects = this._index.objects;
478 | var objnames = this._index.objnames;
479 | var titles = this._index.titles;
480 |
481 | var i;
482 | var results = [];
483 |
484 | for (var prefix in objects) {
485 | for (var name in objects[prefix]) {
486 | var fullname = (prefix ? prefix + '.' : '') + name;
487 | if (fullname.toLowerCase().indexOf(object) > -1) {
488 | var score = 0;
489 | var parts = fullname.split('.');
490 | // check for different match types: exact matches of full name or
491 | // "last name" (i.e. last dotted part)
492 | if (fullname == object || parts[parts.length - 1] == object) {
493 | score += Scorer.objNameMatch;
494 | // matches in last name
495 | } else if (parts[parts.length - 1].indexOf(object) > -1) {
496 | score += Scorer.objPartialMatch;
497 | }
498 | var match = objects[prefix][name];
499 | var objname = objnames[match[1]][2];
500 | var title = titles[match[0]];
501 | // If more than one term searched for, we require other words to be
502 | // found in the name/title/description
503 | if (otherterms.length > 0) {
504 | var haystack = (prefix + ' ' + name + ' ' +
505 | objname + ' ' + title).toLowerCase();
506 | var allfound = true;
507 | for (i = 0; i < otherterms.length; i++) {
508 | if (haystack.indexOf(otherterms[i]) == -1) {
509 | allfound = false;
510 | break;
511 | }
512 | }
513 | if (!allfound) {
514 | continue;
515 | }
516 | }
517 | var descr = objname + _(', in ') + title;
518 |
519 | var anchor = match[3];
520 | if (anchor === '')
521 | anchor = fullname;
522 | else if (anchor == '-')
523 | anchor = objnames[match[1]][1] + '-' + fullname;
524 | // add custom score for some objects according to scorer
525 | if (Scorer.objPrio.hasOwnProperty(match[2])) {
526 | score += Scorer.objPrio[match[2]];
527 | } else {
528 | score += Scorer.objPrioDefault;
529 | }
530 | results.push([filenames[match[0]], fullname, '#'+anchor, descr, score]);
531 | }
532 | }
533 | }
534 |
535 | return results;
536 | },
537 |
538 | /**
539 | * search for full-text terms in the index
540 | */
541 | performTermsSearch : function(searchterms, excluded, terms, titleterms) {
542 | var filenames = this._index.filenames;
543 | var titles = this._index.titles;
544 |
545 | var i, j, file;
546 | var fileMap = {};
547 | var scoreMap = {};
548 | var results = [];
549 |
550 | // perform the search on the required terms
551 | for (i = 0; i < searchterms.length; i++) {
552 | var word = searchterms[i];
553 | var files = [];
554 | var _o = [
555 | {files: terms[word], score: Scorer.term},
556 | {files: titleterms[word], score: Scorer.title}
557 | ];
558 |
559 | // no match but word was a required one
560 | if ($u.every(_o, function(o){return o.files === undefined;})) {
561 | break;
562 | }
563 | // found search word in contents
564 | $u.each(_o, function(o) {
565 | var _files = o.files;
566 | if (_files === undefined)
567 | return
568 |
569 | if (_files.length === undefined)
570 | _files = [_files];
571 | files = files.concat(_files);
572 |
573 | // set score for the word in each file to Scorer.term
574 | for (j = 0; j < _files.length; j++) {
575 | file = _files[j];
576 | if (!(file in scoreMap))
577 | scoreMap[file] = {}
578 | scoreMap[file][word] = o.score;
579 | }
580 | });
581 |
582 | // create the mapping
583 | for (j = 0; j < files.length; j++) {
584 | file = files[j];
585 | if (file in fileMap)
586 | fileMap[file].push(word);
587 | else
588 | fileMap[file] = [word];
589 | }
590 | }
591 |
592 | // now check if the files don't contain excluded terms
593 | for (file in fileMap) {
594 | var valid = true;
595 |
596 | // check if all requirements are matched
597 | if (fileMap[file].length != searchterms.length)
598 | continue;
599 |
600 | // ensure that none of the excluded terms is in the search result
601 | for (i = 0; i < excluded.length; i++) {
602 | if (terms[excluded[i]] == file ||
603 | titleterms[excluded[i]] == file ||
604 | $u.contains(terms[excluded[i]] || [], file) ||
605 | $u.contains(titleterms[excluded[i]] || [], file)) {
606 | valid = false;
607 | break;
608 | }
609 | }
610 |
611 | // if we have still a valid result we can add it to the result list
612 | if (valid) {
613 | // select one (max) score for the file.
614 | // for better ranking, we should calculate ranking by using words statistics like basic tf-idf...
615 | var score = $u.max($u.map(fileMap[file], function(w){return scoreMap[file][w]}));
616 | results.push([filenames[file], titles[file], '', null, score]);
617 | }
618 | }
619 | return results;
620 | },
621 |
622 | /**
623 | * helper function to return a node containing the
624 | * search summary for a given text. keywords is a list
625 | * of stemmed words, hlwords is the list of normal, unstemmed
626 | * words. the first one is used to find the occurance, the
627 | * latter for highlighting it.
628 | */
629 | makeSearchSummary : function(text, keywords, hlwords) {
630 | var textLower = text.toLowerCase();
631 | var start = 0;
632 | $.each(keywords, function() {
633 | var i = textLower.indexOf(this.toLowerCase());
634 | if (i > -1)
635 | start = i;
636 | });
637 | start = Math.max(start - 120, 0);
638 | var excerpt = ((start > 0) ? '...' : '') +
639 | $.trim(text.substr(start, 240)) +
640 | ((start + 240 - text.length) ? '...' : '');
641 | var rv = $('
').text(excerpt);
642 | $.each(hlwords, function() {
643 | rv = rv.highlightText(this, 'highlighted');
644 | });
645 | return rv;
646 | }
647 | };
648 |
649 | $(document).ready(function() {
650 | Search.init();
651 | });
--------------------------------------------------------------------------------
/src/hermes/paperwork.py:
--------------------------------------------------------------------------------
1 | """
2 | This module contains the working class that does the filing, and managing
3 | of the metadata. Much like Hermes Conrad, it loves to parse, change and
4 | file metadata back and forth between dictionaries and xml. The results is
5 | an easy to use tool where users can script metadata changes without having
6 | to parse the XML in XML format.
7 |
8 | Requires : Python 2.7.x, Python 3.4
9 | ArcGIS 10.3.1/ArcGIS 10.4
10 |
11 |
12 | Copyright 2015 Esri
13 | Licensed under the Apache License, Version 2.0 (the 'License');
14 | you may not use this file except in compliance with the License.
15 | You may obtain a copy of the License at
16 | http://www.apache.org/licenses/LICENSE-2.0
17 | Unless required by applicable law or agreed to in writing, software
18 | distributed under the License is distributed on an 'AS IS' BASIS,
19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 | See the License for the specific language governing permissions and
21 | limitations under the License.
22 | """
23 | from __future__ import print_function
24 | from __future__ import absolute_import
25 | import os
26 | import arcpy
27 | import json
28 | import tempfile
29 | import xml.etree.cElementTree as ET
30 | from .common import *
31 | from collections import defaultdict
32 | from .version import __version__
33 | ########################################################################
34 | class Paperwork(object):
35 | """
36 | Allows users to easily create and modify the metadata from the feature
37 | class. The data will be returned as a dictionary object for easy of
38 | use. This means users can modify values and push them back into the
39 | metadata by referencing the key names.
40 |
41 | To use, just pass in the path of a feature class or table. The dataset
42 | can be any support ArcGIS format that support metadata.
43 |
44 | Usage Reader Example:
45 |
46 | >>> fc =r"c:\temp\scratch.gdb\states"
47 | >>> pw = Paperwork(dataset=fc)
48 | >>> print pw.convert()
49 |
50 | Usage Update Example (add searchKeys to the metadata):
51 |
52 | >>> fc = r"c:\temp\scratch.gdb\states"
53 | >>> pw = Paperwork(dataset=fc)
54 | >>> val = pw.convert()
55 | >>> val['metadata']['dataIdInfo']['searchKeys'] = {}
56 | >>> val['metadata']['dataIdInfo']['searchKeys']['keywords'] = ['states', 'USA']
57 | >>> pw.save(d=val)
58 |
59 | The dictionary results explained:
60 |
61 | All attributes begin with a '@' and will be inside the element tag.
62 | All text values will be stated as: #text :
63 | Example:
64 | i heart paperwork
65 | Results in:
66 | {'someelement': { '@myValue' : 1,
67 | '#text' : 'i heart paperwork'
68 | }
69 | }
70 | Example 2:
71 |
72 | my value
73 |
74 | Results in:
75 | {'someelement': { '@myValue' : 1,
76 | "subelement" : {'@tags' : "fish",
77 | '#text' : 'my value'
78 | }
79 | }
80 | }
81 | """
82 | _dataset = None
83 | _xmlText = None
84 | _temp_xml_file = None
85 | _temp_workspace = None
86 | #----------------------------------------------------------------------
87 | def __init__(self, dataset):
88 | """Constructor"""
89 | self.dataset = dataset
90 | #----------------------------------------------------------------------
91 | def _setup(self):
92 | """creates a blank metadata file"""
93 | try:
94 | fd, filepath = tempfile.mkstemp(".xml",
95 | dir=self.save_location,
96 | text=True)
97 | self._temp_xml_file = filepath
98 | with os.fdopen(fd, "w") as f:
99 | f.write(" ")
100 | f.close()
101 | del fd
102 | arcpy.MetadataImporter_conversion(self._dataset, filepath)
103 | except:
104 | line, filename, synerror = trace()
105 | raise HermesErrorHandler(
106 | {
107 | "function": "_setup",
108 | "line": line,
109 | "filename": filename,
110 | "synerror": synerror,
111 | "arc" : str(arcpy.GetMessages(2))
112 | }
113 | )
114 | #----------------------------------------------------------------------
115 | @property
116 | def dataset(self):
117 | """get/sets the dataset metadata"""
118 | return self._dataset
119 | #----------------------------------------------------------------------
120 | @dataset.setter
121 | def dataset(self, value):
122 | """get/sets the dataset metadata"""
123 | if arcpy.Exists(value):
124 | self._dataset = value
125 | self._temp_xml_file = None
126 | self._temp_workspace = None
127 | self._xmlText = None
128 | self._setup()
129 | else:
130 | synerror = "dataset does not exist or cannot be accessed."
131 | raise HermesErrorHandler(
132 | {
133 | "function": "dataset",
134 | "line": 137,
135 | "filename": "paperwork.py",
136 | "synerror": synerror,
137 | "arc" : synerror
138 | }
139 | )
140 | #----------------------------------------------------------------------
141 | @property
142 | def xmlfile(self):
143 | """gets the temporary xml file path"""
144 | try:
145 | if self._temp_xml_file is None:
146 | self._setup()
147 | return self._temp_xml_file
148 | except:
149 | line, filename, synerror = trace()
150 | raise HermesErrorHandler(
151 | {
152 | "function": "xmlfile",
153 | "line": line,
154 | "filename": filename,
155 | "synerror": synerror,
156 | "arc" : str(arcpy.GetMessages(2))
157 | }
158 | )
159 | #----------------------------------------------------------------------
160 | @property
161 | def save_location(self):
162 | """returns the location where the xml file is saved"""
163 | try:
164 | if self._temp_workspace is None:
165 | self._temp_workspace = tempfile.gettempdir()
166 | return self._temp_workspace
167 | except:
168 | line, filename, synerror = trace()
169 | raise HermesErrorHandler(
170 | {
171 | "function": "save_location",
172 | "line": line,
173 | "filename": filename,
174 | "synerror": synerror,
175 | "arc" : str(arcpy.GetMessages(2))
176 | }
177 | )
178 | #----------------------------------------------------------------------
179 | def __str__(self):
180 | """returns the xml text of a metadata file"""
181 | if self._temp_xml_file is None:
182 | self._setup()
183 | return open(self._temp_xml_file, 'rb').read()
184 | #----------------------------------------------------------------------
185 | @property
186 | def json(self):
187 | """returns the object as json from the xml document"""
188 | return json.dumps(self.convert())
189 | #----------------------------------------------------------------------
190 | def _metadata_to_dictionary(self, t):
191 | """ converts the xml to a dictionary object (recursivly)"""
192 | d = {t.tag: {} if t.attrib else None}
193 | children = list(t)
194 | if children:
195 | dd = defaultdict(list)
196 | for dc in map(self._metadata_to_dictionary, children):
197 | for k, v in dc.iteritems():
198 | dd[k].append(v)
199 | d = {t.tag: {k: v[0] if len(v) == 1 else v for k, v in dd.iteritems()}}
200 | if t.attrib:
201 | d[t.tag].update(('@' + k, v) for k, v in t.attrib.iteritems())
202 | if t.text:
203 | text = t.text.strip()
204 | if children or t.attrib:
205 | if text:
206 | d[t.tag]['#text'] = text
207 | else:
208 | d[t.tag] = text
209 | return d
210 | #----------------------------------------------------------------------
211 | def _dictionary_to_metadata(self, d):
212 | """ converts a dictionary to xml"""
213 | def _to_etree(d, root):
214 | if not d:
215 | pass
216 | elif isinstance(d, basestring):
217 | root.text = d
218 | elif isinstance(d, dict):
219 | for k,v in d.items():
220 | assert isinstance(k, basestring)
221 | if k.startswith('#'):
222 | assert k == '#text' and isinstance(v, basestring)
223 | root.text = v
224 | elif k.startswith('@'):
225 | assert isinstance(v, basestring)
226 | root.set(k[1:], v)
227 | elif isinstance(v, list):
228 | for e in v:
229 | _to_etree(e, ET.SubElement(root, k))
230 | else:
231 | _to_etree(v, ET.SubElement(root, k))
232 | else: assert d == 'invalid type'
233 | assert isinstance(d, dict) and len(d) == 1
234 | tag, body = next(iter(d.items()))
235 | node = ET.Element(tag)
236 | _to_etree(body, node)
237 | return ET.tostring(node)
238 | #----------------------------------------------------------------------
239 | def convert(self):
240 | """ converts an xml document to a dictionary """
241 | try:
242 | if self._temp_xml_file is None:
243 | self._setup()
244 | tree = ET.XML(text=open(self._temp_xml_file, 'rb').read())
245 | return self._metadata_to_dictionary(tree)
246 | except:
247 | line, filename, synerror = trace()
248 | raise HermesErrorHandler(
249 | {
250 | "function": "convert",
251 | "line": line,
252 | "filename": filename,
253 | "synerror": synerror,
254 | "arc" : str(arcpy.GetMessages(2))
255 | }
256 | )
257 | #----------------------------------------------------------------------
258 | def save(self, d=None):
259 | """
260 | commits the xml changes from the dictionary to the dataset
261 | If d is set to None, then dictionary from convert() will be
262 | used.
263 |
264 | Inputs:
265 | d - optional - either None or dictionary to be converted to
266 | metdata xml and applied to the dataset.
267 | Raises:
268 | HermesErrorHandler
269 | """
270 | try:
271 | if d is None:
272 | d = self.convert()
273 | if isinstance(d, dict):
274 | res = self._dictionary_to_metadata(d)
275 | writer = None
276 | with open(self.xmlfile, 'wb') as writer:
277 | writer.write(res)
278 | writer.flush()
279 | writer.close()
280 | del writer
281 | arcpy.MetadataImporter_conversion (self._temp_xml_file, self._dataset)
282 | if os.path.isfile(self._temp_xml_file):
283 | os.remove(self._temp_xml_file)
284 | self._temp_xml_file = None
285 | self._temp_workspace = None
286 | self._xmlText = None
287 | return True
288 | else:
289 | raise Exception("Input must be of type dictionary")
290 | return False
291 | except:
292 | line, filename, synerror = trace()
293 | raise HermesErrorHandler(
294 | {
295 | "function": "save",
296 | "line": line,
297 | "filename": filename,
298 | "synerror": synerror,
299 | "arc" : synerror
300 | }
301 | )
302 | #----------------------------------------------------------------------
303 | def exportToXML(self, outFolder=None, outName=None):
304 | """
305 | Exports a metadata file (.xml) to a save location and a given name.
306 | To get the save changes, call the save() before running the
307 | function.
308 |
309 | Example:
310 | >>> fc = r"c:\temp\scratch.gdb\states"
311 | >>> pw = Paperwork(dataset=fc)
312 | >>> val = pw.convert()
313 | >>> val['metadata']['dataIdInfo']['searchKeys'] = {}
314 | >>> val['metadata']['dataIdInfo']['searchKeys']['keywords'] = ['states', 'USA']
315 | >>> pw.save(d=val)
316 | >>> print pw.exportToXML(r"c:\temp\mymetadata", "system_shell.xml")
317 |
318 | Inputs:
319 | outFolder - optional - is the value provided is not given, then
320 | systems temp folder will be used.
321 | outName - optional - is the name of the xml file. This can be
322 | provided, or created by the system. The file create will be
323 | randomly generated.
324 | Output:
325 | path to xml file
326 | """
327 | try:
328 | if outFolder is None:
329 | outFolder = tempfile.gettempdir()
330 | elif not outFolder is None:
331 | if os.path.isdir(outFolder) == False:
332 | os.makedirs(outFolder)
333 | else:
334 | outFolder = tempfile.gettempdir()
335 | if not outName is None:
336 | if outName.lower().endswith('.xml'):
337 | fullPath = os.path.join(outFolder, outName)
338 | else:
339 | fullPath = os.path.join(outFolder, outName + ".xml")
340 | else:
341 | from uuid import uuid4
342 | fullPath = os.path.join(outFolder, uuid4().get_hex() + ".xml")
343 | d = self.convert()
344 | res = self._dictionary_to_metadata(d)
345 | writer = None
346 | with open(fullPath, 'wb') as writer:
347 | writer.write(res)
348 | writer.flush()
349 | writer.close()
350 | del writer
351 | return fullPath
352 | except:
353 | line, filename, synerror = trace()
354 | raise HermesErrorHandler(
355 | {
356 | "function": "exportToXML",
357 | "line": line,
358 | "filename": filename,
359 | "synerror": synerror,
360 | "arc" : synerror
361 | }
362 | )
363 | #----------------------------------------------------------------------
364 | def importXMLFile(self, xmlFile):
365 | """
366 | imports an xml metadata file to the target dataset.
367 | Input:
368 | xmlFile - the xml file to import to the dataset.
369 | Output:
370 | outputs the dictionary of the newly imported file. It returns
371 | None if the xml file is not valid or does not exist.
372 | """
373 | if os.path.isfile(xmlFile) and \
374 | xmlFile.lower().endswith(".xml"):
375 | arcpy.MetadataImporter_conversion(source=xmlFile,
376 | target=self.dataset)
377 | self._setup()
378 | return self.convert()
379 | return None
380 | #----------------------------------------------------------------------
381 | def setSyncMethod(self, method="ALWAYS"):
382 | """
383 | Automatically updates an ArcGIS item's metadata with the current
384 | properties of the item.
385 | For example, if the metadata describes the item as having one
386 | projection but the item's projection has changed since the last
387 | automatic update, the old projection information in the metadata
388 | will be replaced with the new projection information.
389 |
390 | By default, metadata is automatically updated when anyone who has
391 | write access to the ArcGIS item views its metadata. Metadata can
392 | also be synchronized by running this tool. The option to turn off
393 | synchronization when you view metadata doesn't affect how this tool
394 | operates.
395 |
396 | Inputs:
397 | method - The type of synchronization that will take place.
398 | ALWAYS -Properties of the source item are always added to or
399 | updated in its metadata. Metadata will be created if it
400 | doesn't already exist. This is the deault.
401 | ACCESSED -Properties of the source item are added to or updated
402 | in its metadata when it is accessed. Metadata will be created
403 | if it doesn't already exist.
404 | CREATED -Metadata will be created and properties of the source
405 | item will be added to it if the item doesn't already have
406 | metadata.
407 | NOT_CREATED -Properties of the source item are added to or
408 | updated in existing metadata.
409 | OVERWRITE -The same as "ALWAYS" except all information that can
410 | be recorded automatically in the metadata will be recorded.
411 | Any properties typed in by a person will be replaced with the
412 | item's actual properties.
413 | SELECTIVE -The same as "OVERWRITE" except the title and the
414 | content type will not be overwritten with default values for
415 | the item. Used when metadata is upgraded to the ArcGIS 10.x
416 | metadata format.
417 | Ouput:
418 | dataset path
419 | """
420 | try:
421 | methods = ["ALWAYS", "CREATED", "NOT_CREATED",
422 | "OVERWRITE", "SELECTIVE", "ACCESSED"]
423 |
424 | if method.upper() in methods:
425 | arcpy.SynchronizeMetadata_conversion(source=self._dataset,
426 | synctype=method)
427 | return self.dataset
428 | else:
429 | raise Exception("Invalid method type: %s" % method)
430 | except:
431 | line, filename, synerror = trace()
432 | raise HermesErrorHandler(
433 | {
434 | "function": "setSyncMethod",
435 | "line": line,
436 | "filename": filename,
437 | "synerror": synerror,
438 | "arc" : str(arcpy.GetMessages(2))
439 | }
440 | )
441 |
442 | #----------------------------------------------------------------------
443 | @property
444 | def datasetProperties(self):
445 | """
446 | returns a collection of common dataset properties including
447 | information about the workspace.
448 | The return object is a dictionary {}
449 | """
450 | try:
451 | validationWorkspace = os.path.dirname(self._dataset)
452 | desc = arcpy.Describe(self._dataset)
453 | descWrksp = arcpy.Describe(desc.path)
454 | database, owner, tableName = [i.strip() if i.strip() != "(null)" else "" \
455 | for i in arcpy.ParseTableName(desc.name,
456 | validationWorkspace).split(",")]
457 | datasetType = desc.datasetType if hasattr(desc, "datasetType") else ""
458 | workspaceFactoryProgID = descWrksp.workspaceFactoryProgID if hasattr(descWrksp, "workspaceFactoryProgID") else ""
459 | workspaceType = descWrksp.workspaceType if hasattr(descWrksp, "workspaceType") else ""
460 | connectionString = descWrksp.connectionString if hasattr(descWrksp, "connectionString") else ""
461 | alias = desc.aliasName if hasattr(desc, "aliasName") else ""
462 | dataType = descWrksp.dataType if hasattr(descWrksp, "dataType") else ""
463 | return {
464 | "owner" : owner,
465 | "tableName" : tableName,
466 | "alias" : alias,
467 | "database" : database,
468 | "dataType" : dataType,
469 | "datasetType" : datasetType,
470 | "workspace" : {
471 | "type" : descWrksp.dataType,
472 | "path" : desc.path,
473 | "connectionString" : connectionString,
474 | "workspaceType" : workspaceType,
475 | "workspaceFactoryProgID" : workspaceFactoryProgID
476 | }
477 | }
478 | except:
479 | line, filename, synerror = trace()
480 | raise HermesErrorHandler(
481 | {
482 | "function": "datasetProperties",
483 | "line": line,
484 | "filename": filename,
485 | "synerror": synerror,
486 | "arc" : str(arcpy.GetMessages(2))
487 | }
488 | )
489 |
--------------------------------------------------------------------------------
/helpDoc/_build/_build/html/hermes.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | hermes package — src documentation
10 |
11 |
12 |
13 |
14 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
hermes package
42 |
43 |
Submodules
44 |
45 |
46 |
hermes.common module
47 |
Copyright 2015 Esri
48 | Licensed under the Apache License, Version 2.0 (the ‘License’);
49 | you may not use this file except in compliance with the License.
50 | You may obtain a copy of the License at
51 |
52 |
53 |
Unless required by applicable law or agreed to in writing, software
54 | distributed under the License is distributed on an ‘AS IS’ BASIS,
55 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
56 | See the License for the specific language governing permissions and
57 | limitations under the License.
58 |
59 |
60 | exception hermes.common.HermesErrorHandler[source]
61 | Bases: exceptions.Exception
62 | Error handler for hermes package
63 |
64 |
65 |
66 |
67 | hermes.common.safe_str( obj ) [source]
68 | return the byte string representation of obj
69 |
70 |
71 |
72 |
73 | hermes.common.safe_unicode( obj , *args ) [source]
74 | return the unicode representation of obj
75 |
76 |
77 |
78 |
79 | hermes.common.trace( ) [source]
80 | trace finds the line, the filename
81 | and error message and returns it
82 | to the user
83 |
84 |
85 |
86 |
87 |
hermes.paperwork module
88 |
This module contains the working class that does the filing, and managing
89 | of the metadata. Much like Hermes Conrad, it loves to parse, change and
90 | file metadata back and forth between dictionaries and xml. The results is
91 | an easy to use tool where users can script metadata changes without having
92 | to parse the XML in XML format.
93 |
94 | Requires : Python 2.7.x, Python 3.4
95 | ArcGIS 10.3.1/ArcGIS 10.4
96 |
97 |
Copyright 2015 Esri
98 | Licensed under the Apache License, Version 2.0 (the ‘License’);
99 | you may not use this file except in compliance with the License.
100 | You may obtain a copy of the License at
101 |
102 |
103 |
Unless required by applicable law or agreed to in writing, software
104 | distributed under the License is distributed on an ‘AS IS’ BASIS,
105 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
106 | See the License for the specific language governing permissions and
107 | limitations under the License.
108 |
109 |
110 | class hermes.paperwork.Paperwork( dataset ) [source]
111 | Bases: object
112 | Allows users to easily create and modify the metadata from the feature
113 | class. The data will be returned as a dictionary object for easy of
114 | use. This means users can modify values and push them back into the
115 | metadata by referencing the key names.
116 | To use, just pass in the path of a feature class or table. The dataset
117 | can be any support ArcGIS format that support metadata.
118 | Usage Reader Example:
119 | >>> fc = r"c: emp\scratch.gdb\states"
120 | >>> pw = Paperwork ( dataset = fc )
121 | >>> print pw . convert ()
122 |
123 |
124 | Usage Update Example (add searchKeys to the metadata):
125 | >>> fc = r"c: emp\scratch.gdb\states"
126 | >>> pw = Paperwork ( dataset = fc )
127 | >>> val = pw . convert ()
128 | >>> val [ 'metadata' ][ 'dataIdInfo' ][ 'searchKeys' ] = {}
129 | >>> val [ 'metadata' ][ 'dataIdInfo' ][ 'searchKeys' ][ 'keywords' ] = [ 'states' , 'USA' ]
130 | >>> pw . save ( d = val )
131 |
132 |
133 | The dictionary results explained:
134 | All attributes begin with a ‘@’ and will be inside the element tag.
135 | All text values will be stated as: #text : <value>
136 | Example:
137 |
138 | <someelement myValue=1>i heart paperwork</someelement>
139 | Results in:
140 | {‘someelement’: { '@ myValue ‘ : 1,
141 |
142 |
143 | ‘#text’ : ‘i heart paperwork’
144 |
}
145 |
146 |
}
147 |
148 |
149 | Example 2:
150 |
151 | <someelement myValue=1>
152 | <subelement tags=”fish”>my value</subelement>
153 |
154 | </someelement>
155 |
156 | Results in:
157 |
158 | {‘someelement’: { '@ myValue ‘ : 1,
159 |
160 |
161 | “subelement” : {'@ tags ‘ : “fish”,
162 | ‘#text’ : ‘my value’
163 | }
164 |
165 |
166 | }
167 |
168 |
169 | }
170 |
171 |
172 |
173 |
174 | convert( ) [source]
175 | converts an xml document to a dictionary
176 |
177 |
178 |
179 |
180 | dataset
181 | get/sets the dataset metadata
182 |
183 |
184 |
185 |
186 | datasetProperties
187 | returns a collection of common dataset properties including
188 | information about the workspace.
189 | The return object is a dictionary {}
190 |
191 |
192 |
193 |
194 | exportToXML( outFolder=None , outName=None ) [source]
195 | Exports a metadata file (.xml) to a save location and a given name.
196 | To get the save changes, call the save() before running the
197 | function.
198 | Example:
199 | >>> fc = r”c: empscratch.gdbstates”
200 | >>> pw = Paperwork(dataset=fc)
201 | >>> val = pw.convert()
202 | >>> val[‘metadata’][‘dataIdInfo’][‘searchKeys’] = {}
203 | >>> val[‘metadata’][‘dataIdInfo’][‘searchKeys’][‘keywords’] = [‘states’, ‘USA’]
204 | >>> pw.save(d=val)
205 | >>> print pw.exportToXML(r”c: empmymetadata”, “system_shell.xml”)
206 |
207 | Inputs:
208 |
209 | outFolder - optional - is the value provided is not given, then
210 | systems temp folder will be used.
211 | outName - optional - is the name of the xml file. This can be
212 | provided, or created by the system. The file create will be
213 | randomly generated.
214 |
215 |
216 | Output:
217 | path to xml file
218 |
219 |
220 |
221 |
222 |
223 | importXMLFile( xmlFile ) [source]
224 | imports an xml metadata file to the target dataset.
225 | Input:
226 |
227 | xmlFile - the xml file to import to the dataset.
228 |
229 | Output:
230 | outputs the dictionary of the newly imported file. It returns
231 | None if the xml file is not valid or does not exist.
232 |
233 |
234 |
235 |
236 |
237 | json
238 | returns the object as json from the xml document
239 |
240 |
241 |
242 |
243 | save( d=None ) [source]
244 | commits the xml changes from the dictionary to the dataset
245 | If d is set to None, then dictionary from convert() will be
246 | used.
247 |
248 | Inputs:
249 |
250 | d - optional - either None or dictionary to be converted to
251 | metdata xml and applied to the dataset.
252 |
253 |
254 | Raises:
255 | HermesErrorHandler
256 |
257 |
258 |
259 |
260 |
261 | save_location
262 | returns the location where the xml file is saved
263 |
264 |
265 |
266 |
267 | setSyncMethod( method='ALWAYS' ) [source]
268 | Automatically updates an ArcGIS item’s metadata with the current
269 | properties of the item.
270 | For example, if the metadata describes the item as having one
271 | projection but the item’s projection has changed since the last
272 | automatic update, the old projection information in the metadata
273 | will be replaced with the new projection information.
274 | By default, metadata is automatically updated when anyone who has
275 | write access to the ArcGIS item views its metadata. Metadata can
276 | also be synchronized by running this tool. The option to turn off
277 | synchronization when you view metadata doesn’t affect how this tool
278 | operates.
279 |
280 | Inputs:
281 |
282 | method - The type of synchronization that will take place.
283 |
284 | ALWAYS -Properties of the source item are always added to or
285 | updated in its metadata. Metadata will be created if it
286 | doesn’t already exist. This is the deault.
287 | ACCESSED -Properties of the source item are added to or updated
288 | in its metadata when it is accessed. Metadata will be created
289 | if it doesn’t already exist.
290 | CREATED -Metadata will be created and properties of the source
291 | item will be added to it if the item doesn’t already have
292 | metadata.
293 | NOT_CREATED -Properties of the source item are added to or
294 | updated in existing metadata.
295 | OVERWRITE -The same as “ALWAYS” except all information that can
296 | be recorded automatically in the metadata will be recorded.
297 | Any properties typed in by a person will be replaced with the
298 | item’s actual properties.
299 | SELECTIVE -The same as “OVERWRITE” except the title and the
300 | content type will not be overwritten with default values for
301 | the item. Used when metadata is upgraded to the ArcGIS 10.x
302 | metadata format.
303 |
304 |
305 | Ouput:
306 | dataset path
307 |
308 |
309 |
310 |
311 |
312 |
313 |
314 | xmlfile
315 | gets the temporary xml file path
316 |
317 |
318 |
319 |
320 |
321 |
322 |
hermes.version module
323 |
Copyright 2015 Esri
324 | Licensed under the Apache License, Version 2.0 (the ‘License’);
325 | you may not use this file except in compliance with the License.
326 | You may obtain a copy of the License at
327 |
328 |
329 |
Unless required by applicable law or agreed to in writing, software
330 | distributed under the License is distributed on an ‘AS IS’ BASIS,
331 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
332 | See the License for the specific language governing permissions and
333 | limitations under the License.
334 |
335 |
336 |
Module contents
337 |
Copyright 2015 Esri
338 | Licensed under the Apache License, Version 2.0 (the ‘License’);
339 | you may not use this file except in compliance with the License.
340 | You may obtain a copy of the License at
341 |
342 |
343 |
Unless required by applicable law or agreed to in writing, software
344 | distributed under the License is distributed on an ‘AS IS’ BASIS,
345 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
346 | See the License for the specific language governing permissions and
347 | limitations under the License.
348 |
349 |
350 |
351 |
352 |
353 |
354 |
355 |
398 |
399 |
400 |
411 |
412 |
413 |
414 |
415 |
416 |
--------------------------------------------------------------------------------