Last active
June 29, 2016 19:45
-
-
Save tingletech/07a6df1af6ecc44d45663eacbf7d038f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[registry@dsc-registry-stg record_cleanup]$ export PYTHONPATH=. | |
[registry@dsc-registry-stg record_cleanup]$ cat needs-id-fix.txt | xargs -I {} nxls --recursive-objects "{}" --show-custom-function fix_file | |
[registry@dsc-registry-stg record_cleanup]$ pwd | |
/apps/registry/from-nuxeo/code/nuxeo-load/record_cleanup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def nuxeo_mapper(docs, nx): | |
for doc in docs: | |
if not doc['properties'].get('file:content'): | |
return | |
if not doc['properties'].get('file:filename'): | |
new = {} | |
new['file:filename'] = doc['properties']['file:content']['name'] | |
doc['properties'] = new | |
print(doc['uid']) | |
nx.update_nuxeo_properties(doc, uid=doc['uid']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/asset-library/UCSF/MSS 2003-12 Eric Berne papers | |
/asset-library/UCSF/MSS 2005-08 Eric Berne papers | |
/asset-library/UCSF/MSS 82-0 Eric Berne papers | |
/asset-library/UCSF/MSS 89-12 Eric Berne papers | |
/asset-library/UCSF/MSS 2013-18 Eric Berne papers | |
/asset-library/UCSF/MSS 2013-19 Eric Berne papers | |
/asset-library/UCSF/MSS 2016-03 Guedel | |
/asset-library/UCSF/MSS 0085-38 Black Caucus Bishop | |
/asset-library/UCSF/J. Michael Bishop papers MSS 2007-21 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment