A specialized browser-based formatter that normalizes noisy strings and emits deterministic line chunks for strict character-limited contexts (for example Steam Guide tables and Factorio blueprint-related text operations). The app runs fully client-side, persists user preferences in localStorage, and supports multiple UI locales out of the box.
Important
This tool is intentionally lightweight and has no server/API dependency. Your input never leaves the browser runtime unless you explicitly copy/share it.
- Features
- Technology Stack
- Technical Notes
- Getting Started
- Testing
- Deployment
- Usage
- Configuration
- License
- Community and Support
- Support the Development
- Dual formatting engine:
normalmode splits the full cleaned payload into fixed-size chunks.tailmode splits using a controlled head/body/tail strategy for encoded string patterns.
- Automatic whitespace normalization (
\s+collapse/removal behavior) for stable output. - Real-time telemetry in UI:
- source character count,
- output line count,
- effective chunk length.
- Language-aware interface powered by locale profiles under
profiles/*.js. - Persistent UX state using
localStorage:- last mode,
- per-mode chunk size,
- tail split parts,
- last input text.
- Clipboard-first workflow for fast copy/paste into Steam or other editors.
- Pure static architecture: open in any modern browser, no build step required.
Tip
If you work with repetitive blueprint edits, keep the tool pinned in a browser tab and reuse persisted settings for near-instant formatting passes.
HTML5for semantic page layout.CSS3for Factorio-themed UI styling.Vanilla JavaScript (ES6+)for formatting logic and i18n orchestration.localStoragefor client-only persistence.GitHub Pagescompatible static hosting model.
.
βββ index.html # Main UI markup and script imports
βββ style.css # Theme and layout styles
βββ script.js # Core formatter logic, i18n wiring, UI events
βββ profiles/ # Locale dictionaries (ru, en, uk, kk, cs, nl, sv, de, pl, fr, zh, ja)
βββ README.md # Project documentation
βββ CONTRIBUTING.md # Contribution workflow and quality gates
βββ CODE_OF_CONDUCT.md # Community behavior expectations
βββ LICENSE # GPL-3.0 license text
- Client-only execution model
- Keeps privacy guarantees straightforward.
- Eliminates infra/runtime overhead.
- No framework dependency
- Minimal bootstrap cost.
- Easy to audit and extend.
- Deterministic formatting functions
formatNormal,formatTail, andformatTailSplitare predictable and composable.
- Locale profiles as plain JS objects
- Fast to add new languages without tooling.
- Keeps translation updates low-friction for contributors.
Note
Current tail mode uses a fixed firstHead strategy in script.js, optimized for the projectβs target string patterns.
You only need:
- A modern browser (
Chrome,Firefox,Edge,Safari). - Optional for development:
Git(to clone and contribute),- any static file server (for local hosting parity),
- optional Node.js tooling if you want to add custom lint/test scripts.
# 1) Clone repository
git clone https://github.com/fctostin-team/blueprint-text_formatter.git
# 2) Enter project directory
cd blueprint-text_formatter
# 3) Run directly (quick start)
# Open index.html in browser
# 4) Optional: serve over local HTTP to mimic production hosting
python3 -m http.server 8080
# then open http://localhost:8080Warning
Opening via file:// works for core behavior, but local HTTP is recommended when validating browser quirks and path resolution.
At the moment, the repository has no formal automated test suite configured. Recommended manual verification matrix:
# Optional static serving for test pass
python3 -m http.server 8080Manual checks:
- Validate
normalmode chunking with different sizes (10,50,98,200). - Validate
tailmode with multiple part counts and edge cases (very short input). - Confirm
copyaction writes expected output to clipboard. - Reload page and verify persisted settings restored from
localStorage. - Switch locales and ensure all labels/buttons update correctly.
Caution
If you add logic around text parsing/chunking, test with very long strings to avoid regressions in line split math.
Current deployment model is static-site friendly and works great with GitHub Pages.
There is no transpile/build phase. Production artifact is the repository itself.
- Push changes to default branch.
- Ensure Pages is configured to serve from repository root (or selected branch/folder).
- Validate published URL and smoke-test core formatting paths.
If you want stricter quality gates, wire a GitHub Actions workflow that:
- checks markdown linting,
- runs optional JS linting,
- validates links in docs,
- deploys static content only after checks pass.
# Basic operator flow
1) Paste raw text/blueprint payload into the input textarea.
2) Choose formatting mode:
- normal: fixed-size chunking for full payload
- tail: custom split strategy for tail-sensitive payloads
3) Set chunk size (and tail parts when in tail mode).
4) Copy generated output from the result panel.
5) Paste into Steam guide table or target editor.
# Optional local serve + open
python3 -m http.server 8080
# Open browser -> http://localhost:8080The app has no .env requirements and no backend config.
Runtime preferences are stored in browser localStorage keys:
pr98_modeβ selected formatter mode.pr98_chunksβ per-mode chunk size map.pr98_tail_splitβ tail mode parts setting.pr98_textβ latest raw input payload.pr98_langβ selected UI locale.
Note
Clearing browser storage resets the tool to default UX state.
Distributed under the GPL-3.0 license. See LICENSE for full legal text.
Project created with the support of the FCTostin community.
- GitHub: OstinUA
- Team page: FCTostin-team
- Contribution process: see
CONTRIBUTING.md.