Created
June 12, 2014 04:31
-
-
Save mtholder/83b9a9be8ca4d158d63b to your computer and use it in GitHub Desktop.
force_oti_reindexing_of_non_namespaced_ids.py
This file contains hidden or 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
| #!/usr/bin/env python | |
| import sys | |
| from peyotl.api import APIWrapper | |
| aw = APIWrapper(phylesystem_api_kwargs={'get_from':'api'}) | |
| pa = aw.phylesystem_api | |
| o = aw.oti | |
| for line in open(sys.argv[1], 'rU'): | |
| ls = line.strip() | |
| if '_' in ls: | |
| continue | |
| print o.trigger_unindex(ls) | |
| print o.trigger_index(pa, 'pg_' + ls) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment