Skip to content

TTVIKK2527/SimpleChromeViewer

Repository files navigation

SimpleChromeViewer

A lightweight Chromium-based viewer for websites, HTML files, and various document formats built with Electron.

Features

  • Web View: Browse websites and view HTML files in a Chromium-based webview
  • Document Viewer: View PDF, DOC, DOCX, XLS, XLSX, ODS files with formatting
  • Plain Text Mode: View any file as plain text with word wrap option
  • Source & Metadata Analysis: Inspect source code and file metadata including:
    • File size, creation date, modification date
    • Character count, line count, word count
    • Document-specific metadata (PDF info, spreadsheet sheet names, etc.)

Installation

Prerequisites

On Arch Linux, install Node.js and npm:

sudo pacman -S nodejs npm

Building from Source

  1. Navigate to the project directory:
cd SimpleChromeViewer
  1. Install dependencies:
npm install
  1. Build the application:
npm run build:pacman

This will create a .pacman package in the dist directory.

Installing the Package

After building, install the package:

sudo pacman -U dist/simplechromeviewer-*.pacman

Usage

Starting the Application

Run from terminal:

simplechromeviewer

Or start with npm (from project directory):

npm start

Viewing Content

Method 1: URL Bar

  • Type a URL (e.g., github.com) and click "Go" or press Enter
  • Type a file path and click "Go" or press Enter

Method 2: File Browser

  • Click "Open File" button
  • Browse and select a file

Supported File Types

  • Web: HTML, HTM files and URLs
  • Documents: PDF, DOC, DOCX
  • Spreadsheets: XLS, XLSX, ODS (OpenDocument Spreadsheet)
  • Text: TXT, MD, JSON, XML, CSV, and any plain text format

Viewing Modes

Switch between tabs to change viewing mode:

  1. Web View:

    • Displays websites and HTML files in a browser
    • Full Chromium rendering engine
  2. Document:

    • Formatted view of documents
    • Spreadsheets show interactive sheet tabs
    • Preserves document structure and formatting
  3. Plain Text:

    • View any file as plain text
    • Toggle word wrap on/off
    • Copy text to clipboard
  4. Source & Metadata:

    • View raw source code/content
    • File metadata (size, dates, type)
    • Content statistics (characters, lines, words)
    • Document-specific metadata

Keyboard Shortcuts

  • Enter in URL bar: Load URL or file
  • Ctrl+C: Copy (in plain text mode with Copy button)

Tips

  • For legacy DOC files, convert to DOCX for better compatibility
  • Large files may take a moment to parse
  • Spreadsheets display all sheets with tab navigation
  • URLs without protocol (http://) are automatically prefixed with https://

Troubleshooting

Application won't start

  • Ensure Node.js and npm are installed
  • Run npm install to verify dependencies

Document not displaying correctly

  • Check file isn't corrupted
  • Try viewing in Plain Text or Source mode
  • For old DOC files, consider converting to DOCX

URL not loading

  • Check internet connection
  • Verify URL is correct
  • Some sites may block embedding in webviews

Uninstallation

sudo pacman -R simplechromeviewer

Technical Details

  • Framework: Electron 28
  • PDF Parsing: pdf-parse
  • Word Documents: mammoth
  • Spreadsheets: xlsx (SheetJS)
  • UI: Custom HTML/CSS with dark theme

License

MIT

About

Lightweight Chromium-based viewer for websites, HTML files, and documents (PDF, DOCX, XLSX, ODS)

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors