aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-05-03 21:24:16 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-05-03 21:24:16 +0300
commit9a724815823e034e384f7a0d2de946ef6e090487 (patch)
treeb030ade43356b7ce50b2a1c50a2e6f940d584b94
parentREADME: fix badge link (diff)
downloadvk-scripts-9a724815823e034e384f7a0d2de946ef6e090487.tar.gz
vk-scripts-9a724815823e034e384f7a0d2de946ef6e090487.zip
move scripts from bin/ to vk/
This is done in preparation to moving to PyPI. TODO: * update docs, * merge/rename some scripts.
-rwxr-xr-x.ci/bin/mutual_friends.sh4
-rwxr-xr-x.ci/bin/online_sessions.sh2
-rwxr-xr-x.ci/bin/show_status.sh2
-rwxr-xr-x.ci/bin/track_status.sh2
-rw-r--r--bin/utils/__init__.py0
-rw-r--r--vk/mutuals.py (renamed from bin/mutual_friends.py)3
-rw-r--r--vk/tracking/sessions.py (renamed from bin/online_sessions.py)5
-rw-r--r--vk/tracking/show_status.py (renamed from bin/show_status.py)0
-rw-r--r--vk/tracking/track_status.py (renamed from bin/track_status.py)0
-rw-r--r--vk/utils/__init__.py (renamed from bin/__init__.py)0
-rw-r--r--vk/utils/bar_chart.py (renamed from bin/utils/bar_chart.py)0
-rw-r--r--vk/utils/io.py (renamed from bin/utils/io.py)0
12 files changed, 8 insertions, 10 deletions
diff --git a/.ci/bin/mutual_friends.sh b/.ci/bin/mutual_friends.sh
index 4a00fb8..383dbdd 100755
--- a/.ci/bin/mutual_friends.sh
+++ b/.ci/bin/mutual_friends.sh
@@ -12,8 +12,8 @@ script_dir="$( cd -- "$script_dir" && pwd )"
readonly script_dir
test_users() {
- "$script_dir/../lib/test.sh" bin.mutual_friends --format csv "$@"
- "$script_dir/../lib/test.sh" bin.mutual_friends --format json "$@"
+ "$script_dir/../lib/test.sh" vk.mutuals --format csv "$@"
+ "$script_dir/../lib/test.sh" vk.mutuals --format json "$@"
}
main() {
diff --git a/.ci/bin/online_sessions.sh b/.ci/bin/online_sessions.sh
index d64ef2f..7a01dc3 100755
--- a/.ci/bin/online_sessions.sh
+++ b/.ci/bin/online_sessions.sh
@@ -31,7 +31,7 @@ test_output() {
trap "$rm_aux_files" RETURN
- "$script_dir/../lib/test.sh" bin.online_sessions "$@" "$db_path" "$output_path"
+ "$script_dir/../lib/test.sh" vk.tracking.sessions "$@" "$db_path" "$output_path"
if file --brief --dereference --mime -- "$output_path" | grep --quiet -- 'charset=binary$'; then
dump 'Output is a binary file, not going to show that'
diff --git a/.ci/bin/show_status.sh b/.ci/bin/show_status.sh
index c9f8e26..b3f4cfe 100755
--- a/.ci/bin/show_status.sh
+++ b/.ci/bin/show_status.sh
@@ -12,7 +12,7 @@ script_dir="$( cd -- "$script_dir" && pwd )"
readonly script_dir
test_users() {
- "$script_dir/../lib/test.sh" bin.show_status "$@"
+ "$script_dir/../lib/test.sh" vk.tracking.show_status "$@"
}
main() {
diff --git a/.ci/bin/track_status.sh b/.ci/bin/track_status.sh
index 1a7a7dc..9118144 100755
--- a/.ci/bin/track_status.sh
+++ b/.ci/bin/track_status.sh
@@ -30,7 +30,7 @@ test_users() {
rm_aux_files="$( printf -- 'rm -f -- %q %q' "$log_path" "$db_path" )"
trap "$rm_aux_files" RETURN
- "$script_dir/../lib/test.sh" bin.track_status "$@" --log "$log_path" --format csv --output "$db_path" &
+ "$script_dir/../lib/test.sh" vk.tracking.track_status "$@" --log "$log_path" --format csv --output "$db_path" &
local pid="$!"
sleep 3
diff --git a/bin/utils/__init__.py b/bin/utils/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/bin/utils/__init__.py
+++ /dev/null
diff --git a/bin/mutual_friends.py b/vk/mutuals.py
index 550d957..644baf8 100644
--- a/bin/mutual_friends.py
+++ b/vk/mutuals.py
@@ -11,8 +11,7 @@ import sys
from vk.api import API
from vk.user import UserField
-
-from .utils import io
+from vk.utils import io
_OUTPUT_USER_FIELDS = UserField.UID, UserField.FIRST_NAME, UserField.LAST_NAME
diff --git a/bin/online_sessions.py b/vk/tracking/sessions.py
index e0de7c9..dd8b32f 100644
--- a/bin/online_sessions.py
+++ b/vk/tracking/sessions.py
@@ -13,9 +13,8 @@ import sys
from vk.tracking import OnlineSessionEnumerator
from vk.tracking.db import Format as DatabaseFormat
from vk.user import UserField
-
-from .utils.bar_chart import BarChartBuilder
-from .utils import io
+from vk.utils.bar_chart import BarChartBuilder
+from vk.utils import io
class GroupBy(Enum):
diff --git a/bin/show_status.py b/vk/tracking/show_status.py
index cf59280..cf59280 100644
--- a/bin/show_status.py
+++ b/vk/tracking/show_status.py
diff --git a/bin/track_status.py b/vk/tracking/track_status.py
index 2a974a5..2a974a5 100644
--- a/bin/track_status.py
+++ b/vk/tracking/track_status.py
diff --git a/bin/__init__.py b/vk/utils/__init__.py
index e69de29..e69de29 100644
--- a/bin/__init__.py
+++ b/vk/utils/__init__.py
diff --git a/bin/utils/bar_chart.py b/vk/utils/bar_chart.py
index f051efc..f051efc 100644
--- a/bin/utils/bar_chart.py
+++ b/vk/utils/bar_chart.py
diff --git a/bin/utils/io.py b/vk/utils/io.py
index bb8eef9..bb8eef9 100644
--- a/bin/utils/io.py
+++ b/vk/utils/io.py