mirror of https://gitlab.com/bashrc2/epicyon
Merge branch 'main' of gitlab.com:bashrc2/epicyon
commit
c2bb0711d7
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "acceptreject.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "announce.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
2
auth.py
2
auth.py
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "auth.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "availability.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "blocking.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
2
blog.py
2
blog.py
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "blog.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "bookmarks.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
2
briar.py
2
briar.py
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "briar.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
2
cache.py
2
cache.py
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "cache.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "categories.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
2
city.py
2
city.py
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "city.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "content.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "inbox.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "conversation.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
2
cwtch.py
2
cwtch.py
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "cwtch.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
213
daemon.py
213
daemon.py
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "daemon.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
@ -245,7 +245,6 @@ from languages import set_actor_languages
|
|||
from languages import get_understood_languages
|
||||
from like import update_likes_collection
|
||||
from reaction import update_reaction_collection
|
||||
from utils import get_domain_from_url_in_string
|
||||
from utils import local_network_host
|
||||
from utils import undo_reaction_collection_entry
|
||||
from utils import get_new_post_endpoints
|
||||
|
@ -1025,10 +1024,10 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
return True
|
||||
except BrokenPipeError as ex:
|
||||
if self.server.debug:
|
||||
print('ERROR: _write error ' + str(tries) + ' ' + str(ex))
|
||||
print('EX: _write error ' + str(tries) + ' ' + str(ex))
|
||||
break
|
||||
except Exception as ex:
|
||||
print('ERROR: _write error ' + str(tries) + ' ' + str(ex))
|
||||
except BaseException as ex:
|
||||
print('EX: _write error ' + str(tries) + ' ' + str(ex))
|
||||
time.sleep(0.5)
|
||||
tries += 1
|
||||
return False
|
||||
|
@ -1732,16 +1731,16 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
login_params = self.rfile.read(length).decode('utf-8')
|
||||
except SocketError as ex:
|
||||
if ex.errno == errno.ECONNRESET:
|
||||
print('WARN: POST login read ' +
|
||||
print('EX: POST login read ' +
|
||||
'connection reset by peer')
|
||||
else:
|
||||
print('WARN: POST login read socket error')
|
||||
print('EX: POST login read socket error')
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
self.server.postreq_busy = False
|
||||
return
|
||||
except ValueError as ex:
|
||||
print('ERROR: POST login read failed, ' + str(ex))
|
||||
print('EX: POST login read failed, ' + str(ex))
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
self.server.postreq_busy = False
|
||||
|
@ -1925,16 +1924,16 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
moderation_params = self.rfile.read(length).decode('utf-8')
|
||||
except SocketError as ex:
|
||||
if ex.errno == errno.ECONNRESET:
|
||||
print('WARN: POST moderation_params connection was reset')
|
||||
print('EX: POST moderation_params connection was reset')
|
||||
else:
|
||||
print('WARN: POST moderation_params ' +
|
||||
print('EX: POST moderation_params ' +
|
||||
'rfile.read socket error')
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
self.server.postreq_busy = False
|
||||
return
|
||||
except ValueError as ex:
|
||||
print('ERROR: POST moderation_params rfile.read failed, ' +
|
||||
print('EX: POST moderation_params rfile.read failed, ' +
|
||||
str(ex))
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
|
@ -2140,16 +2139,16 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
access_keys_params = self.rfile.read(length).decode('utf-8')
|
||||
except SocketError as ex:
|
||||
if ex.errno == errno.ECONNRESET:
|
||||
print('WARN: POST access_keys_params ' +
|
||||
print('EX: POST access_keys_params ' +
|
||||
'connection reset by peer')
|
||||
else:
|
||||
print('WARN: POST access_keys_params socket error')
|
||||
print('EX: POST access_keys_params socket error')
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
self.server.postreq_busy = False
|
||||
return
|
||||
except ValueError as ex:
|
||||
print('ERROR: POST access_keys_params rfile.read failed, ' +
|
||||
print('EX: POST access_keys_params rfile.read failed, ' +
|
||||
str(ex))
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
|
@ -2233,16 +2232,16 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
theme_params = self.rfile.read(length).decode('utf-8')
|
||||
except SocketError as ex:
|
||||
if ex.errno == errno.ECONNRESET:
|
||||
print('WARN: POST theme_params ' +
|
||||
print('EX: POST theme_params ' +
|
||||
'connection reset by peer')
|
||||
else:
|
||||
print('WARN: POST theme_params socket error')
|
||||
print('EX: POST theme_params socket error')
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
self.server.postreq_busy = False
|
||||
return
|
||||
except ValueError as ex:
|
||||
print('ERROR: POST theme_params rfile.read failed, ' + str(ex))
|
||||
print('EX: POST theme_params rfile.read failed, ' + str(ex))
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
self.server.postreq_busy = False
|
||||
|
@ -2383,16 +2382,16 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
options_confirm_params = self.rfile.read(length).decode('utf-8')
|
||||
except SocketError as ex:
|
||||
if ex.errno == errno.ECONNRESET:
|
||||
print('WARN: POST options_confirm_params ' +
|
||||
print('EX: POST options_confirm_params ' +
|
||||
'connection reset by peer')
|
||||
else:
|
||||
print('WARN: POST options_confirm_params socket error')
|
||||
print('EX: POST options_confirm_params socket error')
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
self.server.postreq_busy = False
|
||||
return
|
||||
except ValueError as ex:
|
||||
print('ERROR: ' +
|
||||
print('EX: ' +
|
||||
'POST options_confirm_params rfile.read failed, ' + str(ex))
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
|
@ -2996,16 +2995,16 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
follow_confirm_params = self.rfile.read(length).decode('utf-8')
|
||||
except SocketError as ex:
|
||||
if ex.errno == errno.ECONNRESET:
|
||||
print('WARN: POST follow_confirm_params ' +
|
||||
print('EX: POST follow_confirm_params ' +
|
||||
'connection was reset')
|
||||
else:
|
||||
print('WARN: POST follow_confirm_params socket error')
|
||||
print('EX: POST follow_confirm_params socket error')
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
self.server.postreq_busy = False
|
||||
return
|
||||
except ValueError as ex:
|
||||
print('ERROR: POST follow_confirm_params rfile.read failed, ' +
|
||||
print('EX: POST follow_confirm_params rfile.read failed, ' +
|
||||
str(ex))
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
|
@ -3085,16 +3084,16 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
follow_confirm_params = self.rfile.read(length).decode('utf-8')
|
||||
except SocketError as ex:
|
||||
if ex.errno == errno.ECONNRESET:
|
||||
print('WARN: POST follow_confirm_params ' +
|
||||
print('EX: POST follow_confirm_params ' +
|
||||
'connection was reset')
|
||||
else:
|
||||
print('WARN: POST follow_confirm_params socket error')
|
||||
print('EX: POST follow_confirm_params socket error')
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
self.server.postreq_busy = False
|
||||
return
|
||||
except ValueError as ex:
|
||||
print('ERROR: POST follow_confirm_params rfile.read failed, ' +
|
||||
print('EX: POST follow_confirm_params rfile.read failed, ' +
|
||||
str(ex))
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
|
@ -3185,16 +3184,16 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
block_confirm_params = self.rfile.read(length).decode('utf-8')
|
||||
except SocketError as ex:
|
||||
if ex.errno == errno.ECONNRESET:
|
||||
print('WARN: POST block_confirm_params ' +
|
||||
print('EX: POST block_confirm_params ' +
|
||||
'connection was reset')
|
||||
else:
|
||||
print('WARN: POST block_confirm_params socket error')
|
||||
print('EX: POST block_confirm_params socket error')
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
self.server.postreq_busy = False
|
||||
return
|
||||
except ValueError as ex:
|
||||
print('ERROR: POST block_confirm_params rfile.read failed, ' +
|
||||
print('EX: POST block_confirm_params rfile.read failed, ' +
|
||||
str(ex))
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
|
@ -3273,16 +3272,16 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
block_confirm_params = self.rfile.read(length).decode('utf-8')
|
||||
except SocketError as ex:
|
||||
if ex.errno == errno.ECONNRESET:
|
||||
print('WARN: POST block_confirm_params ' +
|
||||
print('EX: POST block_confirm_params ' +
|
||||
'connection was reset')
|
||||
else:
|
||||
print('WARN: POST block_confirm_params socket error')
|
||||
print('EX: POST block_confirm_params socket error')
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
self.server.postreq_busy = False
|
||||
return
|
||||
except ValueError as ex:
|
||||
print('ERROR: POST block_confirm_params rfile.read failed, ' +
|
||||
print('EX: POST block_confirm_params rfile.read failed, ' +
|
||||
str(ex))
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
|
@ -3357,15 +3356,15 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
search_params = self.rfile.read(length).decode('utf-8')
|
||||
except SocketError as ex:
|
||||
if ex.errno == errno.ECONNRESET:
|
||||
print('WARN: POST search_params connection was reset')
|
||||
print('EX: POST search_params connection was reset')
|
||||
else:
|
||||
print('WARN: POST search_params socket error')
|
||||
print('EX: POST search_params socket error')
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
self.server.postreq_busy = False
|
||||
return
|
||||
except ValueError as ex:
|
||||
print('ERROR: POST search_params rfile.read failed, ' + str(ex))
|
||||
print('EX: POST search_params rfile.read failed, ' + str(ex))
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
self.server.postreq_busy = False
|
||||
|
@ -3816,15 +3815,15 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
question_params = self.rfile.read(length).decode('utf-8')
|
||||
except SocketError as ex:
|
||||
if ex.errno == errno.ECONNRESET:
|
||||
print('WARN: POST question_params connection was reset')
|
||||
print('EX: POST question_params connection was reset')
|
||||
else:
|
||||
print('WARN: POST question_params socket error')
|
||||
print('EX: POST question_params socket error')
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
self.server.postreq_busy = False
|
||||
return
|
||||
except ValueError as ex:
|
||||
print('ERROR: POST question_params rfile.read failed, ' + str(ex))
|
||||
print('EX: POST question_params rfile.read failed, ' + str(ex))
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
self.server.postreq_busy = False
|
||||
|
@ -3894,16 +3893,16 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
media_bytes = self.rfile.read(length)
|
||||
except SocketError as ex:
|
||||
if ex.errno == errno.ECONNRESET:
|
||||
print('WARN: POST media_bytes ' +
|
||||
print('EX: POST media_bytes ' +
|
||||
'connection reset by peer')
|
||||
else:
|
||||
print('WARN: POST media_bytes socket error')
|
||||
print('EX: POST media_bytes socket error')
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
self.server.postreq_busy = False
|
||||
return
|
||||
except ValueError as ex:
|
||||
print('ERROR: POST media_bytes rfile.read failed, ' + str(ex))
|
||||
print('EX: POST media_bytes rfile.read failed, ' + str(ex))
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
self.server.postreq_busy = False
|
||||
|
@ -3942,16 +3941,16 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.rfile.read(length).decode('utf-8')
|
||||
except SocketError as ex:
|
||||
if ex.errno == errno.ECONNRESET:
|
||||
print('WARN: POST remove_share_confirm_params ' +
|
||||
print('EX: POST remove_share_confirm_params ' +
|
||||
'connection was reset')
|
||||
else:
|
||||
print('WARN: POST remove_share_confirm_params socket error')
|
||||
print('EX: POST remove_share_confirm_params socket error')
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
self.server.postreq_busy = False
|
||||
return
|
||||
except ValueError as ex:
|
||||
print('ERROR: POST remove_share_confirm_params ' +
|
||||
print('EX: POST remove_share_confirm_params ' +
|
||||
'rfile.read failed, ' + str(ex))
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
|
@ -4010,16 +4009,16 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.rfile.read(length).decode('utf-8')
|
||||
except SocketError as ex:
|
||||
if ex.errno == errno.ECONNRESET:
|
||||
print('WARN: POST remove_share_confirm_params ' +
|
||||
print('EX: POST remove_share_confirm_params ' +
|
||||
'connection was reset')
|
||||
else:
|
||||
print('WARN: POST remove_share_confirm_params socket error')
|
||||
print('EX: POST remove_share_confirm_params socket error')
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
self.server.postreq_busy = False
|
||||
return
|
||||
except ValueError as ex:
|
||||
print('ERROR: POST remove_share_confirm_params ' +
|
||||
print('EX: POST remove_share_confirm_params ' +
|
||||
'rfile.read failed, ' + str(ex))
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
|
@ -4081,16 +4080,16 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.rfile.read(length).decode('utf-8')
|
||||
except SocketError as ex:
|
||||
if ex.errno == errno.ECONNRESET:
|
||||
print('WARN: POST remove_post_confirm_params ' +
|
||||
print('EX: POST remove_post_confirm_params ' +
|
||||
'connection was reset')
|
||||
else:
|
||||
print('WARN: POST remove_post_confirm_params socket error')
|
||||
print('EX: POST remove_post_confirm_params socket error')
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
self.server.postreq_busy = False
|
||||
return
|
||||
except ValueError as ex:
|
||||
print('ERROR: POST remove_post_confirm_params ' +
|
||||
print('EX: POST remove_post_confirm_params ' +
|
||||
'rfile.read failed, ' + str(ex))
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
|
@ -4206,17 +4205,17 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
post_bytes = self.rfile.read(length)
|
||||
except SocketError as ex:
|
||||
if ex.errno == errno.ECONNRESET:
|
||||
print('WARN: connection was reset while ' +
|
||||
print('EX: connection was reset while ' +
|
||||
'reading bytes from http form POST')
|
||||
else:
|
||||
print('WARN: error while reading bytes ' +
|
||||
print('EX: error while reading bytes ' +
|
||||
'from http form POST')
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
self.server.postreq_busy = False
|
||||
return
|
||||
except ValueError as ex:
|
||||
print('ERROR: failed to read bytes for POST, ' + str(ex))
|
||||
print('EX: failed to read bytes for POST, ' + str(ex))
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
self.server.postreq_busy = False
|
||||
|
@ -4367,17 +4366,17 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
post_bytes = self.rfile.read(length)
|
||||
except SocketError as ex:
|
||||
if ex.errno == errno.ECONNRESET:
|
||||
print('WARN: connection was reset while ' +
|
||||
print('EX: connection was reset while ' +
|
||||
'reading bytes from http form POST')
|
||||
else:
|
||||
print('WARN: error while reading bytes ' +
|
||||
print('EX: error while reading bytes ' +
|
||||
'from http form POST')
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
self.server.postreq_busy = False
|
||||
return
|
||||
except ValueError as ex:
|
||||
print('ERROR: failed to read bytes for POST, ' + str(ex))
|
||||
print('EX: failed to read bytes for POST, ' + str(ex))
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
self.server.postreq_busy = False
|
||||
|
@ -4451,17 +4450,17 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
post_bytes = self.rfile.read(length)
|
||||
except SocketError as ex:
|
||||
if ex.errno == errno.ECONNRESET:
|
||||
print('WARN: connection was reset while ' +
|
||||
print('EX: connection was reset while ' +
|
||||
'reading bytes from http form POST')
|
||||
else:
|
||||
print('WARN: error while reading bytes ' +
|
||||
print('EX: error while reading bytes ' +
|
||||
'from http form POST')
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
self.server.postreq_busy = False
|
||||
return
|
||||
except ValueError as ex:
|
||||
print('ERROR: failed to read bytes for POST, ' + str(ex))
|
||||
print('EX: failed to read bytes for POST, ' + str(ex))
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
self.server.postreq_busy = False
|
||||
|
@ -4606,18 +4605,18 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
post_bytes = self.rfile.read(length)
|
||||
except SocketError as ex:
|
||||
if ex.errno == errno.ECONNRESET:
|
||||
print('WARN: connection was reset while ' +
|
||||
print('EX: connection was reset while ' +
|
||||
'reading bytes from http form ' +
|
||||
'citation screen POST')
|
||||
else:
|
||||
print('WARN: error while reading bytes ' +
|
||||
print('EX: error while reading bytes ' +
|
||||
'from http form citations screen POST')
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
self.server.postreq_busy = False
|
||||
return
|
||||
except ValueError as ex:
|
||||
print('ERROR: failed to read bytes for ' +
|
||||
print('EX: failed to read bytes for ' +
|
||||
'citations screen POST, ' + str(ex))
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
|
@ -4706,17 +4705,17 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
post_bytes = self.rfile.read(length)
|
||||
except SocketError as ex:
|
||||
if ex.errno == errno.ECONNRESET:
|
||||
print('WARN: connection was reset while ' +
|
||||
print('EX: connection was reset while ' +
|
||||
'reading bytes from http form POST')
|
||||
else:
|
||||
print('WARN: error while reading bytes ' +
|
||||
print('EX: error while reading bytes ' +
|
||||
'from http form POST')
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
self.server.postreq_busy = False
|
||||
return
|
||||
except ValueError as ex:
|
||||
print('ERROR: failed to read bytes for POST, ' + str(ex))
|
||||
print('EX: failed to read bytes for POST, ' + str(ex))
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
self.server.postreq_busy = False
|
||||
|
@ -4766,8 +4765,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
try:
|
||||
save_json(self.server.newswire,
|
||||
newswire_state_filename)
|
||||
except Exception as ex:
|
||||
print('ERROR: saving newswire state, ' + str(ex))
|
||||
except BaseException as ex:
|
||||
print('EX: saving newswire state, ' + str(ex))
|
||||
|
||||
# remove any previous cached news posts
|
||||
news_id = \
|
||||
|
@ -4831,17 +4830,17 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
post_bytes = self.rfile.read(length)
|
||||
except SocketError as ex:
|
||||
if ex.errno == errno.ECONNRESET:
|
||||
print('WARN: connection was reset while ' +
|
||||
print('EX: connection was reset while ' +
|
||||
'reading bytes from http form POST')
|
||||
else:
|
||||
print('WARN: error while reading bytes ' +
|
||||
print('EX: error while reading bytes ' +
|
||||
'from http form POST')
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
self.server.postreq_busy = False
|
||||
return
|
||||
except ValueError as ex:
|
||||
print('ERROR: failed to read bytes for POST, ' + str(ex))
|
||||
print('EX: failed to read bytes for POST, ' + str(ex))
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
self.server.postreq_busy = False
|
||||
|
@ -8113,8 +8112,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
base_dir + '/accounts/.newswirestate.json'
|
||||
try:
|
||||
save_json(newswire, newswire_state_filename)
|
||||
except Exception as ex:
|
||||
print('ERROR: saving newswire state, ' + str(ex))
|
||||
except BaseException as ex:
|
||||
print('EX: saving newswire state, ' + str(ex))
|
||||
if filename:
|
||||
save_json(newswire_item[votes_index],
|
||||
filename + '.votes')
|
||||
|
@ -8168,8 +8167,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
base_dir + '/accounts/.newswirestate.json'
|
||||
try:
|
||||
save_json(newswire, newswire_state_filename)
|
||||
except Exception as ex:
|
||||
print('ERROR: saving newswire state, ' + str(ex))
|
||||
except BaseException as ex:
|
||||
print('EX: saving newswire state, ' + str(ex))
|
||||
if filename:
|
||||
save_json(newswire_item[votes_index],
|
||||
filename + '.votes')
|
||||
|
@ -12702,8 +12701,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.css_cache)
|
||||
if css:
|
||||
break
|
||||
except Exception as ex:
|
||||
print('ERROR: _get_style_sheet ' +
|
||||
except BaseException as ex:
|
||||
print('EX: _get_style_sheet ' +
|
||||
str(tries) + ' ' + str(ex))
|
||||
time.sleep(1)
|
||||
tries += 1
|
||||
|
@ -12742,8 +12741,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
with open(qr_filename, 'rb') as av_file:
|
||||
media_binary = av_file.read()
|
||||
break
|
||||
except Exception as ex:
|
||||
print('ERROR: _show_q_rcode ' + str(tries) + ' ' + str(ex))
|
||||
except BaseException as ex:
|
||||
print('EX: _show_q_rcode ' + str(tries) + ' ' + str(ex))
|
||||
time.sleep(1)
|
||||
tries += 1
|
||||
if media_binary:
|
||||
|
@ -12786,8 +12785,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
with open(banner_filename, 'rb') as av_file:
|
||||
media_binary = av_file.read()
|
||||
break
|
||||
except Exception as ex:
|
||||
print('ERROR: _search_screen_banner ' +
|
||||
except BaseException as ex:
|
||||
print('EX: _search_screen_banner ' +
|
||||
str(tries) + ' ' + str(ex))
|
||||
time.sleep(1)
|
||||
tries += 1
|
||||
|
@ -12831,8 +12830,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
with open(banner_filename, 'rb') as av_file:
|
||||
media_binary = av_file.read()
|
||||
break
|
||||
except Exception as ex:
|
||||
print('ERROR: _column_image ' + str(tries) + ' ' + str(ex))
|
||||
except BaseException as ex:
|
||||
print('EX: _column_image ' + str(tries) + ' ' + str(ex))
|
||||
time.sleep(1)
|
||||
tries += 1
|
||||
if media_binary:
|
||||
|
@ -12875,8 +12874,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
with open(bg_filename, 'rb') as av_file:
|
||||
bg_binary = av_file.read()
|
||||
break
|
||||
except Exception as ex:
|
||||
print('ERROR: _show_background_image ' +
|
||||
except BaseException as ex:
|
||||
print('EX: _show_background_image ' +
|
||||
str(tries) + ' ' + str(ex))
|
||||
time.sleep(1)
|
||||
tries += 1
|
||||
|
@ -12921,8 +12920,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
with open(bg_filename, 'rb') as av_file:
|
||||
bg_binary = av_file.read()
|
||||
break
|
||||
except Exception as ex:
|
||||
print('ERROR: _show_default_profile_background ' +
|
||||
except BaseException as ex:
|
||||
print('EX: _show_default_profile_background ' +
|
||||
str(tries) + ' ' + str(ex))
|
||||
time.sleep(1)
|
||||
tries += 1
|
||||
|
@ -13472,10 +13471,10 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
referer_domain = None
|
||||
if self.headers.get('referer'):
|
||||
referer_domain = \
|
||||
get_domain_from_url_in_string(self.headers['referer'])
|
||||
user_agent_domain(self.headers['referer'], self.server.debug)
|
||||
elif self.headers.get('Referer'):
|
||||
referer_domain = \
|
||||
get_domain_from_url_in_string(self.headers['Referer'])
|
||||
user_agent_domain(self.headers['Referer'], self.server.debug)
|
||||
elif self.headers.get('Signature'):
|
||||
if 'keyId="' in self.headers['Signature']:
|
||||
referer_domain = self.headers['Signature'].split('keyId="')[1]
|
||||
|
@ -13486,7 +13485,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
elif '"' in referer_domain:
|
||||
referer_domain = referer_domain.split('"')[0]
|
||||
elif ua_str:
|
||||
referer_domain = get_domain_from_url_in_string(ua_str)
|
||||
referer_domain = user_agent_domain(ua_str, self.server.debug)
|
||||
return referer_domain
|
||||
|
||||
def _get_user_agent(self) -> str:
|
||||
|
@ -14855,8 +14854,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
with open(media_filename, 'rb') as av_file:
|
||||
media_binary = av_file.read()
|
||||
break
|
||||
except Exception as ex:
|
||||
print('ERROR: manifest logo ' +
|
||||
except BaseException as ex:
|
||||
print('EX: manifest logo ' +
|
||||
str(tries) + ' ' + str(ex))
|
||||
time.sleep(1)
|
||||
tries += 1
|
||||
|
@ -14897,8 +14896,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
with open(screen_filename, 'rb') as av_file:
|
||||
media_binary = av_file.read()
|
||||
break
|
||||
except Exception as ex:
|
||||
print('ERROR: manifest screenshot ' +
|
||||
except BaseException as ex:
|
||||
print('EX: manifest screenshot ' +
|
||||
str(tries) + ' ' + str(ex))
|
||||
time.sleep(1)
|
||||
tries += 1
|
||||
|
@ -14939,8 +14938,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
with open(icon_filename, 'rb') as av_file:
|
||||
media_binary = av_file.read()
|
||||
break
|
||||
except Exception as ex:
|
||||
print('ERROR: login screen image ' +
|
||||
except BaseException as ex:
|
||||
print('EX: login screen image ' +
|
||||
str(tries) + ' ' + str(ex))
|
||||
time.sleep(1)
|
||||
tries += 1
|
||||
|
@ -17603,7 +17602,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
print('WARN: POST post_bytes socket error')
|
||||
return None
|
||||
except ValueError as ex:
|
||||
print('ERROR: POST post_bytes rfile.read failed, ' +
|
||||
print('EX: POST post_bytes rfile.read failed, ' +
|
||||
str(ex))
|
||||
return None
|
||||
|
||||
|
@ -17646,7 +17645,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
print('WARN: handle POST message_bytes socket error')
|
||||
return {}
|
||||
except ValueError as ex:
|
||||
print('ERROR: handle POST message_bytes rfile.read failed ' +
|
||||
print('EX: handle POST message_bytes rfile.read failed ' +
|
||||
str(ex))
|
||||
return {}
|
||||
|
||||
|
@ -17689,7 +17688,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
print('WARN: POST message_bytes socket error')
|
||||
return {}
|
||||
except ValueError as ex:
|
||||
print('ERROR: POST message_bytes rfile.read failed, ' + str(ex))
|
||||
print('EX: POST message_bytes rfile.read failed, ' + str(ex))
|
||||
return {}
|
||||
|
||||
len_message = len(message_bytes)
|
||||
|
@ -18469,16 +18468,16 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
unknown_post = self.rfile.read(length).decode('utf-8')
|
||||
except SocketError as ex:
|
||||
if ex.errno == errno.ECONNRESET:
|
||||
print('WARN: POST unknown_post ' +
|
||||
print('EX: POST unknown_post ' +
|
||||
'connection reset by peer')
|
||||
else:
|
||||
print('WARN: POST unknown_post socket error')
|
||||
print('EX: POST unknown_post socket error')
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
self.server.postreq_busy = False
|
||||
return
|
||||
except ValueError as ex:
|
||||
print('ERROR: POST unknown_post rfile.read failed, ' +
|
||||
print('EX: POST unknown_post rfile.read failed, ' +
|
||||
str(ex))
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
|
@ -18525,7 +18524,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.postreq_busy = False
|
||||
return
|
||||
except ValueError as ex:
|
||||
print('ERROR: POST message_bytes rfile.read failed, ' + str(ex))
|
||||
print('EX: POST message_bytes rfile.read failed, ' + str(ex))
|
||||
self.send_response(400)
|
||||
self.end_headers()
|
||||
self.server.postreq_busy = False
|
||||
|
@ -18755,7 +18754,7 @@ def load_tokens(base_dir: str, tokens_dict: {}, tokens_lookup: {}) -> None:
|
|||
try:
|
||||
with open(token_filename, 'r') as fp_tok:
|
||||
token = fp_tok.read()
|
||||
except Exception as ex:
|
||||
except BaseException as ex:
|
||||
print('WARN: Unable to read token for ' +
|
||||
nickname + ' ' + str(ex))
|
||||
if not token:
|
||||
|
@ -18842,13 +18841,13 @@ def run_daemon(dyslexic_font: bool,
|
|||
|
||||
try:
|
||||
httpd = EpicyonServer(server_address, pub_handler)
|
||||
except Exception as ex:
|
||||
if ex.errno == 98:
|
||||
print('ERROR: HTTP server address is already in use. ' +
|
||||
except SocketError as ex:
|
||||
if ex.errno == errno.ECONNREFUSED:
|
||||
print('EX: HTTP server address is already in use. ' +
|
||||
str(server_address))
|
||||
return False
|
||||
|
||||
print('ERROR: HTTP server failed to start. ' + str(ex))
|
||||
print('EX: HTTP server failed to start. ' + str(ex))
|
||||
print('server_address: ' + str(server_address))
|
||||
return False
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "delete.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "desktop_client.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
@ -176,7 +176,7 @@ def _mark_post_as_read(actor: str, post_id: str, post_category: str) -> None:
|
|||
read_file.seek(0, 0)
|
||||
read_file.write(post_id + content)
|
||||
except Exception as ex:
|
||||
print('WARN: Failed to mark post as read' + str(ex))
|
||||
print('EX: Failed to mark post as read' + str(ex))
|
||||
else:
|
||||
with open(read_posts_filename, 'w+') as read_file:
|
||||
read_file.write(post_id + '\n')
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "devices.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "donate.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "enigma.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "epicyon.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
2
feeds.py
2
feeds.py
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "feeds.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "filters.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "fitnessFunctions.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "follow.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "followingCalendar.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
2
git.py
2
git.py
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "git.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "happening.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -2,7 +2,7 @@ __filename__ = "httpsig.py"
|
|||
__author__ = "Bob Mottram"
|
||||
__credits__ = ['lamia']
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
2
inbox.py
2
inbox.py
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "inbox.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
2
jami.py
2
jami.py
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "jami.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "languages.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
2
like.py
2
like.py
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "like.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -3,7 +3,7 @@ __author__ = "Bob Mottram"
|
|||
__credits__ = ['Based on ' +
|
||||
'https://github.com/tsileo/little-boxes']
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "manualapprove.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "markdown.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "mastoapiv1.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "matrix.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
2
media.py
2
media.py
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "media.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "metadata.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "migrate.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "newsdaemon.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
@ -54,8 +54,8 @@ def _update_feeds_outbox_index(base_dir: str, domain: str,
|
|||
feeds_file.seek(0, 0)
|
||||
feeds_file.write(post_id + '\n' + content)
|
||||
print('DEBUG: feeds post added to index')
|
||||
except Exception as ex:
|
||||
print('WARN: Failed to write entry to feeds posts index ' +
|
||||
except BaseException as ex:
|
||||
print('EX: Failed to write entry to feeds posts index ' +
|
||||
index_filename + ' ' + str(ex))
|
||||
else:
|
||||
try:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "newswire.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
@ -1218,7 +1218,7 @@ def get_rs_sfrom_dict(base_dir: str, newswire: {},
|
|||
published = published_with_offset.strftime("%Y-%m-%dT%H:%M:%SZ")
|
||||
try:
|
||||
pub_date = datetime.strptime(published, "%Y-%m-%dT%H:%M:%SZ")
|
||||
except Exception as ex:
|
||||
except BaseException as ex:
|
||||
print('WARN: Unable to convert date ' + published + ' ' + str(ex))
|
||||
continue
|
||||
rss_str += \
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "notifyOnPost.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "outbox.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "person.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "petnames.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
2
pgp.py
2
pgp.py
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "pgp.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
2
posts.py
2
posts.py
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "posts.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "question.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "reaction.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
2
roles.py
2
roles.py
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "roles.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "schedule.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
48
session.py
48
session.py
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "session.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
@ -23,17 +23,17 @@ def create_session(proxy_type: str):
|
|||
try:
|
||||
session = requests.session()
|
||||
except requests.exceptions.RequestException as ex:
|
||||
print('WARN: requests error during create_session ' + str(ex))
|
||||
print('EX: requests error during create_session ' + str(ex))
|
||||
return None
|
||||
except SocketError as ex:
|
||||
if ex.errno == errno.ECONNRESET:
|
||||
print('WARN: connection was reset during create_session ' +
|
||||
print('EX: connection was reset during create_session ' +
|
||||
str(ex))
|
||||
else:
|
||||
print('WARN: socket error during create_session ' + str(ex))
|
||||
print('EX: socket error during create_session ' + str(ex))
|
||||
return None
|
||||
except ValueError as ex:
|
||||
print('WARN: error during create_session ' + str(ex))
|
||||
print('EX: error during create_session ' + str(ex))
|
||||
return None
|
||||
if not session:
|
||||
return None
|
||||
|
@ -114,7 +114,7 @@ def _get_json_request(session, url: str, domain_full: str, session_headers: {},
|
|||
if session_headers2.get('Authorization'):
|
||||
session_headers2['Authorization'] = 'REDACTED'
|
||||
if debug and not quiet:
|
||||
print('ERROR: get_json failed, url: ' + str(url) + ', ' +
|
||||
print('EX: get_json failed, url: ' + str(url) + ', ' +
|
||||
'headers: ' + str(session_headers2) + ', ' +
|
||||
'params: ' + str(session_params) + ', ' + str(ex))
|
||||
except ValueError as ex:
|
||||
|
@ -122,13 +122,13 @@ def _get_json_request(session, url: str, domain_full: str, session_headers: {},
|
|||
if session_headers2.get('Authorization'):
|
||||
session_headers2['Authorization'] = 'REDACTED'
|
||||
if debug and not quiet:
|
||||
print('ERROR: get_json failed, url: ' + str(url) + ', ' +
|
||||
print('EX: get_json failed, url: ' + str(url) + ', ' +
|
||||
'headers: ' + str(session_headers2) + ', ' +
|
||||
'params: ' + str(session_params) + ', ' + str(ex))
|
||||
except SocketError as ex:
|
||||
if not quiet:
|
||||
if ex.errno == errno.ECONNRESET:
|
||||
print('WARN: get_json failed, ' +
|
||||
print('EX: get_json failed, ' +
|
||||
'connection was reset during get_json ' + str(ex))
|
||||
return None
|
||||
|
||||
|
@ -210,7 +210,7 @@ def _get_json_signed(session, url: str, domain_full: str, session_headers: {},
|
|||
|
||||
def get_json(signing_priv_key_pem: str,
|
||||
session, url: str, headers: {}, params: {}, debug: bool,
|
||||
version: str = '1.2.0', http_prefix: str = 'https',
|
||||
version: str = '1.3.0', http_prefix: str = 'https',
|
||||
domain: str = 'testdomain',
|
||||
timeout_sec: int = 20, quiet: bool = False) -> {}:
|
||||
if not isinstance(url, str):
|
||||
|
@ -248,7 +248,7 @@ def get_json(signing_priv_key_pem: str,
|
|||
|
||||
def download_html(signing_priv_key_pem: str,
|
||||
session, url: str, headers: {}, params: {}, debug: bool,
|
||||
version: str = '1.2.0', http_prefix: str = 'https',
|
||||
version: str = '1.3.0', http_prefix: str = 'https',
|
||||
domain: str = 'testdomain',
|
||||
timeout_sec: int = 20, quiet: bool = False) -> {}:
|
||||
if not isinstance(url, str):
|
||||
|
@ -310,23 +310,23 @@ def post_json(http_prefix: str, domain_full: str,
|
|||
headers=headers, timeout=timeout_sec)
|
||||
except requests.Timeout as ex:
|
||||
if not quiet:
|
||||
print('ERROR: post_json timeout ' + inbox_url + ' ' +
|
||||
print('EX: post_json timeout ' + inbox_url + ' ' +
|
||||
json.dumps(post_json_object) + ' ' + str(headers))
|
||||
print(ex)
|
||||
return ''
|
||||
except requests.exceptions.RequestException as ex:
|
||||
if not quiet:
|
||||
print('ERROR: post_json requests failed ' + inbox_url + ' ' +
|
||||
print('EX: post_json requests failed ' + inbox_url + ' ' +
|
||||
json.dumps(post_json_object) + ' ' + str(headers) +
|
||||
' ' + str(ex))
|
||||
return None
|
||||
except SocketError as ex:
|
||||
if not quiet and ex.errno == errno.ECONNRESET:
|
||||
print('WARN: connection was reset during post_json')
|
||||
print('EX: connection was reset during post_json')
|
||||
return None
|
||||
except ValueError as ex:
|
||||
if not quiet:
|
||||
print('ERROR: post_json failed ' + inbox_url + ' ' +
|
||||
print('EX: post_json failed ' + inbox_url + ' ' +
|
||||
json.dumps(post_json_object) + ' ' + str(headers) +
|
||||
' ' + str(ex))
|
||||
return None
|
||||
|
@ -360,18 +360,18 @@ def post_json_string(session, post_jsonStr: str,
|
|||
headers=headers, timeout=timeout_sec)
|
||||
except requests.exceptions.RequestException as ex:
|
||||
if not quiet:
|
||||
print('WARN: error during post_json_string requests ' + str(ex))
|
||||
print('EX: error during post_json_string requests ' + str(ex))
|
||||
return None, None, 0
|
||||
except SocketError as ex:
|
||||
if not quiet and ex.errno == errno.ECONNRESET:
|
||||
print('WARN: connection was reset during post_json_string')
|
||||
print('EX: connection was reset during post_json_string')
|
||||
if not quiet:
|
||||
print('ERROR: post_json_string failed ' + inbox_url + ' ' +
|
||||
print('EX: post_json_string failed ' + inbox_url + ' ' +
|
||||
post_jsonStr + ' ' + str(headers))
|
||||
return None, None, 0
|
||||
except ValueError as ex:
|
||||
if not quiet:
|
||||
print('WARN: error during post_json_string ' + str(ex))
|
||||
print('EX: error during post_json_string ' + str(ex))
|
||||
return None, None, 0
|
||||
if post_result.status_code < 200 or post_result.status_code > 202:
|
||||
if post_result.status_code >= 400 and \
|
||||
|
@ -425,16 +425,16 @@ def post_image(session, attach_image_filename: str, federation_list: [],
|
|||
post_result = session.post(url=inbox_url, data=media_binary,
|
||||
headers=headers)
|
||||
except requests.exceptions.RequestException as ex:
|
||||
print('WARN: error during post_image requests ' + str(ex))
|
||||
print('EX: error during post_image requests ' + str(ex))
|
||||
return None
|
||||
except SocketError as ex:
|
||||
if ex.errno == errno.ECONNRESET:
|
||||
print('WARN: connection was reset during post_image')
|
||||
print('EX: connection was reset during post_image')
|
||||
print('ERROR: post_image failed ' + inbox_url + ' ' +
|
||||
str(headers) + ' ' + str(ex))
|
||||
return None
|
||||
except ValueError as ex:
|
||||
print('WARN: error during post_image ' + str(ex))
|
||||
print('EX: error during post_image ' + str(ex))
|
||||
return None
|
||||
if post_result:
|
||||
return post_result.text
|
||||
|
@ -540,16 +540,16 @@ def download_image_any_mime_type(session, url: str,
|
|||
try:
|
||||
result = session.get(url, headers=session_headers, timeout=timeout_sec)
|
||||
except requests.exceptions.RequestException as ex:
|
||||
print('ERROR: download_image_any_mime_type failed: ' +
|
||||
print('EX: download_image_any_mime_type failed1: ' +
|
||||
str(url) + ', ' + str(ex))
|
||||
return None, None
|
||||
except ValueError as ex:
|
||||
print('ERROR: download_image_any_mime_type failed: ' +
|
||||
print('EX: download_image_any_mime_type failed2: ' +
|
||||
str(url) + ', ' + str(ex))
|
||||
return None, None
|
||||
except SocketError as ex:
|
||||
if ex.errno == errno.ECONNRESET:
|
||||
print('WARN: download_image_any_mime_type failed, ' +
|
||||
print('EX: download_image_any_mime_type failed, ' +
|
||||
'connection was reset ' + str(ex))
|
||||
return None, None
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "shares.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -2,7 +2,7 @@ __filename__ = "siteactive.py"
|
|||
__author__ = "Bob Mottram"
|
||||
__credits__ = ["webchk"]
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "skills.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "socnet.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "speaker.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
2
ssb.py
2
ssb.py
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "ssb.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -10,6 +10,9 @@ echo "Starting static analysis"
|
|||
|
||||
for sourceFile in *.py
|
||||
do
|
||||
if [[ "$sourceFile" == *"flycheck"* ]]; then
|
||||
continue
|
||||
fi
|
||||
result=$($cmd "$sourceFile")
|
||||
if [ "$result" ]; then
|
||||
echo ''
|
||||
|
|
9
tests.py
9
tests.py
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "tests.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
@ -283,7 +283,7 @@ def _test_http_signed_get(base_dir: str):
|
|||
accept = 'application/json'
|
||||
# accept = 'application/activity+json'
|
||||
headers = {
|
||||
'user-agent': 'Epicyon/1.2.0; +https://' + domain + '/',
|
||||
'user-agent': 'Epicyon/1.3.0; +https://' + domain + '/',
|
||||
'host': headers_domain,
|
||||
'date': date_str,
|
||||
'accept': accept,
|
||||
|
@ -5867,7 +5867,10 @@ def _test_useragent_domain() -> None:
|
|||
print('test_user_agent_domain')
|
||||
user_agent = \
|
||||
'http.rb/4.4.1 (Mastodon/9.10.11; +https://mastodon.something/)'
|
||||
assert user_agent_domain(user_agent, False) == 'mastodon.something'
|
||||
agent_domain = user_agent_domain(user_agent, False)
|
||||
if agent_domain != 'mastodon.something':
|
||||
print(agent_domain)
|
||||
assert agent_domain == 'mastodon.something'
|
||||
user_agent = \
|
||||
'Mozilla/70.0 (X11; Linux x86_64; rv:1.0) Gecko/20450101 Firefox/1.0'
|
||||
assert user_agent_domain(user_agent, False) is None
|
||||
|
|
2
theme.py
2
theme.py
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "theme.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "threads.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
2
tox.py
2
tox.py
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "tox.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
31
utils.py
31
utils.py
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "utils.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
@ -2891,11 +2891,13 @@ def user_agent_domain(user_agent: str, debug: bool) -> str:
|
|||
"""If the User-Agent string contains a domain
|
||||
then return it
|
||||
"""
|
||||
if 'http' not in user_agent:
|
||||
if 'https://' not in user_agent and 'http://' not in user_agent:
|
||||
return None
|
||||
agent_domain = user_agent.split('http')[1].strip()
|
||||
if '://' in agent_domain:
|
||||
agent_domain = agent_domain.split('://')[1]
|
||||
agent_domain = ''
|
||||
if 'https://' in user_agent:
|
||||
agent_domain = user_agent.split('https://')[1].strip()
|
||||
else:
|
||||
agent_domain = user_agent.split('http://')[1].strip()
|
||||
if '/' in agent_domain:
|
||||
agent_domain = agent_domain.split('/')[0]
|
||||
if ')' in agent_domain:
|
||||
|
@ -3323,22 +3325,3 @@ def valid_hash_tag(hashtag: str) -> bool:
|
|||
if _is_valid_language(hashtag):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def get_domain_from_url_in_string(text: str) -> str:
|
||||
"""Returns the domain from within a string if it exists
|
||||
"""
|
||||
domain_str = ''
|
||||
if 'https://' in text:
|
||||
domain_str = text.split('https://')[1]
|
||||
if '/' in domain_str:
|
||||
domain_str = domain_str.split('/')[0]
|
||||
elif ')' in domain_str:
|
||||
domain_str = domain_str.split(')')[0]
|
||||
elif 'http://' in text:
|
||||
domain_str = text.split('http://')[1]
|
||||
if '/' in domain_str:
|
||||
domain_str = domain_str.split('/')[0]
|
||||
elif ')' in domain_str:
|
||||
domain_str = domain_str.split(')')[0]
|
||||
return domain_str
|
||||
|
|
2
video.py
2
video.py
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "video.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "webapp_about.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "webapp_accesskeys.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "webapp_calendar.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "webapp_column_left.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "webapp_column_right.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "webapp_confirm.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "webapp_create_post.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "webapp_frontscreen.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "webapp_hashtagswarm.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "webapp_headerbuttons.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "webapp_login.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "webapp_media.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "webapp_minimalbutton.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "webapp_moderation.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "webapp_person_options.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "webapp_podcast.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "webapp_post.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "webapp_profile.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "webapp_question.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "webapp_search.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "webapp_suspended.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "webapp_theme_designer.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "webapp_timeline.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "webapp_tos.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "webapp_utils.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "webapp_welcome.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "webapp_welcome_final.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "webapp_welcome_profile.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
__filename__ = "webfinger.py"
|
||||
__author__ = "Bob Mottram"
|
||||
__license__ = "AGPL3+"
|
||||
__version__ = "1.2.0"
|
||||
__version__ = "1.3.0"
|
||||
__maintainer__ = "Bob Mottram"
|
||||
__email__ = "bob@libreserver.org"
|
||||
__status__ = "Production"
|
||||
|
|
|
@ -14,12 +14,12 @@
|
|||
"email": "bob@libreserver.org",
|
||||
"url": "https://epicyon.libreserver.org/users/bob"
|
||||
},
|
||||
"applicationCategory" : ["server", "software", "bash", "debian", "linux", "self-hosting"],
|
||||
"applicationCategory" : ["server", "software", "bash", "debian", "linux", "self-hosting", "raspberry-pi"],
|
||||
"downloadUrl" : "https://libreserver.org/epicyon/epicyon.tar.gz"
|
||||
}
|
||||
</script>
|
||||
<meta name="description" content="ActivityPub server written in Python, HTML and CSS, and suitable for self-hosting on single board computers">
|
||||
<meta name="keywords" content="ActivityPub, Fediverse, Python, HTML, CSS">
|
||||
<meta name="keywords" content="ActivityPub, Fediverse, Python, HTML, CSS, SmallWeb, SelfHosting, RaspberryPi">
|
||||
<meta name="author" content="Bob Mottram">
|
||||
<style>
|
||||
@charset "UTF-8";
|
||||
|
@ -775,6 +775,17 @@
|
|||
color: white;
|
||||
}
|
||||
|
||||
.releaseheader {
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
color: yellow;
|
||||
}
|
||||
|
||||
.releaseheader a:link {
|
||||
color: yellow;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
footer {
|
||||
float: right;
|
||||
font-size: 18px;
|
||||
|
@ -1177,6 +1188,7 @@
|
|||
</tr>
|
||||
</table>
|
||||
<p class="matrix">Matrix room: <b>#epicyon:matrix.libreserver.org<br>gemini://libreserver.org/epicyon</b></p>
|
||||
<p class="releaseheader"><a href="v1_3_0.html">New release: 1.3.0</a></p>
|
||||
<p class="intro">
|
||||
Epicyon is an <a href="https://www.gnu.org/licenses/agpl-3.0.en.html">AGPL</a> licensed <a href="https://www.w3.org/TR/activitypub/">ActivityPub protocol</a> compliant <a href="https://en.wikipedia.org/wiki/Fediverse">federated social network</a> server suitable for hosting a small number of accounts on low power systems requiring minimal maintenance, such as single board computers. It's the ActivityPub equivalent of an email server, storing posts as human readable JSON on file, rather than in a database. It also uses only a small amount of RAM.
|
||||
<p>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue