Giter Site home page Giter Site logo

dsgallery's Introduction

About dsgallery

This project is a dead simple web photo gallery for displaying pictures from the file system or an FTP server. It has been tested on Windows, but with the right binaries there is no reason why it shouldn't work in other platforms.

It uses Mongoose (a lightweight, portable, cross-platform web server) and php for serving a navigable list of folder and images, with pre-generated thumbnails and fancyBox for displaying the actual pictures.

The thumbnails are generated with the help of a horribly written C# program called Thumbinate.exe (source code available here). This console app takes two directories as parameters (source and target folders) and generates 150x150 thumbnails for all the JPG pictures found, preserving the directory tree. At this stage only a Windows binary is provided and the program has to be called manually (or scheduled appropriately).

Configuration

A config.ini file should be created in the root folder for configuring the gallery. The available options are enumerated below.

OptionDescriptionDefault value
sto_typeSource type. Accepted values at the moment are ftp (for an ftp server) or fs (for a folder in the local filesystem).fs
sto_basedirThe root folder of the pictures to be displayed. All the original pictures are within this folder and its subdirectories../pics/gallery
thumb_basedirThumbnail folder. The directory tree must be identical to the one on sto_basedir, and all the thumbnails must have the same name as the original picture../pics/thumbs
ftp_serverIP address or name of the FTP server (only used if sto_type is ftp).127.0.0.1
ftp_userUser profile for accessing the FTP server.user
ftp_passwdPassword for accessing the FTP server.password

The following is an example of a config.ini file:

[global]
sto_type = "ftp"
sto_basedir = "/Files/Pictures"
thumb_basedir = "./thumbs"

[ftp]
ftp_server = "127.0.0.1"
ftp_user = "user"
ftp_passwd = "password"

How to use

  1. Generate 150x150 thumbnails by running Thumbinate.exe (or by any other means).
  2. Create a text file called config.ini with the desired options in the root folder of the project. Make sure that sto_basedir and thumb_basedir point to the right directories.
  3. Run mongoose-3.1.exe. This will start the web server.
  4. Navigate to http://localhost:8080/.
  5. Profit.

dsgallery's People

Stargazers

 avatar

Watchers

 avatar  avatar

dsgallery's Issues

Add proper navigation links at the bottom of the page

If javascript is disabled, the only way to navigate to the previous page is by pressing back on the browser or by editing the url. Actual previous/next buttons or links should be added at the bottom of the page.

Infinite scrolling is not working on iPhone

When navigating the site on an iPhone the automated scrolling doesn't trigger upon reaching the bottom of the page. A link for loading the full contents of the page (suppressing pagination) was added as a temporary measure, but the original issue is still there.

Merge loading files from filesystem and from ftp

At the moment there are two separate pages for loading images from the filesystem and from ftp. For my current purposes only the ftp one is needed but it would make sense to keep both around. The problem is that the other page gets neglected in the meantime.

Both pages should be merged and switching loading from different sources should be a configuration parameter. That way any improvement will be available regardless of were the original images are.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.