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
D Delete selected post
C Show or hide reply composer
Ctrl + S 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.3.tar.gz (16.5 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.3-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: postr_tui-0.1.3.tar.gz
  • Upload date:
  • Size: 16.5 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.3.tar.gz
Algorithm Hash digest
SHA256 632e013f728ff335017ee7a42a549ea16e2966c417e73989a8e5251ec063e03e
MD5 34bc1294637b57fdb307490199c3f4b1
BLAKE2b-256 2bef9bf00f52b2fe31f0cbbeb79b6a0e45c5f85c57d73bcc5b6822b297662bfa

See more details on using hashes here.

Provenance

The following attestation bundles were made for postr_tui-0.1.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: postr_tui-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 17.9 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f276240ea4baba7e0bf291a5330811b25d77758316fd1cc3e1ddd1dd1faf582b
MD5 009334f822b387e9dcea237bd4595359
BLAKE2b-256 8c350f7f75007c7c56a91a7eefde565ac5dc7416fb884eb37f7aaa78ae14fcb5

See more details on using hashes here.

Provenance

The following attestation bundles were made for postr_tui-0.1.3-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