MCPcopy Index your code
hub / github.com/clips/pattern / processTypeValue

Method processTypeValue

pattern/web/feed/feedparser.py:2277–2287  ·  view source on GitHub ↗
(sProperty, arDefaultType, arForceType=None)

Source from the content-addressed store, hash-verified

2275 arLines.append(self.vcardFold(sProperty.upper() + sEncoding + sContentType + sValueKey + ':' + sValue))
2276
2277 def processTypeValue(sProperty, arDefaultType, arForceType=None):
2278 arResults = self.getPropertyValue(elmCard, sProperty, bAllowMultiple=1)
2279 for elmResult in arResults:
2280 arType = self.getPropertyValue(elmResult, 'type', self.STRING, 1, 1)
2281 if arForceType:
2282 arType = self.unique(arForceType + arType)
2283 if not arType:
2284 arType = arDefaultType
2285 sValue = self.getPropertyValue(elmResult, 'value', self.EMAIL, 0)
2286 if sValue:
2287 arLines.append(self.vcardFold(sProperty.upper() + ';TYPE=' + ','.join(arType) + ':' + sValue))
2288
2289 # AGENT
2290 # must do this before all other properties because it is destructive

Callers

nothing calls this directly

Calls 4

getPropertyValueMethod · 0.95
uniqueMethod · 0.95
vcardFoldMethod · 0.95
appendMethod · 0.45

Tested by

no test coverage detected