VertNet / dwc-indexer

Google App Engine project for indexing DwC text files into Search API Documents
GNU Lesser General Public License v3.0
0 stars 1 forks source link

Amend slugify in utils.py #30

Closed tucotuco closed 9 years ago

tucotuco commented 9 years ago

CollectionCodes that have a '/' in them produce a key that does not follow the pattern of other, well-behaved keys (institutioncode/collectioncode/catalognumber).

Instead, substitute "-" for "/" in the collectionCode.

Examples of how this plays out in the portal. For Macaulay, http://portal.vertnet.org/o/cuml/sound?id=film/1 is icode=cuml, ccode=sound/film, catnum=1 (keyname is cuml/sound/film/1)

For MVZ Egg/Nest, http://portal.vertnet.org/o/mvz/mvzegg?id=nest/1 icode=mvz, ccode=MVZ Egg/Nest, catnum=1 (keyname is mvz/mvzegg/nest/1)

tucotuco commented 9 years ago

changed ret = re.sub('[ ]+', separator, ret) to ret = re.sub('[ ]+/', separator, ret) in slugify()