[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r21536: {projects} Add help text for split file downloads, do minor cleanup (projects/gettor/lib/gettor)
Author: kaner
Date: 2010-01-31 12:46:12 +0000 (Sun, 31 Jan 2010)
New Revision: 21536
Modified:
projects/gettor/lib/gettor/constants.py
projects/gettor/lib/gettor/packages.py
Log:
Add help text for split file downloads, do minor cleanup
Modified: projects/gettor/lib/gettor/constants.py
===================================================================
--- projects/gettor/lib/gettor/constants.py 2010-01-31 08:45:03 UTC (rev 21535)
+++ projects/gettor/lib/gettor/constants.py 2010-01-31 12:46:12 UTC (rev 21536)
@@ -489,6 +489,83 @@
If you select no language, you will receive the English version.
""")
+
+split_help_head = _("""
+ SMALLER SIZED PACKAGES
+ """)
+split_help_underline = """
+ ======================
+ """
+split_help_1 = _("""
+ If your bandwith is low or your provider doesn't allow you to
+ receive large attachments in your email, there is a feature of
+ GetTor you can use to make it send you a number of small packages
+ instead of one big one.
+
+ """
+split_help_2 = _("""
+ Simply include the keyword 'split' somewhere in your email like so:
+ """)
+split_help_3 = """
+
+ tor-browser-bundle
+ split
+
+ """)
+split_help_4 = _("""
+ Sending this text in an email to GetTor will cause it to send you
+ the Tor Browser Bundle in a number of 1,4MB attachments.
+
+ """)
+split_help_5 = _("""
+ After having received all parts, you need to re-assemble them to
+ one package again. This is done as follows:
+
+ """)
+split_help_6 = _("""
+ 1.) Save all received attachments into one folder on your disk.
+
+ """)
+split_help_7 = _("""
+ 2.) Unzip all files ending in ".z". If you saved all attachments to
+ a fresh folder before, simply unzip all files in that folder.
+
+ """)
+split_help_8 = _("""
+ 3.) Rename the file ending in ".ex_RENAME" to end in ".exe" and
+ also rename the file ending in ".ex_RENAME.asc" to end in
+ ".exe.asc"
+
+ """)
+split_help_9 = _("""
+ 4.) Verify all files as described in the mail you received with
+ each package. (gpg --verify)
+
+ """)
+split_help_10 = _("""
+ 5.) Now use a program that can unrar multivolume RAR archives. On
+ Windows, this usually is WinRAR. If you don't have that
+ installed on you computer yet, get it here:
+
+ """)
+split_help_11 = """
+ http://www.win-rar.com/download.html
+
+ """)
+split_help_12 = _("""
+ To unpack your Tor package, simply doubleclick the ".exe" file.
+
+ """)
+split_help_13 = _("""
+ 6.) After unpacking is finished, you should find a newly created
+ ".exe" file in your destination folder. Simply doubleclick
+ that and Tor Browser Bundle should start within a few seconds.
+
+ """)
+split_help_14 = _("""
+ 7.) That's it. You're done. Thanks for using Tor and have fun!
+
+ """
support = _("""
SUPPORT
""")
@@ -589,6 +666,11 @@
obtain_localized_1 + obtain_localized_2 + obtain_localized_3 + \
list_of_langs_head + list_of_langs_underline + \
list_of_langs_1 + list_of_langs_2 + list_of_langs_3 + \
+ split_help_head + split_help_underline \
+ split_help_1 + split_help_2 + split_help_3 + split_help_4 + \
+ split_help_5 + split_help_6 + split_help_7 + split_help_8 + \
+ split_help_9 + split_help_10 + split_help_11 + split_help_12 + \
+ split_help_13 + split_help_14 + \
support + support_underline + support_email
helpmsg = hello_gettor + \
Modified: projects/gettor/lib/gettor/packages.py
===================================================================
--- projects/gettor/lib/gettor/packages.py 2010-01-31 08:45:03 UTC (rev 21535)
+++ projects/gettor/lib/gettor/packages.py 2010-01-31 12:46:12 UTC (rev 21536)
@@ -81,7 +81,7 @@
# Build dict like 'name': 'name.z'
try:
for filename in os.listdir(self.packDir):
- self.packageList[filename[:-2]] = self.packDir + "/" + filename
+ self.packageList[filename[:-2]] = os.path.join(self.packDir, filename)
except OSError, (strerror):
log.error("Failed to build package list: %s" % strerror)
return None
@@ -104,9 +104,10 @@
log.error("Could not build split files packages")
return False
if re.compile(regex_single).match(filename):
- file = self.distDir + "/" + filename
+ file = os.path.join(self.distDir, filename)
ascfile = file + ".asc"
- zipFileName = self.packDir + "/" + pack + ".z"
+ zpack = pack + ".z"
+ zipFileName = os.path.join(self.packDir, zpack)
# If .asc file is there, build Zip file
if os.access(ascfile, os.R_OK):
zip = zipfile.ZipFile(zipFileName, "w")
@@ -198,7 +199,8 @@
log.info("Building split files..")
packSplitDir = None
try:
- packSplitDir = self.packDir + "/" + pack + ".split"
+ splitpack = pack + ".split"
+ packSplitDir = os.path.join(self.packDir, splitpack)
if not os.access(packSplitDir, os.R_OK):
os.mkdir(packSplitDir)
except OSError, e:
@@ -206,26 +208,28 @@
% (packSplitDir, e))
# Loop through split dir, look if every partXX.ZZZ has a
# matching signature, pack them together in a .z
- splitdir = self.distDir + "/" + filename
+ splitdir = os.path.join(self.distDir, filename)
for splitfile in os.listdir(splitdir):
# Skip signature files
if splitfile.endswith(".asc"):
continue
if re.compile(".*split.part.*").match(splitfile):
- ascfile = splitdir + "/signatures/" + splitfile + ".asc"
+ ascsplit = splitfile + ".asc"
+ ascfile = os.path.join(splitdir, "signatures", ascsplit)
# Rename .exe if needed
if gettor.utils.hasExe(ascfile):
try:
ascfile = gettor.utils.renameExe(ascfile)
except:
log.error("Could not rename exe file")
- file = splitdir + "/" + splitfile
+ file = os.path.join(splitdir, splitfile)
if gettor.utils.hasExe(file):
try:
file = gettor.utils.renameExe(file)
except:
log.error("Could not rename exe file")
- zipFileName = packSplitDir + "/" + splitfile + ".z"
+ zsplitfile = splitfile + ".z"
+ zipFileName = os.path.join(packSplitDir, zsplitfile)
if gettor.utils.hasExe(zipFileName):
try:
zipFileName = gettor.utils.renameExe(zipFileName)