Metadata-Version: 2.4
Name: dialogify
Version: 0.1.0
Summary: Easily turn HTML docs into solveit dialogs
Home-page: https://github.com/galopyz/dialogify
Author: Jay Suh
Author-email: shipalnomoo@gmail.com
License: Apache Software License 2.0
Keywords: nbdev jupyter notebook python solveit
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: Apache Software License
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastcore
Requires-Dist: dialoghelper
Requires-Dist: bs4
Requires-Dist: httpx
Provides-Extra: dev
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# dialogify


<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

[The Python Standard
Library](https://docs.python.org/3/library/index.html) documentation is
very helpful for learning Python. So is
[Solveit](https://solve.it.com/)! Solveit is jupyter notebook + AI with
superpowers. Learning programming is so much fun and productive with AI.
Therefore, I wanted to convert these html python documentation pages
into solveit dialogues, which comprise small pieces of notes and code
messages with appropriate headings, which can be extracted from the
pages’ table of contents.

How it works:

- We first get the html from the python documentation web page.
- We turn it into `(msg_type, element)` where `msg_type` is `note` or
  `code` and `element` is soup element.
- Turn `element`s into appropriate solveit messages for the dialog.

The goal is to use `#` for the title, `##` for subheading, and `###` for
each function definition from the docs.

## Installation

Install latest from the GitHub
[repository](https://github.com/galopyz/dialogify):

``` sh
$ pip install git+https://github.com/galopyz/dialogify.git
```

or from [pypi](https://pypi.org/project/dialogify/)

``` sh
$ pip install dialogify
```

## How to use

To create a solveit dialog from python documentation, we need to pass
the url to
[`mk_dialog`](https://galopyz.github.io/dialogify/core.html#mk_dialog).
Below code creates solveit messages after that message.

``` python
from dialogify.core import *

mk_dialog('https://docs.python.org/3.12/library/random.html')
```

Here is an [example
dialog](https://share.solve.it.com/d/d9937162808e0878070a922abaab3e5d)
on solveit from
[random](https://docs.python.org/3.12/library/random.html) python
libary. It also works on [Built-in
Functions](https://docs.python.org/3.12/library/functions.html).
