Metadata-Version: 2.4
Name: litesurf
Version: 0.0.2
Summary: A simple CLI-based web browser and HTML parser
Home-page: https://github.com/bhatishan2003/litesurf
Author: Ishan Bhat
Author-email: ishan2003bhat@gmail.com
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.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: test
Provides-Extra: dev
Provides-Extra: docs
Provides-Extra: all
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-python
Dynamic: summary

# litesurf <!-- omit in toc -->

A simple Python CLI tool to create a basic web browser.

![Python Version](https://img.shields.io/badge/python-3.11-blue.svg)
[![PyPI version](https://img.shields.io/pypi/v/litesurf.svg?color=blue)](https://pypi.org/project/litesurf/)
[![License](https://img.shields.io/github/license/bhatishan2003/litesurf)](LICENSE)
[![Python CI](https://github.com/bhatishan2003/litesurf/actions/workflows/python-app.yml/badge.svg)](https://github.com/bhatishan2003/litesurf/actions/workflows/python-app.yml)

![Demo](https://raw.githubusercontent.com/bhatishan2003/litesurf/main/assets/demo.gif)

## Table of Contents <!-- omit in toc -->

-   [Installation](#installation)
    -   [Create and activate a virtual environment:](#create-and-activate-a-virtual-environment)
-   [Usage](#usage)
    -   [Command Line Usage](#command-line-usage)
-   [Building Standalone Executables with PyInstaller](#building-standalone-executables-with-pyinstaller)
    -   [1. Install PyInstaller](#1-install-pyinstaller)

---

## Installation

-   Clone the repository:

    ```bash
    git clone https://github.com/bhatishan2003/litesurf
    cd litesurf
    ```

### Create and activate a virtual environment:

1. **Create a Virtual Environment [Optional, but recommended]**

    Run the following command to create a [virtual environment](https://docs.python.org/3/library/venv.html):

    ```bash
    python3 -m venv .venv
    ```

-   **Activate:**

    -   **Windows (PowerShell):**

        ```bash
        .venv\Scripts\activate
        ```

    -   **Linux/Mac (Bash):**

        ```bash
        source .venv/bin/activate
        ```

-   **Deactivate:**

    ```bash
    deactivate
    ```

-   **Install the package:**

    ```bash
    pip install .
    ```

-   **For development (editable mode):**

    ```bash
    pip install -e .
    ```

## Usage

### Command Line Usage

-   Following commands should be entered to get a pop-up browse.

        ```bash
        litesurf
        litesurf --file test.html
        ```

## Building Standalone Executables with PyInstaller

You can generate platform-specific standalone executables for your litesurf project using **PyInstaller**.

### 1. Install PyInstaller

```bash
pip install pyinstaller
```

-   **Windows**

    ```poweshell
    pyinstaller --name litesurf --onefile run_litesurf.py
    ```

-   **MacOS**

    ```bash
    pyinstaller --name litesurf --onefile --windowed run_litesurf.py
    ```

    -   Convert the .app into a .dmg for distribution:

        ```bash
        hdiutil create -volname litesurf -srcfolder dist/litesurf.app -ov -format UDZO litesurf.dmg
        ```

-   **Linux**

    -   You can create a cross-platform source distribution from Windows (or Linux):

        ```bash
        python setup.py sdist
        ```

    -   Linux users can install it via:
        ```bash
        pip install litesurf-0.0.1.tar.gz
        ```
