Working and up to date. WIP misc manual actions
This commit is contained in:
@@ -45,7 +45,7 @@ class ArticleDownload(DownloadBaseModel):
|
||||
# ... are added through foreignkeys
|
||||
|
||||
def __str__(self) -> str:
|
||||
return "ART ({} -- {})".format(self.title, self.source_name)
|
||||
return f"ART [{self.title} -- {self.source_name}]"
|
||||
|
||||
## Useful Properties
|
||||
@property
|
||||
@@ -248,7 +248,7 @@ class Message(ChatBaseModel):
|
||||
# reaction
|
||||
|
||||
def __str__(self) -> str:
|
||||
return "MSG ({} -- {})".format(self.channel_id, self.text[:min(len(self.text), 50)].replace("\n","/") + "....")
|
||||
return "MSG [{}]".format(self.text[:min(len(self.text), 30)].replace('\n','/') + '...')
|
||||
|
||||
@property
|
||||
def slack_ts(self):
|
||||
@@ -312,18 +312,4 @@ def clear_path_name(path):
|
||||
keepcharacters = (' ','.','_', '-')
|
||||
converted = "".join([c if (c.isalnum() or c in keepcharacters) else "_" for c in path]).rstrip()
|
||||
return converted
|
||||
# return re.sub(r'[^\x00-\x7f]', r'_', path)
|
||||
# # cleared = path.replace("\n"," ")\
|
||||
# # .replace("|", "_")\
|
||||
# # .replace(":", "_")\
|
||||
# # .replace("?", "_")\
|
||||
# # .replace("!", "_")\
|
||||
# # .replace(",", "_")\
|
||||
# # .replace("/", "_")\
|
||||
# # .replace("\\", "_")\
|
||||
# # .replace("*", "")\
|
||||
# # .replace("\"", "'")\
|
||||
# # .replace("<", "'")\
|
||||
# # .replace(">", "'")
|
||||
# # return cleared
|
||||
|
Reference in New Issue
Block a user