Commit 1c2e4510 authored by Hiro's avatar Hiro 🏄
Browse files

Use file name to help people locate file in gdrive

parent e4ccf5f4
......@@ -182,6 +182,7 @@ class Sendmail(object):
version = link[4]
arch = link[3]
url = link[0]
file = link[6]
link_str = "Tor Browser {} for {}-{}-{} ({}): {}".format(
version, platform, locale, arch, provider, url
......@@ -192,7 +193,7 @@ class Sendmail(object):
else:
link_msg = link_str
body_msg = strings._("links_body").format(platform, link_msg)
body_msg = strings._("links_body").format(platform, link_msg, file)
subject_msg = strings._("links_subject")
hid = hashlib.sha256(id.encode('utf-8'))
......
......@@ -142,7 +142,7 @@ def main():
release_link = releases.get(k).replace("en-US", l)
c.execute(
"INSERT INTO links(link, platform, language, arch, version, provider, status)"
"VALUES ('%s', '%s', '%s', '64', '%s', '%s', 'ACTIVE')" % (providers.get(p) + release_link, k, l, version, p))
"VALUES ('%s', '%s', '%s', '64', '%s', '%s', 'ACTIVE', '%s')" % (providers.get(p) + release_link, k, l, version, p, release_link))
if __name__ == "__main__":
......
......@@ -87,7 +87,7 @@ def main():
)
c.execute(
"CREATE TABLE links(link TEXT, platform TEXT, language TEXT,"
" arch TEXT, version TEXT, provider TEXT, status TEXT)"
" arch TEXT, version TEXT, provider TEXT, status TEXT, file TEXT)"
)
c.execute(
"CREATE TABLE stats(num_requests NUMBER, platform TEXT,"
......@@ -122,7 +122,7 @@ def main():
)
c.execute(
"CREATE TABLE links(link TEXT, platform TEXT, language TEXT,"
"arch TEXT, version TEXT, provider TEXT, status TEXT,"
"arch TEXT, version TEXT, provider TEXT, status TEXT, file TEXT"
"PRIMARY KEY(platform, arch, version, provider, status))"
)
c.execute(
......
......@@ -10,7 +10,7 @@
"smtp_help_subject": "[GetTor] Help",
"smtp_unsupported_locale_subject": "[GetTor] Unsupported locale",
"smtp_unsupported_locale_msg": "The locale you requested '{}' is not supported.",
"smtp_vlinks_msg": "You requested Tor Browser for {}.\n\nYou will need only one of the links below to download the bundle. If a link does not work for you, try the next one.\n\n{}\n\n \n--\nGetTor",
"smtp_vlinks_msg": "You requested Tor Browser for {}.\n\nYou will need only one of the links below to download the bundle. If a link does not work for you, try the next one.\n\n{}\n\nShould you have issues with any of the links above you can access the following Google Drive folder: https://drive.google.com/open?id=13CADQTsCwrGsIID09YQbNz2DfRMUoxUU\n\n Download the file: {}\n\n \n--\nGetTor",
"smtp_mirrors_msg": "Hi! this is the GetTor robot.\n\nThank you for your request. Attached to this email you will find\nan updated list of mirrors of Tor Project's website.",
"smtp_help_msg": "Hi! This is the GetTor robot. I am here to help you download the\nlatest version of Tor Browser.\n\nPlease reply to this message with one of the options below:\n\nwindows\nlinux\nosx\nmirrors\n\nI will then send you the download instructions.\n\nIf you are unsure, just send a blank reply to this message."
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment