Rename the whole thing to xenu_nntp

This commit is contained in:
XANTRONIX Development 2024-12-30 20:54:09 -05:00
parent ed99ce9981
commit 1fc6120380
20 changed files with 37 additions and 37 deletions

View file

@ -4,9 +4,9 @@ import sys
import os import os
import argparse import argparse
from nntp.tiny.config import Config from xenu_nntp.config import Config
from nntp.tiny.db import Database from xenu_nntp.db import Database
from nntp.tiny.user import User from xenu_nntp.user import User
parser = argparse.ArgumentParser(description='Create new account') parser = argparse.ArgumentParser(description='Create new account')
parser.add_argument('--config-file', '-f', type=str, help='Specify a configuration file location') parser.add_argument('--config-file', '-f', type=str, help='Specify a configuration file location')

View file

@ -5,10 +5,10 @@ import os
import argparse import argparse
import getpass import getpass
from nntp.tiny.config import Config from xenu_nntp.config import Config
from nntp.tiny.db import Database from xenu_nntp.db import Database
from nntp.tiny.user import User from xenu_nntp.user import User
from nntp.tiny.passwd import crypt from xenu_nntp.passwd import crypt
parser = argparse.ArgumentParser(description='Set password of account') parser = argparse.ArgumentParser(description='Set password of account')
parser.add_argument('--config-file', '-f', type=str, help='Specify a configuration file location') parser.add_argument('--config-file', '-f', type=str, help='Specify a configuration file location')

View file

@ -3,10 +3,10 @@
import os import os
import argparse import argparse
from nntp.tiny.config import Config from xenu_nntp.config import Config
from nntp.tiny.db import Database from xenu_nntp.db import Database
from nntp.tiny.server import Server from xenu_nntp.server import Server
from nntp.tiny.daemon import Daemon from xenu_nntp.daemon import Daemon
parser = argparse.ArgumentParser(description='Tiny NNTP server') parser = argparse.ArgumentParser(description='Tiny NNTP server')
parser.add_argument('--daemon', '-d', action='store_true', help='Run NNTP server as daemon in background') parser.add_argument('--daemon', '-d', action='store_true', help='Run NNTP server as daemon in background')

View file

@ -7,12 +7,12 @@ import email.utils
from typing import Optional from typing import Optional
from nntp.tiny.socket import Connection from xenu_nntp.socket import Connection
from nntp.tiny.host import Host from xenu_nntp.host import Host
from nntp.tiny.response import Response, ResponseCode from xenu_nntp.response import Response, ResponseCode
from nntp.tiny.message import MessageRange, Message, MessagePart from xenu_nntp.message import MessageRange, Message, MessagePart
from nntp.tiny.remote import ( from xenu_nntp.remote import (
RemoteException, RemoteException,
RemoteNewsgroup, RemoteNewsgroup,
RemoteNewsgroupDescription, RemoteNewsgroupDescription,

View file

@ -37,8 +37,8 @@ class ConfigFileException(ConfigException):
class Config(configparser.ConfigParser): class Config(configparser.ConfigParser):
SEARCH_PATHS = [ SEARCH_PATHS = [
'./server.conf', './server.conf',
'/usr/local/etc/nntp-tiny/server.conf', '/usr/local/etc/xenu-nntp/server.conf',
'/etc/nntp-tiny/server.conf' '/etc/xenu-nntp/server.conf'
] ]
@staticmethod @staticmethod

View file

@ -2,7 +2,7 @@ import os
import signal import signal
import configparser import configparser
from nntp.tiny.config import Config from xenu_nntp.config import Config
class Daemon(): class Daemon():
def init(config: Config): def init(config: Config):

View file

@ -1,4 +1,4 @@
from nntp.tiny.message import Message from xenu_nntp.message import Message
class MBoxReaderError(Exception): class MBoxReaderError(Exception):
pass pass

View file

@ -6,7 +6,7 @@ import uuid
from email.utils import parsedate_to_datetime from email.utils import parsedate_to_datetime
from email.header import decode_header, Header from email.header import decode_header, Header
from nntp.tiny.db import DatabaseTable from xenu_nntp.db import DatabaseTable
def decode(text: str): def decode(text: str):
decoded = decode_header(text)[0] decoded = decode_header(text)[0]

View file

@ -1,6 +1,6 @@
import datetime import datetime
from nntp.tiny.db import DatabaseTable from xenu_nntp.db import DatabaseTable
class Newsgroup(DatabaseTable): class Newsgroup(DatabaseTable):
name = 'newsgroup' name = 'newsgroup'

View file

@ -1,4 +1,4 @@
from nntp.tiny.response import Response from xenu_nntp.response import Response
class RemoteException(Exception): class RemoteException(Exception):
def __init__(self, response: Response): def __init__(self, response: Response):

View file

@ -5,10 +5,10 @@ import socket
import selectors import selectors
import ssl import ssl
from nntp.tiny.config import Config, ConfigException from xenu_nntp.config import Config, ConfigException
from nntp.tiny.db import Database from xenu_nntp.db import Database
from nntp.tiny.host import Host from xenu_nntp.host import Host
from nntp.tiny.session import Session from xenu_nntp.session import Session
class Server(): class Server():
def __init__(self, config: Config): def __init__(self, config: Config):

View file

@ -10,12 +10,12 @@ import email.utils
from typing import Optional from typing import Optional
from nntp.tiny.socket import Connection from xenu_nntp.socket import Connection
from nntp.tiny.db import Database from xenu_nntp.db import Database
from nntp.tiny.response import Response, ResponseCode from xenu_nntp.response import Response, ResponseCode
from nntp.tiny.newsgroup import Newsgroup from xenu_nntp.newsgroup import Newsgroup
from nntp.tiny.user import User, UserPermission from xenu_nntp.user import User, UserPermission
from nntp.tiny.message import ( from xenu_nntp.message import (
Message, MessageRange, MessagePart, each_line Message, MessageRange, MessagePart, each_line
) )

View file

@ -1,5 +1,5 @@
from nntp.tiny.buffer import OutputBuffer, LineBuffer from xenu_nntp.buffer import OutputBuffer, LineBuffer
from nntp.tiny.message import Message, MessagePart, each_line from xenu_nntp.message import Message, MessagePart, each_line
class Connection(): class Connection():
def __init__(self, sock): def __init__(self, sock):

View file

@ -1,7 +1,7 @@
import enum import enum
from nntp.tiny.db import Database, DatabaseTable from xenu_nntp.db import Database, DatabaseTable
from nntp.tiny.passwd import compare from xenu_nntp.passwd import compare
class UserPermission(enum.Flag): class UserPermission(enum.Flag):
NONE = 0 NONE = 0