From a8b413a6328bfc14393081ff76f054b9f65d5dd3 Mon Sep 17 00:00:00 2001 From: hkc Date: Wed, 24 Aug 2022 08:28:18 +0300 Subject: [PATCH] Changed folder name +TODO --- TODO | 6 ++++++ {mastoreposter => mastoposter}/__init__.py | 0 {mastoreposter => mastoposter}/__main__.py | 8 ++++---- {mastoreposter => mastoposter}/integrations/__init__.py | 0 {mastoreposter => mastoposter}/integrations/base.py | 2 +- {mastoreposter => mastoposter}/integrations/telegram.py | 4 ++-- {mastoreposter => mastoposter}/sources.py | 2 +- {mastoreposter => mastoposter}/types.py | 0 8 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 TODO rename {mastoreposter => mastoposter}/__init__.py (100%) rename {mastoreposter => mastoposter}/__main__.py (89%) rename {mastoreposter => mastoposter}/integrations/__init__.py (100%) rename {mastoreposter => mastoposter}/integrations/base.py (83%) rename {mastoreposter => mastoposter}/integrations/telegram.py (98%) rename {mastoreposter => mastoposter}/sources.py (93%) rename {mastoreposter => mastoposter}/types.py (100%) diff --git a/TODO b/TODO new file mode 100644 index 0000000..794af51 --- /dev/null +++ b/TODO @@ -0,0 +1,6 @@ +[integrations,core] Add database support so remote messages are stored and can be used to reply to them +[integrations,discord] Add Discord functionality +[core] Somehow find a way to get your user ID by token +[core] Maybe get rid of `main.list` field and create one automatically on a startup? +[integrations] Add support for shellscript integration +[integrations,telegram] Add formatting option diff --git a/mastoreposter/__init__.py b/mastoposter/__init__.py similarity index 100% rename from mastoreposter/__init__.py rename to mastoposter/__init__.py diff --git a/mastoreposter/__main__.py b/mastoposter/__main__.py similarity index 89% rename from mastoreposter/__main__.py rename to mastoposter/__main__.py index 2578554..90f778d 100644 --- a/mastoreposter/__main__.py +++ b/mastoposter/__main__.py @@ -2,11 +2,11 @@ from asyncio import run from configparser import ConfigParser -from mastoreposter.integrations.telegram import TelegramIntegration -from mastoreposter.sources import websocket_source +from mastoposter.integrations.telegram import TelegramIntegration +from mastoposter.sources import websocket_source from typing import AsyncGenerator, Callable, List -from mastoreposter.integrations.base import BaseIntegration -from mastoreposter.types import Status +from mastoposter.integrations.base import BaseIntegration +from mastoposter.types import Status async def listen( diff --git a/mastoreposter/integrations/__init__.py b/mastoposter/integrations/__init__.py similarity index 100% rename from mastoreposter/integrations/__init__.py rename to mastoposter/integrations/__init__.py diff --git a/mastoreposter/integrations/base.py b/mastoposter/integrations/base.py similarity index 83% rename from mastoreposter/integrations/base.py rename to mastoposter/integrations/base.py index 9b83c51..d097073 100644 --- a/mastoreposter/integrations/base.py +++ b/mastoposter/integrations/base.py @@ -1,6 +1,6 @@ from abc import ABC, abstractmethod -from mastoreposter.types import Status +from mastoposter.types import Status class BaseIntegration(ABC): diff --git a/mastoreposter/integrations/telegram.py b/mastoposter/integrations/telegram.py similarity index 98% rename from mastoreposter/integrations/telegram.py rename to mastoposter/integrations/telegram.py index 9b3ade9..bd487eb 100644 --- a/mastoreposter/integrations/telegram.py +++ b/mastoposter/integrations/telegram.py @@ -3,8 +3,8 @@ from html import escape from typing import Any, List, Mapping, Optional, Union from bs4 import BeautifulSoup, Tag, PageElement from httpx import AsyncClient -from mastoreposter.integrations.base import BaseIntegration -from mastoreposter.types import Attachment, Status +from mastoposter.integrations.base import BaseIntegration +from mastoposter.types import Attachment, Status @dataclass diff --git a/mastoreposter/sources.py b/mastoposter/sources.py similarity index 93% rename from mastoreposter/sources.py rename to mastoposter/sources.py index ddfddbd..7639d2c 100644 --- a/mastoreposter/sources.py +++ b/mastoposter/sources.py @@ -3,7 +3,7 @@ from typing import AsyncGenerator from urllib.parse import urlencode -from mastoreposter.types import Status +from mastoposter.types import Status async def websocket_source(url: str, **params) -> AsyncGenerator[Status, None]: diff --git a/mastoreposter/types.py b/mastoposter/types.py similarity index 100% rename from mastoreposter/types.py rename to mastoposter/types.py