semvec/pypi-packages huggingface dataset:
granita 0.3.0
Granita is a simple static site generator for embedding Markdown in HTML templates.
Requires Python: >=3.6

# Granita

A super-simple static site generator, with sensible opinionated defaults.

## Installation

```sh
pip install granita
```

## Quickstart

Run the following commands in your terminal, then open the file `my_app/public/index.html` in your browser.

```sh
granita init my_app
cd my_app
granita build
```

## What this is

At a basic level, you write Markdown in the `pages` directory, and Granita combines them with HTML templates from the `templates` directory.

For example, take the following Markdown:

```markdown
# Hello world!

> *I'm learning how to use [Granita](https://github.com/apple-phi/granita)*
```

This would be translated into HTML before being inserted inside the `<Content/>` element in the template.
By default, if a template is not specified, Granita will try to find and use file called `default.html` in your templates directory.

Files listed in the `static` directory will be copied as-is to the output `public` directory.

## Frontmatter

To specify your own parameters, you can use a format called frontmatter. It looks like this:

```markdown
---
title: "My app"
template: my_template.html
---
# Hello world!

> *I'm learning how to use [Granita](https://github.com/apple-phi/granita)*
```

`title` and `template` are treated specially by Granita. Here's what they do:

- `title` specifies the title of the webpage, by creating a `<title>` element if it doesn't already exist in the template.
- `template` specifies the HTML template to embed the Markdown in, with the path relative to the `templates` directory.

Additionally, the frontmatter keys are treated as CSS selectors for prepending content to the template. So if you had the following frontmatter:

```yaml
---
"#my_element": "some text"
---
```

Then the element with the id `my_element` will have the text `some text` prepended inside it.
And this will happen for all elements matched by the CSS selector. For example, if you duplicate the `<Content/>` tag in the default template generated by `granita init` and rebuild, then you will see two copies of the page content.

## Further configuration

If you are unsatisfied with the default paths and settings, you can create a `granita.config.json` file to override them. Here's what the default configuration looks like:

```json
{
 "pages": "pages", // path to pages dir
 "static": "static", // path to static dir
 "public": "public", // path to output dir
 "templates": "templates", // path to template dir
 "default-template": "default.html", // fallback template path
 "content-selector": "Content", // CSS selector to insert Markdown into
 "global-stylesheet": null, // a stylesheet to be applied to all templates
 "extra-data": {} // key : value pairs of CSS selector : HTML data
}
```

You don't have to provide customisation for all settings; the defaults will be used if left unspecified.

## License

MIT License, which can be found [here](https://github.com/apple-phi/granita/blob/main/LICENSE)

© Copyright 2021, apple-phi.
photosynthetic 0.0.16
Perform color and palette analysis on images
Requires Python: >=3.6

# Photosynthetic
Photosynthetic is a python library that uses a unique clustering and distance algorithm to 
determine the perceptual color palette of an image. It offers a high degree of flexibility 
and configuration, allowing you to dial it in for post-processed images, illustrations, 
low-saturation, or product images!

A few examples of what you could do with this library:
* Create a fun, albeit useless, image host centered around color palettes like : https://photosynther.net
* Determine the primary color of product images for your eCommerce merchandising pipeline
* Have fun!
* Combine reference images into a brand guide or design system
* Automatically change themes based on profile images
* And probably at least a little but more

## Usage:
This library can be used one of two ways, you can import the package into your own project 
and use it as a library, or you can use it via the command line by passing in an image 
filepath as the first argument

### Command Line Usage
```bash
python main.py path/to/file.png
```

### Library Usage

Quickstart (Will extract a palette using sane and generic analysis defaults)
```python

from photosynthetic.Palette import Palette

p = Palette('images/test.png')
palette = p.extract()

print(palette)
# Returns :
# 
```