mirror of https://gitlab.com/bashrc2/epicyon
Snake case
parent
a8138d6401
commit
2c39ccf66a
|
@ -20,7 +20,7 @@ from utils import is_account_dir
|
|||
from utils import get_cached_post_filename
|
||||
from utils import load_json
|
||||
from utils import save_json
|
||||
from utils import fileLastModified
|
||||
from utils import file_last_modified
|
||||
from utils import set_config_param
|
||||
from utils import has_users_path
|
||||
from utils import get_full_domain
|
||||
|
@ -904,7 +904,7 @@ def setBrochMode(base_dir: str, domain_full: str, enabled: bool) -> None:
|
|||
print('Broch mode turned off')
|
||||
else:
|
||||
if os.path.isfile(allowFilename):
|
||||
lastModified = fileLastModified(allowFilename)
|
||||
lastModified = file_last_modified(allowFilename)
|
||||
print('Broch mode already activated ' + lastModified)
|
||||
return
|
||||
# generate instance allow list
|
||||
|
@ -955,7 +955,7 @@ def broch_modeLapses(base_dir: str, lapseDays: int) -> bool:
|
|||
allowFilename = base_dir + '/accounts/allowedinstances.txt'
|
||||
if not os.path.isfile(allowFilename):
|
||||
return False
|
||||
lastModified = fileLastModified(allowFilename)
|
||||
lastModified = file_last_modified(allowFilename)
|
||||
modifiedDate = None
|
||||
try:
|
||||
modifiedDate = \
|
||||
|
|
|
@ -17,7 +17,7 @@ from utils import isValidLanguage
|
|||
from utils import get_image_extensions
|
||||
from utils import load_json
|
||||
from utils import save_json
|
||||
from utils import fileLastModified
|
||||
from utils import file_last_modified
|
||||
from utils import get_link_prefixes
|
||||
from utils import dangerous_markup
|
||||
from utils import is_pgp_encrypted
|
||||
|
@ -540,7 +540,7 @@ def _addEmoji(base_dir: str, wordStr: str,
|
|||
'url': emojiUrl
|
||||
},
|
||||
'name': ':' + emoji + ':',
|
||||
"updated": fileLastModified(emojiFilename),
|
||||
"updated": file_last_modified(emojiFilename),
|
||||
"id": emojiUrl.replace('.png', ''),
|
||||
'type': 'Emoji'
|
||||
}
|
||||
|
|
4
inbox.py
4
inbox.py
|
@ -22,7 +22,7 @@ from utils import is_group_account
|
|||
from utils import is_system_account
|
||||
from utils import invalid_ciphertext
|
||||
from utils import remove_html
|
||||
from utils import fileLastModified
|
||||
from utils import file_last_modified
|
||||
from utils import has_object_string
|
||||
from utils import has_object_string_object
|
||||
from utils import get_reply_interval_hours
|
||||
|
@ -163,7 +163,7 @@ def _updateCachedHashtagSwarm(base_dir: str, nickname: str, domain: str,
|
|||
acct_dir(base_dir, nickname, domain) + '/.hashtagSwarm'
|
||||
saveSwarm = True
|
||||
if os.path.isfile(cachedHashtagSwarmFilename):
|
||||
lastModified = fileLastModified(cachedHashtagSwarmFilename)
|
||||
lastModified = file_last_modified(cachedHashtagSwarmFilename)
|
||||
modifiedDate = None
|
||||
try:
|
||||
modifiedDate = \
|
||||
|
|
4
posts.py
4
posts.py
|
@ -44,7 +44,7 @@ from utils import get_port_from_domain
|
|||
from utils import has_object_dict
|
||||
from utils import reject_post_id
|
||||
from utils import remove_invalid_chars
|
||||
from utils import fileLastModified
|
||||
from utils import file_last_modified
|
||||
from utils import isPublicPost
|
||||
from utils import has_users_path
|
||||
from utils import valid_post_date
|
||||
|
@ -1687,7 +1687,7 @@ def getPinnedPostAsJson(base_dir: str, http_prefix: str,
|
|||
'id': actor + '/pinned',
|
||||
'inReplyTo': None,
|
||||
'inReplyToAtomUri': None,
|
||||
'published': fileLastModified(pinnedFilename),
|
||||
'published': file_last_modified(pinnedFilename),
|
||||
'replies': {},
|
||||
'sensitive': False,
|
||||
'summary': None,
|
||||
|
|
4
utils.py
4
utils.py
|
@ -2047,7 +2047,7 @@ def updateRecentPostsCache(recent_posts_cache: {}, max_recent_posts: int,
|
|||
recent_posts_cache['html'][post_id] = htmlStr
|
||||
|
||||
|
||||
def fileLastModified(filename: str) -> str:
|
||||
def file_last_modified(filename: str) -> str:
|
||||
"""Returns the date when a file was last modified
|
||||
"""
|
||||
time_val = os.path.getmtime(filename)
|
||||
|
@ -2062,7 +2062,7 @@ def get_css(base_dir: str, css_filename: str, css_cache: {}) -> str:
|
|||
if not os.path.isfile(css_filename):
|
||||
return None
|
||||
|
||||
last_modified = fileLastModified(css_filename)
|
||||
last_modified = file_last_modified(css_filename)
|
||||
|
||||
# has this already been loaded into the cache?
|
||||
if css_cache.get(css_filename):
|
||||
|
|
Loading…
Reference in New Issue