~jheckt/PhotographyWebsite

e810c3ab064ef043004be5756fb27e1400b6d7d6 — turnipsoup 1 year, 4 months ago 8e91075
readme update
1 files changed, 10 insertions(+), 17 deletions(-)

M README.md
M README.md => README.md +10 -17
@@ 13,11 13,21 @@ The PaletteGenerator that I wrote can be found here: [https://github.com/LetsEat
/   
    photos/
        Collection_One/
            Photo1.png
            Photo1.jpg
            Photo1.md
        Collection_Two/
            Photo2.png
            Photo2.jpg
            Photo2.md
        [...]
    averages/
        Photo1.png.average.png
        Photo2.png.average.png
    html/
        [html/css files]
    posts/
        01-my-first-blog-post.md
```

Your photos need to be placed under `photos/<Collection_Name>/`. This will be how the website knows where each image should be displayed.


@@ 28,23 38,6 @@ Any descriptions of a photo can be saved as `/photos/<collection-name>/<photo-na

Any blog posts get written in markdown and placed in the `posts/` directory. The website will display them under the `/blog/` endpoint. The title of the blog post on this page will be the title case version of the filename, replacing "-" with a space: `how-cameras-work.md -> How Cameras Work`.

## Accessing Pages and Files
Accessing a photo's page can be done like this: http://127.0.0.1:8080/collections/test/DSC_0005 <br>

Accessing the store image or the stored average file can be done like this:
- http://127.0.0.1:8080/collections/test/DSC_0005.png 
- http://127.0.0.1:8080/collections/test/DSC_0005.png.average.png

## Exif Data
The EXIF data of the photos is accessed via a dependency program, `exiftool`. This is a well known and widely used program. I chose to use this instead of the module `goexif` because for some reason `goexif` was complaining about the leading block in the files. `exiftool` can read my files fine and can output with JSON formatting - so I just chose to marshall it this way.

You can access the EXIF data in `photos.go` like this:

```go
if exif[0]["LensID"] != nil {
		photo.Details = exif[0]["LensID"].(string)
	}
```

# Screenshots
## Current individual photo page