Move most source code into src subdirectory

main
bashrc 2026-06-04 13:32:10 +01:00
parent aa394b846a
commit ecc8b2f361
195 changed files with 4553 additions and 4517 deletions

View File

@ -14,132 +14,132 @@ import time
import argparse
import getpass
import datetime
from person import get_actor_json
from person import create_person
from person import create_group
from person import set_profile_image
from person import remove_account
from person import activate_account2
from person import deactivate_account
from skills import set_skill_level
from roles import set_role
from webfinger import webfinger_handle
from bookmarks import send_bookmark_via_server
from bookmarks import send_undo_bookmark_via_server
from conversation import download_conversation_posts
from keys import get_instance_actor_key
from sendC2S import send_post_via_server
from sendC2S import send_block_via_server
from sendC2S import send_mute_via_server
from sendC2S import send_undo_mute_via_server
from sendC2S import send_undo_block_via_server
from posts import novel_fields
from posts import set_post_expiry_days
from posts import c2s_box_json
from posts import download_follow_collection
from posts import get_public_post_domains
from posts import get_public_post_domains_blocked
from posts import create_public_post
from posts import delete_all_posts
from posts import expire_posts
from posts import archive_posts
from posts import get_public_posts_of_person
from posts import get_user_url
from posts import check_domains
from session import get_resolved_url
from session import get_json_valid
from session import create_session
from session import get_json
from session import get_vcard
from session import download_html
from session import verify_html
from session import download_ssml
from newswire import get_rss
from filters import add_filter
from filters import remove_filter
from src.person import get_actor_json
from src.person import create_person
from src.person import create_group
from src.person import set_profile_image
from src.person import remove_account
from src.person import activate_account2
from src.person import deactivate_account
from src.skills import set_skill_level
from src.roles import set_role
from src.webfinger import webfinger_handle
from src.bookmarks import send_bookmark_via_server
from src.bookmarks import send_undo_bookmark_via_server
from src.conversation import download_conversation_posts
from src.keys import get_instance_actor_key
from src.sendC2S import send_post_via_server
from src.sendC2S import send_block_via_server
from src.sendC2S import send_mute_via_server
from src.sendC2S import send_undo_mute_via_server
from src.sendC2S import send_undo_block_via_server
from src.posts import novel_fields
from src.posts import set_post_expiry_days
from src.posts import c2s_box_json
from src.posts import download_follow_collection
from src.posts import get_public_post_domains
from src.posts import get_public_post_domains_blocked
from src.posts import create_public_post
from src.posts import delete_all_posts
from src.posts import expire_posts
from src.posts import archive_posts
from src.posts import get_public_posts_of_person
from src.posts import get_user_url
from src.posts import check_domains
from src.session import get_resolved_url
from src.session import get_json_valid
from src.session import create_session
from src.session import get_json
from src.session import get_vcard
from src.session import download_html
from src.session import verify_html
from src.session import download_ssml
from src.newswire import get_rss
from src.filters import add_filter
from src.filters import remove_filter
from pprint import pprint
from daemon import run_daemon
from follow import get_follow_requests_via_server
from follow import get_following_via_server
from follow import get_followers_via_server
from follow import clear_follows
from follow import add_follower_of_person
from follow import send_follow_request_via_server
from follow import send_unfollow_request_via_server
from tests import test_shared_items_federation
from tests import test_group_follow
from tests import test_post_message_between_servers
from tests import test_follow_between_servers
from tests import test_client_to_server
from tests import test_update_actor
from tests import run_all_tests
from auth import store_basic_credentials
from auth import create_password
from utils import resembles_domain
from utils import string_starts_with
from utils import is_yggdrasil_url
from utils import is_yggdrasil_address
from utils import get_event_categories
from utils import replace_strings
from utils import set_accounts_data_dir
from utils import data_dir
from utils import data_dir_testing
from utils import string_ends_with
from utils import remove_html
from utils import remove_eol
from utils import text_in_file
from utils import remove_domain_port
from utils import get_port_from_domain
from utils import has_users_path
from utils import get_full_domain
from utils import set_config_param
from utils import get_config_param
from utils import get_domain_from_actor
from utils import get_nickname_from_actor
from utils import follow_person
from utils import valid_nickname
from utils import get_protocol_prefixes
from utils import acct_dir
from utils import resembles_url
from media import archive_media
from media import get_attachment_media_type
from delete import send_delete_via_server
from like import send_like_via_server
from like import send_undo_like_via_server
from reaction import send_reaction_via_server
from reaction import send_undo_reaction_via_server
from reaction import valid_emoji_content
from skills import send_skill_via_server
from availability import set_availability
from availability import send_availability_via_server
from manualapprove import manual_deny_follow_request2
from manualapprove import manual_approve_follow_request
from shares import send_share_via_server
from shares import send_undo_share_via_server
from shares import send_wanted_via_server
from shares import send_undo_wanted_via_server
from shares import add_share
from theme import set_theme
from announce import send_announce_via_server
from socnet import instances_graph
from migrate import migrate_accounts
from desktop_client import run_desktop_client
from happening import dav_month_via_server
from happening import dav_day_via_server
from content import import_emoji
from relationships import get_moved_accounts
from blocking import get_blocks_via_server
from poison import html_poisoned
from poison import load_dictionary
from poison import load_2grams
from webapp_post import get_instance_software
from siteactive import site_is_active
from siteactive import is_online
from data import save_string
from data import load_list
from data import is_a_file
from data import is_a_dir
from data import makedir
from src.daemon import run_daemon
from src.follow import get_follow_requests_via_server
from src.follow import get_following_via_server
from src.follow import get_followers_via_server
from src.follow import clear_follows
from src.follow import add_follower_of_person
from src.follow import send_follow_request_via_server
from src.follow import send_unfollow_request_via_server
from src.tests import test_shared_items_federation
from src.tests import test_group_follow
from src.tests import test_post_message_between_servers
from src.tests import test_follow_between_servers
from src.tests import test_client_to_server
from src.tests import test_update_actor
from src.tests import run_all_tests
from src.auth import store_basic_credentials
from src.auth import create_password
from src.utils import resembles_domain
from src.utils import string_starts_with
from src.utils import is_yggdrasil_url
from src.utils import is_yggdrasil_address
from src.utils import get_event_categories
from src.utils import replace_strings
from src.utils import set_accounts_data_dir
from src.utils import data_dir
from src.utils import data_dir_testing
from src.utils import string_ends_with
from src.utils import remove_html
from src.utils import remove_eol
from src.utils import text_in_file
from src.utils import remove_domain_port
from src.utils import get_port_from_domain
from src.utils import has_users_path
from src.utils import get_full_domain
from src.utils import set_config_param
from src.utils import get_config_param
from src.utils import get_domain_from_actor
from src.utils import get_nickname_from_actor
from src.utils import follow_person
from src.utils import valid_nickname
from src.utils import get_protocol_prefixes
from src.utils import acct_dir
from src.utils import resembles_url
from src.media import archive_media
from src.media import get_attachment_media_type
from src.delete import send_delete_via_server
from src.like import send_like_via_server
from src.like import send_undo_like_via_server
from src.reaction import send_reaction_via_server
from src.reaction import send_undo_reaction_via_server
from src.reaction import valid_emoji_content
from src.skills import send_skill_via_server
from src.availability import set_availability
from src.availability import send_availability_via_server
from src.manualapprove import manual_deny_follow_request2
from src.manualapprove import manual_approve_follow_request
from src.shares import send_share_via_server
from src.shares import send_undo_share_via_server
from src.shares import send_wanted_via_server
from src.shares import send_undo_wanted_via_server
from src.shares import add_share
from src.theme import set_theme
from src.announce import send_announce_via_server
from src.socnet import instances_graph
from src.migrate import migrate_accounts
from src.desktop_client import run_desktop_client
from src.happening import dav_month_via_server
from src.happening import dav_day_via_server
from src.content import import_emoji
from src.relationships import get_moved_accounts
from src.blocking import get_blocks_via_server
from src.poison import html_poisoned
from src.poison import load_dictionary
from src.poison import load_2grams
from src.webapp_post import get_instance_software
from src.siteactive import site_is_active
from src.siteactive import is_online
from src.data import save_string
from src.data import load_list
from src.data import is_a_file
from src.data import is_a_dir
from src.data import makedir
def str2bool(value_str) -> bool:

View File

@ -1,2 +1,2 @@
#!/bin/bash
find . -name '*.py' | xargs wc -l
find . -name 'src/*.py' | xargs wc -l

View File

