dialogify
The Python Standard Library documentation is very helpful for learning Python. So is Solveit! 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)wheremsg_typeisnoteorcodeandelementis soup element. - Turn
elements 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:
$ pip install git+https://github.com/galopyz/dialogify.gitor from pypi
$ pip install dialogifyHow to use
To create a solveit dialog from python documentation, we need to pass the url to mk_dialog. Below code creates solveit messages after that message.
from dialogify.core import *
mk_dialog('https://docs.python.org/3.12/library/random.html')Here is an example dialog on solveit from random python libary. It also works on Built-in Functions.