-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
55b7241
commit 01cf0a3
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import urllib.request | ||
import glob | ||
import os | ||
import shutil | ||
import zipfile | ||
|
||
def downloadGettext(): | ||
remoteFile = "gettext0.21-iconv1.16-static-64.zip" | ||
url = "https://github.com/mlocati/gettext-iconv-windows/releases/download/v0.21-v1.16/%s" % remoteFile | ||
print("Downloading gettext tools from %s" % url) | ||
urllib.request.urlretrieve(url, "gettext.zip") | ||
print("Extracting gettext...") | ||
with zipfile.ZipFile("gettext.zip", "r") as zip: | ||
lst = zip.namelist() | ||
for item in lst: | ||
if item.startswith("bin/"): | ||
print("extracting %s" % item) | ||
zip.extract(item) | ||
# end extract | ||
# end for | ||
# end with | ||
print("moving tools to current directory...") | ||
for item in glob.glob("bin/*"): | ||
print("moving %s" % item) | ||
shutil.move(item, ".") | ||
# end for | ||
print("removing temporary files...") | ||
shutil.rmtree("bin") | ||
os.remove("gettext.zip") | ||
print("got gettext tools!") | ||
|
||
downloadGettext() |