@ -3,4 +3,5 @@ git stash
git pull
chown -R epicyon:epicyon *
chmod 644 *.py
chmod 644 src/*.py
systemctl restart epicyon

View File

@ -1,2 +1,3 @@
#!/bin/bash
bandit *.py -x tests.py
bandit *.py
bandit src/*.py -x tests.py

View File

@ -9,28 +9,28 @@ __email__ = "bob@libreserver.org"
__status__ = "Production"
__module_group__ = "ActivityPub"
from posts import send_signed_json
from flags import has_group_type
from flags import url_permitted
from status import get_status_number
from utils import get_attributed_to
from utils import get_user_paths
from utils import text_in_file
from utils import has_object_string_object
from utils import has_users_path
from utils import get_full_domain
from utils import get_domain_from_actor
from utils import get_nickname_from_actor
from utils import domain_permitted
from utils import follow_person
from utils import acct_dir
from utils import local_actor_url
from utils import has_actor
from utils import has_object_string_type
from utils import get_actor_from_post
from utils import is_yggdrasil_address
from timeFunctions import get_current_time_int
from data import is_a_file
from src.posts import send_signed_json
from src.flags import has_group_type
from src.flags import url_permitted
from src.status import get_status_number
from src.utils import get_attributed_to
from src.utils import get_user_paths
from src.utils import text_in_file
from src.utils import has_object_string_object
from src.utils import has_users_path
from src.utils import get_full_domain
from src.utils import get_domain_from_actor
from src.utils import get_nickname_from_actor
from src.utils import domain_permitted
from src.utils import follow_person
from src.utils import acct_dir
from src.utils import local_actor_url
from src.utils import has_actor
from src.utils import has_object_string_type
from src.utils import get_actor_from_post
from src.utils import is_yggdrasil_address
from src.timeFunctions import get_current_time_int
from src.data import is_a_file
def _create_quote_accept_reject(receiving_actor: str,

View File

@ -10,38 +10,38 @@ __status__ = "Production"
__module_group__ = "ActivityPub"
from pprint import pprint
from flags import has_group_type
from flags import url_permitted
from status import get_status_number
from utils import remove_post_from_cache
from utils import get_cached_post_filename
from utils import load_json
from utils import text_in_file
from utils import get_user_paths
from utils import has_object_string_object
from utils import has_object_dict
from utils import remove_domain_port
from utils import remove_id_ending
from utils import has_users_path
from utils import get_full_domain
from utils import create_outbox_dir
from utils import get_nickname_from_actor
from utils import get_domain_from_actor
from utils import locate_post
from utils import save_json
from utils import local_actor_url
from utils import replace_users_with_at
from utils import has_actor
from utils import has_object_string_type
from utils import get_actor_from_post
from posts import send_signed_json
from posts import get_person_box
from session import post_json
from webfinger import webfinger_handle
from auth import create_basic_auth_header
from data import save_string
from data import erase_file
from data import is_a_file
from src.flags import has_group_type
from src.flags import url_permitted
from src.status import get_status_number
from src.utils import remove_post_from_cache
from src.utils import get_cached_post_filename
from src.utils import load_json
from src.utils import text_in_file
from src.utils import get_user_paths
from src.utils import has_object_string_object
from src.utils import has_object_dict
from src.utils import remove_domain_port
from src.utils import remove_id_ending
from src.utils import has_users_path
from src.utils import get_full_domain
from src.utils import create_outbox_dir
from src.utils import get_nickname_from_actor
from src.utils import get_domain_from_actor
from src.utils import locate_post
from src.utils import save_json
from src.utils import local_actor_url
from src.utils import replace_users_with_at
from src.utils import has_actor
from src.utils import has_object_string_type
from src.utils import get_actor_from_post
from src.posts import send_signed_json
from src.posts import get_person_box
from src.session import post_json
from src.webfinger import webfinger_handle
from src.auth import create_basic_auth_header
from src.data import save_string
from src.data import erase_file
from src.data import is_a_file
def no_of_announces(post_json_object: {}) -> int:

View File

@ -8,10 +8,10 @@ __status__ = "Production"
__module_group__ = "Profile Metadata"
from utils import get_attachment_property_value
from utils import remove_html
from utils import string_contains
from utils import resembles_url
from src.utils import get_attachment_property_value
from src.utils import remove_html
from src.utils import string_contains
from src.utils import resembles_url
art_fieldnames = ('art')

View File

@ -12,21 +12,21 @@ import hashlib
import binascii
import os
import secrets
from flags import is_system_account
from flags import is_memorial_account
from utils import data_dir
from utils import has_users_path
from utils import text_in_file
from utils import remove_eol
from utils import valid_nickname
from timeFunctions import date_utcnow
from data import append_string
from data import save_string
from data import load_list
from data import move_file
from data import is_a_file
from data import is_a_dir
from data import makedir
from src.flags import is_system_account
from src.flags import is_memorial_account
from src.utils import data_dir
from src.utils import has_users_path
from src.utils import text_in_file
from src.utils import remove_eol
from src.utils import valid_nickname
from src.timeFunctions import date_utcnow
from src.data import append_string
from src.data import save_string
from src.data import load_list
from src.data import move_file
from src.data import is_a_file
from src.data import is_a_dir
from src.data import makedir
def _hash_password(password: str) -> str:

View File

@ -7,21 +7,21 @@ __email__ = "bob@libreserver.org"
__status__ = "Production"
__module_group__ = "Profile Metadata"
from webfinger import webfinger_handle
from auth import create_basic_auth_header
from posts import get_person_box
from session import post_json
from utils import has_object_string
from utils import get_full_domain
from utils import get_nickname_from_actor
from utils import get_domain_from_actor
from utils import load_json
from utils import save_json
from utils import acct_dir
from utils import local_actor_url
from utils import has_actor
from utils import get_actor_from_post
from data import is_a_file
from src.webfinger import webfinger_handle
from src.auth import create_basic_auth_header
from src.posts import get_person_box
from src.session import post_json
from src.utils import has_object_string
from src.utils import get_full_domain
from src.utils import get_nickname_from_actor
from src.utils import get_domain_from_actor
from src.utils import load_json
from src.utils import save_json
from src.utils import acct_dir
from src.utils import local_actor_url
from src.utils import has_actor
from src.utils import get_actor_from_post
from src.data import is_a_file
def set_availability(base_dir: str, nickname: str, domain: str,

View File

@ -11,56 +11,56 @@ import os
import json
import time
import fnmatch
from session import get_json_valid
from session import create_session
from flags import is_evil
from flags import is_quote_toot
from quote import get_quote_toot_url
from timeFunctions import date_utcnow
from timeFunctions import date_from_string_format
from timeFunctions import get_current_time_int
from utils import is_yggdrasil_address
from utils import get_user_paths
from utils import contains_statuses
from utils import data_dir
from utils import string_contains
from utils import remove_eol
from utils import has_object_string
from utils import has_object_string_object
from utils import has_object_string_type
from utils import remove_domain_port
from utils import has_object_dict
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 file_last_modified
from utils import set_config_param
from utils import has_users_path
from utils import get_full_domain
from utils import remove_id_ending
from utils import locate_post
from utils import get_domain_from_actor
from utils import get_nickname_from_actor
from utils import acct_dir
from utils import local_actor_url
from utils import has_actor
from utils import text_in_file
from utils import get_actor_from_post
from utils import evil_incarnate
from utils import evil_nickname
from conversation import mute_conversation
from conversation import unmute_conversation
from auth import create_basic_auth_header
from session import get_json
from data import load_string
from data import load_list
from data import save_string
from data import save_flag_file
from data import append_string
from data import erase_file
from data import move_file
from data import is_a_file
from src.session import get_json_valid
from src.session import create_session
from src.flags import is_evil
from src.flags import is_quote_toot
from src.quote import get_quote_toot_url
from src.timeFunctions import date_utcnow
from src.timeFunctions import date_from_string_format
from src.timeFunctions import get_current_time_int
from src.utils import is_yggdrasil_address
from src.utils import get_user_paths
from src.utils import contains_statuses
from src.utils import data_dir
from src.utils import string_contains
from src.utils import remove_eol
from src.utils import has_object_string
from src.utils import has_object_string_object
from src.utils import has_object_string_type
from src.utils import remove_domain_port
from src.utils import has_object_dict
from src.utils import is_account_dir
from src.utils import get_cached_post_filename
from src.utils import load_json
from src.utils import save_json
from src.utils import file_last_modified
from src.utils import set_config_param
from src.utils import has_users_path
from src.utils import get_full_domain
from src.utils import remove_id_ending
from src.utils import locate_post
from src.utils import get_domain_from_actor
from src.utils import get_nickname_from_actor
from src.utils import acct_dir
from src.utils import local_actor_url
from src.utils import has_actor
from src.utils import text_in_file
from src.utils import get_actor_from_post
from src.utils import evil_incarnate
from src.utils import evil_nickname
from src.conversation import mute_conversation
from src.conversation import unmute_conversation
from src.auth import create_basic_auth_header
from src.session import get_json
from src.data import load_string
from src.data import load_list
from src.data import save_string
from src.data import save_flag_file
from src.data import append_string
from src.data import erase_file
from src.data import move_file
from src.data import is_a_file
def get_global_block_reason(search_text: str,

View File

@ -9,49 +9,49 @@ __module_group__ = "ActivityPub"
import os
from content import replace_emoji_from_tags
from webapp_utils import html_header_with_external_style
from webapp_utils import html_header_with_blog_markup
from webapp_utils import html_footer
from webapp_utils import get_post_attachments_as_html
from webapp_utils import edit_text_area
from webapp_media import add_embedded_elements
from timeFunctions import date_from_string_format
from utils import replace_embedded_map_with_link
from utils import replace_strings
from utils import data_dir
from utils import remove_link_tracking
from utils import get_url_from_post
from utils import get_attributed_to
from utils import remove_eol
from utils import text_in_file
from utils import local_actor_url
from utils import get_actor_languages_list
from utils import get_base_content_from_post
from utils import get_content_from_post
from utils import is_account_dir
from utils import remove_html
from utils import get_config_param
from utils import get_full_domain
from utils import get_nickname_from_actor
from utils import get_domain_from_actor
from utils import locate_post
from utils import load_json
from utils import first_paragraph_from_string
from utils import get_actor_property_url
from utils import acct_dir
from utils import escape_text
from formats import get_media_formats
from posts import create_blogs_timeline
from newswire import rss2header
from newswire import rss2footer
from cache import get_person_from_cache
from flags import is_image_file
from data import load_string
from data import save_string
from data import load_list
from data import is_a_file
from data import is_a_dir
from src.content import replace_emoji_from_tags
from src.webapp_utils import html_header_with_external_style
from src.webapp_utils import html_header_with_blog_markup
from src.webapp_utils import html_footer
from src.webapp_utils import get_post_attachments_as_html
from src.webapp_utils import edit_text_area
from src.webapp_media import add_embedded_elements
from src.timeFunctions import date_from_string_format
from src.utils import replace_embedded_map_with_link
from src.utils import replace_strings
from src.utils import data_dir
from src.utils import remove_link_tracking
from src.utils import get_url_from_post
from src.utils import get_attributed_to
from src.utils import remove_eol
from src.utils import text_in_file
from src.utils import local_actor_url
from src.utils import get_actor_languages_list
from src.utils import get_base_content_from_post
from src.utils import get_content_from_post
from src.utils import is_account_dir
from src.utils import remove_html
from src.utils import get_config_param
from src.utils import get_full_domain
from src.utils import get_nickname_from_actor
from src.utils import get_domain_from_actor
from src.utils import locate_post
from src.utils import load_json
from src.utils import first_paragraph_from_string
from src.utils import get_actor_property_url
from src.utils import acct_dir
from src.utils import escape_text
from src.formats import get_media_formats
from src.posts import create_blogs_timeline
from src.newswire import rss2header
from src.newswire import rss2footer
from src.cache import get_person_from_cache
from src.flags import is_image_file
from src.data import load_string
from src.data import save_string
from src.data import load_list
from src.data import is_a_file
from src.data import is_a_dir
def _no_of_blog_replies(base_dir: str, http_prefix: str, translate: {},
@ -560,7 +560,7 @@ def _html_blog_post_rss3(domain: str, post_json_object: {},
def _html_blog_remove_cw_button(blog_str: str, translate: {}) -> str:
"""Removes the CW button from blog posts, where the
"""Removes the CW button from src.blog posts, where the
summary field is instead used as the blog title
"""
replacements = {

View File

@ -8,37 +8,37 @@ __status__ = "Production"
__module_group__ = "Timeline"
from pprint import pprint
from webfinger import webfinger_handle
from auth import create_basic_auth_header
from flags import url_permitted
from utils import get_url_from_post
from utils import remove_domain_port
from utils import has_users_path
from utils import get_full_domain
from utils import remove_id_ending
from utils import remove_post_from_cache
from utils import get_nickname_from_actor
from utils import get_domain_from_actor
from utils import locate_post
from utils import get_cached_post_filename
from utils import load_json
from utils import save_json
from utils import has_object_dict
from utils import acct_dir
from utils import local_actor_url
from utils import has_actor
from utils import has_object_string_type
from utils import text_in_file
from utils import remove_eol
from utils import remove_html
from utils import get_actor_from_post
from posts import get_person_box
from session import post_json
from data import load_string
from data import save_string
from data import prepend_string
from data import erase_file
from data import is_a_file
from src.webfinger import webfinger_handle
from src.auth import create_basic_auth_header
from src.flags import url_permitted
from src.utils import get_url_from_post
from src.utils import remove_domain_port
from src.utils import has_users_path
from src.utils import get_full_domain
from src.utils import remove_id_ending
from src.utils import remove_post_from_cache
from src.utils import get_nickname_from_actor
from src.utils import get_domain_from_actor
from src.utils import locate_post
from src.utils import get_cached_post_filename
from src.utils import load_json
from src.utils import save_json
from src.utils import has_object_dict
from src.utils import acct_dir
from src.utils import local_actor_url
from src.utils import has_actor
from src.utils import has_object_string_type
from src.utils import text_in_file
from src.utils import remove_eol
from src.utils import remove_html
from src.utils import get_actor_from_post
from src.posts import get_person_box
from src.session import post_json
from src.data import load_string
from src.data import save_string
from src.data import prepend_string
from src.data import erase_file
from src.data import is_a_file
def undo_bookmarks_collection_entry(recent_posts_cache: {},

View File

@ -8,8 +8,8 @@ __status__ = "Production"
__module_group__ = "Profile Metadata"
from utils import get_attachment_property_value
from utils import remove_html
from src.utils import get_attachment_property_value
from src.utils import remove_html
def get_briar_address(actor_json: {}) -> str:

View File

@ -9,33 +9,33 @@ __module_group__ = "Core"
import os
import json
from session import download_image
from session import url_exists
from session import get_json
from session import get_json_valid
from flags import url_permitted
from utils import remove_html
from utils import get_url_from_post
from utils import data_dir
from utils import get_attributed_to
from utils import remove_id_ending
from utils import get_post_attachments
from utils import has_object_dict
from utils import contains_statuses
from utils import load_json
from utils import save_json
from utils import get_file_case_insensitive
from utils import get_user_paths
from utils import is_yggdrasil_url
from formats import get_image_extensions
from timeFunctions import date_from_string_format
from timeFunctions import date_utcnow
from content import remove_script
from data import save_binary
from data import load_binary
from data import erase_file
from data import is_a_file
from data import is_a_dir
from src.session import download_image
from src.session import url_exists
from src.session import get_json
from src.session import get_json_valid
from src.flags import url_permitted
from src.utils import remove_html
from src.utils import get_url_from_post
from src.utils import data_dir
from src.utils import get_attributed_to
from src.utils import remove_id_ending
from src.utils import get_post_attachments
from src.utils import has_object_dict
from src.utils import contains_statuses
from src.utils import load_json
from src.utils import save_json
from src.utils import get_file_case_insensitive
from src.utils import get_user_paths
from src.utils import is_yggdrasil_url
from src.formats import get_image_extensions
from src.timeFunctions import date_from_string_format
from src.timeFunctions import date_utcnow
from src.content import remove_script
from src.data import save_binary
from src.data import load_binary
from src.data import erase_file
from src.data import is_a_file
from src.data import is_a_dir
def remove_person_from_cache(base_dir: str, person_url: str,

View File

@ -9,17 +9,17 @@ __module_group__ = "RSS Feeds"
import os
import datetime
from timeFunctions import date_utcnow
from timeFunctions import date_epoch
from utils import data_dir
from utils import replace_strings
from utils import get_invalid_characters
from data import load_string
from data import save_string
from data import erase_file
from data import is_a_file
from data import is_a_dir
from data import makedir
from src.timeFunctions import date_utcnow
from src.timeFunctions import date_epoch
from src.utils import data_dir
from src.utils import replace_strings
from src.utils import get_invalid_characters
from src.data import load_string
from src.data import save_string
from src.data import erase_file
from src.data import is_a_file
from src.data import is_a_dir
from src.data import makedir
MAX_TAG_LENGTH = 42

View File

@ -16,10 +16,10 @@ import datetime
import random
import math
from random import randint
from utils import acct_dir
from utils import remove_eol
from data import load_string
from data import is_a_file
from src.utils import acct_dir
from src.utils import remove_eol
from src.data import load_string
from src.data import is_a_file
# states which the simulated city dweller can be in
PERSON_SLEEP = 0

View File

@ -15,50 +15,50 @@ import email.parser
import urllib.parse
from shutil import copyfile
from dateutil.parser import parse
from timeFunctions import convert_published_to_local_timezone
from flags import is_pgp_encrypted
from flags import contains_pgp_public_key
from flags import is_float
from flags import is_right_to_left_text
from utils import resembles_domain
from utils import string_starts_with
from utils import replace_strings
from utils import data_dir
from utils import remove_link_tracking
from utils import string_contains
from utils import string_ends_with
from utils import is_account_dir
from utils import get_url_from_post
from utils import language_right_to_left
from utils import binary_is_image
from utils import get_content_from_post
from utils import get_full_domain
from utils import get_user_paths
from utils import has_object_dict
from utils import valid_hash_tag
from utils import dangerous_svg
from utils import remove_domain_port
from utils import load_json
from utils import save_json
from utils import file_last_modified
from utils import get_link_prefixes
from utils import dangerous_markup
from utils import acct_dir
from utils import get_currencies
from utils import remove_html
from utils import remove_eol
from utils import is_yggdrasil_address
from formats import get_image_extensions
from petnames import get_pet_name
from session import download_image
from data import load_string
from data import save_string
from data import save_binary
from data import append_string
from data import erase_file
from data import is_a_file
from data import is_a_dir
from data import makedir
from src.timeFunctions import convert_published_to_local_timezone
from src.flags import is_pgp_encrypted
from src.flags import contains_pgp_public_key
from src.flags import is_float
from src.flags import is_right_to_left_text
from src.utils import resembles_domain
from src.utils import string_starts_with
from src.utils import replace_strings
from src.utils import data_dir
from src.utils import remove_link_tracking
from src.utils import string_contains
from src.utils import string_ends_with
from src.utils import is_account_dir
from src.utils import get_url_from_post
from src.utils import language_right_to_left
from src.utils import binary_is_image
from src.utils import get_content_from_post
from src.utils import get_full_domain
from src.utils import get_user_paths
from src.utils import has_object_dict
from src.utils import valid_hash_tag
from src.utils import dangerous_svg
from src.utils import remove_domain_port
from src.utils import load_json
from src.utils import save_json
from src.utils import file_last_modified
from src.utils import get_link_prefixes
from src.utils import dangerous_markup
from src.utils import acct_dir
from src.utils import get_currencies
from src.utils import remove_html
from src.utils import remove_eol
from src.utils import is_yggdrasil_address
from src.formats import get_image_extensions
from src.petnames import get_pet_name
from src.session import download_image
from src.data import load_string
from src.data import save_string
from src.data import save_binary
from src.data import append_string
from src.data import erase_file
from src.data import is_a_file
from src.data import is_a_dir
from src.data import makedir
MUSIC_SITES = ('soundcloud.com', 'bandcamp.com', 'resonate.coop')
@ -1684,7 +1684,7 @@ def _valid_follows_csv(content: str) -> bool:
def save_media_in_form_post(media_bytes, debug: bool,
filename_base: str) -> (str, str):
"""Saves the given media bytes extracted from http form POST
"""Saves the given media bytes extracted from src.http form POST
Returns the filename and attachment type
"""
if not media_bytes:

View File

@ -7,26 +7,26 @@ __email__ = "bob@libreserver.org"
__status__ = "Production"
__module_group__ = "Timeline"
from utils import has_object_dict
from utils import acct_dir
from utils import remove_id_ending
from utils import text_in_file
from utils import locate_post
from utils import load_json
from utils import harmless_markup
from utils import get_attributed_to
from utils import get_reply_to
from utils import resembles_url
from keys import get_instance_actor_key
from session import get_json
from session import get_json_valid
from data import save_string
from data import save_flag_file
from data import append_string
from data import erase_file
from data import is_a_file
from data import is_a_dir
from data import makedir
from src.utils import has_object_dict
from src.utils import acct_dir
from src.utils import remove_id_ending
from src.utils import text_in_file
from src.utils import locate_post
from src.utils import load_json
from src.utils import harmless_markup
from src.utils import get_attributed_to
from src.utils import get_reply_to
from src.utils import resembles_url
from src.keys import get_instance_actor_key
from src.session import get_json
from src.session import get_json_valid
from src.data import save_string
from src.data import save_flag_file
from src.data import append_string
from src.data import erase_file
from src.data import is_a_file
from src.data import is_a_dir
from src.data import makedir
def _get_conversation_filename(base_dir: str, nickname: str, domain: str,

View File

@ -7,20 +7,20 @@ __email__ = "bob@libreserver.org"
__status__ = "Production"
__module_group__ = "Core"
from utils import data_dir
from utils import save_json
from utils import user_agent_domain
from utils import remove_eol
from timeFunctions import get_current_time_int
from blocking import get_mil_domains_list
from blocking import get_gov_domains_list
from blocking import get_bsky_domains_list
from blocking import get_nostr_domains_list
from blocking import update_blocked_cache
from blocking import is_blocked_domain
from data import load_string
from data import save_string
from data import is_a_file
from src.utils import data_dir
from src.utils import save_json
from src.utils import user_agent_domain
from src.utils import remove_eol
from src.timeFunctions import get_current_time_int
from src.blocking import get_mil_domains_list
from src.blocking import get_gov_domains_list
from src.blocking import get_bsky_domains_list
from src.blocking import get_nostr_domains_list
from src.blocking import update_blocked_cache
from src.blocking import is_blocked_domain
from src.data import load_string
from src.data import save_string
from src.data import is_a_file
default_user_agent_blocks = [
'fedilist', 'ncsc scan', 'fedifetcher'

View File

@ -8,13 +8,13 @@ __status__ = "Production"
__module_group__ = "Core"
import os
from utils import load_json
from utils import get_content_from_post
from utils import content_is_single_url
from utils import is_yggdrasil_address
from utils import get_attributed_to
from utils import has_object_dict
from data import is_a_dir
from src.utils import load_json
from src.utils import get_content_from_post
from src.utils import content_is_single_url
from src.utils import is_yggdrasil_address
from src.utils import get_attributed_to
from src.utils import has_object_dict
from src.data import is_a_dir
def load_cw_lists(base_dir: str, verbose: bool) -> {}:

View File

@ -8,8 +8,8 @@ __status__ = "Production"
__module_group__ = "Profile Metadata"
import re
from utils import get_attachment_property_value
from utils import remove_html
from src.utils import get_attachment_property_value
from src.utils import remove_html
def get_cwtch_address(actor_json: {}) -> str:

View File

@ -15,101 +15,101 @@ from socket import error as SocketError
import errno
from functools import partial
# for saving images
from metadata import metadata_custom_emoji
from person import update_memorial_flags
from person import clear_person_qrcodes
from person import create_shared_inbox
from person import create_news_inbox
from keys import get_instance_actor_key
from posts import expire_cache
from inbox import run_inbox_queue
from inbox import run_inbox_queue_watchdog
from follow import create_initial_last_seen
from threads import begin_thread
from threads import thread_with_trace
from threads import remove_dormant_threads
from cwlists import load_cw_lists
from blocking import run_federated_blocks_daemon
from blocking import load_federated_blocks_endpoints
from blocking import load_blocked_military
from blocking import load_blocked_government
from blocking import load_blocked_bluesky
from blocking import load_blocked_nostr
from blocking import update_blocked_cache
from blocking import set_broch_mode
from webapp_utils import load_buy_sites
from webapp_accesskeys import load_access_keys_for_accounts
from webapp_media import load_peertube_instances
from webapp_media import load_loops_instances
from shares import run_federated_shares_daemon
from shares import run_federated_shares_watchdog
from shares import create_shared_item_federation_token
from shares import generate_shared_item_federation_tokens
from shares import expire_shares
from categories import load_city_hashtags
from categories import update_hashtag_categories
from languages import load_default_post_languages
from searchable import load_searchable_by_default
from timeFunctions import load_account_timezones
from utils import set_accounts_data_dir
from utils import data_dir
from utils import check_bad_path
from utils import acct_handle_dir
from utils import load_reverse_timeline
from utils import load_min_images_for_accounts
from utils import load_translations_from_file
from utils import load_bold_reading
from utils import load_hide_follows
from utils import load_hide_recent_posts
from utils import get_full_domain
from utils import set_config_param
from utils import get_config_param
from utils import load_json
from utils import load_instance_software
from utils import is_yggdrasil_address
from mitm import load_mitm_servers
from content import load_auto_cw_cache
from content import load_dogwhistles
from theme import scan_themes_for_scripts
from theme import is_news_theme_name
from theme import set_news_avatar
from textmode import get_text_mode_banner
from schedule import run_post_schedule
from schedule import run_post_schedule_watchdog
from happening import dav_propfind_response
from happening import dav_put_response
from happening import dav_report_response
from happening import dav_delete_response
from newswire import load_hashtag_categories
from newsdaemon import run_newswire_watchdog
from newsdaemon import run_newswire_daemon
from fitnessFunctions import fitness_thread
from siteactive import load_unavailable_sites
from crawlers import load_known_web_bots
from qrcode import save_domain_qrcode
from importFollowing import run_import_following_watchdog
from relationships import update_moved_actors
from daemon_get import daemon_http_get
from daemon_post import daemon_http_post
from daemon_head import daemon_http_head
from httpcodes import http_200
from httpcodes import http_201
from httpcodes import http_207
from httpcodes import http_403
from httpcodes import http_404
from httpcodes import http_304
from httpcodes import http_400
from httpcodes import write2
from httpheaders import set_headers
from daemon_utils import load_known_epicyon_instances
from daemon_utils import has_accept
from daemon_utils import is_authorized
from poison import load_dictionary
from poison import load_2grams
from data import load_string
from data import is_a_file
from data import is_a_dir
from data import makedir
from src.metadata import metadata_custom_emoji
from src.person import update_memorial_flags
from src.person import clear_person_qrcodes
from src.person import create_shared_inbox
from src.person import create_news_inbox
from src.keys import get_instance_actor_key
from src.posts import expire_cache
from src.inbox import run_inbox_queue
from src.inbox import run_inbox_queue_watchdog
from src.follow import create_initial_last_seen
from src.threads import begin_thread
from src.threads import thread_with_trace
from src.threads import remove_dormant_threads
from src.cwlists import load_cw_lists
from src.blocking import run_federated_blocks_daemon
from src.blocking import load_federated_blocks_endpoints
from src.blocking import load_blocked_military
from src.blocking import load_blocked_government
from src.blocking import load_blocked_bluesky
from src.blocking import load_blocked_nostr
from src.blocking import update_blocked_cache
from src.blocking import set_broch_mode
from src.webapp_utils import load_buy_sites
from src.webapp_accesskeys import load_access_keys_for_accounts
from src.webapp_media import load_peertube_instances
from src.webapp_media import load_loops_instances
from src.shares import run_federated_shares_daemon
from src.shares import run_federated_shares_watchdog
from src.shares import create_shared_item_federation_token
from src.shares import generate_shared_item_federation_tokens
from src.shares import expire_shares
from src.categories import load_city_hashtags
from src.categories import update_hashtag_categories
from src.languages import load_default_post_languages
from src.searchable import load_searchable_by_default
from src.timeFunctions import load_account_timezones
from src.utils import set_accounts_data_dir
from src.utils import data_dir
from src.utils import check_bad_path
from src.utils import acct_handle_dir
from src.utils import load_reverse_timeline
from src.utils import load_min_images_for_accounts
from src.utils import load_translations_from_file
from src.utils import load_bold_reading
from src.utils import load_hide_follows
from src.utils import load_hide_recent_posts
from src.utils import get_full_domain
from src.utils import set_config_param
from src.utils import get_config_param
from src.utils import load_json
from src.utils import load_instance_software
from src.utils import is_yggdrasil_address
from src.mitm import load_mitm_servers
from src.content import load_auto_cw_cache
from src.content import load_dogwhistles
from src.theme import scan_themes_for_scripts
from src.theme import is_news_theme_name
from src.theme import set_news_avatar
from src.textmode import get_text_mode_banner
from src.schedule import run_post_schedule
from src.schedule import run_post_schedule_watchdog
from src.happening import dav_propfind_response
from src.happening import dav_put_response
from src.happening import dav_report_response
from src.happening import dav_delete_response
from src.newswire import load_hashtag_categories
from src.newsdaemon import run_newswire_watchdog
from src.newsdaemon import run_newswire_daemon
from src.fitnessFunctions import fitness_thread
from src.siteactive import load_unavailable_sites
from src.crawlers import load_known_web_bots
from src.qrcode import save_domain_qrcode
from src.importFollowing import run_import_following_watchdog
from src.relationships import update_moved_actors
from src.daemon_get import daemon_http_get
from src.daemon_post import daemon_http_post
from src.daemon_head import daemon_http_head
from src.httpcodes import http_200
from src.httpcodes import http_201
from src.httpcodes import http_207
from src.httpcodes import http_403
from src.httpcodes import http_404
from src.httpcodes import http_304
from src.httpcodes import http_400
from src.httpcodes import write2
from src.httpheaders import set_headers
from src.daemon_utils import load_known_epicyon_instances
from src.daemon_utils import has_accept
from src.daemon_utils import is_authorized
from src.poison import load_dictionary
from src.poison import load_2grams
from src.data import load_string
from src.data import is_a_file
from src.data import is_a_dir
from src.data import makedir
class PubServer(BaseHTTPRequestHandler):

View File

@ -10,218 +10,218 @@ __module_group__ = "Daemon"
import time
import json
import urllib.parse
from siteactive import referer_is_active
from maps import map_format_from_tagmaps_path
from blog import html_edit_blog
from blog import html_blog_post
from blog import path_contains_blog_link
from blog import html_blog_view
from speaker import get_ssml_box
from follow import pending_followers_timeline_json
from blocking import broch_mode_is_active
from blocking import remove_global_block
from blocking import update_blocked_cache
from blocking import add_global_block
from blocking import blocked_timeline_json
from cache import get_person_from_cache
from webapp_moderation import html_account_info
from webapp_calendar import html_calendar_delete_confirm
from webapp_calendar import html_calendar
from webapp_hashtagswarm import html_search_hashtag_category
from webapp_minimalbutton import set_minimal
from webapp_minimalbutton import is_minimal
from webapp_search import html_search_emoji_text_entry
from webapp_search import html_search
from webapp_search import html_hashtag_search_remote
from webapp_column_left import html_links_mobile
from webapp_column_right import html_newswire_mobile
from webapp_theme_designer import html_theme_designer
from webapp_accesskeys import html_access_keys
from webapp_manual import html_manual
from webapp_specification import html_specification
from webapp_about import html_about
from webapp_tos import html_terms_of_service
from webapp_confirm import html_confirm_remove_shared_item
from webapp_welcome_profile import html_welcome_profile
from webapp_welcome_final import html_welcome_final
from webapp_welcome import html_welcome_screen
from webapp_welcome import is_welcome_screen_complete
from webapp_podcast import html_podcast_episode
from webapp_utils import html_known_epicyon_instances
from webapp_utils import get_default_path
from webapp_utils import csv_following_list
from webapp_utils import get_shares_collection
from webapp_utils import html_following_list
from webapp_utils import html_show_share
from webapp_login import html_login
from followerSync import update_followers_sync_cache
from securemode import secure_mode
from fitnessFunctions import sorted_watch_points
from fitnessFunctions import fitness_performance
from fitnessFunctions import html_watch_points_graph
from session import establish_session
from session import get_session_for_domains
from crawlers import blocked_user_agent
from daemon_utils import etag_exists
from daemon_utils import has_accept
from daemon_utils import show_person_options
from daemon_utils import is_authorized
from daemon_utils import get_user_agent
from daemon_utils import log_epicyon_instances
from httpheaders import update_headers_catalog
from httpheaders import set_headers_etag
from httpheaders import login_headers
from httpheaders import redirect_headers
from httprequests import request_icalendar
from httprequests import request_ssml
from httprequests import request_csv
from httprequests import request_http
from httpheaders import set_headers
from httpheaders import logout_headers
from httpheaders import logout_redirect
from httpheaders import contains_suspicious_headers
from httpcodes import http_200
from httpcodes import http_402
from httpcodes import http_403
from httpcodes import http_404
from httpcodes import http_304
from httpcodes import http_400
from httpcodes import http_503
from httpcodes import write2
from flags import is_moderator
from flags import is_corporate
from flags import is_image_file
from flags import is_artist
from flags import is_blog_post
from timeFunctions import date_utcnow
from timeFunctions import get_current_time_int
from utils import resembles_domain
from utils import string_starts_with
from utils import is_yggdrasil_address
from utils import replace_strings
from utils import contains_invalid_chars
from utils import save_json
from utils import data_dir
from utils import user_agent_domain
from utils import local_network_host
from utils import permitted_dir
from utils import has_users_path
from utils import replace_users_with_at
from utils import remove_id_ending
from utils import local_actor_url
from utils import load_json
from utils import acct_dir
from utils import get_instance_url
from utils import convert_domains
from utils import get_nickname_from_actor
from utils import get_json_content_from_accept
from utils import check_bad_path
from utils import decoded_host
from formats import media_file_mime_type
from mitm import detect_mitm
from person import get_person_notes_endpoint
from person import get_account_pub_key
from shares import actor_attached_shares
from shares import get_share_category
from shares import vf_proposal_from_id
from shares import authorize_shared_items
from shares import shares_catalog_endpoint
from shares import shares_catalog_account_endpoint
from shares import shares_catalog_csv_endpoint
from posts import get_pinned_post_as_json
from posts import outbox_message_create_wrap
from daemon_get_masto_api import masto_api
from daemon_get_favicon import show_cached_favicon
from daemon_get_favicon import get_favicon
from daemon_get_exports import get_exported_blocks
from daemon_get_exports import get_exported_theme
from daemon_get_pwa import progressive_web_app_manifest
from daemon_get_css import get_fonts
from daemon_get_css import get_style_sheet
from daemon_get_nodeinfo import get_nodeinfo
from daemon_get_hashtag import hashtag_search_rss2
from daemon_get_hashtag import hashtag_search_json2
from daemon_get_hashtag import hashtag_search2
from daemon_get_hashtag import get_hashtag_categories_feed2
from daemon_get_timeline import show_media_timeline
from daemon_get_timeline import show_blogs_timeline
from daemon_get_timeline import show_news_timeline
from daemon_get_timeline import show_features_timeline
from daemon_get_timeline import show_shares_timeline
from daemon_get_timeline import show_wanted_timeline
from daemon_get_timeline import show_bookmarks_timeline
from daemon_get_timeline import show_outbox_timeline
from daemon_get_timeline import show_mod_timeline
from daemon_get_timeline import show_dms
from daemon_get_timeline import show_replies
from daemon_get_timeline import show_inbox
from daemon_get_feeds import show_shares_feed
from daemon_get_feeds import show_following_feed
from daemon_get_feeds import show_moved_feed
from daemon_get_feeds import show_inactive_feed
from daemon_get_feeds import show_followers_feed
from daemon_get_buttons_announce import announce_button
from daemon_get_buttons_announce import announce_button_undo
from daemon_get_buttons import follow_approve_button
from daemon_get_buttons import follow_deny_button
from daemon_get_buttons_like import like_button
from daemon_get_buttons_like import like_button_undo
from daemon_get_buttons_reaction import reaction_button
from daemon_get_buttons_reaction import reaction_button_undo
from daemon_get_buttons_bookmark import bookmark_button
from daemon_get_buttons_bookmark import bookmark_button_undo
from daemon_get_buttons import delete_button
from daemon_get_buttons_mute import mute_button
from daemon_get_buttons_mute import mute_button_undo
from daemon_get_newswire import get_newswire_feed
from daemon_get_newswire import newswire_vote
from daemon_get_newswire import newswire_unvote
from daemon_get_newswire import edit_newswire2
from daemon_get_newswire import edit_news_post2
from daemon_get_rss import get_rss2feed
from daemon_get_rss import get_rss2site
from daemon_get_rss import get_rss3feed
from daemon_get_profile import show_person_profile
from daemon_get_profile import show_skills
from daemon_get_profile import show_roles
from daemon_get_profile import edit_profile2
from daemon_get_images import show_avatar_or_banner
from daemon_get_images import show_cached_avatar
from daemon_get_images import show_help_screen_image
from daemon_get_images import show_manual_image
from daemon_get_images import show_specification_image
from daemon_get_images import show_icon
from daemon_get_images import show_share_image
from daemon_get_images import show_media
from daemon_get_images import show_background_image
from daemon_get_images import show_default_profile_background
from daemon_get_images import column_image
from daemon_get_images import search_screen_banner
from daemon_get_images import show_qrcode
from daemon_get_images import show_emoji
from daemon_get_post import show_individual_post
from daemon_get_post import show_notify_post
from daemon_get_post import show_replies_to_post
from daemon_get_post import show_announcers_of_post
from daemon_get_post import show_likers_of_post
from daemon_get_post import show_individual_at_post
from daemon_get_post import show_new_post
from daemon_get_post import show_conversation_thread
from daemon_get_collections import get_featured_collection
from daemon_get_collections import get_featured_tags_collection
from daemon_get_collections import get_following_json
from daemon_get_webfinger import get_webfinger
from daemon_get_reactions import reaction_picker2
from daemon_get_instance_actor import show_instance_actor
from daemon_get_vcard import show_vcard
from daemon_get_blog import show_blog_page
from daemon_get_links import edit_links2
from daemon_get_login import redirect_to_login_screen
from daemon_get_login import show_login_screen
from poison import html_poisoned
from data import load_string
from data import load_binary
from data import is_a_file
from src.siteactive import referer_is_active
from src.maps import map_format_from_tagmaps_path
from src.blog import html_edit_blog
from src.blog import html_blog_post
from src.blog import path_contains_blog_link
from src.blog import html_blog_view
from src.speaker import get_ssml_box
from src.follow import pending_followers_timeline_json
from src.blocking import broch_mode_is_active
from src.blocking import remove_global_block
from src.blocking import update_blocked_cache
from src.blocking import add_global_block
from src.blocking import blocked_timeline_json
from src.cache import get_person_from_cache
from src.webapp_moderation import html_account_info
from src.webapp_calendar import html_calendar_delete_confirm
from src.webapp_calendar import html_calendar
from src.webapp_hashtagswarm import html_search_hashtag_category
from src.webapp_minimalbutton import set_minimal
from src.webapp_minimalbutton import is_minimal
from src.webapp_search import html_search_emoji_text_entry
from src.webapp_search import html_search
from src.webapp_search import html_hashtag_search_remote
from src.webapp_column_left import html_links_mobile
from src.webapp_column_right import html_newswire_mobile
from src.webapp_theme_designer import html_theme_designer
from src.webapp_accesskeys import html_access_keys
from src.webapp_manual import html_manual
from src.webapp_specification import html_specification
from src.webapp_about import html_about
from src.webapp_tos import html_terms_of_service
from src.webapp_confirm import html_confirm_remove_shared_item
from src.webapp_welcome_profile import html_welcome_profile
from src.webapp_welcome_final import html_welcome_final
from src.webapp_welcome import html_welcome_screen
from src.webapp_welcome import is_welcome_screen_complete
from src.webapp_podcast import html_podcast_episode
from src.webapp_utils import html_known_epicyon_instances
from src.webapp_utils import get_default_path
from src.webapp_utils import csv_following_list
from src.webapp_utils import get_shares_collection
from src.webapp_utils import html_following_list
from src.webapp_utils import html_show_share
from src.webapp_login import html_login
from src.followerSync import update_followers_sync_cache
from src.securemode import secure_mode
from src.fitnessFunctions import sorted_watch_points
from src.fitnessFunctions import fitness_performance
from src.fitnessFunctions import html_watch_points_graph
from src.session import establish_session
from src.session import get_session_for_domains
from src.crawlers import blocked_user_agent
from src.daemon_utils import etag_exists
from src.daemon_utils import has_accept
from src.daemon_utils import show_person_options
from src.daemon_utils import is_authorized
from src.daemon_utils import get_user_agent
from src.daemon_utils import log_epicyon_instances
from src.httpheaders import update_headers_catalog
from src.httpheaders import set_headers_etag
from src.httpheaders import login_headers
from src.httpheaders import redirect_headers
from src.httprequests import request_icalendar
from src.httprequests import request_ssml
from src.httprequests import request_csv
from src.httprequests import request_http
from src.httpheaders import set_headers
from src.httpheaders import logout_headers
from src.httpheaders import logout_redirect
from src.httpheaders import contains_suspicious_headers
from src.httpcodes import http_200
from src.httpcodes import http_402
from src.httpcodes import http_403
from src.httpcodes import http_404
from src.httpcodes import http_304
from src.httpcodes import http_400
from src.httpcodes import http_503
from src.httpcodes import write2
from src.flags import is_moderator
from src.flags import is_corporate
from src.flags import is_image_file
from src.flags import is_artist
from src.flags import is_blog_post
from src.timeFunctions import date_utcnow
from src.timeFunctions import get_current_time_int
from src.utils import resembles_domain
from src.utils import string_starts_with
from src.utils import is_yggdrasil_address
from src.utils import replace_strings
from src.utils import contains_invalid_chars
from src.utils import save_json
from src.utils import data_dir
from src.utils import user_agent_domain
from src.utils import local_network_host
from src.utils import permitted_dir
from src.utils import has_users_path
from src.utils import replace_users_with_at
from src.utils import remove_id_ending
from src.utils import local_actor_url
from src.utils import load_json
from src.utils import acct_dir
from src.utils import get_instance_url
from src.utils import convert_domains
from src.utils import get_nickname_from_actor
from src.utils import get_json_content_from_accept
from src.utils import check_bad_path
from src.utils import decoded_host
from src.formats import media_file_mime_type
from src.mitm import detect_mitm
from src.person import get_person_notes_endpoint
from src.person import get_account_pub_key
from src.shares import actor_attached_shares
from src.shares import get_share_category
from src.shares import vf_proposal_from_id
from src.shares import authorize_shared_items
from src.shares import shares_catalog_endpoint
from src.shares import shares_catalog_account_endpoint
from src.shares import shares_catalog_csv_endpoint
from src.posts import get_pinned_post_as_json
from src.posts import outbox_message_create_wrap
from src.daemon_get_masto_api import masto_api
from src.daemon_get_favicon import show_cached_favicon
from src.daemon_get_favicon import get_favicon
from src.daemon_get_exports import get_exported_blocks
from src.daemon_get_exports import get_exported_theme
from src.daemon_get_pwa import progressive_web_app_manifest
from src.daemon_get_css import get_fonts
from src.daemon_get_css import get_style_sheet
from src.daemon_get_nodeinfo import get_nodeinfo
from src.daemon_get_hashtag import hashtag_search_rss2
from src.daemon_get_hashtag import hashtag_search_json2
from src.daemon_get_hashtag import hashtag_search2
from src.daemon_get_hashtag import get_hashtag_categories_feed2
from src.daemon_get_timeline import show_media_timeline
from src.daemon_get_timeline import show_blogs_timeline
from src.daemon_get_timeline import show_news_timeline
from src.daemon_get_timeline import show_features_timeline
from src.daemon_get_timeline import show_shares_timeline
from src.daemon_get_timeline import show_wanted_timeline
from src.daemon_get_timeline import show_bookmarks_timeline
from src.daemon_get_timeline import show_outbox_timeline
from src.daemon_get_timeline import show_mod_timeline
from src.daemon_get_timeline import show_dms
from src.daemon_get_timeline import show_replies
from src.daemon_get_timeline import show_inbox
from src.daemon_get_feeds import show_shares_feed
from src.daemon_get_feeds import show_following_feed
from src.daemon_get_feeds import show_moved_feed
from src.daemon_get_feeds import show_inactive_feed
from src.daemon_get_feeds import show_followers_feed
from src.daemon_get_buttons_announce import announce_button
from src.daemon_get_buttons_announce import announce_button_undo
from src.daemon_get_buttons import follow_approve_button
from src.daemon_get_buttons import follow_deny_button
from src.daemon_get_buttons_like import like_button
from src.daemon_get_buttons_like import like_button_undo
from src.daemon_get_buttons_reaction import reaction_button
from src.daemon_get_buttons_reaction import reaction_button_undo
from src.daemon_get_buttons_bookmark import bookmark_button
from src.daemon_get_buttons_bookmark import bookmark_button_undo
from src.daemon_get_buttons import delete_button
from src.daemon_get_buttons_mute import mute_button
from src.daemon_get_buttons_mute import mute_button_undo
from src.daemon_get_newswire import get_newswire_feed
from src.daemon_get_newswire import newswire_vote
from src.daemon_get_newswire import newswire_unvote
from src.daemon_get_newswire import edit_newswire2
from src.daemon_get_newswire import edit_news_post2
from src.daemon_get_rss import get_rss2feed
from src.daemon_get_rss import get_rss2site
from src.daemon_get_rss import get_rss3feed
from src.daemon_get_profile import show_person_profile
from src.daemon_get_profile import show_skills
from src.daemon_get_profile import show_roles
from src.daemon_get_profile import edit_profile2
from src.daemon_get_images import show_avatar_or_banner
from src.daemon_get_images import show_cached_avatar
from src.daemon_get_images import show_help_screen_image
from src.daemon_get_images import show_manual_image
from src.daemon_get_images import show_specification_image
from src.daemon_get_images import show_icon
from src.daemon_get_images import show_share_image
from src.daemon_get_images import show_media
from src.daemon_get_images import show_background_image
from src.daemon_get_images import show_default_profile_background
from src.daemon_get_images import column_image
from src.daemon_get_images import search_screen_banner
from src.daemon_get_images import show_qrcode
from src.daemon_get_images import show_emoji
from src.daemon_get_post import show_individual_post
from src.daemon_get_post import show_notify_post
from src.daemon_get_post import show_replies_to_post
from src.daemon_get_post import show_announcers_of_post
from src.daemon_get_post import show_likers_of_post
from src.daemon_get_post import show_individual_at_post
from src.daemon_get_post import show_new_post
from src.daemon_get_post import show_conversation_thread
from src.daemon_get_collections import get_featured_collection
from src.daemon_get_collections import get_featured_tags_collection
from src.daemon_get_collections import get_following_json
from src.daemon_get_webfinger import get_webfinger
from src.daemon_get_reactions import reaction_picker2
from src.daemon_get_instance_actor import show_instance_actor
from src.daemon_get_vcard import show_vcard
from src.daemon_get_blog import show_blog_page
from src.daemon_get_links import edit_links2
from src.daemon_get_login import redirect_to_login_screen
from src.daemon_get_login import show_login_screen
from src.poison import html_poisoned
from src.data import load_string
from src.data import load_binary
from src.data import is_a_file
# Blogs can be longer, so don't show many per page
MAX_POSTS_IN_BLOGS_FEED = 4

View File

@ -7,12 +7,12 @@ __email__ = "bob@libreserver.org"
__status__ = "Production"
__module_group__ = "Daemon GET"
from httpcodes import write2
from session import establish_session
from httpcodes import http_404
from httpheaders import set_headers
from blog import html_blog_page
from fitnessFunctions import fitness_performance
from src.httpcodes import write2
from src.session import establish_session
from src.httpcodes import http_404
from src.httpheaders import set_headers
from src.blog import html_blog_page
from src.fitnessFunctions import fitness_performance
def show_blog_page(self, authorized: bool,

View File

@ -9,21 +9,21 @@ __email__ = "bob@libreserver.org"
__status__ = "Production"
__module_group__ = "Daemon GET"
from manualapprove import manual_deny_follow_request_thread
from manualapprove import manual_approve_follow_request_thread
from fitnessFunctions import fitness_performance
from session import establish_session
from httpheaders import set_headers
from httpheaders import redirect_headers
from httpcodes import write2
from httpcodes import http_400
from httpcodes import http_404
from utils import get_full_domain
from utils import get_domain_from_actor
from utils import get_nickname_from_actor
from utils import is_yggdrasil_address
from utils import is_yggdrasil_url
from webapp_confirm import html_confirm_delete
from src.manualapprove import manual_deny_follow_request_thread
from src.manualapprove import manual_approve_follow_request_thread
from src.fitnessFunctions import fitness_performance
from src.session import establish_session
from src.httpheaders import set_headers
from src.httpheaders import redirect_headers
from src.httpcodes import write2
from src.httpcodes import http_400
from src.httpcodes import http_404
from src.utils import get_full_domain
from src.utils import get_domain_from_actor
from src.utils import get_nickname_from_actor
from src.utils import is_yggdrasil_address
from src.utils import is_yggdrasil_url
from src.webapp_confirm import html_confirm_delete
def follow_approve_button(self, calling_domain: str, path: str,

View File

@ -9,27 +9,27 @@ __email__ = "bob@libreserver.org"
__status__ = "Production"
__module_group__ = "Daemon GET"
from utils import get_mutuals_of_person
from utils import delete_post
from utils import locate_post
from utils import is_dm
from utils import get_cached_post_filename
from utils import remove_id_ending
from utils import local_actor_url
from utils import get_nickname_from_actor
from utils import get_instance_url
from utils import is_yggdrasil_url
from mitm import detect_mitm
from httpheaders import redirect_headers
from session import establish_session
from httpcodes import http_404
from announce import create_announce
from posts import save_post_to_box
from daemon_utils import post_to_outbox
from fitnessFunctions import fitness_performance
from follow import follower_approval_active
from webapp_post import individual_post_as_html
from data import is_a_file
from src.utils import get_mutuals_of_person
from src.utils import delete_post
from src.utils import locate_post
from src.utils import is_dm
from src.utils import get_cached_post_filename
from src.utils import remove_id_ending
from src.utils import local_actor_url
from src.utils import get_nickname_from_actor
from src.utils import get_instance_url
from src.utils import is_yggdrasil_url
from src.mitm import detect_mitm
from src.httpheaders import redirect_headers
from src.session import establish_session
from src.httpcodes import http_404
from src.announce import create_announce
from src.posts import save_post_to_box
from src.daemon_utils import post_to_outbox
from src.fitnessFunctions import fitness_performance
from src.follow import follower_approval_active
from src.webapp_post import individual_post_as_html
from src.data import is_a_file
def announce_button(self, calling_domain: str, path: str,

View File

@ -9,25 +9,25 @@ __email__ = "bob@libreserver.org"
__status__ = "Production"
__module_group__ = "Daemon GET"
from utils import get_mutuals_of_person
from utils import get_cached_post_filename
from utils import load_json
from utils import locate_post
from utils import is_dm
from utils import get_nickname_from_actor
from utils import get_instance_url
from utils import local_actor_url
from utils import is_yggdrasil_url
from mitm import detect_mitm
from session import establish_session
from httpheaders import redirect_headers
from httpcodes import http_404
from bookmarks import bookmark_post
from bookmarks import undo_bookmark_post
from follow import follower_approval_active
from webapp_post import individual_post_as_html
from fitnessFunctions import fitness_performance
from data import is_a_file
from src.utils import get_mutuals_of_person
from src.utils import get_cached_post_filename
from src.utils import load_json
from src.utils import locate_post
from src.utils import is_dm
from src.utils import get_nickname_from_actor
from src.utils import get_instance_url
from src.utils import local_actor_url
from src.utils import is_yggdrasil_url
from src.mitm import detect_mitm
from src.session import establish_session
from src.httpheaders import redirect_headers
from src.httpcodes import http_404
from src.bookmarks import bookmark_post
from src.bookmarks import undo_bookmark_post
from src.follow import follower_approval_active
from src.webapp_post import individual_post_as_html
from src.fitnessFunctions import fitness_performance
from src.data import is_a_file
def bookmark_button(self, calling_domain: str, path: str,

View File

@ -9,27 +9,27 @@ __email__ = "bob@libreserver.org"
__status__ = "Production"
__module_group__ = "Daemon GET"
from utils import get_mutuals_of_person
from utils import is_dm
from utils import get_cached_post_filename
from utils import load_json
from utils import locate_post
from utils import local_actor_url
from utils import get_nickname_from_actor
from utils import get_instance_url
from utils import is_yggdrasil_url
from mitm import detect_mitm
from daemon_utils import post_to_outbox
from follow import follower_approval_active
from httpheaders import redirect_headers
from session import establish_session
from httpcodes import http_404
from posts import get_original_post_from_announce_url
from fitnessFunctions import fitness_performance
from like import update_likes_collection
from like import undo_likes_collection_entry
from webapp_post import individual_post_as_html
from data import is_a_file
from src.utils import get_mutuals_of_person
from src.utils import is_dm
from src.utils import get_cached_post_filename
from src.utils import load_json
from src.utils import locate_post
from src.utils import local_actor_url
from src.utils import get_nickname_from_actor
from src.utils import get_instance_url
from src.utils import is_yggdrasil_url
from src.mitm import detect_mitm
from src.daemon_utils import post_to_outbox
from src.follow import follower_approval_active
from src.httpheaders import redirect_headers
from src.session import establish_session
from src.httpcodes import http_404
from src.posts import get_original_post_from_announce_url
from src.fitnessFunctions import fitness_performance
from src.like import update_likes_collection
from src.like import undo_likes_collection_entry
from src.webapp_post import individual_post_as_html
from src.data import is_a_file
def like_button(self, calling_domain: str, path: str,

View File

@ -9,22 +9,22 @@ __email__ = "bob@libreserver.org"
__status__ = "Production"
__module_group__ = "Daemon GET"
from utils import get_mutuals_of_person
from utils import is_dm
from utils import get_cached_post_filename
from utils import load_json
from utils import locate_post
from utils import get_nickname_from_actor
from utils import is_yggdrasil_address
from mitm import detect_mitm
from httpcodes import http_404
from httpheaders import redirect_headers
from blocking import unmute_post
from blocking import mute_post
from follow import follower_approval_active
from webapp_post import individual_post_as_html
from fitnessFunctions import fitness_performance
from data import is_a_file
from src.utils import get_mutuals_of_person
from src.utils import is_dm
from src.utils import get_cached_post_filename
from src.utils import load_json
from src.utils import locate_post
from src.utils import get_nickname_from_actor
from src.utils import is_yggdrasil_address
from src.mitm import detect_mitm
from src.httpcodes import http_404
from src.httpheaders import redirect_headers
from src.blocking import unmute_post
from src.blocking import mute_post
from src.follow import follower_approval_active
from src.webapp_post import individual_post_as_html
from src.fitnessFunctions import fitness_performance
from src.data import is_a_file
def mute_button(self, calling_domain: str, path: str,

View File

@ -10,27 +10,27 @@ __status__ = "Production"
__module_group__ = "Daemon GET"
import urllib.parse
from utils import get_mutuals_of_person
from utils import get_cached_post_filename
from utils import load_json
from utils import locate_post
from utils import is_dm
from utils import local_actor_url
from utils import get_instance_url
from utils import get_nickname_from_actor
from utils import is_yggdrasil_url
from mitm import detect_mitm
from httpheaders import redirect_headers
from session import establish_session
from httpcodes import http_404
from posts import get_original_post_from_announce_url
from daemon_utils import post_to_outbox
from fitnessFunctions import fitness_performance
from reaction import undo_reaction_collection_entry
from reaction import update_reaction_collection
from follow import follower_approval_active
from webapp_post import individual_post_as_html
from data import is_a_file
from src.utils import get_mutuals_of_person
from src.utils import get_cached_post_filename
from src.utils import load_json
from src.utils import locate_post
from src.utils import is_dm
from src.utils import local_actor_url
from src.utils import get_instance_url
from src.utils import get_nickname_from_actor
from src.utils import is_yggdrasil_url
from src.mitm import detect_mitm
from src.httpheaders import redirect_headers
from src.session import establish_session
from src.httpcodes import http_404
from src.posts import get_original_post_from_announce_url
from src.daemon_utils import post_to_outbox
from src.fitnessFunctions import fitness_performance
from src.reaction import undo_reaction_collection_entry
from src.reaction import update_reaction_collection
from src.follow import follower_approval_active
from src.webapp_post import individual_post_as_html
from src.data import is_a_file
def reaction_button(self, calling_domain: str, path: str,

View File

@ -8,14 +8,14 @@ __status__ = "Production"
__module_group__ = "Daemon GET"
import json
from context import get_individual_post_context
from httpcodes import write2
from httpcodes import http_404
from httpheaders import set_headers
from posts import json_pin_post
from utils import convert_domains
from utils import get_json_content_from_accept
from follow import get_following_feed
from src.context import get_individual_post_context
from src.httpcodes import write2
from src.httpcodes import http_404
from src.httpheaders import set_headers
from src.posts import json_pin_post
from src.utils import convert_domains
from src.utils import get_json_content_from_accept
from src.follow import get_following_feed
def get_featured_collection(self, calling_domain: str,

View File

@ -8,17 +8,17 @@ __status__ = "Production"
__module_group__ = "Daemon GET"
import time
from httpcodes import http_304
from httpcodes import http_404
from httpcodes import write2
from httpheaders import set_headers_etag
from httpheaders import set_headers
from utils import string_ends_with
from utils import get_css
from fitnessFunctions import fitness_performance
from daemon_utils import etag_exists
from data import load_binary
from data import is_a_file
from src.httpcodes import http_304
from src.httpcodes import http_404
from src.httpcodes import write2
from src.httpheaders import set_headers_etag
from src.httpheaders import set_headers
from src.utils import string_ends_with
from src.utils import get_css
from src.fitnessFunctions import fitness_performance
from src.daemon_utils import etag_exists
from src.data import load_binary
from src.data import is_a_file
def get_style_sheet(self, base_dir: str, calling_domain: str, path: str,

View File

@ -7,14 +7,14 @@ __email__ = "bob@libreserver.org"
__status__ = "Production"
__module_group__ = "Daemon GET"
from httpcodes import http_404
from httpcodes import write2
from httpheaders import set_headers
from httpheaders import set_headers_etag
from utils import get_nickname_from_actor
from blocking import export_blocking_file
from data import load_binary
from data import is_a_file
from src.httpcodes import http_404
from src.httpcodes import write2
from src.httpheaders import set_headers
from src.httpheaders import set_headers_etag
from src.utils import get_nickname_from_actor
from src.blocking import export_blocking_file
from src.data import load_binary
from src.data import is_a_file
def get_exported_blocks(self, path: str, base_dir: str,

View File

@ -8,18 +8,18 @@ __status__ = "Production"
__module_group__ = "Daemon GET"
import urllib.parse
from fitnessFunctions import fitness_performance
from httpheaders import set_headers_etag
from httpcodes import write2
from httpcodes import http_304
from httpcodes import http_404
from daemon_utils import has_accept
from daemon_utils import etag_exists
from utils import get_config_param
from utils import binary_is_image
from formats import media_file_mime_type
from data import load_binary
from data import is_a_file
from src.fitnessFunctions import fitness_performance
from src.httpheaders import set_headers_etag
from src.httpcodes import write2
from src.httpcodes import http_304
from src.httpcodes import http_404
from src.daemon_utils import has_accept
from src.daemon_utils import etag_exists
from src.utils import get_config_param
from src.utils import binary_is_image
from src.formats import media_file_mime_type
from src.data import load_binary
from src.data import is_a_file
def get_favicon(self, calling_domain: str,

View File

@ -8,22 +8,22 @@ __status__ = "Production"
__module_group__ = "Daemon GET"
import json
from follow import get_following_feed
from securemode import secure_mode
from city import get_spoofed_city
from httpheaders import set_headers
from httpcodes import http_404
from httpcodes import write2
from session import establish_session
from shares import get_shares_feed_for_person
from httprequests import request_http
from person import person_lookup
from webapp_profile import html_profile
from fitnessFunctions import fitness_performance
from utils import convert_domains
from utils import get_json_content_from_accept
from relationships import get_inactive_feed
from relationships import get_moved_feed
from src.follow import get_following_feed
from src.securemode import secure_mode
from src.city import get_spoofed_city
from src.httpheaders import set_headers
from src.httpcodes import http_404
from src.httpcodes import write2
from src.session import establish_session
from src.shares import get_shares_feed_for_person
from src.httprequests import request_http
from src.person import person_lookup
from src.webapp_profile import html_profile
from src.fitnessFunctions import fitness_performance
from src.utils import convert_domains
from src.utils import get_json_content_from_accept
from src.relationships import get_inactive_feed
from src.relationships import get_moved_feed
def show_shares_feed(self, authorized: bool,

View File

@ -9,23 +9,23 @@ __module_group__ = "Daemon GET"
import json
import urllib.parse
from session import establish_session
from httpcodes import http_400
from httpcodes import http_404
from httpcodes import write2
from httpheaders import login_headers
from httpheaders import redirect_headers
from httpheaders import set_headers
from blocking import is_blocked_hashtag
from utils import convert_domains
from utils import get_nickname_from_actor
from utils import is_yggdrasil_address
from fitnessFunctions import fitness_performance
from webapp_utils import html_hashtag_blocked
from webapp_search import html_hashtag_search
from webapp_search import hashtag_search_rss
from webapp_search import hashtag_search_json
from webapp_hashtagswarm import get_hashtag_categories_feed
from src.session import establish_session
from src.httpcodes import http_400
from src.httpcodes import http_404
from src.httpcodes import write2
from src.httpheaders import login_headers
from src.httpheaders import redirect_headers
from src.httpheaders import set_headers
from src.blocking import is_blocked_hashtag
from src.utils import convert_domains
from src.utils import get_nickname_from_actor
from src.utils import is_yggdrasil_address
from src.fitnessFunctions import fitness_performance
from src.webapp_utils import html_hashtag_blocked
from src.webapp_search import html_hashtag_search
from src.webapp_search import hashtag_search_rss
from src.webapp_search import hashtag_search_json
from src.webapp_hashtagswarm import get_hashtag_categories_feed
def hashtag_search_rss2(self, calling_domain: str,

View File

@ -11,27 +11,27 @@ import os
import datetime
import time
from shutil import copyfile
from media import path_is_video
from media import path_is_transcript
from media import path_is_audio
from httpcodes import write2
from httpcodes import http_304
from httpcodes import http_404
from httpheaders import set_headers_etag
from utils import data_dir
from utils import get_nickname_from_actor
from utils import acct_dir
from formats import media_file_mime_type
from formats import get_image_mime_type
from formats import get_image_extensions
from flags import is_image_file
from daemon_utils import etag_exists
from fitnessFunctions import fitness_performance
from person import save_person_qrcode
from lxmf import save_lxmf_qrcode
from data import load_string
from data import load_binary
from data import is_a_file
from src.media import path_is_video
from src.media import path_is_transcript
from src.media import path_is_audio
from src.httpcodes import write2
from src.httpcodes import http_304
from src.httpcodes import http_404
from src.httpheaders import set_headers_etag
from src.utils import data_dir
from src.utils import get_nickname_from_actor
from src.utils import acct_dir
from src.formats import media_file_mime_type
from src.formats import get_image_mime_type
from src.formats import get_image_extensions
from src.flags import is_image_file
from src.daemon_utils import etag_exists
from src.fitnessFunctions import fitness_performance
from src.person import save_person_qrcode
from src.lxmf import save_lxmf_qrcode
from src.data import load_string
from src.data import load_binary
from src.data import is_a_file
def show_avatar_or_banner(self, referer_domain: str, path: str,

View File

@ -8,14 +8,14 @@ __status__ = "Production"
__module_group__ = "Daemon GET"
import json
from httprequests import request_http
from httpcodes import write2
from httpcodes import http_404
from person import person_lookup
from utils import get_instance_url
from utils import convert_domains
from httpheaders import set_headers
from fitnessFunctions import fitness_performance
from src.httprequests import request_http
from src.httpcodes import write2
from src.httpcodes import http_404
from src.person import person_lookup
from src.utils import get_instance_url
from src.utils import convert_domains
from src.httpheaders import set_headers
from src.fitnessFunctions import fitness_performance
def show_instance_actor(self, calling_domain: str,

View File

@ -7,10 +7,10 @@ __email__ = "bob@libreserver.org"
__status__ = "Production"
__module_group__ = "Daemon GET"
from webapp_column_left import html_edit_links
from httpheaders import set_headers
from httpcodes import write2
from httpcodes import http_404
from src.webapp_column_left import html_edit_links
from src.httpheaders import set_headers
from src.httpcodes import write2
from src.httpcodes import http_404
def edit_links2(self, calling_domain: str, path: str,

View File

@ -7,14 +7,14 @@ __email__ = "bob@libreserver.org"
__status__ = "Production"
__module_group__ = "Daemon Login"
from utils import get_instance_url
from utils import string_ends_with
from utils import string_contains
from httpcodes import write2
from httpheaders import login_headers
from httpheaders import redirect_headers
from fitnessFunctions import fitness_performance
from webapp_login import html_login
from src.utils import get_instance_url
from src.utils import string_ends_with
from src.utils import string_contains
from src.httpcodes import write2
from src.httpheaders import login_headers
from src.httpheaders import redirect_headers
from src.fitnessFunctions import fitness_performance
from src.webapp_login import html_login
def redirect_to_login_screen(self, calling_domain: str, path: str,

View File

@ -8,21 +8,21 @@ __status__ = "Production"
__module_group__ = "Daemon GET"
import json
from httpheaders import set_headers
from httpcodes import write2
from mastoapiv1 import masto_api_v1_response
from mastoapiv2 import masto_api_v2_response
from siteactive import referer_is_active
from httpcodes import http_400
from httpcodes import http_404
from httpcodes import http_503
from utils import resembles_domain
from utils import get_json_content_from_accept
from utils import convert_domains
from utils import local_network_host
from crawlers import update_known_crawlers
from blocking import broch_mode_is_active
from daemon_utils import has_accept
from src.httpheaders import set_headers
from src.httpcodes import write2
from src.mastoapiv1 import masto_api_v1_response
from src.mastoapiv2 import masto_api_v2_response
from src.siteactive import referer_is_active
from src.httpcodes import http_400
from src.httpcodes import http_404
from src.httpcodes import http_503
from src.utils import resembles_domain
from src.utils import get_json_content_from_accept
from src.utils import convert_domains
from src.utils import local_network_host
from src.crawlers import update_known_crawlers
from src.blocking import broch_mode_is_active
from src.daemon_utils import has_accept
def masto_api(self, path: str, calling_domain: str,

View File

@ -8,20 +8,20 @@ __status__ = "Production"
__module_group__ = "Daemon GET"
import urllib.parse
from session import establish_session
from httpcodes import write2
from httpcodes import http_404
from httpheaders import redirect_headers
from httpheaders import set_headers
from newswire import get_rss_from_dict
from fitnessFunctions import fitness_performance
from flags import is_moderator
from utils import is_yggdrasil_address
from utils import data_dir
from utils import local_actor_url
from utils import save_json
from webapp_column_right import html_edit_news_post
from webapp_column_right import html_edit_newswire
from src.session import establish_session
from src.httpcodes import write2
from src.httpcodes import http_404
from src.httpheaders import redirect_headers
from src.httpheaders import set_headers
from src.newswire import get_rss_from_dict
from src.fitnessFunctions import fitness_performance
from src.flags import is_moderator
from src.utils import is_yggdrasil_address
from src.utils import data_dir
from src.utils import local_actor_url
from src.utils import save_json
from src.webapp_column_right import html_edit_news_post
from src.webapp_column_right import html_edit_newswire
def get_newswire_feed(self, calling_domain: str, path: str,

View File

@ -8,20 +8,20 @@ __status__ = "Production"
__module_group__ = "Daemon GET"
import json
from httpcodes import http_400
from httpcodes import http_404
from httpcodes import http_503
from httpcodes import write2
from httpheaders import set_headers
from utils import resembles_domain
from utils import string_starts_with
from utils import convert_domains
from utils import get_instance_url
from utils import local_network_host
from siteactive import referer_is_active
from crawlers import update_known_crawlers
from blocking import broch_mode_is_active
from metadata import meta_data_node_info
from src.httpcodes import http_400
from src.httpcodes import http_404
from src.httpcodes import http_503
from src.httpcodes import write2
from src.httpheaders import set_headers
from src.utils import resembles_domain
from src.utils import string_starts_with
from src.utils import convert_domains
from src.utils import get_instance_url
from src.utils import local_network_host
from src.siteactive import referer_is_active
from src.crawlers import update_known_crawlers
from src.blocking import broch_mode_is_active
from src.metadata import meta_data_node_info
def get_nodeinfo(self, ua_str: str, calling_domain: str,

View File

@ -8,48 +8,48 @@ __status__ = "Production"
__module_group__ = "Daemon Timeline"
import json
from webapp_conversation import html_conversation_view
from flags import is_public_post_from_url
from flags import is_public_post
from flags import is_premium_account
from flags import can_reply_to
from utils import get_mutuals_of_person
from utils import get_instance_url
from utils import local_actor_url
from utils import locate_post
from utils import get_config_param
from utils import get_nickname_from_actor
from utils import get_new_post_endpoints
from utils import acct_dir
from utils import get_json_content_from_accept
from utils import convert_domains
from utils import has_object_dict
from utils import load_json
from mitm import detect_mitm
from session import establish_session
from languages import get_understood_languages
from languages import get_reply_language
from httpcodes import write2
from httpcodes import http_401
from httpcodes import http_403
from httpcodes import http_404
from httpheaders import set_headers
from httpheaders import set_html_post_headers
from httpheaders import login_headers
from httpheaders import redirect_headers
from httprequests import request_http
from posts import populate_replies_json
from posts import remove_post_interactions
from webapp_post import html_post_replies
from webapp_post import html_individual_post
from webapp_create_post import html_new_post
from webapp_likers import html_likers_of_post
from fitnessFunctions import fitness_performance
from securemode import secure_mode
from context import get_individual_post_context
from conversation import convthread_id_to_conversation_tag
from data import load_string
from data import is_a_file
from src.webapp_conversation import html_conversation_view
from src.flags import is_public_post_from_url
from src.flags import is_public_post
from src.flags import is_premium_account
from src.flags import can_reply_to
from src.utils import get_mutuals_of_person
from src.utils import get_instance_url
from src.utils import local_actor_url
from src.utils import locate_post
from src.utils import get_config_param
from src.utils import get_nickname_from_actor
from src.utils import get_new_post_endpoints
from src.utils import acct_dir
from src.utils import get_json_content_from_accept
from src.utils import convert_domains
from src.utils import has_object_dict
from src.utils import load_json
from src.mitm import detect_mitm
from src.session import establish_session
from src.languages import get_understood_languages
from src.languages import get_reply_language
from src.httpcodes import write2
from src.httpcodes import http_401
from src.httpcodes import http_403
from src.httpcodes import http_404
from src.httpheaders import set_headers
from src.httpheaders import set_html_post_headers
from src.httpheaders import login_headers
from src.httpheaders import redirect_headers
from src.httprequests import request_http
from src.posts import populate_replies_json
from src.posts import remove_post_interactions
from src.webapp_post import html_post_replies
from src.webapp_post import html_individual_post
from src.webapp_create_post import html_new_post
from src.webapp_likers import html_likers_of_post
from src.fitnessFunctions import fitness_performance
from src.securemode import secure_mode
from src.context import get_individual_post_context
from src.conversation import convthread_id_to_conversation_tag
from src.data import load_string
from src.data import is_a_file
def _show_post_from_file(self, post_filename: str, liked_by: str,

View File

@ -8,32 +8,32 @@ __status__ = "Production"
__module_group__ = "Daemon GET"
import json
from roles import get_actor_roles_list
from skills import no_of_actor_skills
from skills import get_skills_from_list
from status import get_actor_status
from status import actor_status_expired
from utils import get_nickname_from_actor
from utils import load_json
from utils import get_json_content_from_accept
from utils import get_instance_url
from utils import acct_dir
from utils import convert_domains
from occupation import get_occupation_skills
from httpcodes import write2
from httpcodes import http_404
from person import person_lookup
from person import add_alternate_domains
from httprequests import request_http
from httpheaders import redirect_headers
from httpheaders import set_headers
from session import establish_session
from city import get_spoofed_city
from webapp_profile import html_profile
from webapp_profile import html_edit_profile
from fitnessFunctions import fitness_performance
from securemode import secure_mode
from data import is_a_file
from src.roles import get_actor_roles_list
from src.skills import no_of_actor_skills
from src.skills import get_skills_from_list
from src.status import get_actor_status
from src.status import actor_status_expired
from src.utils import get_nickname_from_actor
from src.utils import load_json
from src.utils import get_json_content_from_accept
from src.utils import get_instance_url
from src.utils import acct_dir
from src.utils import convert_domains
from src.occupation import get_occupation_skills
from src.httpcodes import write2
from src.httpcodes import http_404
from src.person import person_lookup
from src.person import add_alternate_domains
from src.httprequests import request_http
from src.httpheaders import redirect_headers
from src.httpheaders import set_headers
from src.session import establish_session
from src.city import get_spoofed_city
from src.webapp_profile import html_profile
from src.webapp_profile import html_edit_profile
from src.fitnessFunctions import fitness_performance
from src.securemode import secure_mode
from src.data import is_a_file
def show_person_profile(self, authorized: bool,

View File

@ -8,12 +8,12 @@ __status__ = "Production"
__module_group__ = "Daemon GET"
import json
from httpcodes import write2
from httpheaders import set_headers
from webapp_pwa import pwa_manifest
from utils import convert_domains
from utils import get_json_content_from_accept
from fitnessFunctions import fitness_performance
from src.httpcodes import write2
from src.httpheaders import set_headers
from src.webapp_pwa import pwa_manifest
from src.utils import convert_domains
from src.utils import get_json_content_from_accept
from src.fitnessFunctions import fitness_performance
def progressive_web_app_manifest(self, base_dir: str,

View File

@ -7,15 +7,15 @@ __email__ = "bob@libreserver.org"
__status__ = "Production"
__module_group__ = "Daemon GET"
from httpcodes import write2
from httpheaders import redirect_headers
from httpheaders import set_headers
from utils import load_json
from utils import locate_post
from utils import get_nickname_from_actor
from utils import get_instance_url
from webapp_post import html_emoji_reaction_picker
from fitnessFunctions import fitness_performance
from src.httpcodes import write2
from src.httpheaders import redirect_headers
from src.httpheaders import set_headers
from src.utils import load_json
from src.utils import locate_post
from src.utils import get_nickname_from_actor
from src.utils import get_instance_url
from src.webapp_post import html_emoji_reaction_picker
from src.fitnessFunctions import fitness_performance
def reaction_picker2(self, calling_domain: str, path: str,

View File

@ -8,19 +8,19 @@ __status__ = "Production"
__module_group__ = "Daemon GET"
import os
from utils import data_dir
from utils import is_account_dir
from utils import acct_dir
from session import establish_session
from blog import html_blog_page_rss2
from blog import html_blog_page_rss3
from httpheaders import set_headers
from httpcodes import write2
from httpcodes import http_404
from fitnessFunctions import fitness_performance
from newswire import rss2header
from newswire import rss2footer
from data import is_a_dir
from src.utils import data_dir
from src.utils import is_account_dir
from src.utils import acct_dir
from src.session import establish_session
from src.blog import html_blog_page_rss2
from src.blog import html_blog_page_rss3
from src.httpheaders import set_headers
from src.httpcodes import write2
from src.httpcodes import http_404
from src.fitnessFunctions import fitness_performance
from src.newswire import rss2header
from src.newswire import rss2footer
from src.data import is_a_dir
def get_rss2feed(self, calling_domain: str, path: str,

View File

@ -8,31 +8,31 @@ __status__ = "Production"
__module_group__ = "Daemon Timeline"
import json
from securemode import secure_mode
from flags import is_moderator
from flags import is_artist
from flags import is_editor
from utils import convert_domains
from utils import get_json_content_from_accept
from httpheaders import set_headers
from httpcodes import http_404
from httpcodes import write2
from httprequests import request_http
from person import person_box_json
from webapp_minimalbutton import is_minimal
from webapp_timeline import html_outbox
from webapp_timeline import html_bookmarks
from webapp_timeline import html_wanted
from webapp_timeline import html_shares
from webapp_timeline import html_inbox_dms
from webapp_timeline import html_inbox_features
from webapp_timeline import html_inbox_news
from webapp_timeline import html_inbox_blogs
from webapp_timeline import html_inbox_media
from webapp_timeline import html_inbox_replies
from webapp_timeline import html_inbox
from webapp_moderation import html_moderation
from fitnessFunctions import fitness_performance
from src.securemode import secure_mode
from src.flags import is_moderator
from src.flags import is_artist
from src.flags import is_editor
from src.utils import convert_domains
from src.utils import get_json_content_from_accept
from src.httpheaders import set_headers
from src.httpcodes import http_404
from src.httpcodes import write2
from src.httprequests import request_http
from src.person import person_box_json
from src.webapp_minimalbutton import is_minimal
from src.webapp_timeline import html_outbox
from src.webapp_timeline import html_bookmarks
from src.webapp_timeline import html_wanted
from src.webapp_timeline import html_shares
from src.webapp_timeline import html_inbox_dms
from src.webapp_timeline import html_inbox_features
from src.webapp_timeline import html_inbox_news
from src.webapp_timeline import html_inbox_blogs
from src.webapp_timeline import html_inbox_media
from src.webapp_timeline import html_inbox_replies
from src.webapp_timeline import html_inbox
from src.webapp_moderation import html_moderation
from src.fitnessFunctions import fitness_performance
def show_media_timeline(self, authorized: bool,

View File

@ -7,18 +7,18 @@ __email__ = "bob@libreserver.org"
__status__ = "Production"
__module_group__ = "Daemon GET"
from daemon_utils import has_accept
from httpcodes import write2
from httpcodes import http_400
from httpcodes import http_404
from httpcodes import http_503
from httpheaders import set_headers
from utils import acct_dir
from utils import load_json
from utils import string_contains
from pgp import actor_to_vcard_xml
from pgp import actor_to_vcard
from data import is_a_file
from src.daemon_utils import has_accept
from src.httpcodes import write2
from src.httpcodes import http_400
from src.httpcodes import http_404
from src.httpcodes import http_503
from src.httpheaders import set_headers
from src.utils import acct_dir
from src.utils import load_json
from src.utils import string_contains
from src.pgp import actor_to_vcard_xml
from src.pgp import actor_to_vcard
from src.data import is_a_file
def show_vcard(self, base_dir: str, path: str, calling_domain: str,

View File

@ -8,19 +8,19 @@ __status__ = "Production"
__module_group__ = "Daemon GET"
import json
from httpcodes import write2
from httpcodes import http_404
from httpheaders import redirect_headers
from httpheaders import set_headers
from webfinger import webfinger_lookup
from webfinger import webfinger_node_info
from webfinger import webfinger_meta
from webfinger import wellknown_protocol_handler
from utils import string_starts_with
from utils import get_json_content_from_accept
from utils import convert_domains
from utils import is_yggdrasil_address
from daemon_utils import has_accept
from src.httpcodes import write2
from src.httpcodes import http_404
from src.httpheaders import redirect_headers
from src.httpheaders import set_headers
from src.webfinger import webfinger_lookup
from src.webfinger import webfinger_node_info
from src.webfinger import webfinger_meta
from src.webfinger import wellknown_protocol_handler
from src.utils import string_starts_with
from src.utils import get_json_content_from_accept
from src.utils import convert_domains
from src.utils import is_yggdrasil_address
from src.daemon_utils import has_accept
def get_webfinger(self, calling_domain: str, referer_domain: str,

View File

@ -10,23 +10,23 @@ __module_group__ = "Daemon"
import os
import datetime
from hashlib import md5
from flags import is_image_file
from formats import media_file_mime_type
from utils import data_dir
from utils import string_contains
from utils import decoded_host
from utils import check_bad_path
from httpcodes import http_400
from httpcodes import http_404
from httpheaders import set_headers_head
from media import path_is_video
from media import path_is_audio
from daemon_utils import get_user_agent
from daemon_utils import log_epicyon_instances
from data import load_string
from data import load_binary
from data import save_string
from data import is_a_file
from src.flags import is_image_file
from src.formats import media_file_mime_type
from src.utils import data_dir
from src.utils import string_contains
from src.utils import decoded_host
from src.utils import check_bad_path
from src.httpcodes import http_400
from src.httpcodes import http_404
from src.httpheaders import set_headers_head
from src.media import path_is_video
from src.media import path_is_audio
from src.daemon_utils import get_user_agent
from src.daemon_utils import log_epicyon_instances
from src.data import load_string
from src.data import load_binary
from src.data import save_string
from src.data import is_a_file
def daemon_http_head(self) -> None:

View File

@ -11,68 +11,68 @@ import time
import errno
import json
from socket import error as SocketError
from flags import is_corporate
from utils import string_starts_with
from utils import is_yggdrasil_address
from utils import replace_strings
from utils import string_ends_with
from utils import get_config_param
from utils import decoded_host
from utils import get_new_post_endpoints
from utils import local_actor_url
from utils import contains_invalid_chars
from utils import remove_id_ending
from utils import check_bad_path
from mitm import detect_mitm
from blocking import contains_military_domain
from blocking import contains_government_domain
from blocking import contains_bluesky_domain
from blocking import contains_nostr_domain
from crawlers import blocked_user_agent
from session import get_session_for_domain
from session import establish_session
from fitnessFunctions import fitness_performance
from shares import update_shared_item_federation_token
from inbox import inbox_message_has_params
from inbox import inbox_permitted_message
from httpsig import getheader_signature_input
from httpcodes import http_200
from httpcodes import http_400
from httpcodes import http_402
from httpcodes import http_403
from httpcodes import http_404
from httpcodes import http_503
from httpheaders import contains_suspicious_headers
from httpheaders import update_headers_catalog
from httpheaders import redirect_headers
from daemon_utils import log_epicyon_instances
from daemon_utils import get_user_agent
from daemon_utils import post_to_outbox
from daemon_utils import update_inbox_queue
from daemon_utils import is_authorized
from daemon_post_login import post_login_screen
from daemon_post_receive import receive_new_post
from daemon_post_profile import profile_edit
from daemon_post_person_options import person_options2
from daemon_post_search import receive_search_query
from daemon_post_moderator import moderator_actions
from daemon_post_confirm import follow_confirm2
from daemon_post_confirm import unfollow_confirm
from daemon_post_confirm import block_confirm2
from daemon_post_confirm import unblock_confirm
from daemon_post_newswire import newswire_update
from daemon_post_newswire import citations_update
from daemon_post_newswire import news_post_edit
from daemon_post_remove import remove_reading_status
from daemon_post_remove import remove_share
from daemon_post_remove import remove_wanted
from daemon_post_remove import receive_remove_post
from daemon_post_question import receive_vote
from daemon_post_theme import theme_designer_edit
from daemon_post_hashtags import set_hashtag_category2
from daemon_post_links import links_update
from daemon_post_image import receive_image_attachment
from daemon_post_keys import keyboard_shortcuts
from src.flags import is_corporate
from src.utils import string_starts_with
from src.utils import is_yggdrasil_address
from src.utils import replace_strings
from src.utils import string_ends_with
from src.utils import get_config_param
from src.utils import decoded_host
from src.utils import get_new_post_endpoints
from src.utils import local_actor_url
from src.utils import contains_invalid_chars
from src.utils import remove_id_ending
from src.utils import check_bad_path
from src.mitm import detect_mitm
from src.blocking import contains_military_domain
from src.blocking import contains_government_domain
from src.blocking import contains_bluesky_domain
from src.blocking import contains_nostr_domain
from src.crawlers import blocked_user_agent
from src.session import get_session_for_domain
from src.session import establish_session
from src.fitnessFunctions import fitness_performance
from src.shares import update_shared_item_federation_token
from src.inbox import inbox_message_has_params
from src.inbox import inbox_permitted_message
from src.httpsig import getheader_signature_input
from src.httpcodes import http_200
from src.httpcodes import http_400
from src.httpcodes import http_402
from src.httpcodes import http_403
from src.httpcodes import http_404
from src.httpcodes import http_503
from src.httpheaders import contains_suspicious_headers
from src.httpheaders import update_headers_catalog
from src.httpheaders import redirect_headers
from src.daemon_utils import log_epicyon_instances
from src.daemon_utils import get_user_agent
from src.daemon_utils import post_to_outbox
from src.daemon_utils import update_inbox_queue
from src.daemon_utils import is_authorized
from src.daemon_post_login import post_login_screen
from src.daemon_post_receive import receive_new_post
from src.daemon_post_profile import profile_edit
from src.daemon_post_person_options import person_options2
from src.daemon_post_search import receive_search_query
from src.daemon_post_moderator import moderator_actions
from src.daemon_post_confirm import follow_confirm2
from src.daemon_post_confirm import unfollow_confirm
from src.daemon_post_confirm import block_confirm2
from src.daemon_post_confirm import unblock_confirm
from src.daemon_post_newswire import newswire_update
from src.daemon_post_newswire import citations_update
from src.daemon_post_newswire import news_post_edit
from src.daemon_post_remove import remove_reading_status
from src.daemon_post_remove import remove_share
from src.daemon_post_remove import remove_wanted
from src.daemon_post_remove import receive_remove_post
from src.daemon_post_question import receive_vote
from src.daemon_post_theme import theme_designer_edit
from src.daemon_post_hashtags import set_hashtag_category2
from src.daemon_post_links import links_update
from src.daemon_post_image import receive_image_attachment
from src.daemon_post_keys import keyboard_shortcuts
# maximum number of posts in a hashtag feed
MAX_POSTS_IN_HASHTAG_FEED = 6
@ -825,7 +825,7 @@ def daemon_http_post(self) -> None:
'_POST', 'block_confirm2',
self.server.debug)
# an option was chosen from person options screen
# an option was chosen from src.person options screen
# view/follow/block/report
if self.path.endswith('/personoptions'):
person_options2(self, self.path,

View File

@ -10,27 +10,27 @@ __module_group__ = "Daemon POST"
import errno
import urllib.parse
from socket import error as SocketError
from flags import has_group_type
from flags import is_moderator
from utils import is_yggdrasil_address
from utils import get_nickname_from_actor
from utils import get_domain_from_actor
from utils import get_full_domain
from utils import local_actor_url
from status import get_status_number
from follow import unfollow_account
from follow import send_follow_request
from follow import remove_follower
from daemon_utils import post_to_outbox_thread
from httpcodes import write2
from httpheaders import redirect_headers
from httpheaders import login_headers
from webapp_moderation import html_account_info
from session import establish_session
from blocking import remove_block
from blocking import remove_global_block
from blocking import update_blocked_cache
from blocking import add_block
from src.flags import has_group_type
from src.flags import is_moderator
from src.utils import is_yggdrasil_address
from src.utils import get_nickname_from_actor
from src.utils import get_domain_from_actor
from src.utils import get_full_domain
from src.utils import local_actor_url
from src.status import get_status_number
from src.follow import unfollow_account
from src.follow import send_follow_request
from src.follow import remove_follower
from src.daemon_utils import post_to_outbox_thread
from src.httpcodes import write2
from src.httpheaders import redirect_headers
from src.httpheaders import login_headers
from src.webapp_moderation import html_account_info
from src.session import establish_session
from src.blocking import remove_block
from src.blocking import remove_global_block
from src.blocking import update_blocked_cache
from src.blocking import add_block
def unfollow_confirm(self, calling_domain: str, cookie: str,
@ -161,7 +161,7 @@ def follow_confirm2(self, calling_domain: str, cookie: str,
project_version: str,
sites_unavailable: [],
mitm_servers: []) -> None:
"""Confirm a follow from profile after search or from person options
"""Confirm a follow from profile after search or from src.person options
"""
users_path = path.split('/followconfirm')[0]
origin_path_str = http_prefix + '://' + domain_full + users_path

View File

@ -10,17 +10,17 @@ __module_group__ = "Daemon POST"
import errno
import urllib.parse
from socket import error as SocketError
from httpcodes import http_404
from httpheaders import redirect_headers
from utils import get_instance_url
from utils import get_nickname_from_actor
from flags import is_editor
from content import extract_text_fields_in_post
from blocking import is_blocked_hashtag
from filters import is_filtered
from categories import set_hashtag_category
from data import erase_file
from data import is_a_file
from src.httpcodes import http_404
from src.httpheaders import redirect_headers
from src.utils import get_instance_url
from src.utils import get_nickname_from_actor
from src.flags import is_editor
from src.content import extract_text_fields_in_post
from src.blocking import is_blocked_hashtag
from src.filters import is_filtered
from src.categories import set_hashtag_category
from src.data import erase_file
from src.data import is_a_file
def set_hashtag_category2(self, calling_domain: str, cookie: str,
@ -98,10 +98,10 @@ def set_hashtag_category2(self, calling_domain: str, cookie: str,
except SocketError as ex:
if ex.errno == errno.ECONNRESET:
print('EX: connection was reset while ' +
'reading bytes from http form POST')
'reading bytes from src.http form POST')
else:
print('EX: error while reading bytes ' +
'from http form POST')
'from src.http form POST')
self.send_response(400)
self.end_headers()
self.server.postreq_busy = False

View File

@ -10,13 +10,13 @@ __module_group__ = "Daemon POST"
import os
import errno
from socket import error as SocketError
from httpcodes import http_404
from utils import acct_dir
from utils import binary_is_image
from formats import get_image_extension_from_mime_type
from data import save_binary
from data import is_a_dir
from data import is_a_file
from src.httpcodes import http_404
from src.utils import acct_dir
from src.utils import binary_is_image
from src.formats import get_image_extension_from_mime_type
from src.data import save_binary
from src.data import is_a_dir
from src.data import is_a_file
def receive_image_attachment(self, length: int, path: str, base_dir: str,

View File

@ -10,10 +10,10 @@ __module_group__ = "Daemon POST"
import errno
import urllib.parse
from socket import error as SocketError
from httpheaders import redirect_headers
from utils import acct_dir
from utils import save_json
from utils import is_yggdrasil_address
from src.httpheaders import redirect_headers
from src.utils import acct_dir
from src.utils import save_json
from src.utils import is_yggdrasil_address
def keyboard_shortcuts(self, calling_domain: str, cookie: str,
@ -23,7 +23,7 @@ def keyboard_shortcuts(self, calling_domain: str, cookie: str,
yggdrasil_domain: str,
access_keys2: {}, default_timeline: str,
access_keys: {}, key_shortcuts: {}) -> None:
"""Receive POST from webapp_accesskeys
"""Receive POST from src.webapp_accesskeys
"""
users_path = '/users/' + nickname
origin_path_str = \

View File

@ -9,17 +9,17 @@ __module_group__ = "Daemon POST"
import errno
from socket import error as SocketError
from flags import is_editor
from utils import data_dir
from utils import dangerous_markup
from utils import get_instance_url
from utils import get_nickname_from_actor
from utils import get_config_param
from httpheaders import redirect_headers
from content import extract_text_fields_in_post
from data import save_string
from data import erase_file
from data import is_a_file
from src.flags import is_editor
from src.utils import data_dir
from src.utils import dangerous_markup
from src.utils import get_instance_url
from src.utils import get_nickname_from_actor
from src.utils import get_config_param
from src.httpheaders import redirect_headers
from src.content import extract_text_fields_in_post
from src.data import save_string
from src.data import erase_file
from src.data import is_a_file
def _links_update_edited(fields: {}, links_filename: str) -> None:
@ -157,10 +157,10 @@ def links_update(self, calling_domain: str, cookie: str,
except SocketError as ex:
if ex.errno == errno.ECONNRESET:
print('EX: connection was reset while ' +
'reading bytes from http form POST')
'reading bytes from src.http form POST')
else:
print('EX: error while reading bytes ' +
'from http form POST')
'from src.http form POST')
self.send_response(400)
self.end_headers()
self.server.postreq_busy = False

View File

@ -11,33 +11,33 @@ import time
import errno
from hashlib import sha256
from socket import error as SocketError
from auth import create_password
from auth import record_login_failure
from auth import authorize_basic
from auth import create_basic_auth_header
from httpcodes import write2
from httpcodes import http_200
from httpcodes import http_401
from httpcodes import http_503
from httpheaders import login_headers
from httpheaders import redirect_headers
from httpheaders import clear_login_details
from webapp_login import html_get_login_credentials
from webapp_suspended import html_suspended
from flags import is_suspended
from flags import is_local_network_address
from utils import is_yggdrasil_address
from utils import data_dir
from utils import acct_dir
from utils import get_instance_url
from utils import valid_password
from flags import is_system_account
from person import person_upgrade_actor
from person import activate_account2
from person import register_account
from data import load_string
from data import save_string
from data import is_a_file
from src.auth import create_password
from src.auth import record_login_failure
from src.auth import authorize_basic
from src.auth import create_basic_auth_header
from src.httpcodes import write2
from src.httpcodes import http_200
from src.httpcodes import http_401
from src.httpcodes import http_503
from src.httpheaders import login_headers
from src.httpheaders import redirect_headers
from src.httpheaders import clear_login_details
from src.webapp_login import html_get_login_credentials
from src.webapp_suspended import html_suspended
from src.flags import is_suspended
from src.flags import is_local_network_address
from src.utils import is_yggdrasil_address
from src.utils import data_dir
from src.utils import acct_dir
from src.utils import get_instance_url
from src.utils import valid_password
from src.flags import is_system_account
from src.person import person_upgrade_actor
from src.person import activate_account2
from src.person import register_account
from src.data import load_string
from src.data import save_string
from src.data import is_a_file
def post_login_screen(self, calling_domain: str, cookie: str,

View File

@ -10,33 +10,33 @@ __module_group__ = "Daemon POST"
import errno
import urllib.parse
from socket import error as SocketError
from utils import resembles_domain
from utils import string_starts_with
from utils import data_dir
from utils import delete_post
from utils import locate_post
from utils import get_full_domain
from utils import get_domain_from_actor
from utils import get_nickname_from_actor
from utils import get_instance_url
from utils import is_yggdrasil_address
from flags import is_moderator
from httpcodes import write2
from httpheaders import redirect_headers
from httpheaders import login_headers
from webapp_moderation import html_account_info
from webapp_moderation import html_moderation_info
from person import can_remove_post
from person import remove_account
from person import suspend_account
from person import reenable_account
from filters import add_global_filter
from filters import remove_global_filter
from cache import clear_actor_cache
from blocking import add_global_block
from blocking import update_blocked_cache
from blocking import remove_global_block
from data import is_a_dir
from src.utils import resembles_domain
from src.utils import string_starts_with
from src.utils import data_dir
from src.utils import delete_post
from src.utils import locate_post
from src.utils import get_full_domain
from src.utils import get_domain_from_actor
from src.utils import get_nickname_from_actor
from src.utils import get_instance_url
from src.utils import is_yggdrasil_address
from src.flags import is_moderator
from src.httpcodes import write2
from src.httpheaders import redirect_headers
from src.httpheaders import login_headers
from src.webapp_moderation import html_account_info
from src.webapp_moderation import html_moderation_info
from src.person import can_remove_post
from src.person import remove_account
from src.person import suspend_account
from src.person import reenable_account
from src.filters import add_global_filter
from src.filters import remove_global_filter
from src.cache import clear_actor_cache
from src.blocking import add_global_block
from src.blocking import update_blocked_cache
from src.blocking import remove_global_block
from src.data import is_a_dir
def moderator_actions(self, path: str, calling_domain: str, cookie: str,

View File

@ -9,25 +9,25 @@ __module_group__ = "Daemon POST"
import errno
from socket import error as SocketError
from flags import is_editor
from flags import is_moderator
from cache import clear_from_post_caches
from utils import data_dir
from utils import remove_id_ending
from utils import save_json
from utils import first_paragraph_from_string
from utils import load_json
from utils import locate_post
from utils import acct_dir
from utils import get_instance_url
from utils import get_nickname_from_actor
from timeFunctions import date_from_string_format
from httpheaders import redirect_headers
from content import extract_text_fields_in_post
from content import load_dogwhistles
from data import save_string
from data import erase_file
from data import is_a_file
from src.flags import is_editor
from src.flags import is_moderator
from src.cache import clear_from_post_caches
from src.utils import data_dir
from src.utils import remove_id_ending
from src.utils import save_json
from src.utils import first_paragraph_from_string
from src.utils import load_json
from src.utils import locate_post
from src.utils import acct_dir
from src.utils import get_instance_url
from src.utils import get_nickname_from_actor
from src.timeFunctions import date_from_string_format
from src.httpheaders import redirect_headers
from src.content import extract_text_fields_in_post
from src.content import load_dogwhistles
from src.data import save_string
from src.data import erase_file
from src.data import is_a_file
def newswire_update(self, calling_domain: str, cookie: str,
@ -85,10 +85,10 @@ def newswire_update(self, calling_domain: str, cookie: str,
except SocketError as ex:
if ex.errno == errno.ECONNRESET:
print('EX: connection was reset while ' +
'reading bytes from http form POST')
'reading bytes from src.http form POST')
else:
print('EX: error while reading bytes ' +
'from http form POST')
'from src.http form POST')
self.send_response(400)
self.end_headers()
self.server.postreq_busy = False
@ -248,11 +248,11 @@ def citations_update(self, calling_domain: str, cookie: str,
except SocketError as ex:
if ex.errno == errno.ECONNRESET:
print('EX: connection was reset while ' +
'reading bytes from http form ' +
'reading bytes from src.http form ' +
'citation screen POST')
else:
print('EX: error while reading bytes ' +
'from http form citations screen POST')
'from src.http form citations screen POST')
self.send_response(400)
self.end_headers()
self.server.postreq_busy = False
@ -360,10 +360,10 @@ def news_post_edit(self, calling_domain: str, cookie: str,
except SocketError as ex:
if ex.errno == errno.ECONNRESET:
print('EX: connection was reset while ' +
'reading bytes from http form POST')
'reading bytes from src.http form POST')
else:
print('EX: error while reading bytes ' +
'from http form POST')
'from src.http form POST')
self.send_response(400)
self.end_headers()
self.server.postreq_busy = False

View File

@ -10,48 +10,48 @@ __module_group__ = "Daemon POST"
import errno
import urllib.parse
from socket import error as SocketError
from utils import get_nickname_from_actor
from httpcodes import write2
from httpcodes import http_404
from httpheaders import login_headers
from httpheaders import redirect_headers
from httpheaders import set_headers
from utils import refresh_newswire
from utils import acct_dir
from utils import get_config_param
from utils import get_domain_from_actor
from utils import get_full_domain
from utils import remove_eol
from utils import is_yggdrasil_address
from utils import is_yggdrasil_url
from session import establish_session
from webapp_profile import html_profile_after_search
from petnames import set_pet_name
from person import person_snooze
from person import person_unsnooze
from person import set_person_notes
from followingCalendar import add_person_to_calendar
from followingCalendar import remove_person_from_calendar
from webapp_person_options import person_minimize_images
from webapp_person_options import person_undo_minimize_images
from webapp_confirm import html_confirm_block
from webapp_confirm import html_confirm_unblock
from webapp_confirm import html_confirm_follow
from webapp_confirm import html_confirm_unfollow
from webapp_create_post import html_new_post
from webapp_moderation import html_account_info
from languages import get_understood_languages
from blocking import allowed_announce_add
from blocking import allowed_announce_remove
from blocking import blocked_quote_toots_add
from blocking import blocked_quote_toots_remove
from notifyOnPost import add_notify_on_post
from notifyOnPost import remove_notify_on_post
from flags import is_moderator
from data import save_flag_file
from data import erase_file
from data import is_a_file
from data import is_a_dir
from src.utils import get_nickname_from_actor
from src.httpcodes import write2
from src.httpcodes import http_404
from src.httpheaders import login_headers
from src.httpheaders import redirect_headers
from src.httpheaders import set_headers
from src.utils import refresh_newswire
from src.utils import acct_dir
from src.utils import get_config_param
from src.utils import get_domain_from_actor
from src.utils import get_full_domain
from src.utils import remove_eol
from src.utils import is_yggdrasil_address
from src.utils import is_yggdrasil_url
from src.session import establish_session
from src.webapp_profile import html_profile_after_search
from src.petnames import set_pet_name
from src.person import person_snooze
from src.person import person_unsnooze
from src.person import set_person_notes
from src.followingCalendar import add_person_to_calendar
from src.followingCalendar import remove_person_from_calendar
from src.webapp_person_options import person_minimize_images
from src.webapp_person_options import person_undo_minimize_images
from src.webapp_confirm import html_confirm_block
from src.webapp_confirm import html_confirm_unblock
from src.webapp_confirm import html_confirm_follow
from src.webapp_confirm import html_confirm_unfollow
from src.webapp_create_post import html_new_post
from src.webapp_moderation import html_account_info
from src.languages import get_understood_languages
from src.blocking import allowed_announce_add
from src.blocking import allowed_announce_remove
from src.blocking import blocked_quote_toots_add
from src.blocking import blocked_quote_toots_remove
from src.notifyOnPost import add_notify_on_post
from src.notifyOnPost import remove_notify_on_post
from src.flags import is_moderator
from src.data import save_flag_file
from src.data import erase_file
from src.data import is_a_file
from src.data import is_a_dir
def _person_options_page_number(options_confirm_params: str) -> int:
@ -1317,7 +1317,7 @@ def person_options2(self, path: str,
mitm_servers: [],
ua_str: str,
instance_software: {}) -> None:
"""Receive POST from person options screen
"""Receive POST from src.person options screen
"""
page_number: int = 1
users_path = path.split('/personoptions')[0]
@ -1745,7 +1745,7 @@ def person_options2(self, path: str,
ua_str):
return
# redirect back from person options screen
# redirect back from src.person options screen
if calling_domain.endswith('.onion') and onion_domain:
origin_path_str = 'http://' + onion_domain + users_path
elif calling_domain.endswith('.i2p') and i2p_domain:

View File

@ -8,153 +8,153 @@ __status__ = "Production"
__module_group__ = "Daemon POST"
import errno
from webfinger import webfinger_update
from src.webfinger import webfinger_update
from socket import error as SocketError
from blocking import save_blocked_military
from blocking import save_blocked_government
from blocking import save_blocked_bluesky
from blocking import save_blocked_nostr
from httpheaders import redirect_headers
from httpheaders import clear_login_details
from flags import is_artist
from flags import is_memorial_account
from flags import is_premium_account
from flags import is_moderator
from timeFunctions import get_account_timezone
from timeFunctions import set_account_timezone
from utils import resembles_domain
from utils import is_yggdrasil_url
from utils import is_yggdrasil_address
from utils import data_dir
from utils import set_premium_account
from utils import save_json
from utils import save_reverse_timeline
from utils import set_minimize_all_images
from utils import set_memorials
from utils import get_memorials
from utils import license_link_from_name
from utils import resembles_url
from utils import set_config_param
from utils import set_reply_interval_hours
from utils import valid_password
from utils import remove_eol
from utils import remove_html
from utils import get_url_from_post
from utils import load_json
from utils import acct_dir
from utils import get_config_param
from utils import get_instance_url
from utils import get_nickname_from_actor
from occupation import get_occupation_name
from auth import store_basic_credentials
from filters import is_filtered
from content import add_name_emojis_to_tags
from content import add_html_tags
from content import extract_text_fields_in_post
from content import extract_media_in_form_post
from content import save_media_in_form_post
from textmode import get_text_mode_banner
from theme import enable_grayscale
from theme import disable_grayscale
from theme import get_theme
from theme import is_news_theme_name
from theme import set_news_avatar
from theme import set_theme
from theme import export_theme
from theme import import_theme
from city import get_spoofed_city
from media import convert_image_to_low_bandwidth
from media import process_meta_data
from webapp_welcome import welcome_screen_is_complete
from skills import no_of_actor_skills
from skills import actor_has_skill
from skills import actor_skill_value
from skills import set_actor_skill_level
from categories import set_hashtag_category
from person import deactivate_account
from person import get_actor_move_json
from person import get_actor_update_json
from person import add_actor_update_timestamp
from person import randomize_actor_images
from person import get_default_person_context
from person import update_memorial_flags
from pgp import set_pgp_pub_key
from pgp import get_pgp_pub_key
from pgp import get_email_address
from pgp import set_email_address
from pgp import get_deltachat_invite
from pgp import set_deltachat_invite
from pgp import set_pgp_fingerprint
from pgp import get_pgp_fingerprint
from pronouns import get_pronouns
from pronouns import set_pronouns
from discord import get_discord
from discord import set_discord
from music import get_music_site_url
from music import set_music_site_url
from art import get_art_site_url
from art import set_art_site_url
from youtube import get_youtube
from youtube import set_youtube
from pixelfed import get_pixelfed
from pixelfed import set_pixelfed
from peertube import get_peertube
from peertube import set_peertube
from loops import get_loops
from loops import set_loops
from xmpp import get_xmpp_address
from xmpp import set_xmpp_address
from matrix import get_matrix_address
from matrix import set_matrix_address
from ssb import get_ssb_address
from ssb import set_ssb_address
from occupation import set_occupation_name
from blog import get_blog_address
from webapp_utils import set_blog_address
from session import site_is_verified
from languages import set_actor_languages
from languages import get_actor_languages
from posts import set_post_expiry_keep_dms
from posts import get_post_expiry_keep_dms
from posts import set_post_expiry_days
from posts import get_post_expiry_days
from posts import set_max_profile_posts
from posts import get_max_profile_posts
from tox import get_tox_address
from tox import set_tox_address
from lxmf import get_lxmf_address
from lxmf import set_lxmf_address
from briar import get_briar_address
from briar import set_briar_address
from cwtch import get_cwtch_address
from cwtch import set_cwtch_address
from enigma import get_enigma_pub_key
from enigma import set_enigma_pub_key
from website import get_website
from website import set_website
from website import get_gemini_link
from website import set_gemini_link
from donate import get_donation_url
from donate import set_donation_url
from person import get_featured_hashtags
from person import set_featured_hashtags
from blocking import save_block_federated_endpoints
from blocking import import_blocking_file
from blocking import add_account_blocks
from blocking import set_broch_mode
from shares import merge_shared_item_tokens
from roles import set_roles_from_list
from schedule import remove_scheduled_posts
from cwlists import get_cw_list_variable
from cache import remove_avatar_from_cache
from cache import store_person_in_cache
from daemon_utils import post_to_outbox
from data import save_string
from data import save_flag_file
from data import erase_file
from data import is_a_file
from data import is_a_dir
from data import makedir
from src.blocking import save_blocked_military
from src.blocking import save_blocked_government
from src.blocking import save_blocked_bluesky
from src.blocking import save_blocked_nostr
from src.httpheaders import redirect_headers
from src.httpheaders import clear_login_details
from src.flags import is_artist
from src.flags import is_memorial_account
from src.flags import is_premium_account
from src.flags import is_moderator
from src.timeFunctions import get_account_timezone
from src.timeFunctions import set_account_timezone
from src.utils import resembles_domain
from src.utils import is_yggdrasil_url
from src.utils import is_yggdrasil_address
from src.utils import data_dir
from src.utils import set_premium_account
from src.utils import save_json
from src.utils import save_reverse_timeline
from src.utils import set_minimize_all_images
from src.utils import set_memorials
from src.utils import get_memorials
from src.utils import license_link_from_name
from src.utils import resembles_url
from src.utils import set_config_param
from src.utils import set_reply_interval_hours
from src.utils import valid_password
from src.utils import remove_eol
from src.utils import remove_html
from src.utils import get_url_from_post
from src.utils import load_json
from src.utils import acct_dir
from src.utils import get_config_param
from src.utils import get_instance_url
from src.utils import get_nickname_from_actor
from src.occupation import get_occupation_name
from src.auth import store_basic_credentials
from src.filters import is_filtered
from src.content import add_name_emojis_to_tags
from src.content import add_html_tags
from src.content import extract_text_fields_in_post
from src.content import extract_media_in_form_post
from src.content import save_media_in_form_post
from src.textmode import get_text_mode_banner
from src.theme import enable_grayscale
from src.theme import disable_grayscale
from src.theme import get_theme
from src.theme import is_news_theme_name
from src.theme import set_news_avatar
from src.theme import set_theme
from src.theme import export_theme
from src.theme import import_theme
from src.city import get_spoofed_city
from src.media import convert_image_to_low_bandwidth
from src.media import process_meta_data
from src.webapp_welcome import welcome_screen_is_complete
from src.skills import no_of_actor_skills
from src.skills import actor_has_skill
from src.skills import actor_skill_value
from src.skills import set_actor_skill_level
from src.categories import set_hashtag_category
from src.person import deactivate_account
from src.person import get_actor_move_json
from src.person import get_actor_update_json
from src.person import add_actor_update_timestamp
from src.person import randomize_actor_images
from src.person import get_default_person_context
from src.person import update_memorial_flags
from src.pgp import set_pgp_pub_key
from src.pgp import get_pgp_pub_key
from src.pgp import get_email_address
from src.pgp import set_email_address
from src.pgp import get_deltachat_invite
from src.pgp import set_deltachat_invite
from src.pgp import set_pgp_fingerprint
from src.pgp import get_pgp_fingerprint
from src.pronouns import get_pronouns
from src.pronouns import set_pronouns
from src.discord import get_discord
from src.discord import set_discord
from src.music import get_music_site_url
from src.music import set_music_site_url
from src.art import get_art_site_url
from src.art import set_art_site_url
from src.youtube import get_youtube
from src.youtube import set_youtube
from src.pixelfed import get_pixelfed
from src.pixelfed import set_pixelfed
from src.peertube import get_peertube
from src.peertube import set_peertube
from src.loops import get_loops
from src.loops import set_loops
from src.xmpp import get_xmpp_address
from src.xmpp import set_xmpp_address
from src.matrix import get_matrix_address
from src.matrix import set_matrix_address
from src.ssb import get_ssb_address
from src.ssb import set_ssb_address
from src.occupation import set_occupation_name
from src.blog import get_blog_address
from src.webapp_utils import set_blog_address
from src.session import site_is_verified
from src.languages import set_actor_languages
from src.languages import get_actor_languages
from src.posts import set_post_expiry_keep_dms
from src.posts import get_post_expiry_keep_dms
from src.posts import set_post_expiry_days
from src.posts import get_post_expiry_days
from src.posts import set_max_profile_posts
from src.posts import get_max_profile_posts
from src.tox import get_tox_address
from src.tox import set_tox_address
from src.lxmf import get_lxmf_address
from src.lxmf import set_lxmf_address
from src.briar import get_briar_address
from src.briar import set_briar_address
from src.cwtch import get_cwtch_address
from src.cwtch import set_cwtch_address
from src.enigma import get_enigma_pub_key
from src.enigma import set_enigma_pub_key
from src.website import get_website
from src.website import set_website
from src.website import get_gemini_link
from src.website import set_gemini_link
from src.donate import get_donation_url
from src.donate import set_donation_url
from src.person import get_featured_hashtags
from src.person import set_featured_hashtags
from src.blocking import save_block_federated_endpoints
from src.blocking import import_blocking_file
from src.blocking import add_account_blocks
from src.blocking import set_broch_mode
from src.shares import merge_shared_item_tokens
from src.roles import set_roles_from_list
from src.schedule import remove_scheduled_posts
from src.cwlists import get_cw_list_variable
from src.cache import remove_avatar_from_cache
from src.cache import store_person_in_cache
from src.daemon_utils import post_to_outbox
from src.data import save_string
from src.data import save_flag_file
from src.data import erase_file
from src.data import is_a_file
from src.data import is_a_dir
from src.data import makedir
def _profile_post_deactivate_account(base_dir: str, nickname: str, domain: str,
@ -2703,10 +2703,10 @@ def profile_edit(self, calling_domain: str, cookie: str,
except SocketError as ex:
if ex.errno == errno.ECONNRESET:
print('EX: connection was reset while ' +
'reading bytes from http form POST')
'reading bytes from src.http form POST')
else:
print('EX: error while reading bytes ' +
'from http form POST')
'from src.http form POST')
self.send_response(400)
self.end_headers()
self.server.postreq_busy = False

View File

@ -10,26 +10,26 @@ __module_group__ = "Daemon POST"
import errno
import urllib.parse
from socket import error as SocketError
from utils import replace_strings
from utils import remove_post_from_cache
from utils import get_cached_post_filename
from utils import load_json
from utils import locate_post
from utils import get_full_domain
from utils import get_domain_from_actor
from utils import text_in_file
from utils import get_nickname_from_actor
from utils import acct_dir
from utils import is_yggdrasil_address
from httpheaders import redirect_headers
from city import get_spoofed_city
from languages import get_understood_languages
from posts import create_direct_message_post
from daemon_utils import post_to_outbox
from inbox import populate_replies
from data import append_string
from data import erase_file
from data import is_a_file
from src.utils import replace_strings
from src.utils import remove_post_from_cache
from src.utils import get_cached_post_filename
from src.utils import load_json
from src.utils import locate_post
from src.utils import get_full_domain
from src.utils import get_domain_from_actor
from src.utils import text_in_file
from src.utils import get_nickname_from_actor
from src.utils import acct_dir
from src.utils import is_yggdrasil_address
from src.httpheaders import redirect_headers
from src.city import get_spoofed_city
from src.languages import get_understood_languages
from src.posts import create_direct_message_post
from src.daemon_utils import post_to_outbox
from src.inbox import populate_replies
from src.data import append_string
from src.data import erase_file
from src.data import is_a_file
def receive_vote(self, calling_domain: str, cookie: str,

View File

@ -13,63 +13,63 @@ import copy
import errno
from shutil import copyfile
from socket import error as SocketError
from shares import add_share
from languages import get_understood_languages
from languages import set_default_post_language
from content import get_price_from_string
from content import replace_emoji_from_tags
from content import add_html_tags
from content import extract_text_fields_in_post
from content import extract_media_in_form_post
from content import save_media_in_form_post
from media import apply_watermark_to_image
from media import replace_twitter
from media import replace_you_tube
from media import process_meta_data
from media import convert_image_to_low_bandwidth
from media import attach_media
from city import get_spoofed_city
from flags import is_image_file
from flags import is_float
from searchable import set_searchable_by
from timeFunctions import date_utcnow
from timeFunctions import date_from_string_format
from utils import get_instance_url
from utils import save_json
from utils import remove_post_from_cache
from utils import load_json
from utils import locate_post
from utils import refresh_newswire
from utils import get_base_content_from_post
from utils import license_link_from_name
from utils import get_config_param
from utils import acct_dir
from posts import create_reading_post
from posts import create_question_post
from posts import create_report_post
from posts import create_direct_message_post
from posts import create_followers_only_post
from posts import create_unlisted_post
from posts import create_blog_post
from posts import create_public_post
from posts import undo_pinned_post
from posts import pin_post2
from inbox import populate_replies
from inbox import update_edited_post
from daemon_utils import post_to_outbox
from webapp_column_right import html_citations
from httpheaders import set_headers
from httpcodes import write2
from cache import store_person_in_cache
from cache import remove_person_from_cache
from cache import get_person_from_cache
from shares import add_shares_to_actor
from person import get_actor_update_json
from maps import geocoords_to_osm_link
from data import save_string
from data import erase_file
from data import move_file
from data import is_a_file
from src.shares import add_share
from src.languages import get_understood_languages
from src.languages import set_default_post_language
from src.content import get_price_from_string
from src.content import replace_emoji_from_tags
from src.content import add_html_tags
from src.content import extract_text_fields_in_post
from src.content import extract_media_in_form_post
from src.content import save_media_in_form_post
from src.media import apply_watermark_to_image
from src.media import replace_twitter
from src.media import replace_you_tube
from src.media import process_meta_data
from src.media import convert_image_to_low_bandwidth
from src.media import attach_media
from src.city import get_spoofed_city
from src.flags import is_image_file
from src.flags import is_float
from src.searchable import set_searchable_by
from src.timeFunctions import date_utcnow
from src.timeFunctions import date_from_string_format
from src.utils import get_instance_url
from src.utils import save_json
from src.utils import remove_post_from_cache
from src.utils import load_json
from src.utils import locate_post
from src.utils import refresh_newswire
from src.utils import get_base_content_from_post
from src.utils import license_link_from_name
from src.utils import get_config_param
from src.utils import acct_dir
from src.posts import create_reading_post
from src.posts import create_question_post
from src.posts import create_report_post
from src.posts import create_direct_message_post
from src.posts import create_followers_only_post
from src.posts import create_unlisted_post
from src.posts import create_blog_post
from src.posts import create_public_post
from src.posts import undo_pinned_post
from src.posts import pin_post2
from src.inbox import populate_replies
from src.inbox import update_edited_post
from src.daemon_utils import post_to_outbox
from src.webapp_column_right import html_citations
from src.httpheaders import set_headers
from src.httpcodes import write2
from src.cache import store_person_in_cache
from src.cache import remove_person_from_cache
from src.cache import get_person_from_cache
from src.shares import add_shares_to_actor
from src.person import get_actor_update_json
from src.maps import geocoords_to_osm_link
from src.data import save_string
from src.data import erase_file
from src.data import move_file
from src.data import is_a_file
NEW_POST_SUCCESS = 1
NEW_POST_FAILED = -1

View File

@ -10,28 +10,28 @@ __module_group__ = "Daemon POST"
import errno
import urllib.parse
from socket import error as SocketError
from utils import save_json
from utils import load_json
from utils import acct_dir
from utils import get_instance_url
from utils import get_domain_from_actor
from utils import local_actor_url
from utils import get_config_param
from utils import get_nickname_from_actor
from utils import is_yggdrasil_address
from reading import remove_reading_event
from httpheaders import redirect_headers
from flags import is_moderator
from shares import remove_shared_item2
from shares import add_shares_to_actor
from cache import store_person_in_cache
from cache import remove_person_from_cache
from cache import get_person_from_cache
from person import get_actor_update_json
from daemon_utils import post_to_outbox_thread
from daemon_utils import post_to_outbox
from happening import remove_calendar_event
from data import is_a_file
from src.utils import save_json
from src.utils import load_json
from src.utils import acct_dir
from src.utils import get_instance_url
from src.utils import get_domain_from_actor
from src.utils import local_actor_url
from src.utils import get_config_param
from src.utils import get_nickname_from_actor
from src.utils import is_yggdrasil_address
from src.reading import remove_reading_event
from src.httpheaders import redirect_headers
from src.flags import is_moderator
from src.shares import remove_shared_item2
from src.shares import add_shares_to_actor
from src.cache import store_person_in_cache
from src.cache import remove_person_from_cache
from src.cache import get_person_from_cache
from src.person import get_actor_update_json
from src.daemon_utils import post_to_outbox_thread
from src.daemon_utils import post_to_outbox
from src.happening import remove_calendar_event
from src.data import is_a_file
def remove_reading_status(self, calling_domain: str, cookie: str,

View File

@ -10,30 +10,30 @@ __module_group__ = "Daemon POST"
import errno
import urllib.parse
from socket import error as SocketError
from utils import get_instance_url
from httpcodes import write2
from httpheaders import login_headers
from httpheaders import redirect_headers
from utils import string_ends_with
from utils import has_users_path
from utils import get_nickname_from_actor
from utils import get_domain_from_actor
from utils import get_full_domain
from utils import local_actor_url
from utils import remove_eol
from utils import valid_nickname
from utils import is_yggdrasil_url
from webapp_utils import get_avatar_image_url
from webapp_search import html_hashtag_search
from webapp_search import html_skills_search
from webapp_search import html_history_search
from webapp_search import html_search_emoji
from webapp_search import html_search_shared_items
from webapp_profile import html_profile_after_search
from follow import is_follower_of_person
from follow import is_following_actor
from session import establish_session
from daemon_utils import show_person_options
from src.utils import get_instance_url
from src.httpcodes import write2
from src.httpheaders import login_headers
from src.httpheaders import redirect_headers
from src.utils import string_ends_with
from src.utils import has_users_path
from src.utils import get_nickname_from_actor
from src.utils import get_domain_from_actor
from src.utils import get_full_domain
from src.utils import local_actor_url
from src.utils import remove_eol
from src.utils import valid_nickname
from src.utils import is_yggdrasil_url
from src.webapp_utils import get_avatar_image_url
from src.webapp_search import html_hashtag_search
from src.webapp_search import html_skills_search
from src.webapp_search import html_history_search
from src.webapp_search import html_search_emoji
from src.webapp_search import html_search_shared_items
from src.webapp_profile import html_profile_after_search
from src.follow import is_follower_of_person
from src.follow import is_following_actor
from src.session import establish_session
from src.daemon_utils import show_person_options
def _receive_search_redirect(self, calling_domain: str,

View File

@ -10,12 +10,12 @@ __module_group__ = "Daemon POST"
import errno
import urllib.parse
from socket import error as SocketError
from theme import reset_theme_designer_settings
from theme import set_theme
from theme import set_theme_from_designer
from httpheaders import redirect_headers
from utils import load_json
from utils import is_yggdrasil_address
from src.theme import reset_theme_designer_settings
from src.theme import set_theme
from src.theme import set_theme_from_designer
from src.httpheaders import redirect_headers
from src.utils import load_json
from src.utils import is_yggdrasil_address
def theme_designer_edit(self, calling_domain: str, cookie: str,
@ -27,7 +27,7 @@ def theme_designer_edit(self, calling_domain: str, cookie: str,
allow_local_network_access: bool,
system_language: str,
dyslexic_font: bool) -> None:
"""Receive POST from webapp_theme_designer
"""Receive POST from src.webapp_theme_designer
"""
users_path = '/users/' + nickname
origin_path_str = \
@ -148,7 +148,7 @@ def theme_designer_edit(self, calling_domain: str, cookie: str,
else:
self.server.full_width_tl_button_header = False
# redirect back from theme designer screen
# redirect back from src.theme designer screen
if calling_domain.endswith('.onion') and onion_domain:
origin_path_str = \
'http://' + onion_domain + users_path + '/' + default_timeline

View File

@ -8,78 +8,78 @@ __status__ = "Production"
__module_group__ = "Daemon"
import time
from auth import authorize
from threads import thread_with_trace
from threads import begin_thread
from outbox import post_message_to_outbox
from city import get_spoofed_city
from httpcodes import http_404
from httpcodes import http_503
from httpcodes import http_400
from httpcodes import write2
from context import has_valid_context
from inbox import save_post_to_inbox_queue
from inbox import clear_queue_items
from blocking import update_blocked_cache
from blocking import is_blocked_nickname
from blocking import is_blocked_domain
from content import valid_url_lengths
from posts import add_to_field
from status import actor_status_expired
from status import get_actor_status
from mitm import detect_mitm
from utils import valid_nickname
from utils import is_yggdrasil_url
from utils import data_dir
from utils import load_json
from utils import save_json
from utils import get_instance_url
from utils import remove_html
from utils import get_locked_account
from utils import post_summary_contains_links
from utils import get_local_network_addresses
from utils import has_object_dict
from utils import get_nickname_from_actor
from utils import get_domain_from_actor
from utils import get_actor_from_post
from utils import has_actor
from utils import resembles_url
from flags import local_only_is_local
from flags import is_system_account
from cache import check_for_changed_actor
from cache import get_person_from_cache
from website import get_website
from website import get_gemini_link
from donate import get_donation_url
from pronouns import get_pronouns
from discord import get_discord
from art import get_art_site_url
from music import get_music_site_url
from youtube import get_youtube
from pixelfed import get_pixelfed
from peertube import get_peertube
from loops import get_loops
from xmpp import get_xmpp_address
from matrix import get_matrix_address
from ssb import get_ssb_address
from blog import get_blog_address
from tox import get_tox_address
from lxmf import get_lxmf_address
from briar import get_briar_address
from cwtch import get_cwtch_address
from pgp import get_pgp_fingerprint
from pgp import get_email_address
from pgp import get_deltachat_invite
from pgp import get_pgp_pub_key
from enigma import get_enigma_pub_key
from git import get_repo_url
from webapp_person_options import html_person_options
from httpheaders import redirect_headers
from httpheaders import set_headers
from fitnessFunctions import fitness_performance
from siteactive import is_online
from data import load_string
from data import is_a_file
from src.auth import authorize
from src.threads import thread_with_trace
from src.threads import begin_thread
from src.outbox import post_message_to_outbox
from src.city import get_spoofed_city
from src.httpcodes import http_404
from src.httpcodes import http_503
from src.httpcodes import http_400
from src.httpcodes import write2
from src.context import has_valid_context
from src.inbox import save_post_to_inbox_queue
from src.inbox import clear_queue_items
from src.blocking import update_blocked_cache
from src.blocking import is_blocked_nickname
from src.blocking import is_blocked_domain
from src.content import valid_url_lengths
from src.posts import add_to_field
from src.status import actor_status_expired
from src.status import get_actor_status
from src.mitm import detect_mitm
from src.utils import valid_nickname
from src.utils import is_yggdrasil_url
from src.utils import data_dir
from src.utils import load_json
from src.utils import save_json
from src.utils import get_instance_url
from src.utils import remove_html
from src.utils import get_locked_account
from src.utils import post_summary_contains_links
from src.utils import get_local_network_addresses
from src.utils import has_object_dict
from src.utils import get_nickname_from_actor
from src.utils import get_domain_from_actor
from src.utils import get_actor_from_post
from src.utils import has_actor
from src.utils import resembles_url
from src.flags import local_only_is_local
from src.flags import is_system_account
from src.cache import check_for_changed_actor
from src.cache import get_person_from_cache
from src.website import get_website
from src.website import get_gemini_link
from src.donate import get_donation_url
from src.pronouns import get_pronouns
from src.discord import get_discord
from src.art import get_art_site_url
from src.music import get_music_site_url
from src.youtube import get_youtube
from src.pixelfed import get_pixelfed
from src.peertube import get_peertube
from src.loops import get_loops
from src.xmpp import get_xmpp_address
from src.matrix import get_matrix_address
from src.ssb import get_ssb_address
from src.blog import get_blog_address
from src.tox import get_tox_address
from src.lxmf import get_lxmf_address
from src.briar import get_briar_address
from src.cwtch import get_cwtch_address
from src.pgp import get_pgp_fingerprint
from src.pgp import get_email_address
from src.pgp import get_deltachat_invite
from src.pgp import get_pgp_pub_key
from src.enigma import get_enigma_pub_key
from src.git import get_repo_url
from src.webapp_person_options import html_person_options
from src.httpheaders import redirect_headers
from src.httpheaders import set_headers
from src.fitnessFunctions import fitness_performance
from src.siteactive import is_online
from src.data import load_string
from src.data import is_a_file
def post_to_outbox(self, message_json: {}, version: str,

View File

@ -9,27 +9,27 @@ __module_group__ = "ActivityPub"
import os
from datetime import datetime, timezone
from utils import has_object_string
from utils import remove_domain_port
from utils import has_users_path
from utils import get_full_domain
from utils import remove_id_ending
from utils import get_nickname_from_actor
from utils import get_domain_from_actor
from utils import locate_post
from utils import delete_post
from utils import remove_moderation_post_from_index
from utils import local_actor_url
from utils import get_actor_from_post
from timeFunctions import date_epoch
from timeFunctions import date_from_numbers
from timeFunctions import date_utcnow
from session import post_json
from webfinger import webfinger_handle
from auth import create_basic_auth_header
from posts import get_person_box
from data import erase_file
from data import is_a_file
from src.utils import has_object_string
from src.utils import remove_domain_port
from src.utils import has_users_path
from src.utils import get_full_domain
from src.utils import remove_id_ending
from src.utils import get_nickname_from_actor
from src.utils import get_domain_from_actor
from src.utils import locate_post
from src.utils import delete_post
from src.utils import remove_moderation_post_from_index
from src.utils import local_actor_url
from src.utils import get_actor_from_post
from src.timeFunctions import date_epoch
from src.timeFunctions import date_from_numbers
from src.timeFunctions import date_utcnow
from src.session import post_json
from src.webfinger import webfinger_handle
from src.auth import create_basic_auth_header
from src.posts import get_person_box
from src.data import erase_file
from src.data import is_a_file
def send_delete_via_server(base_dir: str, session,

View File

@ -16,68 +16,68 @@ import webbrowser
import urllib.parse
from pathlib import Path
from random import randint
from flags import is_pgp_encrypted
from utils import string_starts_with
from utils import replace_strings
from utils import get_post_attachments
from utils import get_url_from_post
from utils import get_actor_languages_list
from utils import get_attributed_to
from utils import remove_html
from utils import safe_system_string
from utils import text_in_file
from utils import disallow_reply
from utils import get_base_content_from_post
from utils import has_object_dict
from utils import get_full_domain
from utils import is_dm
from utils import load_translations_from_file
from utils import get_nickname_from_actor
from utils import get_domain_from_actor
from utils import local_actor_url
from utils import get_reply_to
from utils import get_actor_from_post
from session import create_session
from speaker import speakable_text
from speaker import get_speaker_pitch
from speaker import get_speaker_rate
from speaker import get_speaker_range
from like import send_like_via_server
from like import send_undo_like_via_server
from follow import approve_follow_request_via_server
from follow import deny_follow_request_via_server
from follow import get_follow_requests_via_server
from follow import get_following_via_server
from follow import get_followers_via_server
from follow import send_follow_request_via_server
from follow import send_unfollow_request_via_server
from sendC2S import send_post_via_server
from sendC2S import send_block_via_server
from sendC2S import send_undo_block_via_server
from sendC2S import send_mute_via_server
from sendC2S import send_undo_mute_via_server
from posts import c2s_box_json
from posts import download_announce
from announce import send_announce_via_server
from announce import send_undo_announce_via_server
from announce import disallow_announce
from pgp import pgp_local_public_key
from pgp import pgp_decrypt
from pgp import has_local_pg_pkey
from pgp import pgp_encrypt_to_actor
from pgp import pgp_public_key_upload
from like import no_of_likes
from bookmarks import send_bookmark_via_server
from bookmarks import send_undo_bookmark_via_server
from delete import send_delete_via_server
from person import get_actor_json
from cache import get_person_from_cache
from data import save_string
from data import load_string
from data import prepend_string
from data import is_a_file
from data import is_a_dir
from data import makedir
from src.flags import is_pgp_encrypted
from src.utils import string_starts_with
from src.utils import replace_strings
from src.utils import get_post_attachments
from src.utils import get_url_from_post
from src.utils import get_actor_languages_list
from src.utils import get_attributed_to
from src.utils import remove_html
from src.utils import safe_system_string
from src.utils import text_in_file
from src.utils import disallow_reply
from src.utils import get_base_content_from_post
from src.utils import has_object_dict
from src.utils import get_full_domain
from src.utils import is_dm
from src.utils import load_translations_from_file
from src.utils import get_nickname_from_actor
from src.utils import get_domain_from_actor
from src.utils import local_actor_url
from src.utils import get_reply_to
from src.utils import get_actor_from_post
from src.session import create_session
from src.speaker import speakable_text
from src.speaker import get_speaker_pitch
from src.speaker import get_speaker_rate
from src.speaker import get_speaker_range
from src.like import send_like_via_server
from src.like import send_undo_like_via_server
from src.follow import approve_follow_request_via_server
from src.follow import deny_follow_request_via_server
from src.follow import get_follow_requests_via_server
from src.follow import get_following_via_server
from src.follow import get_followers_via_server
from src.follow import send_follow_request_via_server
from src.follow import send_unfollow_request_via_server
from src.sendC2S import send_post_via_server
from src.sendC2S import send_block_via_server
from src.sendC2S import send_undo_block_via_server
from src.sendC2S import send_mute_via_server
from src.sendC2S import send_undo_mute_via_server
from src.posts import c2s_box_json
from src.posts import download_announce
from src.announce import send_announce_via_server
from src.announce import send_undo_announce_via_server
from src.announce import disallow_announce
from src.pgp import pgp_local_public_key
from src.pgp import pgp_decrypt
from src.pgp import has_local_pg_pkey
from src.pgp import pgp_encrypt_to_actor
from src.pgp import pgp_public_key_upload
from src.like import no_of_likes
from src.bookmarks import send_bookmark_via_server
from src.bookmarks import send_undo_bookmark_via_server
from src.delete import send_delete_via_server
from src.person import get_actor_json
from src.cache import get_person_from_cache
from src.data import save_string
from src.data import load_string
from src.data import prepend_string
from src.data import is_a_file
from src.data import is_a_dir
from src.data import makedir
def _desktop_help() -> None:

View File

@ -8,9 +8,9 @@ __status__ = "Production"
__module_group__ = "Profile Metadata"
from utils import get_attachment_property_value
from utils import remove_html
from utils import string_contains
from src.utils import get_attachment_property_value
from src.utils import remove_html
from src.utils import string_contains
discord_fieldnames = ['discord']

View File

@ -8,9 +8,9 @@ __status__ = "Production"
__module_group__ = "Profile Metadata"
from utils import get_attachment_property_value
from utils import remove_html
from utils import remove_link_tracking
from src.utils import get_attachment_property_value
from src.utils import remove_html
from src.utils import remove_link_tracking
def _get_donation_types() -> []:

View File

@ -8,8 +8,8 @@ __status__ = "Production"
__module_group__ = "Profile Metadata"
from utils import get_attachment_property_value
from utils import remove_html
from src.utils import get_attachment_property_value
from src.utils import remove_html
def get_enigma_pub_key(actor_json: {}) -> str:

View File

@ -8,7 +8,7 @@ __status__ = "Production"
__module_group__ = "RSS Feeds"
from utils import escape_text
from src.utils import escape_text
def rss2tag_header(hashtag: str, http_prefix: str, domain_full: str) -> str:

View File

@ -8,18 +8,18 @@ __status__ = "Production"
__module_group__ = "Moderation"
import fnmatch
from utils import data_dir
from utils import acct_dir
from utils import text_in_file
from utils import remove_eol
from unicodetext import standardize_text
from unicodetext import remove_inverted_text
from unicodetext import remove_square_capitals
from data import append_string
from data import save_string
from data import load_list
from data import move_file
from data import is_a_file
from src.utils import data_dir
from src.utils import acct_dir
from src.utils import text_in_file
from src.utils import remove_eol
from src.unicodetext import standardize_text
from src.unicodetext import remove_inverted_text
from src.unicodetext import remove_square_capitals
from src.data import append_string
from src.data import save_string
from src.data import load_list
from src.data import move_file
from src.data import is_a_file
def add_filter(base_dir: str, nickname: str, domain: str, words: str) -> bool:

View File

@ -8,12 +8,12 @@ __status__ = "Production"
__module_group__ = "Core"
import time
from webapp_utils import html_header_with_external_style
from webapp_utils import html_footer
from utils import data_dir
from utils import get_config_param
from utils import save_json
from data import is_a_file
from src.webapp_utils import html_header_with_external_style
from src.webapp_utils import html_footer
from src.utils import data_dir
from src.utils import get_config_param
from src.utils import save_json
from src.data import is_a_file
def fitness_performance(start_time, fitness_state: {},

View File

@ -8,30 +8,30 @@ __status__ = "Production"
__module_group__ = "Core"
import re
from timeFunctions import date_utcnow
from timeFunctions import get_published_date
from timeFunctions import date_from_string_format
from timeFunctions import date_epoch
from utils import get_full_domain
from utils import get_domain_from_actor
from utils import acct_dir
from utils import data_dir
from utils import get_config_param
from utils import evil_incarnate
from utils import get_local_network_addresses
from utils import get_attributed_to
from utils import is_dm
from utils import has_object_dict
from utils import locate_post
from utils import load_json
from utils import has_object_string_type
from utils import get_reply_to
from utils import text_in_file
from utils import get_group_paths
from formats import get_image_extensions
from quote import get_quote_toot_url
from data import load_string
from data import is_a_file
from src.timeFunctions import date_utcnow
from src.timeFunctions import get_published_date
from src.timeFunctions import date_from_string_format
from src.timeFunctions import date_epoch
from src.utils import get_full_domain
from src.utils import get_domain_from_actor
from src.utils import acct_dir
from src.utils import data_dir
from src.utils import get_config_param
from src.utils import evil_incarnate
from src.utils import get_local_network_addresses
from src.utils import get_attributed_to
from src.utils import is_dm
from src.utils import has_object_dict
from src.utils import locate_post
from src.utils import load_json
from src.utils import has_object_string_type
from src.utils import get_reply_to
from src.utils import text_in_file
from src.utils import get_group_paths
from src.formats import get_image_extensions
from src.quote import get_quote_toot_url
from src.data import load_string
from src.data import is_a_file
def is_featured_writer(base_dir: str, nickname: str, domain: str) -> bool:

View File

@ -9,51 +9,51 @@ __module_group__ = "ActivityPub"
import os
from pprint import pprint
from flags import has_group_type
from utils import string_starts_with
from utils import is_yggdrasil_address
from utils import is_yggdrasil_url
from utils import get_user_paths
from utils import acct_handle_dir
from utils import has_object_string_object
from utils import has_object_string_type
from utils import remove_domain_port
from utils import has_users_path
from utils import get_full_domain
from utils import valid_nickname
from utils import domain_permitted
from utils import get_domain_from_actor
from utils import get_nickname_from_actor
from utils import follow_person
from utils import load_json
from utils import save_json
from utils import is_account_dir
from utils import acct_dir
from utils import local_actor_url
from utils import text_in_file
from utils import remove_eol
from utils import get_actor_from_post
from utils import data_dir
from status import get_status_number
from posts import send_signed_json
from posts import get_person_box
from acceptreject import create_accept
from acceptreject import create_reject
from webfinger import webfinger_handle
from auth import create_basic_auth_header
from session import get_json
from session import get_json_valid
from session import post_json
from followerSync import remove_followers_sync
from data import load_string
from data import append_string
from data import load_list
from data import save_string
from data import erase_file
from data import move_file
from data import is_a_file
from data import is_a_dir
from data import makedir
from src.flags import has_group_type
from src.utils import string_starts_with
from src.utils import is_yggdrasil_address
from src.utils import is_yggdrasil_url
from src.utils import get_user_paths
from src.utils import acct_handle_dir
from src.utils import has_object_string_object
from src.utils import has_object_string_type
from src.utils import remove_domain_port
from src.utils import has_users_path
from src.utils import get_full_domain
from src.utils import valid_nickname
from src.utils import domain_permitted
from src.utils import get_domain_from_actor
from src.utils import get_nickname_from_actor
from src.utils import follow_person
from src.utils import load_json
from src.utils import save_json
from src.utils import is_account_dir
from src.utils import acct_dir
from src.utils import local_actor_url
from src.utils import text_in_file
from src.utils import remove_eol
from src.utils import get_actor_from_post
from src.utils import data_dir
from src.status import get_status_number
from src.posts import send_signed_json
from src.posts import get_person_box
from src.acceptreject import create_accept
from src.acceptreject import create_reject
from src.webfinger import webfinger_handle
from src.auth import create_basic_auth_header
from src.session import get_json
from src.session import get_json_valid
from src.session import post_json
from src.followerSync import remove_followers_sync
from src.data import load_string
from src.data import append_string
from src.data import load_list
from src.data import save_string
from src.data import erase_file
from src.data import move_file
from src.data import is_a_file
from src.data import is_a_dir
from src.data import makedir
def create_initial_last_seen(base_dir: str, http_prefix: str) -> None:
@ -118,7 +118,7 @@ def _remove_from_follow_base(base_dir: str,
nickname: str, domain: str,
accept_or_deny_handle: str, follow_file: str,
debug: bool) -> None:
"""Removes a handle/actor from follow requests or rejects file
"""Removes a handle/actor from src.follow requests or rejects file
"""
accounts_dir: str = acct_dir(base_dir, nickname, domain)
approve_follows_filename: str = accounts_dir + '/' + follow_file + '.txt'
@ -179,7 +179,7 @@ def _remove_from_follow_base(base_dir: str,
def remove_from_follow_requests(base_dir: str,
nickname: str, domain: str,
deny_handle: str, debug: bool) -> None:
"""Removes a handle from follow requests
"""Removes a handle from src.follow requests
"""
_remove_from_follow_base(base_dir, nickname, domain,
deny_handle, 'followrequests', debug)
@ -188,7 +188,7 @@ def remove_from_follow_requests(base_dir: str,
def _remove_from_follow_rejects(base_dir: str,
nickname: str, domain: str,
accept_handle: str, debug: bool) -> None:
"""Removes a handle from follow rejects
"""Removes a handle from src.follow rejects
"""
_remove_from_follow_base(base_dir, nickname, domain,
accept_handle, 'followrejects', debug)

View File

@ -9,10 +9,10 @@ __module_group__ = "ActivityPub"
import hashlib
from hashlib import sha256
from utils import acct_dir
from utils import get_user_paths
from data import load_string
from data import is_a_file
from src.utils import acct_dir
from src.utils import get_user_paths
from src.data import load_string
from src.data import is_a_file
def remove_followers_sync(followers_sync_cache: {},

View File

@ -7,9 +7,9 @@ __email__ = "bob@libreserver.org"
__status__ = "Production"
__module_group__ = "Calendar"
from data import load_string
from data import save_string
from data import is_a_file
from src.data import load_string
from src.data import save_string
from src.data import is_a_file
def _data_dir2(base_dir) -> str:

View File

@ -8,17 +8,17 @@ __status__ = "Production"
__module_group__ = "Timeline"
import shutil
from utils import acct_dir
from utils import remove_html
from utils import get_base_content_from_post
from utils import get_post_attachments
from utils import get_url_from_post
from utils import get_gemini_blog_title
from utils import get_gemini_blog_published
from utils import get_gemini_blog_filename
from data import save_string
from data import is_a_dir
from data import makedir
from src.utils import acct_dir
from src.utils import remove_html
from src.utils import get_base_content_from_post
from src.utils import get_post_attachments
from src.utils import get_url_from_post
from src.utils import get_gemini_blog_title
from src.utils import get_gemini_blog_published
from src.utils import get_gemini_blog_filename
from src.data import save_string
from src.data import is_a_dir
from src.data import makedir
def blog_to_gemini(base_dir: str, nickname: str, domain: str,

View File

@ -8,18 +8,18 @@ __status__ = "Production"
__module_group__ = "Profile Metadata"
import html
from utils import remove_link_tracking
from utils import acct_dir
from utils import has_object_string_type
from utils import text_in_file
from utils import get_attachment_property_value
from utils import remove_html
from utils import get_attributed_to
from utils import string_contains
from data import save_string
from data import is_a_file
from data import is_a_dir
from data import makedir
from src.utils import remove_link_tracking
from src.utils import acct_dir
from src.utils import has_object_string_type
from src.utils import text_in_file
from src.utils import get_attachment_property_value
from src.utils import remove_html
from src.utils import get_attributed_to
from src.utils import string_contains
from src.data import save_string
from src.data import is_a_file
from src.data import is_a_dir
from src.data import makedir
def _git_format_content(content: str) -> str:

View File

@ -11,39 +11,39 @@ from uuid import UUID
from hashlib import md5
from datetime import datetime
from datetime import timedelta
from flags import is_reminder
from flags import is_public_post
from utils import resembles_url
from utils import replace_strings
from utils import acct_handle_dir
from utils import load_json
from utils import save_json
from utils import locate_post
from utils import has_object_dict
from utils import acct_dir
from utils import remove_html
from utils import get_display_name
from utils import delete_post
from utils import get_full_domain
from utils import text_in_file
from utils import remove_eol
from status import get_status_number
from timeFunctions import date_from_string_format
from timeFunctions import date_from_numbers
from filters import is_filtered
from context import get_individual_post_context
from session import get_method
from auth import create_basic_auth_header
from conversation import post_id_to_convthread_id
from data import load_list
from data import load_string
from data import save_string
from data import append_string
from data import prepend_string
from data import erase_file
from data import is_a_file
from data import is_a_dir
from data import makedir
from src.flags import is_reminder
from src.flags import is_public_post
from src.utils import resembles_url
from src.utils import replace_strings
from src.utils import acct_handle_dir
from src.utils import load_json
from src.utils import save_json
from src.utils import locate_post
from src.utils import has_object_dict
from src.utils import acct_dir
from src.utils import remove_html
from src.utils import get_display_name
from src.utils import delete_post
from src.utils import get_full_domain
from src.utils import text_in_file
from src.utils import remove_eol
from src.status import get_status_number
from src.timeFunctions import date_from_string_format
from src.timeFunctions import date_from_numbers
from src.filters import is_filtered
from src.context import get_individual_post_context
from src.session import get_method
from src.auth import create_basic_auth_header
from src.conversation import post_id_to_convthread_id
from src.data import load_list
from src.data import load_string
from src.data import save_string
from src.data import append_string
from src.data import prepend_string
from src.data import erase_file
from src.data import is_a_file
from src.data import is_a_dir
from src.data import makedir
def _strings_are_digits(strings_list: []) -> bool:

View File

@ -9,16 +9,16 @@ __module_group__ = "Core"
import urllib.parse
from hashlib import md5
from utils import string_contains
from utils import get_instance_url
from utils import data_dir
from utils import save_json
from utils import remove_id_ending
from utils import has_object_dict
from utils import get_attributed_to
from data import load_string
from data import save_string
from data import is_a_file
from src.utils import string_contains
from src.utils import get_instance_url
from src.utils import data_dir
from src.utils import save_json
from src.utils import remove_id_ending
from src.utils import has_object_dict
from src.utils import get_attributed_to
from src.data import load_string
from src.data import save_string
from src.data import is_a_file
def login_headers(self, file_format: str, length: int,

View File

@ -7,7 +7,7 @@ __email__ = "bob@libreserver.org"
__status__ = "Production"
__module_group__ = "Core"
from textmode import text_mode_browser
from src.textmode import text_mode_browser
def request_csv(headers: {}) -> bool:

View File

@ -21,13 +21,13 @@ from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.asymmetric import utils as hazutils
import base64
from time import gmtime, strftime
from utils import get_full_domain
from utils import get_sha_256
from utils import get_sha_512
from utils import local_actor_url
from timeFunctions import date_epoch
from timeFunctions import date_from_string_format
from timeFunctions import date_utcnow
from src.utils import get_full_domain
from src.utils import get_sha_256
from src.utils import get_sha_512
from src.utils import local_actor_url
from src.timeFunctions import date_epoch
from src.timeFunctions import date_from_string_format
from src.timeFunctions import date_utcnow
def message_content_digest(message_body_json_str: str,
@ -51,7 +51,7 @@ def get_digest_prefix(digest_algorithm: str) -> str:
def get_digest_algorithm_from_headers(http_headers: {}) -> str:
"""Returns the digest algorithm from http headers
"""Returns the digest algorithm from src.http headers
"""
digest_str = None
if http_headers.get('digest'):

View File

@ -10,22 +10,22 @@ __module_group__ = "Core"
import os
import time
import random
from utils import data_dir
from utils import get_full_domain
from utils import is_account_dir
from utils import get_nickname_from_actor
from utils import get_domain_from_actor
from utils import is_yggdrasil_address
from follow import is_following_actor
from follow import send_follow_request
from session import create_session
from session import set_session_for_sender
from threads import begin_thread
from person import set_person_notes
from data import load_string
from data import save_string
from data import erase_file
from data import is_a_file
from src.utils import data_dir
from src.utils import get_full_domain
from src.utils import is_account_dir
from src.utils import get_nickname_from_actor
from src.utils import get_domain_from_actor
from src.utils import is_yggdrasil_address
from src.follow import is_following_actor
from src.follow import send_follow_request
from src.session import create_session
from src.session import set_session_for_sender
from src.threads import begin_thread
from src.person import set_person_notes
from src.data import load_string
from src.data import save_string
from src.data import erase_file
from src.data import is_a_file
def _establish_import_session(httpd,

View File

@ -13,144 +13,144 @@ import datetime
import time
import random
from shutil import copyfile
from linked_data_sig import verify_json_signature
from flags import can_reply_to
from flags import is_system_account
from flags import is_blog_post
from flags import is_recent_post
from flags import is_reply
from flags import is_group_account
from flags import has_group_type
from flags import is_quote_toot
from flags import url_permitted
from quote import quote_toots_allowed
from mitm import save_mitm_servers
from timeFunctions import date_utcnow
from timeFunctions import date_epoch
from timeFunctions import get_account_timezone
from timeFunctions import get_current_time_int
from utils import is_yggdrasil_address
from utils import get_mutuals_of_person
from utils import harmless_markup
from utils import lines_in_file
from utils import contains_statuses
from utils import get_actor_from_post_id
from utils import acct_handle_dir
from utils import text_in_file
from utils import get_media_descriptions_from_post
from utils import get_summary_from_post
from utils import domain_permitted
from utils import get_reply_interval_hours
from utils import get_base_content_from_post
from utils import acct_dir
from utils import remove_domain_port
from utils import get_port_from_domain
from utils import has_object_dict
from utils import dm_allowed_from_domain
from utils import get_config_param
from utils import has_users_path
from utils import get_full_domain
from utils import remove_id_ending
from utils import create_inbox_queue_dir
from utils import get_domain_from_actor
from utils import get_nickname_from_actor
from utils import locate_post
from utils import delete_post
from utils import load_json
from utils import save_json
from utils import local_actor_url
from utils import get_attributed_to
from utils import get_reply_to
from utils import get_actor_from_post
from utils import data_dir
from utils import is_dm
from utils import has_actor
from utils import evil_nickname
from status import get_status_number
from httpsig import get_digest_algorithm_from_headers
from httpsig import verify_post_headers
from session import create_session
from follow import is_following_actor
from follow import get_followers_of_actor
from follow import is_follower_of_person
from follow import followed_account_accepts
from follow import store_follow_request
from follow import no_of_follow_requests
from follow import get_no_of_followers
from follow import follow_approval_required
from src.linked_data_sig import verify_json_signature
from src.flags import can_reply_to
from src.flags import is_system_account
from src.flags import is_blog_post
from src.flags import is_recent_post
from src.flags import is_reply
from src.flags import is_group_account
from src.flags import has_group_type
from src.flags import is_quote_toot
from src.flags import url_permitted
from src.quote import quote_toots_allowed
from src.mitm import save_mitm_servers
from src.timeFunctions import date_utcnow
from src.timeFunctions import date_epoch
from src.timeFunctions import get_account_timezone
from src.timeFunctions import get_current_time_int
from src.utils import is_yggdrasil_address
from src.utils import get_mutuals_of_person
from src.utils import harmless_markup
from src.utils import lines_in_file
from src.utils import contains_statuses
from src.utils import get_actor_from_post_id
from src.utils import acct_handle_dir
from src.utils import text_in_file
from src.utils import get_media_descriptions_from_post
from src.utils import get_summary_from_post
from src.utils import domain_permitted
from src.utils import get_reply_interval_hours
from src.utils import get_base_content_from_post
from src.utils import acct_dir
from src.utils import remove_domain_port
from src.utils import get_port_from_domain
from src.utils import has_object_dict
from src.utils import dm_allowed_from_domain
from src.utils import get_config_param
from src.utils import has_users_path
from src.utils import get_full_domain
from src.utils import remove_id_ending
from src.utils import create_inbox_queue_dir
from src.utils import get_domain_from_actor
from src.utils import get_nickname_from_actor
from src.utils import locate_post
from src.utils import delete_post
from src.utils import load_json
from src.utils import save_json
from src.utils import local_actor_url
from src.utils import get_attributed_to
from src.utils import get_reply_to
from src.utils import get_actor_from_post
from src.utils import data_dir
from src.utils import is_dm
from src.utils import has_actor
from src.utils import evil_nickname
from src.status import get_status_number
from src.httpsig import get_digest_algorithm_from_headers
from src.httpsig import verify_post_headers
from src.session import create_session
from src.follow import is_following_actor
from src.follow import get_followers_of_actor
from src.follow import is_follower_of_person
from src.follow import followed_account_accepts
from src.follow import store_follow_request
from src.follow import no_of_follow_requests
from src.follow import get_no_of_followers
from src.follow import follow_approval_required
from pprint import pprint
from cache import cache_svg_images
from cache import get_person_pub_key
from acceptreject import receive_accept_reject
from acceptreject import receive_quote_request
from blocking import is_blocked
from blocking import is_blocked_nickname
from blocking import is_blocked_domain
from blocking import broch_modeLapses
from blocking import contains_military_domain
from blocking import contains_government_domain
from blocking import contains_bluesky_domain
from blocking import contains_nostr_domain
from filters import is_filtered
from httpsig import message_content_digest
from posts import outbox_message_create_wrap
from posts import convert_post_content_to_html
from posts import edited_post_filename
from posts import save_post_to_box
from posts import is_create_inside_announce
from posts import create_direct_message_post
from posts import is_muted_conv
from posts import is_image_media
from posts import send_signed_json
from posts import send_to_followers_thread
from posts import post_allow_comments
from posts import valid_post_content
from webapp_post import individual_post_as_html
from question import is_vote
from media import replace_you_tube
from media import replace_twitter
from git import receive_git_patch
from followingCalendar import receiving_calendar_events
from happening import save_event_post
from context import has_valid_context
from speaker import update_speaker
from announce import create_announce
from notifyOnPost import notify_when_person_posts
from conversation import update_conversation
from webapp_hashtagswarm import store_hash_tags
from person import valid_sending_actor
from fitnessFunctions import fitness_performance
from content import reject_twitter_summary
from content import load_dogwhistles
from threads import thread_with_trace
from threads import begin_thread
from reading import store_book_events
from inbox_receive import inbox_update_index
from inbox_receive import receive_edit_to_post
from inbox_receive import receive_actor_status
from inbox_receive import receive_like
from inbox_receive import receive_reaction
from inbox_receive import receive_zot_reaction
from inbox_receive import receive_bookmark
from inbox_receive import receive_announce
from inbox_receive import receive_delete
from inbox_receive import receive_question_vote
from inbox_receive import receive_move_activity
from inbox_receive import receive_update_activity
from inbox_receive_undo import receive_undo_like
from inbox_receive_undo import receive_undo_reaction
from inbox_receive_undo import receive_undo_bookmark
from inbox_receive_undo import receive_undo_announce
from inbox_receive_undo import receive_undo
from data import save_string
from data import save_flag_file
from data import load_string
from data import append_string
from data import prepend_string
from data import erase_file
from data import is_a_file
from data import is_a_dir
from data import makedir
from src.cache import cache_svg_images
from src.cache import get_person_pub_key
from src.acceptreject import receive_accept_reject
from src.acceptreject import receive_quote_request
from src.blocking import is_blocked
from src.blocking import is_blocked_nickname
from src.blocking import is_blocked_domain
from src.blocking import broch_modeLapses
from src.blocking import contains_military_domain
from src.blocking import contains_government_domain
from src.blocking import contains_bluesky_domain
from src.blocking import contains_nostr_domain
from src.filters import is_filtered
from src.httpsig import message_content_digest
from src.posts import outbox_message_create_wrap
from src.posts import convert_post_content_to_html
from src.posts import edited_post_filename
from src.posts import save_post_to_box
from src.posts import is_create_inside_announce
from src.posts import create_direct_message_post
from src.posts import is_muted_conv
from src.posts import is_image_media
from src.posts import send_signed_json
from src.posts import send_to_followers_thread
from src.posts import post_allow_comments
from src.posts import valid_post_content
from src.webapp_post import individual_post_as_html
from src.question import is_vote
from src.media import replace_you_tube
from src.media import replace_twitter
from src.git import receive_git_patch
from src.followingCalendar import receiving_calendar_events
from src.happening import save_event_post
from src.context import has_valid_context
from src.speaker import update_speaker
from src.announce import create_announce
from src.notifyOnPost import notify_when_person_posts
from src.conversation import update_conversation
from src.webapp_hashtagswarm import store_hash_tags
from src.person import valid_sending_actor
from src.fitnessFunctions import fitness_performance
from src.content import reject_twitter_summary
from src.content import load_dogwhistles
from src.threads import thread_with_trace
from src.threads import begin_thread
from src.reading import store_book_events
from src.inbox_receive import inbox_update_index
from src.inbox_receive import receive_edit_to_post
from src.inbox_receive import receive_actor_status
from src.inbox_receive import receive_like
from src.inbox_receive import receive_reaction
from src.inbox_receive import receive_zot_reaction
from src.inbox_receive import receive_bookmark
from src.inbox_receive import receive_announce
from src.inbox_receive import receive_delete
from src.inbox_receive import receive_question_vote
from src.inbox_receive import receive_move_activity
from src.inbox_receive import receive_update_activity
from src.inbox_receive_undo import receive_undo_like
from src.inbox_receive_undo import receive_undo_reaction
from src.inbox_receive_undo import receive_undo_bookmark
from src.inbox_receive_undo import receive_undo_announce
from src.inbox_receive_undo import receive_undo
from src.data import save_string
from src.data import save_flag_file
from src.data import load_string
from src.data import append_string
from src.data import prepend_string
from src.data import erase_file
from src.data import is_a_file
from src.data import is_a_dir
from src.data import makedir
def _store_last_post_id(base_dir: str, nickname: str, domain: str,

View File

@ -9,91 +9,91 @@ __module_group__ = "Timeline"
import os
import time
from flags import is_recent_post
from flags import is_quote_toot
from status import actor_status_expired
from quote import get_quote_toot_url
from timeFunctions import get_account_timezone
from utils import valid_nickname
from utils import get_mutuals_of_person
from utils import get_actor_from_post_id
from utils import contains_invalid_actor_url_chars
from utils import get_attributed_to
from utils import remove_eol
from utils import get_protocol_prefixes
from utils import contains_statuses
from utils import delete_post
from utils import remove_moderation_post_from_index
from utils import remove_domain_port
from utils import get_reply_to
from utils import acct_handle_dir
from utils import has_object_string
from utils import has_users_path
from utils import has_object_string_type
from utils import get_config_param
from utils import acct_dir
from utils import is_dm
from utils import delete_cached_html
from utils import harmless_markup
from utils import has_object_dict
from utils import remove_post_from_cache
from utils import get_cached_post_filename
from utils import get_actor_from_post
from utils import locate_post
from utils import remove_id_ending
from utils import has_actor
from utils import text_in_file
from utils import is_account_dir
from utils import data_dir
from utils import get_nickname_from_actor
from utils import get_domain_from_actor
from utils import save_json
from utils import load_json
from utils import get_url_from_post
from utils import remove_html
from utils import get_full_domain
from utils import get_user_paths
from cache import remove_avatar_from_cache
from cache import get_person_from_cache
from cache import get_actor_public_key_from_id
from cache import store_person_in_cache
from cache import get_person_pub_key
from person import get_person_avatar_url
from filters import is_question_filtered
from question import dangerous_question
from question import question_update_votes
from posts import convert_post_content_to_html
from posts import download_announce
from posts import send_to_followers_thread
from posts import valid_post_content
from follow import send_follow_request
from follow import is_following_actor
from follow import follower_approval_active
from blocking import is_blocked
from blocking import is_blocked_domain
from blocking import is_blocked_nickname
from blocking import allowed_announce
from blocking import contains_military_domain
from blocking import contains_government_domain
from blocking import contains_bluesky_domain
from blocking import contains_nostr_domain
from like import update_likes_collection
from reaction import valid_emoji_content
from reaction import update_reaction_collection
from bookmarks import update_bookmarks_collection
from announce import update_announce_collection
from announce import is_self_announce
from speaker import update_speaker
from webapp_post import individual_post_as_html
from webapp_hashtagswarm import store_hash_tags
from data import save_string
from data import save_flag_file
from data import append_string
from data import prepend_string
from data import load_string
from data import erase_file
from data import is_a_file
from data import is_a_dir
from src.flags import is_recent_post
from src.flags import is_quote_toot
from src.status import actor_status_expired
from src.quote import get_quote_toot_url
from src.timeFunctions import get_account_timezone
from src.utils import valid_nickname
from src.utils import get_mutuals_of_person
from src.utils import get_actor_from_post_id
from src.utils import contains_invalid_actor_url_chars
from src.utils import get_attributed_to
from src.utils import remove_eol
from src.utils import get_protocol_prefixes
from src.utils import contains_statuses
from src.utils import delete_post
from src.utils import remove_moderation_post_from_index
from src.utils import remove_domain_port
from src.utils import get_reply_to
from src.utils import acct_handle_dir
from src.utils import has_object_string
from src.utils import has_users_path
from src.utils import has_object_string_type
from src.utils import get_config_param
from src.utils import acct_dir
from src.utils import is_dm
from src.utils import delete_cached_html
from src.utils import harmless_markup
from src.utils import has_object_dict
from src.utils import remove_post_from_cache
from src.utils import get_cached_post_filename
from src.utils import get_actor_from_post
from src.utils import locate_post
from src.utils import remove_id_ending
from src.utils import has_actor
from src.utils import text_in_file
from src.utils import is_account_dir
from src.utils import data_dir
from src.utils import get_nickname_from_actor
from src.utils import get_domain_from_actor
from src.utils import save_json
from src.utils import load_json
from src.utils import get_url_from_post
from src.utils import remove_html
from src.utils import get_full_domain
from src.utils import get_user_paths
from src.cache import remove_avatar_from_cache
from src.cache import get_person_from_cache
from src.cache import get_actor_public_key_from_id
from src.cache import store_person_in_cache
from src.cache import get_person_pub_key
from src.person import get_person_avatar_url
from src.filters import is_question_filtered
from src.question import dangerous_question
from src.question import question_update_votes
from src.posts import convert_post_content_to_html
from src.posts import download_announce
from src.posts import send_to_followers_thread
from src.posts import valid_post_content
from src.follow import send_follow_request
from src.follow import is_following_actor
from src.follow import follower_approval_active
from src.blocking import is_blocked
from src.blocking import is_blocked_domain
from src.blocking import is_blocked_nickname
from src.blocking import allowed_announce
from src.blocking import contains_military_domain
from src.blocking import contains_government_domain
from src.blocking import contains_bluesky_domain
from src.blocking import contains_nostr_domain
from src.like import update_likes_collection
from src.reaction import valid_emoji_content
from src.reaction import update_reaction_collection
from src.bookmarks import update_bookmarks_collection
from src.announce import update_announce_collection
from src.announce import is_self_announce
from src.speaker import update_speaker
from src.webapp_post import individual_post_as_html
from src.webapp_hashtagswarm import store_hash_tags
from src.data import save_string
from src.data import save_flag_file
from src.data import append_string
from src.data import prepend_string
from src.data import load_string
from src.data import erase_file
from src.data import is_a_file
from src.data import is_a_dir
def inbox_update_index(boxname: str, base_dir: str, handle: str,

View File

@ -7,37 +7,37 @@ __email__ = "bob@libreserver.org"
__status__ = "Production"
__module_group__ = "Timeline"
from flags import has_group_type
from timeFunctions import get_account_timezone
from announce import undo_announce_collection_entry
from utils import get_mutuals_of_person
from utils import has_object_dict
from utils import remove_domain_port
from utils import remove_id_ending
from utils import get_url_from_post
from utils import remove_html
from utils import is_dm
from utils import get_cached_post_filename
from utils import load_json
from utils import locate_post
from utils import acct_handle_dir
from utils import has_object_string_object
from utils import has_object_string_type
from utils import has_actor
from utils import get_full_domain
from utils import get_actor_from_post
from utils import has_users_path
from utils import get_domain_from_actor
from utils import get_nickname_from_actor
from like import undo_likes_collection_entry
from follow import unfollower_of_account
from follow import follower_approval_active
from bookmarks import undo_bookmarks_collection_entry
from webapp_post import individual_post_as_html
from reaction import undo_reaction_collection_entry
from data import erase_file
from data import is_a_file
from data import is_a_dir
from src.flags import has_group_type
from src.timeFunctions import get_account_timezone
from src.announce import undo_announce_collection_entry
from src.utils import get_mutuals_of_person
from src.utils import has_object_dict
from src.utils import remove_domain_port
from src.utils import remove_id_ending
from src.utils import get_url_from_post
from src.utils import remove_html
from src.utils import is_dm
from src.utils import get_cached_post_filename
from src.utils import load_json
from src.utils import locate_post
from src.utils import acct_handle_dir
from src.utils import has_object_string_object
from src.utils import has_object_string_type
from src.utils import has_actor
from src.utils import get_full_domain
from src.utils import get_actor_from_post
from src.utils import has_users_path
from src.utils import get_domain_from_actor
from src.utils import get_nickname_from_actor
from src.like import undo_likes_collection_entry
from src.follow import unfollower_of_account
from src.follow import follower_approval_active
from src.bookmarks import undo_bookmarks_collection_entry
from src.webapp_post import individual_post_as_html
from src.reaction import undo_reaction_collection_entry
from src.data import erase_file
from src.data import is_a_file
from src.data import is_a_dir
def _receive_undo_follow(base_dir: str, message_json: {},
@ -212,7 +212,7 @@ def receive_undo_like(recent_posts_cache: {},
return False
if '/statuses/' not in message_json['object']['object']:
if debug:
print('DEBUG: "statuses" missing from like object in ' +
print('DEBUG: "statuses" missing from src.like object in ' +
message_json['type'])
return False
handle_dir = acct_handle_dir(base_dir, handle)
@ -364,7 +364,7 @@ def receive_undo_reaction(recent_posts_cache: {},
return False
if '/statuses/' not in message_json['object']['object']:
if debug:
print('DEBUG: "statuses" missing from reaction object in ' +
print('DEBUG: "statuses" missing from src.reaction object in ' +
message_json['type'])
return False
handle_dir = acct_handle_dir(base_dir, handle)

View File

@ -7,8 +7,8 @@ __email__ = "bob@libreserver.org"
__status__ = "Production"
__module_group__ = "ActivityPub"
from data import load_string
from data import is_a_file
from src.data import load_string
from src.data import is_a_file
def _get_local_private_key(base_dir: str, nickname: str, domain: str) -> str:

View File

@ -10,19 +10,19 @@ __module_group__ = "Core"
import json
import os
from urllib import request, parse
from utils import data_dir
from utils import is_account_dir
from utils import acct_dir
from utils import get_actor_languages_list
from utils import remove_html
from utils import has_object_dict
from utils import get_config_param
from utils import local_actor_url
from utils import resembles_url
from cache import get_person_from_cache
from data import load_string
from data import save_string
from data import is_a_file
from src.utils import data_dir
from src.utils import is_account_dir
from src.utils import acct_dir
from src.utils import get_actor_languages_list
from src.utils import remove_html
from src.utils import has_object_dict
from src.utils import get_config_param
from src.utils import local_actor_url
from src.utils import resembles_url
from src.cache import get_person_from_cache
from src.data import load_string
from src.data import save_string
from src.data import is_a_file
def get_actor_languages(actor_json: {}) -> str:

View File

@ -8,32 +8,32 @@ __status__ = "Production"
__module_group__ = "ActivityPub"
from pprint import pprint
from flags import has_group_type
from flags import url_permitted
from utils import has_object_string
from utils import has_object_string_object
from utils import has_object_string_type
from utils import remove_domain_port
from utils import has_object_dict
from utils import has_users_path
from utils import get_full_domain
from utils import remove_id_ending
from utils import get_nickname_from_actor
from utils import get_domain_from_actor
from utils import locate_post
from utils import local_actor_url
from utils import load_json
from utils import save_json
from utils import remove_post_from_cache
from utils import get_cached_post_filename
from utils import get_actor_from_post
from posts import send_signed_json
from session import post_json
from webfinger import webfinger_handle
from auth import create_basic_auth_header
from posts import get_person_box
from data import erase_file
from data import is_a_file
from src.flags import has_group_type
from src.flags import url_permitted
from src.utils import has_object_string
from src.utils import has_object_string_object
from src.utils import has_object_string_type
from src.utils import remove_domain_port
from src.utils import has_object_dict
from src.utils import has_users_path
from src.utils import get_full_domain
from src.utils import remove_id_ending
from src.utils import get_nickname_from_actor
from src.utils import get_domain_from_actor
from src.utils import locate_post
from src.utils import local_actor_url
from src.utils import load_json
from src.utils import save_json
from src.utils import remove_post_from_cache
from src.utils import get_cached_post_filename
from src.utils import get_actor_from_post
from src.posts import send_signed_json
from src.session import post_json
from src.webfinger import webfinger_handle
from src.auth import create_basic_auth_header
from src.posts import get_person_box
from src.data import erase_file
from src.data import is_a_file
def no_of_likes(post_json_object: {}) -> int:

View File

@ -18,10 +18,10 @@ from cryptography.hazmat.primitives.serialization import load_pem_public_key
from cryptography.hazmat.primitives.asymmetric import padding
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.asymmetric import utils as hazutils
from pyjsonld import normalize
from context import has_valid_context
from utils import get_sha_256
from timeFunctions import date_utcnow
from src.pyjsonld import normalize
from src.context import has_valid_context
from src.utils import get_sha_256
from src.timeFunctions import date_utcnow
def _options_hash(doc: {}) -> str:

Some files were not shown because too many files have changed in this diff Show More