mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-08-26 09:59:23 +00:00
Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
bb4869b7be | |||
44b6e82183 | |||
![]() |
5268f166f8 | ||
![]() |
37ad6b5fbf | ||
![]() |
bcc72c932d | ||
b9a9bd03c2 | |||
e6543bcf77 | |||
03b61946f8 | |||
8fe2f4c64d |
@@ -17,7 +17,7 @@ snapshot32:
|
|||||||
- Set-Variable -Name "time" -Value (date -Format "%H:%m")
|
- Set-Variable -Name "time" -Value (date -Format "%H:%m")
|
||||||
- echo ${time}
|
- echo ${time}
|
||||||
- echo "started by ${GITLAB_USER_NAME}"
|
- echo "started by ${GITLAB_USER_NAME}"
|
||||||
- choco install python --version 3.8.7 -y -ForceX86
|
- choco install python --version 3.8.10 -y -ForceX86
|
||||||
- '&$env:PYTHON -V'
|
- '&$env:PYTHON -V'
|
||||||
- '&$env:PYTHON -m pip install --upgrade pip'
|
- '&$env:PYTHON -m pip install --upgrade pip'
|
||||||
- '&$env:PYTHON -m pip install --upgrade -r requirements.txt'
|
- '&$env:PYTHON -m pip install --upgrade -r requirements.txt'
|
||||||
@@ -54,7 +54,7 @@ snapshot64:
|
|||||||
- Set-Variable -Name "time" -Value (date -Format "%H:%m")
|
- Set-Variable -Name "time" -Value (date -Format "%H:%m")
|
||||||
- echo ${time}
|
- echo ${time}
|
||||||
- echo "started by ${GITLAB_USER_NAME}"
|
- echo "started by ${GITLAB_USER_NAME}"
|
||||||
- choco install python --version 3.8.7 -y
|
- choco install python --version 3.8.10 -y
|
||||||
- '&$env:PYTHON -V'
|
- '&$env:PYTHON -V'
|
||||||
- '&$env:PYTHON -m pip install --upgrade pip'
|
- '&$env:PYTHON -m pip install --upgrade pip'
|
||||||
- '&$env:PYTHON -m pip install --upgrade -r requirements.txt'
|
- '&$env:PYTHON -m pip install --upgrade -r requirements.txt'
|
||||||
|
@@ -15,10 +15,10 @@ SetCompressor /solid lzma
|
|||||||
SetDatablockOptimize on
|
SetDatablockOptimize on
|
||||||
VIAddVersionKey ProductName "TWBlue Snapshot version"
|
VIAddVersionKey ProductName "TWBlue Snapshot version"
|
||||||
VIAddVersionKey LegalCopyright "Copyright 2014-2021 Manuel Cortéz."
|
VIAddVersionKey LegalCopyright "Copyright 2014-2021 Manuel Cortéz."
|
||||||
VIAddVersionKey ProductVersion "7"
|
VIAddVersionKey ProductVersion "9"
|
||||||
VIAddVersionKey FileVersion "7"
|
VIAddVersionKey FileVersion "9"
|
||||||
VIProductVersion "7.0.0.0"
|
VIProductVersion "9.0.0.0"
|
||||||
VIFileVersion "7.0.0.0"
|
VIFileVersion "9.0.0.0"
|
||||||
!insertmacro MUI_PAGE_WELCOME
|
!insertmacro MUI_PAGE_WELCOME
|
||||||
!define MUI_LICENSEPAGE_RADIOBUTTONS
|
!define MUI_LICENSEPAGE_RADIOBUTTONS
|
||||||
!insertmacro MUI_PAGE_LICENSE "license.txt"
|
!insertmacro MUI_PAGE_LICENSE "license.txt"
|
||||||
@@ -72,8 +72,8 @@ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\twblue" "D
|
|||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\twblue" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\twblue" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall" "InstallLocation" $INSTDIR
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall" "InstallLocation" $INSTDIR
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall" "Publisher" "Manuel Cortéz"
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall" "Publisher" "Manuel Cortéz"
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\twblue" "DisplayVersion" "7"
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\twblue" "DisplayVersion" "9"
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\twblue" "URLInfoAbout" "http://twblue.es"
|
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\twblue" "URLInfoAbout" "https://twblue.es"
|
||||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\twblue" "VersionMajor" 0
|
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\twblue" "VersionMajor" 0
|
||||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\twblue" "VersionMinor" 0
|
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\twblue" "VersionMinor" 0
|
||||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\twblue" "NoModify" 1
|
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\twblue" "NoModify" 1
|
||||||
|
@@ -9,7 +9,7 @@ if snapshot == False:
|
|||||||
update_url = 'https://twblue.es/updates/stable.php'
|
update_url = 'https://twblue.es/updates/stable.php'
|
||||||
mirror_update_url = 'https://raw.githubusercontent.com/manuelcortez/TWBlue/next-gen/updates/stable.json'
|
mirror_update_url = 'https://raw.githubusercontent.com/manuelcortez/TWBlue/next-gen/updates/stable.json'
|
||||||
else:
|
else:
|
||||||
version = "7"
|
version = "9"
|
||||||
update_url = 'https://twblue.es/updates/snapshot.php'
|
update_url = 'https://twblue.es/updates/snapshot.php'
|
||||||
mirror_update_url = 'https://raw.githubusercontent.com/manuelcortez/TWBlue/next-gen/updates/snapshots.json'
|
mirror_update_url = 'https://raw.githubusercontent.com/manuelcortez/TWBlue/next-gen/updates/snapshots.json'
|
||||||
authors = ["Manuel Cortéz", "José Manuel Delicado"]
|
authors = ["Manuel Cortéz", "José Manuel Delicado"]
|
||||||
|
@@ -440,7 +440,7 @@ class Controller(object):
|
|||||||
log.error("A buffer for the %s search term is already created. You can't create a duplicate buffer." % (term,))
|
log.error("A buffer for the %s search term is already created. You can't create a duplicate buffer." % (term,))
|
||||||
return
|
return
|
||||||
elif dlg.get("users") == True:
|
elif dlg.get("users") == True:
|
||||||
search = buffers.twitter.SearchBuffer(self.view.nb, "search_users", "%s-searchUser" % (term,), buffer.session, buffer.session.db["user_name"], bufferType=None, sound="search_updated.ogg", q=term)
|
search = buffers.twitter.SearchPeopleBuffer(self.view.nb, "search_users", "%s-searchUser" % (term,), buffer.session, buffer.session.db["user_name"], bufferType=None, sound="search_updated.ogg", q=term)
|
||||||
search.start_stream(mandatory=True)
|
search.start_stream(mandatory=True)
|
||||||
pos=self.view.search("searches", buffer.session.db["user_name"])
|
pos=self.view.search("searches", buffer.session.db["user_name"])
|
||||||
self.insert_buffer(search, pos)
|
self.insert_buffer(search, pos)
|
||||||
|
@@ -39,7 +39,7 @@ def logs_path():
|
|||||||
os.mkdir(path)
|
os.mkdir(path)
|
||||||
return path
|
return path
|
||||||
|
|
||||||
def data_path(app_name='socializer'):
|
def data_path(app_name='TW Blue'):
|
||||||
if platform.system() == "Windows":
|
if platform.system() == "Windows":
|
||||||
data_path = os.path.join(os.getenv("AppData"), app_name)
|
data_path = os.path.join(os.getenv("AppData"), app_name)
|
||||||
else:
|
else:
|
||||||
|
@@ -504,13 +504,18 @@ class Session(base.baseSession):
|
|||||||
self.db["users"] = users
|
self.db["users"] = users
|
||||||
|
|
||||||
def start_streaming(self):
|
def start_streaming(self):
|
||||||
self.stream_listener = streaming.StreamListener(twitter_api=self.twitter, user=self.db["user_name"], user_id=self.db["user_id"])
|
if config.app["app-settings"]["no_streaming"]:
|
||||||
|
return
|
||||||
|
self.stream_listener = streaming.StreamListener(twitter_api=self.twitter, user=self.db["user_name"], user_id=self.db["user_id"], muted_users=self.db["muted_users"])
|
||||||
self.stream = streaming.Stream(auth = self.auth, listener=self.stream_listener, chunk_size=1025)
|
self.stream = streaming.Stream(auth = self.auth, listener=self.stream_listener, chunk_size=1025)
|
||||||
self.stream_thread = call_threaded(self.stream.filter, follow=self.stream_listener.users, stall_warnings=True)
|
self.stream_thread = call_threaded(self.stream.filter, follow=self.stream_listener.users, stall_warnings=True)
|
||||||
|
|
||||||
def stop_streaming(self):
|
def stop_streaming(self):
|
||||||
self.stream.running = False
|
if config.app["app-settings"]["no_streaming"]:
|
||||||
log.debug("Stream stopped for accounr {}".format(self.db["user_name"]))
|
return
|
||||||
|
if hasattr(self, "stream"):
|
||||||
|
self.stream.running = False
|
||||||
|
log.debug("Stream stopped for accounr {}".format(self.db["user_name"]))
|
||||||
|
|
||||||
def handle_new_status(self, status, user):
|
def handle_new_status(self, status, user):
|
||||||
""" Handles a new status present in the Streaming API. """
|
""" Handles a new status present in the Streaming API. """
|
||||||
@@ -555,6 +560,10 @@ class Session(base.baseSession):
|
|||||||
pub.sendMessage("newTweet", data=status, user=self.db["user_name"], _buffers=buffers_to_send)
|
pub.sendMessage("newTweet", data=status, user=self.db["user_name"], _buffers=buffers_to_send)
|
||||||
|
|
||||||
def check_streams(self):
|
def check_streams(self):
|
||||||
|
if config.app["app-settings"]["no_streaming"]:
|
||||||
|
return
|
||||||
|
if not hasattr(self, "stream"):
|
||||||
|
return
|
||||||
log.debug("Status of running stream for user {}: {}".format(self.db["user_name"], self.stream.running))
|
log.debug("Status of running stream for user {}: {}".format(self.db["user_name"], self.stream.running))
|
||||||
if self.stream.running == False:
|
if self.stream.running == False:
|
||||||
self.start_streaming()
|
self.start_streaming()
|
||||||
|
@@ -14,14 +14,23 @@ log = logging.getLogger("sessions.twitter.streaming")
|
|||||||
|
|
||||||
class StreamListener(tweepy.StreamListener):
|
class StreamListener(tweepy.StreamListener):
|
||||||
|
|
||||||
def __init__(self, twitter_api, user, user_id, *args, **kwargs):
|
def __init__(self, twitter_api, user, user_id, muted_users=[], *args, **kwargs):
|
||||||
super(StreamListener, self).__init__(*args, **kwargs)
|
super(StreamListener, self).__init__(*args, **kwargs)
|
||||||
|
log.debug("Starting streaming listener for account {}".format(user))
|
||||||
|
self.started = False
|
||||||
|
self.users = []
|
||||||
self.api = twitter_api
|
self.api = twitter_api
|
||||||
self.user = user
|
self.user = user
|
||||||
self.user_id = user_id
|
self.user_id = user_id
|
||||||
self.users = [str(id) for id in self.api.friends_ids()]
|
friends = self.api.friends_ids()
|
||||||
|
log.debug("Retrieved {} friends to add to the streaming listener.".format(len(friends)))
|
||||||
self.users.append(str(self.user_id))
|
self.users.append(str(self.user_id))
|
||||||
log.debug("Started streaming object for user {}".format(self.user))
|
log.debug("Got {} muted users.".format(len(muted_users)))
|
||||||
|
for user in friends:
|
||||||
|
if user not in muted_users:
|
||||||
|
self.users.append(str(user))
|
||||||
|
self.started = True
|
||||||
|
log.debug("Streaming listener started with {} users to follow.".format(len(self.users)))
|
||||||
|
|
||||||
def on_connect(self):
|
def on_connect(self):
|
||||||
pub.sendMessage("streamConnected", user=self.user)
|
pub.sendMessage("streamConnected", user=self.user)
|
||||||
|
@@ -121,9 +121,9 @@ def get_all_mentioned(tweet, conf, field="screen_name"):
|
|||||||
""" Gets all users that have been mentioned."""
|
""" Gets all users that have been mentioned."""
|
||||||
results = []
|
results = []
|
||||||
if hasattr(tweet, "retweeted_status"):
|
if hasattr(tweet, "retweeted_status"):
|
||||||
results.extend(get_all_mentionned(tweet.retweeted_status, conf, field))
|
results.extend(get_all_mentioned(tweet.retweeted_status, conf, field))
|
||||||
if hasattr(tweet, "quoted_status"):
|
if hasattr(tweet, "quoted_status"):
|
||||||
results.extend(tweet.quoted_status, conf, field)
|
results.extend(get_all_mentioned(tweet.quoted_status, conf, field))
|
||||||
if hasattr(tweet, "entities") and tweet.entities.get("user_mentions"):
|
if hasattr(tweet, "entities") and tweet.entities.get("user_mentions"):
|
||||||
for i in tweet.entities["user_mentions"]:
|
for i in tweet.entities["user_mentions"]:
|
||||||
if i["screen_name"] != conf["user_name"] and i["id_str"] != tweet.user:
|
if i["screen_name"] != conf["user_name"] and i["id_str"] != tweet.user:
|
||||||
@@ -168,7 +168,7 @@ def is_allowed(tweet, settings, buffer_name):
|
|||||||
tweet_data = {}
|
tweet_data = {}
|
||||||
if hasattr(tweet, "retweeted_status"):
|
if hasattr(tweet, "retweeted_status"):
|
||||||
tweet_data["retweet"] = True
|
tweet_data["retweet"] = True
|
||||||
if tweet.in_reply_to_status_id != None:
|
if hasattr(tweet, "in_reply_to_status_id"):
|
||||||
tweet_data["reply"] = True
|
tweet_data["reply"] = True
|
||||||
if hasattr(tweet, "quoted_status"):
|
if hasattr(tweet, "quoted_status"):
|
||||||
tweet_data["quote"] = True
|
tweet_data["quote"] = True
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
{"current_version": "7",
|
{"current_version": "8",
|
||||||
"description": "Snapshot version.",
|
"description": "Snapshot version.",
|
||||||
"date": "unknown",
|
"date": "unknown",
|
||||||
"downloads":
|
"downloads":
|
||||||
{"Windows32": "https://twblue.es/pubs/twblue_snapshot_x86.zip"},
|
{"Windows32": "https://twblue.es/pubs/twblue_snapshot_x86.zip",
|
||||||
{"Windows64": "https://twblue.es/pubs/twblue_snapshot_x64.zip"}
|
{"Windows64": "https://twblue.es/pubs/twblue_snapshot_x64.zip"
|
||||||
}
|
}
|
Submodule windows-dependencies updated: 27d860885f...3244b9e3fb
Reference in New Issue
Block a user