Skip to content

Commit

Permalink
Merge pull request #34 from wri/master
Browse files Browse the repository at this point in the history
Add nested lists and rewrite tests
  • Loading branch information
Thomas Maschler authored Apr 7, 2017
2 parents a820521 + e8c2e28 commit f8c4710
Show file tree
Hide file tree
Showing 9 changed files with 1,268 additions and 620 deletions.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ Change list items

```python
metadata.tags = ["tag1", "tag2"]
metadata.tags[1] = "another tag"
metadata.tags.append("new tag")
metadata.tags.remove("tag1")
metadata.tags.pop()
```

Get numeric items (return int or float)
Expand Down Expand Up @@ -93,10 +97,21 @@ metadata.point_of_contact.contact_name = "First and Last Name"
metadata.point_of_contact.email = "[email protected]"
```

Remove all items from the geoprocessing history
```python
metadata.rm_gp_history()
```


Saving the changes back to the file

```python
metadata.finish() # save the metadata back to the original source feature class and cleanup. Without calling finish(), your edits are NOT saved!
metadata.save() # save the metadata back to file.
metadata.cleanup() # remove all temporary files.
```
or
```
metadata.finish() # save() and cleanup() as one call
```
If you want to enable automatic updates of your metadata (feature classes only) call.
```python
Expand Down Expand Up @@ -145,6 +160,7 @@ Supported items
|Metadata File Identifier|file_identifier|String|Metadata/Details/File Idnetifier|mdFileID|
|Dataset URI|dataset_uri|String|Metadata/Details/Dataset URI|dataSetURI|
|Resource Label|resource_label|String|Resource/Fields/Details/Label|eainfo/detailed/enttyp/enttypl|
|Format|format|String|Resource/Distribution/Distribution Format/Format Name|distInfo/distFormat/formatName|

Contact items
---------------
Expand Down
Loading

0 comments on commit f8c4710

Please sign in to comment.