Skip to content
This repository

Praze is a simple HTML image viewer where you can cycle through the pictures with cursors or clicking by the image.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 hsgcam
Octocat-spinner-32 pi
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .htaccess
Octocat-spinner-32 Makefile
Octocat-spinner-32 README.md
Octocat-spinner-32 create-json.sh
Octocat-spinner-32 index.cgi
Octocat-spinner-32 jquery.js
Octocat-spinner-32 main.js
Octocat-spinner-32 style.css
Octocat-spinner-32 webp2jpg.php
README.md

Praze

Demo site: http://cam.hackerspace.sg

  • Features low <150 source lines of code
  • Simple caching to make next image load quickly
  • Assumes images are retrieved in Epoch format
  • Supports WebP to JPEG conversion on the fly

Requirements

CGI support

Setup

Assuming your VirtualDocumentRoot is /web/%0.

Git clone into /web/praze.example.com

Link image directory into cloned directory:

ln -s ~/imagedirectory /web/praze.example.com/

webp to jpeg

Nginx configuration:

server {
    server_name cam.hackerspace.sg;
    root /srv/www/cam.hackerspace.sg;
    include cgi.conf;
    location / {
        add_header Access-Control-Allow-Origin "*";
        if ($http_accept !~* "webp") {
            rewrite ^/(.*\.webp)$ /webp2jpg.php?f=$1 last; break;
        }
    }
}

webp2jpg.php

Something went wrong with that request. Please try again.