From 712343f3c7b78b51ae312ae42baf905620cf6548 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Sun, 10 Nov 2013 17:36:01 +0100 Subject: Removed code related to QR Code generation. --- pyaggr3g470r/utils.py | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/pyaggr3g470r/utils.py b/pyaggr3g470r/utils.py index 07836016..f2108703 100755 --- a/pyaggr3g470r/utils.py +++ b/pyaggr3g470r/utils.py @@ -40,17 +40,10 @@ import glob import operator import calendar -try: - from qrcode.pyqrnative.PyQRNative import QRCode, QRErrorCorrectLevel, CodeOverflowException - from qrcode import qr -except: - pass - import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText -import requests from BeautifulSoup import BeautifulSoup from collections import Counter @@ -111,23 +104,6 @@ def open_url(url): #pyaggr3g470r_log.error(url + " " + str(e.reason.errno) + " " + e.reason.strerror) return (False, error) -def generate_qr_code(article): - """ - Generated a QR Code for the article given in parameter. - """ - try: - os.makedirs("./var/qrcode/") - except OSError: - pass - if not os.path.isfile("./var/qrcode/" + article["article_id"] + ".png"): - # QR Code generation - try: - f = qr.QRUrl(url = article["article_link"]) - f.make() - f.save("./var/qrcode/" + article["article_id"] + ".png") - except: - pass - def clear_string(data): """ Clear a string by removing HTML tags, HTML special caracters -- cgit