Skip to main content

A terminal-based blog/forum client built with Python and Textual

Project description

Postr-TUI

Postr-TUI is a terminal-based blog and forum client built with Python and Textual, and database support for both PostgreSQL and SQLite.

It allows users to connect to a public hosted server, run their own private local server, or connect to a custom server URL. Users can register, log in, create posts, reply to posts, delete their own content, and use a remembered login system.


Features

  • Terminal user interface built with Textual
  • Public, private, and custom server modes
  • User login and registration
  • Remember-me system using local config and system keyring
  • Create, view, edit, and delete posts
  • Author-only post editing and deletion
  • Create and view replies
  • Selectable replies
  • Author-only reply deletion
  • Admin moderation support for deleting inappropriate posts/replies
  • Public hosting support with Railway
  • PostgreSQL support for hosted deployment
  • SQLite fallback for private local hosting
  • Packaged for installation from PyPI as postr-tui

Installation

Install from PyPI:

pip install postr-tui

Server Mode

When Postr-TUI starts, you can choose how to connect.

Public Mode

In thsi mode you connect to a public server where people can post and reply to blogs etc.

Private Mode

In this mode you connect to your own local server if you want to run one yourself, it will connect to:

http://127.0.0.1:5000

as a default.

Custum Mode

Allows you to enter any compatible Postr server URL.

This is useful for self-hosting, testing, or connecting to a server hosted elsewhere.

Running a Private Local Server

git clone https://github.com/Chi-ChunL/Postr.git
cd Postr

Install dependencies:

pip install -r requirements.txt

And then run the server:

python -m server.server

Then now you can run the client at another terminal or another device by doing:

python -m client.main

Database Support

Postr supports two main database modes.

###PostgreSQL if DATABASE_URL is set, Postr uses PostgreSQL

###SQLite If DATABASE_URL is not set, Postr automatically falls back to SQLite.

This is intended for local private hosting.

The local database file is created as:

postr.db

Project Structure

Postr/
├── client/
│   ├── __init__.py
│   ├── main.py
│   ├── features.py
│   ├── login.py
│   ├── serverSelect.py
│   ├── config.py
│   ├── credentials.py
│   └── postr.tcss
├── server/
│   ├── __init__.py
│   ├── server.py
│   ├── db.py
│   └── auth.py
├── .github/
│   └── workflows/
│       └── publish.yml
├── pyproject.toml
├── requirements.txt
├── README.md
└── .gitignore

Main Controls

Key Action
N Create a new post
E Edit selected post, or reply
D Delete selected post
C Show or hide reply composer
Shift + Enter Submit reply
X Delete selected reply
R Reload posts
L Log out / switch account
Esc Back / quit

Login And Registration

Postr includes a login screen with seperate Login and Register tabs.

  • Use the left and right arrow keys to switch between tabs.
  • Press Enter in the username or password field to submit.
  • Use the Remember Me option to save login details locally.
  • Passwords are stored using the system keyring, not directly inside the config file.

Remember Me System

Postr stores non-sensitive settings in a local config file such as:

  • last username
  • last server URL
  • remember-me preference

Passwords are stored seperately and all passwrods are hashed

Current Status

Postr-TUI currently supports:

  • hosted public server mode
  • private local server mode
  • custom server mode
  • posting
  • replies
  • selectable reply deletion
  • author-only edit/delete permissions
  • admin moderation
  • PyPI installation
  • GitHub Actions publishing

Security Notice

This is an App in development and there may be vulnerablility that is unknown to me, if you want to add something, open an issue or PR on my (GitHub)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

postr_tui-0.1.5.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

postr_tui-0.1.5-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file postr_tui-0.1.5.tar.gz.

File metadata

  • Download URL: postr_tui-0.1.5.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for postr_tui-0.1.5.tar.gz
Algorithm Hash digest
SHA256 8006c9b704a6b89e9f763fb6ef8aae463e0bc1c99c1f8d60e2b6596e85b63e12
MD5 289985a1c0ff6c0fe1d2728c452d357b
BLAKE2b-256 6749777782912c2b2c96df8ae4ea1cece3ff33a2cbdd3cf145eb9fbf98a009e5

See more details on using hashes here.

Provenance

The following attestation bundles were made for postr_tui-0.1.5.tar.gz:

Publisher: publish.yml on Chi-ChunL/Postr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file postr_tui-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: postr_tui-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for postr_tui-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 030d6735c6a7f423e46541ced00f7da4d18d190b20c85e4efc0e1a8417592735
MD5 460d53f1046eb3bb3ba3857ecd66e04d
BLAKE2b-256 87495faae45436c990bf0baecf9975dbcd1f574652b55be1efe9f01ac49225f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for postr_tui-0.1.5-py3-none-any.whl:

Publisher: publish.yml on Chi-ChunL/Postr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page