Пример #1
0
def get_amplify_subjects(text):
    registry = getUtility(IRegistry)
    settings = registry.forInterface(ITagHelperSettingsSchema)
    api_key = settings.openamplify_api_key
    results = []
    if api_key:
        amplifyObj = Amplify(api_key)
        results = amplifyObj.amplify(text)
    return results
Пример #2
0
def get_amplify_subjects(text):
    registry = getUtility(IRegistry)
    settings = registry.forInterface(ITagHelperSettingsSchema)
    api_key = settings.openamplify_api_key
    results = []
    if api_key:
        amplifyObj = Amplify(api_key)
        results = amplifyObj.amplify(text)
    return results
Пример #3
0
def get_amplify_subjects_remote(url):
    registry = getUtility(IRegistry)
    settings = registry.forInterface(ITagHelperSettingsSchema)
    api_key = settings.amplify_api_key
    results = []
    a_url = 'sourceURL=' + url
    if api_key:
        amplifyObj = Amplify(api_key)
        results = amplifyObj.amplify(a_url)
    return results
Пример #4
0
def get_amplify_subjects_remote(url):
    registry = getUtility(IRegistry)
    settings = registry.forInterface(ITagHelperSettingsSchema)
    api_key = settings.amplify_api_key
    results = []
    a_url = "sourceURL=" + url
    if api_key:
        amplifyObj = Amplify(api_key)
        results = amplifyObj.amplify(a_url)
    return results