Metadata-Version: 2.2
Name: st-scribe
Version: 0.1.0
Summary: Record clicks in your Streamlit app and auto-generate a step-by-step how-to guide (Scribe for Streamlit).
Author-email: Meet2147 <meetjethwa3@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/Meet2147/pythonLibraries/tree/main/st_scribe
Project-URL: Repository, https://github.com/Meet2147/pythonLibraries
Project-URL: Issues, https://github.com/Meet2147/pythonLibraries/issues
Keywords: streamlit,documentation,screenshots,guide,scribe,walkthrough
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Documentation
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: streamlit>=1.20

# st_scribe

Record clicks and field changes in your Streamlit app and auto-generate a
step-by-step how-to guide — like [Scribe](https://scribehow.com), but for
Streamlit apps.

Great for internal tools: instead of writing a "how to use this dashboard"
doc by hand, click Start Recording, use the app once, and export a
shareable guide with screenshots, highlighted click points, and captions.

## Install

```bash
pip install st-scribe
```

## Usage

```python
import streamlit as st
import st_scribe

# ... your normal app widgets ...

steps = st_scribe.recorder()

if steps:
    html_doc = st_scribe.to_html(steps, title="How to use this app")
    st.download_button("Download guide", html_doc, file_name="guide.html")
```

Click **Start Recording**, interact with your app as a user would, then
**Finish Recording**. Each click and field change is captured as a
screenshot with a red highlight ring on the clicked element, plus an
auto-guessed caption (e.g. `Enter "Priya Sharma" in "Employee name"`).

See [`demo.py`](demo.py) for a complete example, including an editable
review step before export.

```bash
streamlit run demo.py
```

## How it works

`st_scribe.recorder()` is a Streamlit custom component. Its frontend
JavaScript reaches into the parent app's DOM (same-origin, so this is
allowed) to listen for clicks/changes anywhere in your app, and uses
[html2canvas](https://html2canvas.hertzen.com/) to screenshot the page at
each step. No screen-recording permissions or server-side rendering
needed — it all happens in the browser.

## Limitations

- Password field values are masked in captions, but the *screenshot*
  still shows whatever is visibly rendered on screen — don't record
  flows containing real secrets.
- Full-page screenshots can take ~1 second each on complex pages; the
  recorder shows a "Capturing..." status while this happens.
- Captions are heuristic guesses based on nearby labels/button text;
  review and edit them before exporting (the demo app shows how).
