Skip to main content

GitHub-like local file viewer built with Flask

Project description

HubView — Scripting file viewer

A clean, fast, local file viewer with a GitHub‑style UI. Browse folders, preview code with syntax highlighting, render Markdown (tables, task lists, admonitions), show images/video/audio/PDF, and even draw Mermaid diagrams via fenced blocks.

Example Run Code

  1. Create python Script to run hubview
# Example Hubview Run

from hubview import app


scripts = {
    "Python": {
        "python": ".venv/bin/python3",
        "path": "library/pylibs/hubview/example_script.py",
        "args": ["--foo", "bar"],
        "log": "hubview_demo.log",
    },
    "Shell": {

    }
    "Streamlit": {
        "cmd": ["bash", "run_gpc.sh", "--dry-run"],
        "path": "run_gpc.sh",
        "log": "cleanup.log",
    },
}

app.create_hub(root="./", host="0.0.0.0", port=3000, scripts=scripts)
  1. Create shell script to run python
# navigate to control directory
cd '/home/pi/Desktop/Code'
py_exec="venv/bin/python3"
py_script="can_hub.py"
echo "============= RUNNING CAN Hub =================="
$py_exec $py_script
/bin/bash
$SHELL

Or

  1. Run hubview from shell script
#!/bin/sh
# ------------------------------------
cd '/home/pi/Desktop/Code'
py_exec=".venv/bin/activate"
. $py_exec
echo "============= RUNNING Hubview =================="
hubview --host=0.0.0.0
/bin/bash
$SHELL

Quick start

  1. pip install hubview
  2. hubview --root 'your directory'
  3. open http://127.0.0.1:5000 in your browser.

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

hubview-0.8.tar.gz (21.9 kB view details)

Uploaded Source

Built Distribution

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

hubview-0.8-py3-none-any.whl (24.9 kB view details)

Uploaded Python 3

File details

Details for the file hubview-0.8.tar.gz.

File metadata

  • Download URL: hubview-0.8.tar.gz
  • Upload date:
  • Size: 21.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for hubview-0.8.tar.gz
Algorithm Hash digest
SHA256 2eca8fa44e53a134b237789b4f3f692a6e3e034355c6e7323163ac87d52a4306
MD5 ce8cc787c216ac9174a9b0ab445adcec
BLAKE2b-256 bd8448998a9b0dd10bf98fa2316ff212d8e7ebfc406755c7827c5daf60d99a1d

See more details on using hashes here.

File details

Details for the file hubview-0.8-py3-none-any.whl.

File metadata

  • Download URL: hubview-0.8-py3-none-any.whl
  • Upload date:
  • Size: 24.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for hubview-0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 777980e8936771a87f440c371c5ce9ed408118a55e52195abd39461f60967a1e
MD5 29e9ac6e481149dca97ab8437e1f1849
BLAKE2b-256 60af73f9e71b32a2cdccd678759794d607051a29be9d1769d38c5c6ec0f0c143

See more details on using hashes here.

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