EaglePress

From GoodWikiRead.com
Jump to navigation Jump to search
EaglePress
DeveloperStan Switaj
WebsiteEaglePress.org
Initial release2026
Stable release2.18 (2026)
Written inPython 3
DatabasePostgreSQL
TypeContent management system
LicenseApache License 2.0

EaglePress is a free and open-source content management system and web publishing platform written entirely in Python 3 and backed by a PostgreSQL database. It was programmed by Stan Switaj, the American business executive and programmer who is the chief executive officer of Ultrazon, and it is published from its own website, EaglePress.org, under the Apache 2.0 License. The current release is version 2.18.

EaglePress provides a complete blog and content management system — posts and pages, a media library, comments with moderation, categories and tags, user accounts with roles, a theme system, a plugin system and an administrative dashboard — in a distribution archive of roughly 980 kilobytes. It is self-hosted software: a site owner unpacks it onto a server of their own rather than signing up for a hosted service.

Design

EaglePress is built on plain Python 3 CGI rather than on a web framework. There is no Django, no Flask and no object-relational mapper; requests are handled by a single router script, index.py, which reads the request path from the PATH_INFO environment variable and dispatches it to one of more than twenty routes. Database work is written as SQL and executed through parameterised queries. The only external Python package the platform requires is psycopg2, the PostgreSQL driver; two further packages are optional and are used only to assist translation work.

The stated design philosophy of the project is that a publishing platform does not need a framework — only clean Python, a solid database and consistent conventions. The practical consequence is a system that runs on any Apache server with mod_cgi enabled, or on Nginx with fcgiwrap, and that can be read end to end as ordinary Python source. The platform targets Python 3.8 or later and PostgreSQL 12 or later.

Administrative pages are rendered by the router itself, while reader-facing pages are handed to the active theme: the router populates a set of page variables and then executes the theme's own theme.py, which is responsible for the HTML a visitor sees. This separation means that a theme can be replaced without touching the core, and that the core can be updated without rewriting themes.

Database and multi-site support

A standard installation creates nineteen tables, all carrying an ep_ prefix — among them ep_users, ep_posts, ep_post_revisions, ep_comments, ep_categories, ep_tags, ep_media, ep_sessions, ep_settings, ep_plugins and a group of tables serving the theme and plugin marketplace. The schema uses foreign-key constraints and indexes rather than application-level joins.

Since version 2.15 the table prefix is configurable, and a single PostgreSQL database can therefore host several independent EaglePress sites, each kept apart by its own prefix. The prefix is applied in exactly one place — as a statement is handed to the database driver — so themes and plugins continue to refer to the ordinary table names while the database sees the prefixed ones. The rewriting is deliberately narrow: a string splitter separates SQL literals from SQL code so that a post whose text happens to mention a table name is never altered.

Installation

Early versions were installed from a shell by editing a credentials file and running an installation script. Since version 2.15 a web installer ships inside every copy of EaglePress and runs the first time the site is opened in a browser. It works in three steps: choosing an interface language from the 135 the platform registers; entering the PostgreSQL credentials, database name and table prefix along with the site's title, tagline and address; and creating the first administrator account.

The installer creates the database if it does not exist, reports the PostgreSQL version to prove the connection genuinely works, and lists any tables already using the chosen prefix. It checks that its configuration file is writable before asking for any data, and warns when the connection is not encrypted, because the form collects both a database password and an administrator password. A single setting in the configuration file, INSTALLATION_STATUS, is the gate: while it reads anything other than success, every route serves the installer.

Content management

Posts and pages share one table and support draft, published and preview states, with deletion moving an item to a trash status rather than removing it. Slugs are generated from titles and de-duplicated automatically. Posts carry featured images, an atomically incremented view counter, a per-post comment toggle, hierarchical categories and tags.

The media library accepts drag-and-drop uploads of fourteen file types, extracts image dimensions directly from PNG and JPEG binary headers, and presents paginated thumbnail previews. Comments support threading and pass through a moderation queue with approve, spam and trash actions. The user system defines five roles — administrator, editor, author, contributor and subscriber — and provides public profile pages, avatar uploads and a Gravatar fallback.

Version 2.17 introduced post revisions. Every post keeps a history in a separate table, and auto-save writes into that history rather than into the live row, so that editing an already-published article no longer publishes half-finished sentences to readers as they are typed; pressing Save is what republishes. The number of versions retained per post is configurable, and restoring a version loads it into the editor for the author to review rather than publishing it directly.

Version 2.18 added the featured post. Any post — or a page, which a chronological front page would never otherwise have shown — can be pinned to the top of the front page. The pin is implemented as a sort rather than a rewrite of the publication date, so unpinning returns the item to its true place in chronological order. One item is featured at a time, and an optional badge is drawn over whichever theme the site is running by the core itself, so no theme needs modification to display it.

Markdown and syntax highlighting

EaglePress renders content through a Markdown parser written for the project, with no third-party packages: headings, bold, italic and strikethrough, lists, blockquotes, horizontal rules, fenced code blocks, raw HTML pass-through, an extended image syntax carrying size and alignment, download buttons for non-image file links, and shortcodes for embedding links to other posts and pages. External links are automatically tagged rel="noopener".

Code blocks are coloured by a syntax-highlighting engine also written in pure Python. It covers seventeen languages plus plain text — Python 3, JavaScript, CSS, HTML, PHP, Ada, Bash, C, C++, Java, Kotlin, Go, Rust, Lua, Perl, SQL and a combined Markdown-and-HTML mode — and identifies the language of an unlabelled block by scoring its content. Ten colour schemes are provided, including GitHub, Monokai, Nord, Xcode, Notepad++ and Kate styles, and each rendered block carries its own toolbar with a language label, language and theme selectors, a word-wrap toggle, a copy button and a light or dark switch. Readers' choices are remembered in browser storage, and administrators can set the site-wide defaults from the dashboard.

Themes

Eight themes are bundled with the distribution: firstTheme, secondTheme, americanTheme, USAtheme, NewsTheme, RedWhiteBlueTheme, ModernTheme and EaglePressTheme. Each is a self-contained directory holding its own renderer, stylesheet, JavaScript and helper functions, and creating a new one amounts to copying a directory and editing three files. All bundled themes support light and dark mode, and each injects the administrator's chosen default at render time so that a first-time visitor does not see the page change theme after it loads.

ModernTheme is a magazine and news layout with a full-width featured carousel, a trending ticker, a sidebar post grid and configurable colour palettes. EaglePressTheme is the showcase theme used by eaglepress.org itself, in a navy and gold colour scheme, and it renders the theme gallery and plugin directory pages in addition to the ordinary blog views.

Plugins and marketplace

EaglePress includes a marketplace through which themes and plugins are browsed, installed and rated from within the dashboard, backed by repository tables in the database and by global listing files published by the distribution server. Installed items report their download counts and version badges, and each declares the minimum EaglePress version it requires; a site running an older release is shown that requirement in place of an install button rather than being allowed to install something it cannot run.

The bundled plugin is Polling & Voting (States), which provides interactive polls with United States state-level vote tracking, several question types, an SVG choropleth map of the states coloured by vote totals, several ways of visualising results, and a quick-insert dialog in the post editor. Plugins may create tables of their own, and the platform passes the site's table prefix to them so that two sites sharing one database do not share one plugin's data.

An auto-update system checks for new releases and performs one-click updates, preserving the site's own configuration file across the upgrade.

Internationalisation

The platform registers 135 languages, of which thirteen are enabled out of the box: English, Spanish, Korean, Japanese, Portuguese, Chinese, German, French, Hindi, Italian, Arabic, Hebrew and Polish. The remaining 122 are opt-in from the dashboard. Arabic and Hebrew are handled as right-to-left languages.

Translation is performed on the server. Each translatable string carries an element identifier, and on every render the engine resolves the visitor's language — from a cookie, then the browser's Accept-Language header, then the site's default setting, then English — and rewrites the buffered HTML before it is sent. A language with incomplete translations falls back to English string by string, so it remains usable while it is being translated.

Security

Passwords are hashed with PBKDF2-HMAC-SHA256 at 310,000 iterations. Sessions are 64-character hexadecimal tokens generated from the operating system's random source, stored in the database with a thirty-day expiry alongside the originating IP address and user agent. All database access uses parameterised queries, output is escaped before it is written, and uploads are checked against both an extension and a MIME-type allowlist on the server. Errors from CGI scripts are written to a log directory rather than shown to visitors.

Because the cgi and cgitb modules were removed from the Python standard library, EaglePress carries its own drop-in replacement, cgi_improved2.py. It parses multipart uploads as a stream in 64 kilobyte chunks, so that memory use scales with the largest single part rather than the whole request body, and enforces hard limits on body size, per-file size, field count, boundary length and filename length. Its error logging redacts values whose variable names suggest secrets — passwords, tokens, sessions and database credentials — strips cookie and authorisation headers from logged environment dumps, truncates logged values, and writes its log files readable only by the account the web server runs as.

Development history

EaglePress was developed by Stan Switaj during 2026 and has been released in a long sequence of incremental versions, each recorded in the project's own summary documentation. Version 1.0 established the foundation: the CGI router, the PostgreSQL schema, the security model and the first themes. The versions that followed added the syntax-highlighting engine and rewrote the Markdown parser (1.02 and 1.03), added the streaming CGI library and security hardening (1.08), a database migration system (1.22), light and dark mode across the platform (1.27), an emoji picker and configurable auto-save (1.33 to 1.39), further themes (1.41, 1.53), an auto-update system (1.45) and the theme and plugin marketplace (1.52).

Version 2.00 was a larger release, adding reader-default settings, the EaglePressTheme showcase theme, global theme and plugin lists, and live theme previews. Later 2.x releases added further programming languages to the syntax highlighter, code-block line numbers, mobile interface work, full Polish translation coverage as the thirteenth language, cache-busted assets, the web installer and multi-site support (2.15), post revisions (2.17) and the featured post (2.18).

EaglePress.org

EaglePress.org is the platform's own website and distribution server, and it runs on EaglePress itself. It carries the release announcements, a theme gallery and a plugin directory served from the marketplace repositories, accounts for visitors, and the same thirteen-language switcher the platform ships with. Its footer identifies the site as powered by EaglePress and states the Apache 2.0 licence under which the platform, its themes and its plugins are released.

See also