[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [gettor/master] Use file name to help people locate file in gdrive



commit 1c2e45107d18dcc24a3f214095dd8483a8570c31
Author: hiro <hiro@xxxxxxxxxxxxxx>
Date:   Fri Sep 6 13:55:32 2019 +0200

    Use file name to help people locate file in gdrive
---
 gettor/services/email/sendmail.py | 3 ++-
 scripts/add_links_to_db           | 2 +-
 scripts/create_db                 | 4 ++--
 share/locale/en.json              | 2 +-
 4 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/gettor/services/email/sendmail.py b/gettor/services/email/sendmail.py
index fd01257..15cb728 100644
--- a/gettor/services/email/sendmail.py
+++ b/gettor/services/email/sendmail.py
@@ -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'))
diff --git a/scripts/add_links_to_db b/scripts/add_links_to_db
index a0014ed..74d4b69 100755
--- a/scripts/add_links_to_db
+++ b/scripts/add_links_to_db
@@ -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__":
diff --git a/scripts/create_db b/scripts/create_db
index 32121df..ed4ee34 100755
--- a/scripts/create_db
+++ b/scripts/create_db
@@ -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(
diff --git a/share/locale/en.json b/share/locale/en.json
index 3006c7c..8e99ef1 100644
--- a/share/locale/en.json
+++ b/share/locale/en.json
@@ -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."
 }



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits