Lenscap is a static site generator for creating beautiful photo narratives
Write your stories in markdown and insert small snippets of code to add small
groups of images.
# Example
Given a directory structure of
```
kitten.md
photos/
1.jpg
2.jpg
3.jpg
```
And a markdown file of
# Kittens
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean pretium
elit sit amet posuere congue. Nam felis augue, pretium ac auctor quis,
facilisis non nunc. Nullam in erat magna. Duis rhoncus felis id erat
maximus, ac condimentum felis efficitur. Nunc ac mattis ante. Etiam sed
orci tortor. Ut gravida orci eu dictum vulputate. Vestibulum dui augue,
condimentum ac tempus ac, mollis non ante. Pellentesque aliquam, est vitae
sollicitudin tristique, tortor massa tincidunt nibh, eu tempus sem dolor
vitae diam. Proin sodales velit nec nisi euismod, id facilisis elit
consequat. Nam eros magna, vulputate ac turpis quis, rhoncus euismod justo.
```yaml
rows: 1, 2
items:
- 1.jpg
- 2.jpg
- 3.jpg
```
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean pretium
elit sit amet posuere congue. Nam felis augue, pretium ac auctor quis,
facilisis non nunc. Nullam in erat magna. Duis rhoncus felis id erat
maximus, ac condimentum felis efficitur.
Nunc ac mattis ante. Etiam sed orci tortor. Ut gravida orci eu dictum
vulputate. Vestibulum dui augue, condimentum ac tempus ac, mollis non ante.
Pellentesque aliquam, est vitae sollicitudin tristique, tortor massa
tincidunt nibh, eu tempus sem dolor vitae diam. Proin sodales velit nec
nisi euismod, id facilisis elit consequat. Nam eros magna, vulputate ac
turpis quis, rhoncus euismod justo.
You can produce content like [the demo page][1] by running `lenscap kitten.md`.
[1]: http://honza.ca/tripod/kitten.html
# Installation
`$ pip install lenscap`
# Usage
Throw some high resolution photos into a `photos/` directory and then write
your essay in a markdown file. You can use regular markdown and specify your
photo layouts using fenced blocks.
The fenced in block uses simple yaml syntax to specify your meta data. All you
really need to do is tell it how many rows of photos you want and how many
photos are in each row. Then you list the files and lenscap does the rest.
So, if you want to have a 2 photos over 3, you'd say `rows: 2, 3`. If you want
a single image, you can skip the `rows` directive.
Lenscap will check that your photos are big enough in terms of resolution and
will refuse to continue if the photos are too small. You can also tell lenscap
to resize your high resolution photos to just the right size.
You invoke the `lenscap` command on your file:
```
$ lenscap kitten.md
```
And this will create a file called `kitten.html` in the same directory.
```
Usage: lenscap [options] files
Options:
-h, --help show this help message and exit
-p DIR, --photos=DIR Directory with photos (default: photos/)
-t DIR, --templates=DIR Directory with templates (default: None)
-s FILE, --stylesheet=FILE Stylesheet file
-r, --resize Resize images (default: False)
```
# License
BSD, short and sweet
Metadata
Release files for lenscap 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lenscap-0.0.1.tar.gz | 4.5 kB | Without provenance | Details for lenscap-0.0.1.tar.gz |
Release files / lenscap-0.0.1.tar.gz
| Download URL | lenscap-0.0.1.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
411c8ea6bccf272124b7f5fb5e2648ac76fbc6a73d52fc64b43e13aab4150b81
|
|
BLAKE2b-256 checksum How to use checksums |
45e0cbf9c24aa8d925ab15835be57ac9555a62179a9457f6855880bb9ac41c5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for lenscap 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.