|
1 | | -# dspace-editing |
| 1 | +# dspace-api |
2 | 2 |
|
3 | | -**Note**: Upgraded to Python 3 in 02/2019. The Python 2.x version can be downloaded [here](https://github.com/ehanson8/dspace-editing/releases) |
| 3 | +This repository was created from the merger of https://github.com/ehanson8/dspace-editing and https://github.com/ehanson8/dspace-data-collection, both of which have been archived. All further development will occur in this repository. |
4 | 4 |
|
5 | 5 | **Note**: These scripts were updated in 05/2018 for the new authentication method used by DSpace 6.x |
6 | 6 |
|
@@ -30,6 +30,12 @@ Based on user input, adds a specified key-value pair with a specified language v |
30 | 30 | #### [addNewItemsToCollection.py](addNewItemsToCollection.py) |
31 | 31 | Based on user input, adds new items to the specified collection. In the specified directory, the script creates items and associated metadata based on a 'metadataNewFiles.json' file in the directory. The script then posts files for the appropriate items, which is determined by having the file name (minus the file extension) in a 'dc.identifier.other' field in the item metadata record. |
32 | 32 |
|
| 33 | +#### [compareTwoKeysInCommunity.py](compareTwoKeysInCommunity.py) |
| 34 | +Based on user input, extracts the values of two specified keys from a specified community to a CSV file for comparison. |
| 35 | + |
| 36 | +#### [countInitialedNamesByCollection.py](countInitialedNamesByCollection.py) |
| 37 | +Based on [mjanowiecki's](https://github.com/mjanowiecki) [findInitialedNamesByCollection.py](https://github.com/mjanowiecki/dspace-data-collection/blob/master/findInitialedNamesByCollection.py), find values in name fields that appear to have first initials that could be expanded to full names and provides a count for each collection when the count is more than zero. |
| 38 | + |
33 | 39 | #### [createItemMetadataFromCSV.py](createItemMetadataFromCSV.py) |
34 | 40 | Based on user input, creates a JSON file of metadata that can be added to a DSpace item from the specified CSV file or from values directly specified in the script. The 'createMetadataElementCSV' function in the script is used to create a metadata element from the specified CSV file and has three variables: |
35 | 41 |
|
@@ -58,9 +64,65 @@ Based on user input, removes all key-value pairs with the specified key and valu |
58 | 64 | #### [editBitstreamsNames.py](editBitstreamsNames.py) |
59 | 65 | Based on a specified CSV file of DSpace item handles and replacement file names, replaces the name of bitstreams attached to the specified items. |
60 | 66 |
|
| 67 | +#### [exportSelectedRecordMetadataToCSV.py](exportSelectedRecordMetadataToCSV.py) |
| 68 | +Based a CSV of item handles, extracts all metadata (except 'dc.description.provenance' values) from the selected items to a CSV file. |
| 69 | + |
| 70 | +#### [findBogusUris.py](findBogusUris.py) |
| 71 | +Extracts the item ID and the value of the key 'dc.identifier.uri' to a CSV file when the value does not begin with the handlePrefix specified in the secrets.py file. |
| 72 | + |
| 73 | +#### [findDuplicateKeys.py](findDuplicateKeys.py) |
| 74 | +Based on user input, extracts item IDs to a CSV file where there are multiple instances of the specified key in the item metadata. |
| 75 | + |
61 | 76 | #### [generateCollectionLevelAbstract.py](generateCollectionLevelAbstract.py) |
62 | 77 | Based on user input, creates an HTML collection-level abstract that contains hyperlinks to all of the items in each series, as found in the metadata CSV. This assumes that the series title is recorded in 'dc.relation.ispartof' or a similar property in the DSpace item records. The abstract is then posted to the collection in DSpace. |
63 | 78 |
|
| 79 | +#### [getCollectionMetadataJson.py](getCollectionMetadataJson.py) |
| 80 | +Based on user input, extracts all of the item metadata from the specified collection to a JSON file. |
| 81 | + |
| 82 | +#### [getCompleteAndUniqueValuesForAllKeys.py](getCompleteAndUniqueValuesForAllKeys.py) |
| 83 | +Creates a 'completeValueLists' folder and for all keys used in the repository, extracts all values for a particular key to a CSV with item IDs. It also creates a 'uniqueValueLists' folder, that writes a CSV file for each key with all unique values and a count of how many times the value appears. |
| 84 | + |
| 85 | +#### [getCompleteAndUniqueValuesForAllKeysInCommunity.py](getCompleteAndUniqueValuesForAllKeysInCommunity.py) |
| 86 | +Creates a 'completeValueLists' folder and for all keys used in the specified community, extracts all values for a particular key to a CSV with item IDs. It also creates a 'uniqueValueLists' folder, that writes a CSV file for each key with all unique values and a count of how many times the value appears. |
| 87 | + |
| 88 | +#### [getFacultyNamesFromETDs.py](getFacultyNamesFromETDs.py) |
| 89 | +Based on user input, extracts all values from 'dc.contributor.advisor' and 'dc.contributor.committeeMember' fields from items in collections in the specified community. |
| 90 | + |
| 91 | +#### [getGlobalLanguageValues.py](getGlobalLanguageValues.py) |
| 92 | +Extracts all unique language values used by metadata entries in the repository to a CSV file. |
| 93 | + |
| 94 | +#### [getHandlesAndBitstreamsFromCollection.py](getHandlesAndBitstreamsFromCollection.py) |
| 95 | +Based on user input, extracts all the handles and bitstreams associated with the items in the specified collection to a CSV file. |
| 96 | + |
| 97 | +#### [getLanguageValuesForKeys.py](getLanguageValuesForKeys.py) |
| 98 | +Extracts all unique pairs of keys and language values used by metadata entries in the repository to a CSV file. |
| 99 | + |
| 100 | +#### [getRecordsAndValuesForKey.py](getRecordsAndValuesForKey.py) |
| 101 | +Based on user input, extracts the ID and URI for all items in the repository with the specified key, as well as the value of the specified key, to a CSV file. |
| 102 | + |
| 103 | +#### [getRecordsAndValuesForKeyInCollection.py](getRecordsAndValuesForKeyInCollection.py) |
| 104 | +Based on user input, extracts the ID and URI for all items in the specified collection with the specified key, as well as the value of the specified key, to a CSV file. |
| 105 | + |
| 106 | +#### [getRecordsWithKeyAndValue.py](getRecordsWithKeyAndValue.py) |
| 107 | +Based on user input, extracts the ID and URI for all items in the repository with the specified key-value pair to a CSV file. |
| 108 | + |
| 109 | +#### [identifyItemsMissingKeyInCommunity.py](identifyItemsMissingKeyInCommunity.py) |
| 110 | +Based on user input, extracts the IDs of items from a specified community that do not have the specified key. |
| 111 | + |
| 112 | +#### [metadataCollectionsKeysMatrix.py](metadataCollectionsKeysMatrix.py) |
| 113 | +Creates a matrix containing a count of each time a key appears in each collection in the repository. |
| 114 | + |
| 115 | +#### [metadataOverview.py](metadataOverview.py) |
| 116 | +Produces several CSV files containing different information about the structure and metadata of the repository: |
| 117 | + |
| 118 | +|File Name |Description| |
| 119 | +|--------------------------|--------------------------------------------------------------------------| |
| 120 | +|collectionMetadataKeys.csv | A list of all keys used in each collection with collection name, ID, and handle.| |
| 121 | +|dspaceIDs.csv | A list of every item ID along with the IDs of the collection and community that contains that item.| |
| 122 | +|dspaceTypes.csv | A list of all unique values for the key 'dc.type.'| |
| 123 | +|keyCount.csv | A list of all unique keys used in the repository, as well as a count of how many times it appear.| |
| 124 | +|collectionStats.csv | A list of all collections in the repository with the collection name, ID, handle, and number of items.| |
| 125 | + |
64 | 126 | #### [overwriteExistingMetadata.py](overwriteExistingMetadata.py) |
65 | 127 | Based on a specified CSV file of DSpace item handles and file identifiers, replaces the metadata of the items with specified handles with the set of metadata elements associated with the corresponding file identifier in a JSON file of metadata entries named 'metadataOverwrite.json.' |
66 | 128 |
|
|
0 commit comments