-
Notifications
You must be signed in to change notification settings - Fork 0
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
0b85878
commit 3313f87
Showing
1 changed file
with
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import requests | ||
import console | ||
import time | ||
import os | ||
import runpy | ||
import time | ||
from zipfile import ZipFile | ||
import io | ||
import gzip | ||
|
||
os.chdir('/private/var/mobile/Containers/Shared/AppGroup/5E22383E-122A-4BBE-9677-E4A0EF63E7C3/Pythonista3/Documents/ctt_tracking_ios') | ||
|
||
# personalizar a linha seguinte com o URL da mini_db no Dropbox, por exemplo: | ||
ZIP_MINI_DB = 'mini_db_PT_Tracking.sqlite.zip?raw=1' | ||
|
||
#print("\nA obter base de dados atualizada...") | ||
console.show_activity() | ||
pedido = requests.get(ZIP_MINI_DB) | ||
ficheiro = ZipFile(io.BytesIO(pedido.content)) | ||
console.hide_activity() | ||
ficheiro.extract('mini_db_PT_Tracking.sqlite') |