jack000 / expose Goto Github PK
View Code? Open in Web Editor NEWA simple static site generator for photoessays
License: MIT License
A simple static site generator for photoessays
License: MIT License
Hi,
Thanks for the cool tool!
More of a question than an issue, but...can expose websites be hosted by github pages?
Best,
Mike
Line 280, expression sed 's/[^ a-zA-Z0-9]//g works only for latin letters. So, the folders named with non-latin letters, become empty.
Maybe should use sed 's/[^ [[:alnum:]]]//g' instead?
Hi,
I am using expose, would it be easy to add a background color option to the text ?
I'm unable to encode vp8 using the disable_audio=false
attribute in my _config.sh. It just errors out. H264 works just fine. If I remove the disable_audio
line, it works but then I have no sound.
The error that I get is:
Only VP8 or VP9 video and Vorbis or Opus audio and WebVTT subtitles are supported for WebM. av_interleaved_write_frame(): Invalid argument
and Error writing trailer of <file>: Invalid argument
This is my ffmpeg config. I do also have --enable-libvorbis
and --enable-libvpx
as you can see below.
built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
configuration: --prefix=/usr/local/Cellar/ffmpeg/3.2.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-opencl --disable-lzma --enable-nonfree --enable-vda
libavutil 55. 34.100 / 55. 34.100
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.100 / 57. 56.100
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Trying it via the command line: expose disable_audio=false
doesn't error out but the video has no sound.
Hey @Jack000! Thanks for sharing Expose. It's fantastic.
I was using it to build a photo album of a recent trip of mine and I ran into some pain points, so I tried rewriting Expose in Python to see how it was done.
Here are some features I implemented in my attempt at building Expose, expose.py. I'd like to help if you are open to implementing any of them. I'm not a fantastic Bash programmer but I can probably get the job done.
Images that were generated don't need to be regenerated if the source material hasn't changed. I save a my_file.jpg.src.sha256
file alongside products generated from my_file.jpg
and check that before running ImageMagick or ffmpeg.
It helps me debug or add a new feature when I can see the actions that will be taken without them actually affecting the filesystem. expose.py has a --dry-run
argument that prints every render/mkdir action without executing them.
I was frustrated when I tried converting videos. I didn't know how long a video conversion would take, the current setup doesn't provide progress output from ffmpeg, and it's hard to see progress in the filesystem unless you monitor file sizes. expose.py uses a progress bar library to provide pretty progress bars and ETA for mass conversions.
Expose only ever uses 100% of my CPU, when I can go up to 800% with parallelism. My implementation uses Python's multiprocessing library to call as many simultaneous instances of ImageMagick as you want. I did this with ffmpeg too because I'm not convinced that you can spin ffmpeg up to max threads and get as big a performance boost as running multiple instances. This one may be a little trickier in Bash though.
Let me know what you think. I'm happy to help with any of these.
In global.css line 418 the min-width of 830px seems to be arbitrary, unless I am missing something. Taking it out seems to work fine and prevents horizontal scrolling on small screens.
This looks great, can't wait to integrate it with my Jekyll site.
I'm having an issue however, I only have 1 image, but it is not being saved out. Here is the output:
$ expose
Scanning directories...
Populating nav...
Reading files.
Building HTML.
Starting encode
steve
$ tree .
.
├── 2015
│ └── shoot
│ └── steve.jpg
└── _site
├── 2015
│ └── shoot
│ ├── index.html
│ └── steve
├── cookie.js
├── global.css
├── global.js
├── img
│ ├── camera.png
│ ├── camera_mask.png
│ ├── close.png
│ ├── comment.png
│ ├── comment_mask.png
│ ├── download.png
│ ├── download_mask.png
│ ├── facebook.png
│ ├── facebook_mask.png
│ ├── hackernews.png
│ ├── hackernews_mask.png
│ ├── heart.png
│ ├── heart_mask.png
│ ├── monitor.png
│ ├── monitor_mask.png
│ ├── next.png
│ ├── pinterest.png
│ ├── pinterest_mask.png
│ ├── prev.png
│ ├── reddit.png
│ ├── reddit_mask.png
│ ├── text.png
│ ├── text_mask.png
│ ├── twitter.png
│ └── twitter_mask.png
├── index.html
└── json.js
7 directories, 32 files
Just installed the latest git for windows. Followed instructions and got this error -
MINGW64 /g/laragonServerPortable/www/expose/images
$ expose
FFmpeg not found, videos will not be processed
Scanning directories.
Populating nav.
Reading files.Invalid Parameter - /laragonServerPortable
.Invalid Parameter - /laragonServerPortable
.Invalid Parameter - /laragonServerPortable
.Invalid Parameter - /laragonServerPortable
.Invalid Parameter - /laragonServerPortable
Building HTML.....
Starting encode
img20210911130504
Invalid Parameter - -size
Invalid Parameter - -size
Invalid Parameter - -size
Invalid Parameter - -size
Invalid Parameter - -size
Invalid Parameter - -size
img20210911130514
Invalid Parameter - -size
Invalid Parameter - -size
Invalid Parameter - -size
Invalid Parameter - -size
Invalid Parameter - -size
Invalid Parameter - -size
img20210911130705
Invalid Parameter - -size
Invalid Parameter - -size
Invalid Parameter - -size
Invalid Parameter - -size
Invalid Parameter - -size
Invalid Parameter - -size
img20210911130750
Invalid Parameter - -size
Invalid Parameter - -size
Invalid Parameter - -size
Invalid Parameter - -size
Invalid Parameter - -size
Invalid Parameter - -size
img20210911130915
Invalid Parameter - -size
Invalid Parameter - -size
Invalid Parameter - -size
Invalid Parameter - -size
Invalid Parameter - -size
Invalid Parameter - -size
/g/laragonServerPortable/www/expose/expose.sh: line 972: rsync: command not found
Anything come to mind?
When working on a directory with huge number of images, Expose runs into /bin/sed: Argument list too long
errors. This is probably a command line limitation, but Expose should handle it. Possibly chunk it the input files?
Use a polygon to wrap text around shapes. The polygon is defined by 3 or more points in a JSON blob. Units are again in percentages.
Do you use some tool to make a polygon? Can you describe your flow in more details please?
Hello,
I'm new to expose but I already love it.
I have a small issue.
Reading the docs is possible to have some yaml vars in the text including custom variables to be used in a custom template.
Now, I have my text file that looks like this:
title: new adventures
textcolor: #ffffff
---`
I would expect to see the first line in the image and the part between '---' parsed as yaml.
The results is that no text is displayed in the image.
If I remove the yaml part
A train to somewhere?
I see text as expected in the image.
I also tried removing the custom var "title" but the result is the same, if there's yaml section in the file the text is not displayed in the image.
Am I doing something wrong?
Thanks!
rsync
is missing from the dependency list and its required in line expose.sh:972 to copy the resources to _site
.
The current readme doesn't seem to describe what to do in Windows. How do I generate a site?
Are you able to provide sanitized examples for the theme config used for both Jack.works and Jack.Ventures?
While the documentation is a good start, I would like to replicate the timeline and other parts jack.works.
Thanks
David
Hey there!
Really handy project you have here.
Are there any plans in the pipeline to offer sorting by reverse numerical order?
I'd like to have something like:
9_imagefile.jpg
8_imagefile.jpg
7_imagefile.jpg
6_imagefile.jpg
5_imagefile.jpg
Be the display order, so that newer content (higher number) is displayed at the top.
Thanks for any feedback you can offer!
I really love this - it looks great.
I was wondering if there is a function to as a "Next Photo" button, to nicely scroll to the next photo. This would be in the form of a down arrow or something unobtrusive.
Either way - cheers for this, i'm going to have a play with it now :)
Theme 2 currently places any text before its associated image, except for the first (masthead) image. This means (I think) that there is no way to place any text at the very end of the page (in other words, no way to have the page end with text, instead of ending with an image.)
I created my own version of theme 2, and changed its post-template.html file to place the "post" div after the "image" div.
That solves the issue with not being able to put text at the very end of the page, but now there's no way to have the page start with text (except for the masthead text.)
Would it be useful to allow the name of the text file to include something that indicates whether the text goes before or after the associated image?
Would an RSS feed be a possibility such that new image additions (on build) are logged in the RSS file?
Hi,
it would be great to have a download link for the whole album as zip.
First off, great work!
I'm not too familiar with shell scripts and I don't see any error logs, so I'll do my best to describe what's happening:
Running expose -d
in the folder generates all the files, including video.
_site
|- img7851
| |- 640.jpg
| |- 1024-h264.mp4
| |- 1024.jpg
But running plain ol' expose
(after deleting the previously created _site
folder) will only generate the poster-image for the video inside its folder, not the video file.
_site
|- img7851
| |- 640.jpg
I'm running zsh in Mac OS 10.8.5. It is an older machine, so perhaps it's a hardware issue?
Imagemagick and ffmpeg are installed:
identify -version 127 ↵
Version: ImageMagick 6.9.0-9 Q16 x86_64 2015-03-02 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: DPC Modules
Delegates (built-in): bzlib freetype jng jpeg ltdl lzma png xml zlib
ffmpeg
ffmpeg version 2.5.4 Copyright (c) 2000-2015 the FFmpeg developers
built on Feb 15 2015 20:18:54 with Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
configuration: --prefix=/usr/local/Cellar/ffmpeg/2.5.4 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-vda
Sorry, I'd like to fix this myself, but I'm not proficient in bash scripting.
Happens with and without draft mode reliably at this file. It is the second video file expose.sh encounters. Anyways, piccolotto/Desktop/gallery
should be /Users/npiccolotto/Desktop/gallery
. Same goes for rs/npiccolotto/Desktop/gallery
. Not sure if the other errors are caused by the wrong path.
I'm running on OSX 10.10.2. Happens with zsh and bash.
Desktop/gallery » zsh --version
zsh --version
zsh 5.0.6 (x86_64-apple-darwin13.3.0)
Desktop/gallery » bash --version
bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin14)
Copyright (C) 2007 Free Software Foundation, Inc.
On my Raspberry Pi running Raspbian, I get
Reading files...................................../home/cherron/bin/expose.sh: line 402: [: 460460460460460460460460460460460460460460460460: integer expression expected
I have a nested directory of photos, but when simply run expose
, the links on the left sidebar link to the directory instead of the index.html
within that directory. For example, the links are
<a href="../subfolder" ... ></a>
which ends up opening a new finder window for that directory. I think they should be referencing the index.html
within the directly which will produce the correct behaviour as such:
<a href="../subfolder/index.html" ... ></a>
I'm not sure if this is the intended behaviour or if I'm using it wrongly, I've tried running it in both Safari and Chrome on my Mac.
Hi there, I'm at the beginning of looking at Expose and ran into an issue where if I have my Expose site in a Git repo, it'll pick up the .git
folder and generate a site folder for it. Is there a way to ignore hidden folders?
Thanks!
Hi Jack, Firstly, a big thanks for doing this. This is pretty well exactly what I need. Clean and stylish. Sometimes less is more.
I'm likely doing something supid/wrong that a quick example of structure would sort? The docs seem to step over placement of this file. For gallery, I've user the parent directory and also each subdirectory.
I see two problems I struggle with:
When I use theme 1, the text doesn't seem to stay in all the pictures of a directory. I'd like to replicate what is on your site where the test can be varied a little. I'd jut like to know where to do that. The pinning of pictures to the same size fails too when the text placement fails.
In theme 2, the width: 32.5 seems to have no effect at all and though the layout switches to theme 2, the images are shown in a list down the page?
I've put files just about everywhere I can think of. ie in each directory, at the highest level etc.
Any help very much appreciated.
Tom.
I look for static album generators that can do BPG.
As browsers don't usually support new picture formats, BPG offers a JavaScript decoder that adds this feature without browser support.
But that turns usual <img>
s to <canvas>
, so it does not typically works with galleries.
Thanks to Expose, I've got a great looking photosite.
Unfortunately, I can only get it to work locally on my Mac. After pushing to Amazon S3, I'm getting the following error and no photos showing:
This page contains the following errors:
error on line 58 at column 107: EntityRef: expecting ';'
Below is a rendering of the page up to the first error.
I have checked the contents of my S3 bucket, and it is simply everything inside the _site
directory that worked fine locally. I also have set a policy that makes all the content viewable publicly, and my domain points to the s3-website URL. Are there any URL or domain variables that need to be set to get Expose sites working when hosted?
My site is here: https://photos.stephenchinnadorai.com/
Any help appreciated!
ImageMagick used by exposed discards all the Exif and IPTC data that may be embedded in the original photos by default. But as IPTC data holds information about copyright- and contact information of the photographer (although easily deletable), these information should be kept in the photos wherever possible.
Hi,
I believe that FFMPEG does not exist in the latest Ubuntu distributions, and has been replaced with avconf (http://askubuntu.com/questions/432542/is-ffmpeg-missing-from-the-official-repositories-in-14-04).
Apparently the syntax is slightly different, but very similar. Would it be possible to detect if this exists and use it instead, if FFMPEG is missing?
I'm wanting to use Expose via a Codeship CI workflow, so I don't have that level of control over the system.
Thanks,
Steve
I have a Markdown file in German. Somehow file
does not like the first umlaut (all others are fine, weirdly enough — it's just that specific instance).
~/Projects » echo $LANG
en_US.UTF-8
~/Projects » echo $LC_ALL
en_US.UTF-8
~/Projects » echo $LC_CTYPE
UTF-8
~/Projects » file /Users/npiccolotto/Desktop/gallery/04\ Konferenz/L1000500.md
/Users/npiccolotto/Desktop/gallery/04 Konferenz/L1000500.md: ERROR: line 22: regexec error 17, (illegal byte sequence)
Anyway, I was able to fix it by overriding LC_ALL
or unset
ting all of LANG
, LC_ALL
and LC_CTYPE
.
~/Projects » LC_ALL=C file /Users/npiccolotto/Desktop/gallery/04\ Konferenz/L1000500.md
/Users/npiccolotto/Desktop/gallery/04 Konferenz/L1000500.md: UTF-8 Unicode text, with very long lines
Not sure what the best solution here is.
Hi, I noticed on jack.ventures (awesome photography by the way) that your galleries each had headers / variable text sizes in slides. Is this at all possible in this tool you released, or are you keeping that a trade secret?
Thanks!
I ran it for the first time (OSX 10.10.2) and it complained about missing ImageMagick, so I installed it. Then it just ignored my videos. It was only after I installed ffmpeg that expose.sh processed my videos. It should check for ffmpeg
when there are videos in the gallery.
Great work btw, thank you very much.
Hi there, I'm having trouble running this on Windows 7 using Cygwin. Here is the output:
$ sh expose.sh
FFmpeg not found, videos will not be processed
Scanning directoriesexpose.sh: line 245: syntax error near unexpected token `<'
expose.sh: line 245: `done < <(find "$topdir" -type d ! -path "$topdir*/_*" | sort)'
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.