{"id":34675581,"url":"https://github.com/amberlee2427/nb4llm","last_synced_at":"2026-04-28T16:33:48.808Z","repository":{"id":305976082,"uuid":"1024578626","full_name":"AmberLee2427/nb4llm","owner":"AmberLee2427","description":"Python module that converts `.ipynb` to fenced `.txt` and back again.","archived":false,"fork":false,"pushed_at":"2025-07-27T21:03:18.000Z","size":497,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-26T09:12:38.009Z","etag":null,"topics":["data-cleaning","data-mining","database","jupyter","jupyter-notebook","jupyter-notebooks","llm","llm-tools","llm-training","llms"],"latest_commit_sha":null,"homepage":"https://nb4llm.readthedocs.io/en/latest/?badge=latest","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AmberLee2427.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-22T23:47:32.000Z","updated_at":"2025-07-27T21:03:21.000Z","dependencies_parsed_at":"2025-07-23T01:35:48.694Z","dependency_job_id":null,"html_url":"https://github.com/AmberLee2427/nb4llm","commit_stats":null,"previous_names":["amberlee2427/nb4llm"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AmberLee2427/nb4llm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmberLee2427%2Fnb4llm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmberLee2427%2Fnb4llm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmberLee2427%2Fnb4llm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmberLee2427%2Fnb4llm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AmberLee2427","download_url":"https://codeload.github.com/AmberLee2427/nb4llm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmberLee2427%2Fnb4llm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32390036,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T14:34:11.604Z","status":"ssl_error","status_checked_at":"2026-04-28T14:32:37.009Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-cleaning","data-mining","database","jupyter","jupyter-notebook","jupyter-notebooks","llm","llm-tools","llm-training","llms"],"created_at":"2025-12-24T20:31:26.464Z","updated_at":"2026-04-28T16:33:48.803Z","avatar_url":"https://github.com/AmberLee2427.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"2025_07_27_0rr_Kleki.png\" alt=\"logo\" width=40%\u003e\n\u003c/p\u003ep\u003e\n\n[![PyPI version](https://img.shields.io/pypi/v/clfits.svg)](https://pypi.org/project/nb4llm)[![Documentation Status](https://readthedocs.org/projects/nb4llm/badge/?version=latest)](https://nb4llm.readthedocs.io/en/latest/?badge=latest)[![CI](https://github.com/Amberlee2427/nb4llm/actions/workflows/ci.yml/badge.svg)](https://github.com/Amberlee2427/nb4llm/actions/workflows/ci.yml)[![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\n---\n\n# `nb4llm`\n\n**Convert Jupyter notebooks to and from a readable, LLM-friendly text format.**\n\n## 🚀 Features\n\n- **Convert `.ipynb` → `.txt`**: Extracts markdown and code cells as readable, chunked blocks.\n- **Convert `.txt` → `.ipynb`**: Reconstructs a notebook from the text format.\n- **Language-aware**: Preserves code cell language (Python, R, Julia, etc).\n- **Robust chunking**: Handles nested code fences and markdown.\n- **CLI tool**: Easy to use from the command line or scripts.\n- **Pre-commit, Black, isort, flake8**: Modern Python dev workflow.\n\n---\n\n## 📦 Installation\n\n```bash\npip install -e .\n# or, for development:\npip install -e .[dev]\n```\n\n---\n\n## 📝 Usage\n\n### **Convert a notebook to text**\n\n```bash\nnb4llm notebook.ipynb\n# Output: notebook.txt\n```\n\n### **Convert a notebook to a specific text file**\n\n```bash\nnb4llm notebook.ipynb output.txt\n```\n\n### **Convert text back to a notebook**\n\n```bash\nnb4llm --reverse notebook.txt\n# Output: notebook.ipynb\n```\n\n### **Convert text to a specific notebook file**\n\n```bash\nnb4llm --reverse notebook.txt output.ipynb\n```\n\n### **Show help**\n\n```bash\nnb4llm --help\n```\n\n---\n\n## 🧑‍💻 Example Text Format\n\n```\n# my_notebook.ipynb\n\n```markdown\nSome markdown text\n```\n\n```python\n# Some code\nprint(\\\"Hello, world!\\\")\n```\n```\n\n---\n\n## 🛠️ Development\n\n### **Run tests**\n\n```bash\npytest tests/\n```\n\n### **Run formatting and linting**\n\n```bash\npre-commit run --all-files\n```\n\n### **Type checking**\n\n```bash\nmypy src/\n```\n\n---\n\n## 🧩 Project Structure\n\n```\nnb4llm/\n├── src/\n│   └── nb4llm/\n│       ├── __init__.py\n│       ├── cli.py\n│       └── converter.py\n├── tests/\n│   ├── test_cli.py\n│   ├── test_converter.py\n│   └── conftest.py\n├── pyproject.toml\n├── .pre-commit-config.yaml\n├── .flake8\n└── README.md\n```\n\n---\n\n## 📝 Contributing\n\n1. Fork the repo and create a feature branch.\n2. Make your changes and add tests.\n3. Run `pre-commit run --all-files` and `pytest`.\n4. Submit a pull request!\n\n---\n\n## 📄 License\n\nMIT License. See [LICENSE](LICENSE) for details.\n\n---\n\n**Built for robust, LLM-friendly notebook processing.**\n\n---\n\nLet me know if you want this written to your `README.md` or want to tweak any section!\n\n\n## Contact\n\nname: Amber Malpas \ngithub: AmberLee2427\nemail: malpas.1@osu.edu\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famberlee2427%2Fnb4llm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famberlee2427%2Fnb4llm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famberlee2427%2Fnb4llm/lists"}