Example #1
0
def handle_data():
    textBox = request.form["ideaBox"]
    indexValues = getString.processString(textBox)
    searchTerms = getString.getSearchValues(indexValues, textBox)
    arrayLinks = getImage.main(searchTerms)
    termCounter = 0
    termInfo = ""
    code = ""
    for linkAddress in arrayLinks:
        linkAddress1 = linkAddress.strip("}")
        code += '<a href="' + linkAddress1 + '">' + '<img class="img-circle" src="'+ linkAddress1 + '" ></a>'

    for term in searchTerms:
        if termCounter == 0:
            termInfo += term.strip("\n")
            termInfo += " "
            termCounter += 1
        else:
            termInfo += ", " + term.strip("\n")
            termInfo += " "
    return render_template("product.html",images= Markup(code),termInfo=termInfo,textBox=textBox)
Example #2
0
def handle_data():
    textBox = request.form["ideaBox"]
    indexValues = getString.processString(textBox)
    searchTerms = getString.getSearchValues(indexValues, textBox)
    arrayLinks = getImage.main(searchTerms)
    termCounter = 0
    termInfo = ""
    code = ""
    for linkAddress in arrayLinks:
        linkAddress1 = linkAddress.strip("}")
        code += '<a href="' + linkAddress1 + '">' + '<img class="img-circle" src="' + linkAddress1 + '" ></a>'

    for term in searchTerms:
        if termCounter == 0:
            termInfo += term.strip("\n")
            termInfo += " "
            termCounter += 1
        else:
            termInfo += ", " + term.strip("\n")
            termInfo += " "
    return render_template("product.html",
                           images=Markup(code),
                           termInfo=termInfo,
                           textBox=textBox)
Example #3
0
def main(textBox):
    indexValues = processString(textBox.strip('\n'))
    searchTerms = getSearchValues(indexValues, textBox)
    getImage.main(searchTerms)
Example #4
0
def main(textBox):
    indexValues = processString(textBox.strip('\n'))
    searchTerms = getSearchValues(indexValues, textBox)
    getImage.main(searchTerms)