Metadata-Version: 2.4
Name: karurada
Version: 0.0.1
Summary: Text-based prototyping.
Author: Nauri Nastik
License: Unlicense
Classifier: License :: Public Domain
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Requires-Dist: jinja2
Requires-Dist: loguru
Requires-Dist: pyyaml
Requires-Dist: xhtml2pdf
Description-Content-Type: text/markdown

# pip-karurada

Generates from YAML-files PDF file.

User defines page-based system (eg. WUI) using YAML files, where UI elements and navigation is declared in simple (limited) way.

Then partial PDF (A4 portrait) can be generated for show purposes to get feedback.


## Declaration

Write YAML-files for every visible page/unit (including popups).

```yaml
alias: simplesetofpages
imports:
  - 
    file: c_standard.yaml
    from: core # if from is missing, file path local file system to your own components

pages:
-
  page: first_page
  title: Things
  abstract: Let it be some list or greetings
  notes:
  - Note about this page, always
  content:
  -
    comp: title_bar
    title: Here will be title
```


Group them somehow (for bigger projects).

Make show-purposed YAML files, which collect pages for that purpose. 

```yaml
show:
  title: Some nice title
  imports:
  - 
    file: "./group1/pages1.yaml"
    as: mydefs

pages:
  -
    page: first_page
    from: mydes
    abstract: Just for fun
    text: Be nice and click everywhere
    notes: # after-page-notes for this show
    - "How to get back is not relevant today, let's discuss it later"
    - No need to hurry

```


Execute something like next (not tested yet):

```python
from karurada import generate_show

show_file_name = 'show.yaml'
show: dict = {}

show_def: dict = interpret_string_as_yaml(read_content_of_file(show_file_name)) # use pyyaml or similar to read yaml file to dict
show = show_def["show"] # other keys may exists for description of file (eg "author"), not needed for show

new_file_name = generate_show(show, output_file, "pdf")
```
