From f63161906693ae5585077d08b7a8f7ebaab45fb0 Mon Sep 17 00:00:00 2001 From: "Alon (PC)" Date: Sun, 4 Apr 2021 00:47:09 +0300 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=9A=9A=20Renamed=20src=20directory=20?= =?UTF-8?q?to=20"instarex"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- instabot/bot/state/__init__.py | 0 instabot/bot/state/bot_cache.py | 14 ---- instabot/bot/state/bot_state.py | 68 -------------------- {instabot => instarex}/__init__.py | 0 {instabot => instarex}/api/__init__.py | 0 {instabot => instarex}/api/api.py | 0 {instabot => instarex}/api/api_login.py | 0 {instabot => instarex}/api/api_photo.py | 0 {instabot => instarex}/api/api_story.py | 0 {instabot => instarex}/api/api_video.py | 0 {instabot => instarex}/api/config.py | 0 {instabot => instarex}/api/devices.py | 0 {instabot => instarex}/api/prepare.py | 0 {instabot => instarex}/bot/__init__.py | 0 {instabot => instarex}/bot/bot.py | 0 {instabot => instarex}/bot/bot_archive.py | 0 {instabot => instarex}/bot/bot_block.py | 0 {instabot => instarex}/bot/bot_checkpoint.py | 0 {instabot => instarex}/bot/bot_comment.py | 0 {instabot => instarex}/bot/bot_delete.py | 0 {instabot => instarex}/bot/bot_direct.py | 0 {instabot => instarex}/bot/bot_filter.py | 0 {instabot => instarex}/bot/bot_follow.py | 0 {instabot => instarex}/bot/bot_get.py | 0 {instabot => instarex}/bot/bot_like.py | 0 {instabot => instarex}/bot/bot_photo.py | 0 {instabot => instarex}/bot/bot_stats.py | 0 {instabot => instarex}/bot/bot_story.py | 0 {instabot => instarex}/bot/bot_support.py | 0 {instabot => instarex}/bot/bot_unfollow.py | 0 {instabot => instarex}/bot/bot_unlike.py | 0 {instabot => instarex}/bot/bot_video.py | 0 {instabot => instarex}/singleton.py | 0 {instabot => instarex}/utils.py | 0 34 files changed, 82 deletions(-) delete mode 100644 instabot/bot/state/__init__.py delete mode 100644 instabot/bot/state/bot_cache.py delete mode 100644 instabot/bot/state/bot_state.py rename {instabot => instarex}/__init__.py (100%) rename {instabot => instarex}/api/__init__.py (100%) rename {instabot => instarex}/api/api.py (100%) rename {instabot => instarex}/api/api_login.py (100%) rename {instabot => instarex}/api/api_photo.py (100%) rename {instabot => instarex}/api/api_story.py (100%) rename {instabot => instarex}/api/api_video.py (100%) rename {instabot => instarex}/api/config.py (100%) rename {instabot => instarex}/api/devices.py (100%) rename {instabot => instarex}/api/prepare.py (100%) rename {instabot => instarex}/bot/__init__.py (100%) rename {instabot => instarex}/bot/bot.py (100%) rename {instabot => instarex}/bot/bot_archive.py (100%) rename {instabot => instarex}/bot/bot_block.py (100%) rename {instabot => instarex}/bot/bot_checkpoint.py (100%) rename {instabot => instarex}/bot/bot_comment.py (100%) rename {instabot => instarex}/bot/bot_delete.py (100%) rename {instabot => instarex}/bot/bot_direct.py (100%) rename {instabot => instarex}/bot/bot_filter.py (100%) rename {instabot => instarex}/bot/bot_follow.py (100%) rename {instabot => instarex}/bot/bot_get.py (100%) rename {instabot => instarex}/bot/bot_like.py (100%) rename {instabot => instarex}/bot/bot_photo.py (100%) rename {instabot => instarex}/bot/bot_stats.py (100%) rename {instabot => instarex}/bot/bot_story.py (100%) rename {instabot => instarex}/bot/bot_support.py (100%) rename {instabot => instarex}/bot/bot_unfollow.py (100%) rename {instabot => instarex}/bot/bot_unlike.py (100%) rename {instabot => instarex}/bot/bot_video.py (100%) rename {instabot => instarex}/singleton.py (100%) rename {instabot => instarex}/utils.py (100%) diff --git a/instabot/bot/state/__init__.py b/instabot/bot/state/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/instabot/bot/state/bot_cache.py b/instabot/bot/state/bot_cache.py deleted file mode 100644 index 0bba4ad..0000000 --- a/instabot/bot/state/bot_cache.py +++ /dev/null @@ -1,14 +0,0 @@ -from instabot.singleton import Singleton - - -class BotCache(object): - __metaclass__ = Singleton - - def __init__(self): - self.following = None - self.followers = None - self.user_infos = {} # User info cache - self.usernames = {} # `username` to `user_id` mapping - - def __repr__(self): - return self.__dict__ diff --git a/instabot/bot/state/bot_state.py b/instabot/bot/state/bot_state.py deleted file mode 100644 index 3b5354a..0000000 --- a/instabot/bot/state/bot_state.py +++ /dev/null @@ -1,68 +0,0 @@ -import datetime - -from instabot.singleton import Singleton - - -class BotState(object): - __metaclass__ = Singleton - - def __init__(self): - self.start_time = datetime.datetime.now() - self.total = dict.fromkeys( - [ - "likes", - "unlikes", - "follows", - "unfollows", - "comments", - "blocks", - "unblocks", - "messages", - "archived", - "unarchived", - "stories_viewed", - ], - 0, - ) - self.blocked_actions = dict.fromkeys( - [ - "likes", - "unlikes", - "follows", - "unfollows", - "comments", - "blocks", - "unblocks", - "messages", - ], - False, - ) - self.sleeping_actions = dict.fromkeys( - [ - "likes", - "unlikes", - "follows", - "unfollows", - "comments", - "blocks", - "unblocks", - "messages", - ], - False, - ) - self.last = dict.fromkeys( - [ - "like", - "unlike", - "follow", - "unfollow", - "comment", - "block", - "unblock", - "message", - ], - 0, - ) - - def __repr__(self): - return self.__dict__ diff --git a/instabot/__init__.py b/instarex/__init__.py similarity index 100% rename from instabot/__init__.py rename to instarex/__init__.py diff --git a/instabot/api/__init__.py b/instarex/api/__init__.py similarity index 100% rename from instabot/api/__init__.py rename to instarex/api/__init__.py diff --git a/instabot/api/api.py b/instarex/api/api.py similarity index 100% rename from instabot/api/api.py rename to instarex/api/api.py diff --git a/instabot/api/api_login.py b/instarex/api/api_login.py similarity index 100% rename from instabot/api/api_login.py rename to instarex/api/api_login.py diff --git a/instabot/api/api_photo.py b/instarex/api/api_photo.py similarity index 100% rename from instabot/api/api_photo.py rename to instarex/api/api_photo.py diff --git a/instabot/api/api_story.py b/instarex/api/api_story.py similarity index 100% rename from instabot/api/api_story.py rename to instarex/api/api_story.py diff --git a/instabot/api/api_video.py b/instarex/api/api_video.py similarity index 100% rename from instabot/api/api_video.py rename to instarex/api/api_video.py diff --git a/instabot/api/config.py b/instarex/api/config.py similarity index 100% rename from instabot/api/config.py rename to instarex/api/config.py diff --git a/instabot/api/devices.py b/instarex/api/devices.py similarity index 100% rename from instabot/api/devices.py rename to instarex/api/devices.py diff --git a/instabot/api/prepare.py b/instarex/api/prepare.py similarity index 100% rename from instabot/api/prepare.py rename to instarex/api/prepare.py diff --git a/instabot/bot/__init__.py b/instarex/bot/__init__.py similarity index 100% rename from instabot/bot/__init__.py rename to instarex/bot/__init__.py diff --git a/instabot/bot/bot.py b/instarex/bot/bot.py similarity index 100% rename from instabot/bot/bot.py rename to instarex/bot/bot.py diff --git a/instabot/bot/bot_archive.py b/instarex/bot/bot_archive.py similarity index 100% rename from instabot/bot/bot_archive.py rename to instarex/bot/bot_archive.py diff --git a/instabot/bot/bot_block.py b/instarex/bot/bot_block.py similarity index 100% rename from instabot/bot/bot_block.py rename to instarex/bot/bot_block.py diff --git a/instabot/bot/bot_checkpoint.py b/instarex/bot/bot_checkpoint.py similarity index 100% rename from instabot/bot/bot_checkpoint.py rename to instarex/bot/bot_checkpoint.py diff --git a/instabot/bot/bot_comment.py b/instarex/bot/bot_comment.py similarity index 100% rename from instabot/bot/bot_comment.py rename to instarex/bot/bot_comment.py diff --git a/instabot/bot/bot_delete.py b/instarex/bot/bot_delete.py similarity index 100% rename from instabot/bot/bot_delete.py rename to instarex/bot/bot_delete.py diff --git a/instabot/bot/bot_direct.py b/instarex/bot/bot_direct.py similarity index 100% rename from instabot/bot/bot_direct.py rename to instarex/bot/bot_direct.py diff --git a/instabot/bot/bot_filter.py b/instarex/bot/bot_filter.py similarity index 100% rename from instabot/bot/bot_filter.py rename to instarex/bot/bot_filter.py diff --git a/instabot/bot/bot_follow.py b/instarex/bot/bot_follow.py similarity index 100% rename from instabot/bot/bot_follow.py rename to instarex/bot/bot_follow.py diff --git a/instabot/bot/bot_get.py b/instarex/bot/bot_get.py similarity index 100% rename from instabot/bot/bot_get.py rename to instarex/bot/bot_get.py diff --git a/instabot/bot/bot_like.py b/instarex/bot/bot_like.py similarity index 100% rename from instabot/bot/bot_like.py rename to instarex/bot/bot_like.py diff --git a/instabot/bot/bot_photo.py b/instarex/bot/bot_photo.py similarity index 100% rename from instabot/bot/bot_photo.py rename to instarex/bot/bot_photo.py diff --git a/instabot/bot/bot_stats.py b/instarex/bot/bot_stats.py similarity index 100% rename from instabot/bot/bot_stats.py rename to instarex/bot/bot_stats.py diff --git a/instabot/bot/bot_story.py b/instarex/bot/bot_story.py similarity index 100% rename from instabot/bot/bot_story.py rename to instarex/bot/bot_story.py diff --git a/instabot/bot/bot_support.py b/instarex/bot/bot_support.py similarity index 100% rename from instabot/bot/bot_support.py rename to instarex/bot/bot_support.py diff --git a/instabot/bot/bot_unfollow.py b/instarex/bot/bot_unfollow.py similarity index 100% rename from instabot/bot/bot_unfollow.py rename to instarex/bot/bot_unfollow.py diff --git a/instabot/bot/bot_unlike.py b/instarex/bot/bot_unlike.py similarity index 100% rename from instabot/bot/bot_unlike.py rename to instarex/bot/bot_unlike.py diff --git a/instabot/bot/bot_video.py b/instarex/bot/bot_video.py similarity index 100% rename from instabot/bot/bot_video.py rename to instarex/bot/bot_video.py diff --git a/instabot/singleton.py b/instarex/singleton.py similarity index 100% rename from instabot/singleton.py rename to instarex/singleton.py diff --git a/instabot/utils.py b/instarex/utils.py similarity index 100% rename from instabot/utils.py rename to instarex/utils.py From 94ce2ba2ad14d19860fd6f7fac487f67d5e8be96 Mon Sep 17 00:00:00 2001 From: "Alon (PC)" Date: Sun, 4 Apr 2021 00:47:57 +0300 Subject: [PATCH 2/3] Removed imports to support older version of python MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Those versions are no longer supported anyway... 😉 --- setup.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setup.py b/setup.py index 61dfd75..9ecf1cf 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,4 @@ -from codecs import open from os import path - from setuptools import find_packages, setup here = path.abspath(path.dirname(__file__)) From 8b4b829eef9144f1c616930cca170f757b68c806 Mon Sep 17 00:00:00 2001 From: "Alon (PC)" Date: Sun, 4 Apr 2021 01:01:16 +0300 Subject: [PATCH 3/3] =?UTF-8?q?=E2=9C=85=20Updated=20module=20install=20"t?= =?UTF-8?q?est"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9e63766..0d1effb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,4 +22,4 @@ jobs: run: pip install . - name: Import module - run: python -c "import instabot" + run: python -c "import instarex"