Skip to main content

Easily turn HTML docs into solveit dialogs

Project description

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) where msg_type is note or code and element is 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.git

or from pypi

$ pip install dialogify

How 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dialogify-0.0.1.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dialogify-0.0.1-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file dialogify-0.0.1.tar.gz.

File metadata

  • Download URL: dialogify-0.0.1.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for dialogify-0.0.1.tar.gz
Algorithm Hash digest
SHA256 a101d78469114dcf36761ab7cab670e2b697b3e5f63928e6419613a873a31581
MD5 5e2bf0d66a7e07f02d5dcaff86f80afb
BLAKE2b-256 c46f7a5e18aa25bf36407a6a813a65aa9708ab14583008bdc01ca9de4fa089a7

See more details on using hashes here.

File details

Details for the file dialogify-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: dialogify-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for dialogify-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ec4413d1644847bdc102fa6c5136258fefb2c6f0c04c3741ecda7f66648a8013
MD5 cfd8afe1cfbfcdf4492549f524d9bfbe
BLAKE2b-256 90256936023c2747bfebe2fdb6272cd39d3a037012e66a5a80226771d1be2d73

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page