diff --git a/src/README.md b/src/README.md
index a0982d2..c618a10 100644
--- a/src/README.md
+++ b/src/README.md
@@ -41,8 +41,8 @@ Given A → B, B depends on A
```
digraph Dependency {
"." -> html_root
- "." -> bundle_download
- bundle_download -> index_app_names
+ "." -> download_itunes
+ download_itunes -> index_app_names
index_app_names -> html_bundle
index_app_names -> html_index_apps
index_app_names -> html_index_domains
@@ -52,7 +52,7 @@ digraph Dependency {
index_meta -> html_bundle
bundle_combine -> index_domains
index_domains -> html_index_domains
- "." -> tracker_download
+ "." -> download_tracker
}
```
[graphviz](http://www.webgraphviz.com/)
\ No newline at end of file
diff --git a/src/bundle_combine.py b/src/bundle_combine.py
index e5ad53b..22f70c6 100755
--- a/src/bundle_combine.py
+++ b/src/bundle_combine.py
@@ -4,7 +4,7 @@ import os
import re
import sys
import common_lib as mylib
-import tracker_download # is_tracker
+import download_tracker # is_tracker
THRESHOLD_PERCENT_OF_LOGS = 0.33 # domain appears in % recordings
@@ -41,7 +41,7 @@ def json_combine(bundle_id):
try:
ddic[key][1].append(num)
except KeyError:
- ddic[key] = (tracker_download.is_tracker(key), [num])
+ ddic[key] = (download_tracker.is_tracker(key), [num])
res = {'rec_len': []}
pardom = {}
diff --git a/src/bundle_download.py b/src/download_itunes.py
similarity index 100%
rename from src/bundle_download.py
rename to src/download_itunes.py
diff --git a/src/tracker_download.py b/src/download_tracker.py
similarity index 100%
rename from src/tracker_download.py
rename to src/download_tracker.py
diff --git a/src/html_bundle.py b/src/html_bundle.py
index 341d599..8dd7155 100755
--- a/src/html_bundle.py
+++ b/src/html_bundle.py
@@ -4,7 +4,7 @@ import sys
import time
import math
import common_lib as mylib
-import bundle_download # get_genres
+import download_itunes # get_genres
import bundle_combine # get_evaluated, fname_evaluated
import index_app_names # get_name
import index_meta # get_rank
@@ -113,7 +113,7 @@ def gen_html(bundle_id, obj):
'''
name = index_app_names.get_name(bundle_id)
- gernes = bundle_download.get_genres(bundle_id)
+ gernes = download_itunes.get_genres(bundle_id)
rank, max_rank = index_meta.get_rank(bundle_id)
obj['tracker'] = list(filter(lambda x: x[2], obj['subdom']))
return mylib.template_with_base(f'''
diff --git a/src/index_app_names.py b/src/index_app_names.py
index ba27347..1854e9c 100755
--- a/src/index_app_names.py
+++ b/src/index_app_names.py
@@ -2,7 +2,7 @@
import sys
import common_lib as mylib
-import bundle_download # app_names
+import download_itunes # app_names
_bundle_name_dict = None
@@ -49,7 +49,7 @@ def process(bundle_ids):
load_json_if_not_already()
did_change = False
for bid in bundle_ids:
- names = bundle_download.app_names(bid)
+ names = download_itunes.app_names(bid)
if not names:
mylib.err('index-app-names', 'could not load: {}'.format(bid))
continue
diff --git a/src/index_domains.py b/src/index_domains.py
index b53b236..12c0509 100755
--- a/src/index_domains.py
+++ b/src/index_domains.py
@@ -3,7 +3,7 @@
import sys
import common_lib as mylib
import bundle_combine # get_evaluated
-import tracker_download # is_tracker
+import download_tracker # is_tracker
def fname_all():
@@ -69,7 +69,7 @@ def insert_in_index(index, bundle_ids):
def filter_tracker_only(index):
sub_trkr = {}
par_trkr = {}
- for domain, ids in filter(lambda x: tracker_download.is_tracker(x[0]),
+ for domain, ids in filter(lambda x: download_tracker.is_tracker(x[0]),
index['subdom'].items()):
sub_trkr[domain] = ids
pardom = mylib.parent_domain(domain)
diff --git a/src/main.py b/src/main.py
index 2a47b54..ae07730 100755
--- a/src/main.py
+++ b/src/main.py
@@ -4,7 +4,8 @@ import sys
import traceback
import common_lib as mylib
import bundle_combine
-import bundle_download
+import download_itunes
+import download_tracker
import html_root
import html_index_apps
import html_bundle
@@ -12,7 +13,6 @@ import html_index_domains
import index_app_names
import index_domains
import index_meta
-import tracker_download
def print_usage_and_exit():
@@ -63,11 +63,11 @@ def combine_and_update(bundle_ids, where=None):
# special case needed. '*' will force rebuilt index
return ['*'] if not where and bundle_ids == ['*'] else ids
# 1. download meta data from iTunes store, incl. app icons
- new_ids = bundle_download.process(bundle_ids)
+ new_ids = download_itunes.process(bundle_ids)
new_ids = star_reset(new_ids)
# 2. if new apps, update bundle name index
if len(new_ids) > 0:
- index_app_names.process(new_ids) # after bundle_download
+ index_app_names.process(new_ids) # after download_itunes
# 3. re-calculate combined.json and evaluated.json files
affected = bundle_combine.process(bundle_ids, where=where)
affected = star_reset(affected)
@@ -111,7 +111,7 @@ def import_update():
def tracker_update():
- new_trackers = tracker_download.process()
+ new_trackers = download_tracker.process()
if new_trackers:
combine_and_update(['*'], where=new_trackers)
@@ -127,9 +127,9 @@ try:
import_update()
elif cmd == 'tracker':
tracker_update()
- # tracker_download.combine_all()
+ # download_tracker.combine_all()
elif cmd == 'icons':
- if bundle_download.download_missing_icons(force=False):
+ if download_itunes.download_missing_icons(force=False):
rebuild_app_index_html()
elif cmd == 'index':
index_meta.process(['*'])
diff --git a/src/z_dependency.svg b/src/z_dependency.svg
index 32b4bfa..ccda6ad 100644
--- a/src/z_dependency.svg
+++ b/src/z_dependency.svg
@@ -17,13 +17,13 @@
-
-bundle_download
+
+download_itunes
-bundle_download
+download_itunes
-
-.->bundle_download
+
+.->download_itunes
@@ -37,13 +37,13 @@
-
-tracker_download
+
+download_tracker
-tracker_download
+download_tracker
-
-.->tracker_download
+
+.->download_tracker
@@ -52,8 +52,8 @@
index_app_names
-
-bundle_download->index_app_names
+
+download_itunes->index_app_names