Skip to content

Commit

Permalink
Merge pull request #3 from tonimelisma/rewrite
Browse files Browse the repository at this point in the history
Rewrite fastgallery
  • Loading branch information
tonimelisma authored Feb 27, 2021
2 parents 6f6bde4 + 99677d9 commit 71ba499
Show file tree
Hide file tree
Showing 68 changed files with 2,821 additions and 812 deletions.
61 changes: 30 additions & 31 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: build

on: [ push, pull_request ]
on: [push, pull_request]

jobs:
build:
Expand All @@ -10,38 +10,37 @@ jobs:
CGO_CFLAGS_ALLOW: -Xpreprocessor
strategy:
matrix:
os: [ubuntu-18.04, ubuntu-20.04, macOS-10.15, macos-11.0]
os: [ubuntu-18.04, ubuntu-20.04, macOS-10.15]

steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.16

- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.13
- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Install linux deps
if: matrix.os == 'ubuntu-18.04' || matrix.os == 'ubuntu-20.04'
run: |
sudo add-apt-repository -y ppa:tonimelisma/ppa
sudo apt-get -y install libvips-dev
- name: Install macos deps
if: matrix.os == 'macos-10.15' || matrix.os == 'macos-11.0'
run: |
brew install vips
- name: Get dependencies
run: |
go get -v -t -d ./...
- name: Build
run: go build -v ./cmd/fastgallery
- name: Install linux deps
if: matrix.os == 'ubuntu-18.04' || matrix.os == 'ubuntu-20.04'
run: |
sudo add-apt-repository -y ppa:tonimelisma/ppa
sudo apt-get -y install libvips-dev
- name: Install macos deps
if: matrix.os == 'macos-10.15'
run: |
brew install vips
- name: Get dependencies
run: |
go get -v -t -d ./...
- name: Build
run: go build -v ./cmd/fastgallery

- name: Test
run: go test -v -coverprofile=profile.cov ./...
- name: Test
run: go test -v -coverprofile=profile.cov ./...

- name: Coveralls
if: matrix.os == 'ubuntu-20.04'
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov
- name: Coveralls
if: matrix.os == 'ubuntu-20.04'
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
*.dylib

# temp media files
*.mp4
*.jpg
*.heic
.DS_Store

# Test binary, built with `go test -c`
Expand Down
12 changes: 8 additions & 4 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Process",
"name": "Launch file",
"type": "go",
"request": "attach",
"mode": "local",
"processId": 585791
"request": "launch",
"mode": "debug",
"program": "${file}",
"args": [
"../../testing/source/",
"../../testing/gallery/"
]
}
]
}
22 changes: 9 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,24 @@
- Both photo and video support
- Deals with any file formats (including HEIC and HEVC)
- Only updates changed files, runs incrementally
- If aborted, can continue from where it stopped and clean-up unfinished files
- Will delete removed source files from gallery
- Uses relative paths (safe for using in subdirectory or S3)
- Minimal bloat (no third party frontend libraries, minimal CSS)
- Minimal bloat (vanilla JS frontend, minimal CSS)

*Please note that fastgallery is still beta, I am actively working on it*
*Fastgallery has just been rewritten to better handle incremental updates of the gallery.
*The command-line syntax changed to a more sane version, please see below

## Examples

Please see [https://www.melisma.fi/fastgallery-examples/](https://www.melisma.fi/fastgallery-examples/)

## Dependencies

### MacOS

For dependencies, use Homebrew to install:

`brew install vips ffmpeg`

### Ubuntu Linux

For Ubuntu 18.04 bionic or 20.04 focal, first add my PPA for latest libvips with HEIF support:

`sudo add-apt-repository ppa:tonimelisma/ppa`
Expand All @@ -33,20 +32,17 @@ Then install libvips42 for images and optionally ffmpeg (if you need video suppo
`apt-get install libvips42 ffmpeg`

## Install

1. Download the latest release and unpack
1. Download the latest release
2. Run ```make build```
3. Copy ```bin/fastgallery``` to ```/usr/local/bin```
4. Copy contents of ```assets/``` to ```/usr/local/share/fastgallery```
## Usage

`fastgallery -o /var/www/html/gallery ~/Dropbox/Pictures`
## Usage
`fastgallery ~/Dropbox/Pictures /var/www/html/gallery`

## Roadmap

For the prioritised roadmap, please see https://github.com/tonimelisma/fastgallery/projects/1

## Third party libraries
- [govips](https://github.com/davidbyttow/govips), lightning fast image processing and resizing library
- [govips](https://github.com/davidbyttow/govips), lightning fast image processing and resizing library in Go/C
- [Feather](https://github.com/feathericons/feather) icons, simple and beautiful
- [Primer](https://github.com/primer/css) CSS, Github's in-house design system
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
Loading

0 comments on commit 71ba499

Please sign in to comment.