botstash 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- botstash/__init__.py +3 -0
- botstash/anythingllm/__init__.py +0 -0
- botstash/anythingllm/client.py +1 -0
- botstash/classifier/__init__.py +0 -0
- botstash/classifier/auto.py +1 -0
- botstash/cli.py +70 -0
- botstash/config.py +1 -0
- botstash/extractors/__init__.py +0 -0
- botstash/extractors/docx.py +1 -0
- botstash/extractors/pdf.py +1 -0
- botstash/extractors/pptx.py +1 -0
- botstash/extractors/qti.py +1 -0
- botstash/extractors/unit_outline.py +1 -0
- botstash/extractors/url_tracker.py +1 -0
- botstash/extractors/vtt.py +1 -0
- botstash/ingester/__init__.py +0 -0
- botstash/ingester/imscc.py +1 -0
- botstash/ingester/transcript.py +1 -0
- botstash/pipeline.py +1 -0
- botstash/py.typed +0 -0
- botstash/webui/__init__.py +0 -0
- botstash/webui/app.py +1 -0
- botstash-0.1.0.dist-info/METADATA +86 -0
- botstash-0.1.0.dist-info/RECORD +27 -0
- botstash-0.1.0.dist-info/WHEEL +4 -0
- botstash-0.1.0.dist-info/entry_points.txt +2 -0
- botstash-0.1.0.dist-info/licenses/LICENSE +21 -0
botstash/__init__.py
ADDED
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""AnythingLLM REST API wrapper."""
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Heuristic and optional AI classification."""
|
botstash/cli.py
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"""Click-based CLI entry points."""
|
|
2
|
+
|
|
3
|
+
import click
|
|
4
|
+
|
|
5
|
+
from botstash import __version__
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@click.group()
|
|
9
|
+
@click.version_option(version=__version__, prog_name="botstash")
|
|
10
|
+
def cli() -> None:
|
|
11
|
+
"""BotStash — LMS course content to AnythingLLM chatbot pipeline."""
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@cli.command()
|
|
15
|
+
@click.argument("course_zip", type=click.Path(exists=True))
|
|
16
|
+
@click.argument("transcripts", type=click.Path(exists=True))
|
|
17
|
+
@click.option("--workspace", required=True, help="AnythingLLM workspace name.")
|
|
18
|
+
@click.option("--url", envvar="ANYTHINGLLM_URL", help="AnythingLLM instance URL.")
|
|
19
|
+
@click.option("--key", envvar="ANYTHINGLLM_KEY", help="AnythingLLM API key.")
|
|
20
|
+
@click.option("--keep-staging", is_flag=True, help="Keep staging files after embed.")
|
|
21
|
+
def run(
|
|
22
|
+
course_zip: str,
|
|
23
|
+
transcripts: str,
|
|
24
|
+
workspace: str,
|
|
25
|
+
url: str | None,
|
|
26
|
+
key: str | None,
|
|
27
|
+
keep_staging: bool,
|
|
28
|
+
) -> None:
|
|
29
|
+
"""Run the full extract-classify-embed pipeline."""
|
|
30
|
+
click.echo("botstash run: not yet implemented")
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
@cli.command()
|
|
34
|
+
@click.argument("course_zip", type=click.Path(exists=True))
|
|
35
|
+
@click.argument("transcripts", type=click.Path(exists=True))
|
|
36
|
+
@click.option("--output", default="./staging", help="Output directory.")
|
|
37
|
+
def extract(course_zip: str, transcripts: str, output: str) -> None:
|
|
38
|
+
"""Extract and auto-classify content from a course export."""
|
|
39
|
+
click.echo("botstash extract: not yet implemented")
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
@cli.command()
|
|
43
|
+
@click.argument("staging_dir", type=click.Path(exists=True))
|
|
44
|
+
@click.option("--workspace", required=True, help="AnythingLLM workspace name.")
|
|
45
|
+
@click.option("--tags", type=click.Path(exists=True), help="Path to tags.json.")
|
|
46
|
+
@click.option("--reset", is_flag=True, help="Clear workspace before uploading.")
|
|
47
|
+
def embed(staging_dir: str, workspace: str, tags: str | None, reset: bool) -> None:
|
|
48
|
+
"""Embed staged documents into an AnythingLLM workspace."""
|
|
49
|
+
click.echo("botstash embed: not yet implemented")
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
@cli.command()
|
|
53
|
+
@click.argument("workspace")
|
|
54
|
+
def chatbot(workspace: str) -> None:
|
|
55
|
+
"""Retrieve the chatbot embed code for a workspace."""
|
|
56
|
+
click.echo("botstash chatbot: not yet implemented")
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
@cli.command()
|
|
60
|
+
def init() -> None:
|
|
61
|
+
"""Scaffold a .botstash.env configuration file."""
|
|
62
|
+
click.echo("botstash init: not yet implemented")
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
@cli.command()
|
|
66
|
+
@click.option("--host", default="127.0.0.1", help="Host to bind to.")
|
|
67
|
+
@click.option("--port", default=8000, help="Port to bind to.")
|
|
68
|
+
def serve(host: str, port: int) -> None:
|
|
69
|
+
"""Launch the BotStash WebUI."""
|
|
70
|
+
click.echo("botstash serve: not yet implemented")
|
botstash/config.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Configuration file and environment variable handling."""
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""DOCX text extraction."""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""PDF text extraction."""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""PPTX text extraction."""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""QTI XML quiz extraction — question text only."""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Bespoke unit outline extraction plugin."""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Log video/external URLs found in manifests."""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""VTT to clean text conversion (timestamps stripped)."""
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Unzip and walk IMSCC/common cartridge structure."""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""VTT folder ingestion."""
|
botstash/pipeline.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Orchestrates the full extract-classify-embed pipeline."""
|
botstash/py.typed
ADDED
|
File without changes
|
|
File without changes
|
botstash/webui/app.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""FastAPI + Jinja2 WebUI."""
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: botstash
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: CLI tool and WebUI that ingests LMS course exports and Echo360 transcripts into an AnythingLLM workspace for embedded course chatbots.
|
|
5
|
+
Project-URL: Homepage, https://github.com/michael-borck/botstash
|
|
6
|
+
Project-URL: Repository, https://github.com/michael-borck/botstash
|
|
7
|
+
Project-URL: Issues, https://github.com/michael-borck/botstash/issues
|
|
8
|
+
Author-email: Michael <michael@example.com>
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: anythingllm,botstash,chatbot,education,lms,rag
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Education
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Topic :: Education
|
|
20
|
+
Requires-Python: >=3.11
|
|
21
|
+
Requires-Dist: click>=8.1
|
|
22
|
+
Requires-Dist: fastapi>=0.115
|
|
23
|
+
Requires-Dist: httpx>=0.27
|
|
24
|
+
Requires-Dist: jinja2>=3.1
|
|
25
|
+
Requires-Dist: pdfminer-six>=20231228
|
|
26
|
+
Requires-Dist: python-docx>=1.1
|
|
27
|
+
Requires-Dist: python-dotenv>=1.0
|
|
28
|
+
Requires-Dist: python-pptx>=1.0
|
|
29
|
+
Requires-Dist: uvicorn>=0.32
|
|
30
|
+
Requires-Dist: webvtt-py>=0.5
|
|
31
|
+
Description-Content-Type: text/markdown
|
|
32
|
+
|
|
33
|
+
# BotStash
|
|
34
|
+
|
|
35
|
+
A CLI tool and lightweight WebUI that ingests LMS course exports (Blackboard IMSCC / Canvas) and Echo360 VTT transcripts, uploads content to an [AnythingLLM](https://anythingllm.com/) workspace, and returns embeddable chatbot code for pasting into a course page.
|
|
36
|
+
|
|
37
|
+
## Features
|
|
38
|
+
|
|
39
|
+
- **IMSCC ingestion** — unzips and walks Blackboard/Canvas common cartridge exports
|
|
40
|
+
- **Transcript ingestion** — processes folders of Echo360 VTT files
|
|
41
|
+
- **Multi-format extraction** — PPTX, DOCX, PDF, VTT, QTI quizzes
|
|
42
|
+
- **Auto-classification** — heuristic tagging of content types (lecture, worksheet, assignment, etc.)
|
|
43
|
+
- **AnythingLLM integration** — uploads documents, manages workspaces, retrieves embed code
|
|
44
|
+
- **WebUI** — FastAPI + Jinja2 interface for non-terminal users
|
|
45
|
+
|
|
46
|
+
## Installation
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pip install botstash
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Quick Start
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# Full pipeline
|
|
56
|
+
botstash run course.zip transcripts/ \
|
|
57
|
+
--workspace ISYS2001 \
|
|
58
|
+
--url https://your-anythingllm.instance \
|
|
59
|
+
--key YOUR_API_KEY
|
|
60
|
+
|
|
61
|
+
# Two-step workflow (extract, review, embed)
|
|
62
|
+
botstash extract course.zip transcripts/ --output ./staging/
|
|
63
|
+
# ... review staging/tags.json ...
|
|
64
|
+
botstash embed ./staging/ --workspace ISYS2001
|
|
65
|
+
|
|
66
|
+
# Launch WebUI
|
|
67
|
+
botstash serve
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Development
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
# Clone and install in dev mode
|
|
74
|
+
git clone https://github.com/michael-borck/botstash.git
|
|
75
|
+
cd botstash
|
|
76
|
+
uv sync --dev
|
|
77
|
+
|
|
78
|
+
# Run checks
|
|
79
|
+
uv run ruff check src/ tests/
|
|
80
|
+
uv run mypy src/
|
|
81
|
+
uv run pytest
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## License
|
|
85
|
+
|
|
86
|
+
MIT
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
botstash/__init__.py,sha256=WFQEtIGkRLYjgt77tfYhL9ylDCRdw0t0pRCF68p7C_A,94
|
|
2
|
+
botstash/cli.py,sha256=60f1o2qgFQvJhjQ1EJs-t-tUUdlPAcv6xDdUEQz8mvg,2531
|
|
3
|
+
botstash/config.py,sha256=jBGr_r_dXT1lu3OUmLynmr6VhHuhFzw135fcZHt5o_o,60
|
|
4
|
+
botstash/pipeline.py,sha256=R_zLhAX-qm5n2Njez_ZqPZzcJ1r45a5eVlYsLJ61NlY,61
|
|
5
|
+
botstash/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
+
botstash/anythingllm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
+
botstash/anythingllm/client.py,sha256=cwlD8Cr0m-vnG9ofxSD7bmltDe7L9Da6nVJFMdLG3a8,36
|
|
8
|
+
botstash/classifier/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
+
botstash/classifier/auto.py,sha256=B93zDBsmhKlx7sv7aOUJkwLhsdkuKSpD_u7_YhhRCVU,48
|
|
10
|
+
botstash/extractors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
+
botstash/extractors/docx.py,sha256=phriXPLU1gtCfJKu9n5mOMUqfr9nwwS5_XU2Lcpn15Q,28
|
|
12
|
+
botstash/extractors/pdf.py,sha256=tQdoOvmOes06V7xT_b4iM2_3QWL_L59q3O_3nx1S6co,27
|
|
13
|
+
botstash/extractors/pptx.py,sha256=MuUn-z2G_qMM1uOnzvUuNoEmY9I8lmVxv8LBd2CcL3o,28
|
|
14
|
+
botstash/extractors/qti.py,sha256=LFcLDMlbyOMMffI7_bJQMtuWBStJ6QVLCTTp8ZJUHh0,54
|
|
15
|
+
botstash/extractors/unit_outline.py,sha256=hA3OESDnVDCs3BOazRu87aXhu6Mq5CJHmO1wBYf5-xs,46
|
|
16
|
+
botstash/extractors/url_tracker.py,sha256=BOPCR03ba2fnQ6A6tujGLZ62Q90X5-uUxT-HzdqHoAk,50
|
|
17
|
+
botstash/extractors/vtt.py,sha256=G5cTh72naIFbMvOXlCrwUePsvD2saSnlV6ZEmm89w_I,58
|
|
18
|
+
botstash/ingester/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
|
+
botstash/ingester/imscc.py,sha256=0WAh4otJ9Hjkl1MdoE9JAG7sZBNAuUSZjvKmRPsQ6Z8,55
|
|
20
|
+
botstash/ingester/transcript.py,sha256=rObH3amvhnrpFjPl-4WpJp1--1LWrIqlY0BItIDE7s8,28
|
|
21
|
+
botstash/webui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
|
+
botstash/webui/app.py,sha256=WTDtns88pGoOXxpzd5o3nqVWun6c-87-HJMxZ8JEq9U,30
|
|
23
|
+
botstash-0.1.0.dist-info/METADATA,sha256=cbTbEZDanf6F73SjdSSowO4EILA8MfytXZC0okHDXrY,2742
|
|
24
|
+
botstash-0.1.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
|
|
25
|
+
botstash-0.1.0.dist-info/entry_points.txt,sha256=_-hTmjM8HqsoqtRuv4aEeOzClgzs_wB75TOaagSPmFU,46
|
|
26
|
+
botstash-0.1.0.dist-info/licenses/LICENSE,sha256=0uVeJfLU3mjdYwRrEGRh4X0RQC0fbqX3Hc8BjSaZSJg,1064
|
|
27
|
+
botstash-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Michael
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|