Skip to main content

Space Reader

space-reader is a tool that can read a workspace URL and convert the content into LLM-friendly format.

Installation

pip install sreader

Usage

from sreader import read

read("<workspace URL>")

Support Workspace

  • Local File (e.g., /Users/user/desktop/demo.pdf)
  • Local Directory (e.g., /Users/user/desktop/demo)
  • Remote File with Access (e.g., https://example.com/demo.pdf)
  • GitHub Repo with Access (e.g., https://github.com/user/demo)

Support Formats

Markdown

read("<workspace URL>", format="markdown")

"""
## /Users/user/desktop/demo
- ****
  - a.py
  - c.py
  - b.py
  - **d**
    - g.py
    - **f**
      - f.py
  - **e**
"""

JSON and Dict

read("<workspace URL>", format="json")  # or "dict"

"""
{
    "/Users/user/desktop/demo": {
        "files": [
            "a.py",
            "c.py",
            "b.py"
        ],
        "dirs": {
            "d": {
                "files": [
                    "g.py"
                ],
                "dirs": {
                    "f": {
                        "files": [
                            "f.py"
                        ],
                        "dirs": {}
                    }
                }
            },
            "e": {
                "files": [],
                "dirs": {}
            }
        }
    }
}
"""

Tree

read("<workspace URL>", format="tree")

"""
/Users/user/desktop/demo
└── 
    ├── a.py
    ├── c.py
    ├── b.py
    ├── d
    │   ├── g.py
    │   └── f
    │       └── f.py
    └── e
"""

Examples

License

This project is licensed under the MIT License - see the LICENSE file for details.

Download files

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

Source Distribution

sreader-0.0.1.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

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

sreader-0.0.1-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sreader-0.0.1.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for sreader-0.0.1.tar.gz
Algorithm Hash digest
SHA256 84592984f251491609b67b84154dea116d6f6efd87273c3038de04a9db213713
MD5 95ec805f4c0002373054505d76208112
BLAKE2b-256 fd086a5de70f1aadd929bf1a7d8bd9066a6029fdf322dbf59d0784ce7111ee30

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sreader-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for sreader-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ba827363652eaf77e7b4b5e80af84d0e4107a666e7c9dff730fefc043d23b57e
MD5 8da612404725fa680c86f5fb96591ff0
BLAKE2b-256 d4b0cc76a2c705d0c8bf0e3e272ab357249f8894bc94402bda18d3a7c3b3fcf1

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 files

Supported by

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