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

Method processSingleURI

pattern/web/feed/feedparser.py:2254–2275  ·  view source on GitHub ↗
(sProperty)

Source from the content-addressed store, hash-verified

2252 return sValue or u''
2253
2254 def processSingleURI(sProperty):
2255 sValue = self.getPropertyValue(elmCard, sProperty, self.URI)
2256 if sValue:
2257 sContentType = ''
2258 sEncoding = ''
2259 sValueKey = ''
2260 if sValue.startswith('data:'):
2261 sEncoding = ';ENCODING=b'
2262 sContentType = sValue.split(';')[0].split('/').pop()
2263 sValue = sValue.split(',', 1).pop()
2264 else:
2265 elmValue = self.getPropertyValue(elmCard, sProperty)
2266 if elmValue:
2267 if sProperty != 'url':
2268 sValueKey = ';VALUE=uri'
2269 sContentType = elmValue.get('type', '').strip().split('/').pop().strip()
2270 sContentType = sContentType.upper()
2271 if sContentType == 'OCTET-STREAM':
2272 sContentType = ''
2273 if sContentType:
2274 sContentType = ';TYPE=' + sContentType.upper()
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)

Callers

nothing calls this directly

Calls 7

getPropertyValueMethod · 0.95
vcardFoldMethod · 0.95
stripMethod · 0.80
popMethod · 0.45
splitMethod · 0.45
getMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected