Metadata-Version: 2.4
Name: srcviewserver
Version: 0.1.0a2
Summary: A simple HTTP server that serves source files with syntax highlighting.
Author-email: Jifeng Wu <jifengwu2k@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/jifengwu2k/srcviewserver
Project-URL: Bug Tracker, https://github.com/jifengwu2k/srcviewserver/issues
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=2
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fspathverbs
Requires-Dist: guess-file-mime-type
Requires-Dist: httppackets
Requires-Dist: pygments
Requires-Dist: six
Requires-Dist: textcompat
Requires-Dist: typing; python_version < "3.5"
Dynamic: license-file

# `srcviewserver`

A simple HTTP server that serves source files with syntax highlighting.  

Source files with a recognized language extension are highlighted and wrapped in an HTML page.  
All other files are served as-is (binary streaming). Directories get an HTML listing.

## Installation

```
pip install srcviewserver
```

## Usage

```
srcviewserver [--port PORT] [--host HOST]
```

| Option      | Default     | Description                       |
|------------ |------------ |---------------------------------- |
| `--host`    | `127.0.0.1` | Host/IP address to bind to.       |
| `--port -p` | `8000`      | Port to listen on.                |

Navigate to `http://127.0.0.1:8000/` and browse the directory tree.

## Testing

A self-contained smoke test exercises the response-building functions (directory
listing, syntax highlighting, binary streaming, HEAD, and error responses):

```
python -m test.smoke_test
```

Run it with either Python 2 or Python 3 from the repository root.

## Contributing

Contributions are welcome! Please submit pull requests or open issues on the GitHub repository.

## License

This project is licensed under the [MIT License](LICENSE).
