Metadata-Version: 2.4
Name: tgpublisher
Version: 3.1.0rc2
Summary: A user interface for managing TextGrid projects, including import, export, and publication features.
Author: Ralf Klammer, Moritz Wilhelm
Author-email: ralf.klammer@tu-dresden.de, moritz.wilhelm@tu-dresden.de
Project-URL: Homepage, https://gitlab.gwdg.de/textplus/textplus-io/tgpublisher
Project-URL: Source, https://gitlab.gwdg.de/textplus/textplus-io/tgpublisher
Project-URL: Tracker, https://gitlab.gwdg.de/textplus/textplus-io/tgpublisher/-/issues
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click
Requires-Dist: flask
Requires-Dist: flask_json
Requires-Dist: flask_login
Requires-Dist: tg_model>=4.0.4.rc5
Requires-Dist: tgclients
Requires-Dist: tgadmin
Requires-Dist: nextcloud-api-wrapper
Provides-Extra: build
Requires-Dist: build; extra == "build"
Requires-Dist: twine; extra == "build"
Dynamic: author
Dynamic: author-email
Dynamic: description
Dynamic: description-content-type
Dynamic: license-file
Dynamic: project-url
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: summary

# TGPublisher

`tgpublisher` is a user interface (UI) designed to visually prepare TextGrid imports. It integrates with the [`tg_model`](https://gitlab.gwdg.de/textplus/textplus-io/tg_model) project and provides tools for managing projects, uploading files, and publishing to TextGrid.

## Features

- **Project Management**: Create, edit, and delete projects.
- **TextGrid Integration**: Publish projects to a TextGrid test instance.
- **XPath Support**: Validate and edit XPath expressions.
- **File Uploads**: Upload and manage files within a project.
- **Nextcloud Integration**: Download files from Nextcloud.
- **Git Integration**: Clone Git repositories directly into a project.
- **Configurable Settings**: Customize the application via `config.ini`.

## Requirements

- Python 3.8 or higher
- Dependencies listed in [`setup.py`](setup.py)

## Installation

1. Clone the repository:
    ```bash
    git https://gitlab.gwdg.de/textplus/textplus-io/tgpublisher.git
    cd tgpublisher
    ```

2. Create and activate a virtual environment:
    ```bash
    python3 -m venv venv
    source venv/bin/activate
    ```

3. Install the dependencies:
    ```bash
    pip install .
    ```

4. Configure the application:
    - Copy the example configuration file:
        ```bash
        cp config.ini.example config.ini
        ```
    - Edit `config.ini` to suit your environment.

5. Run the application:
    ```bash
    tgp_app
    ```

6. Open the application in your browser at `http://localhost:5000`.

## Usage

### Configuring the Application
Modify the `config.ini` file to set up:
- TextGrid API credentials
- File storage paths
- Other application-specific settings

### Creating Projects
1. Navigate to the homepage.
2. Click "Create New Project."
3. Enter a project name and confirm.

### Uploading Files
1. Open a project.
2. Go to the "Files" tab.
3. Select files and click "Upload."

### Publishing to TextGrid
1. Ensure you have a valid TextGrid session ID.
2. Select a project and click "Publish."
3. Follow the instructions to upload the project to the TextGrid test instance.

## Project Structure

The project is organized into two main subpackages:

### `tgp_ui`
- Contains the Flask-based user interface.
- Includes HTML templates and static assets.

### `tgp_backend`
- Implements the backend logic for project management, file handling, and TextGrid API integration.

### Configuration
- `config.ini`: Central configuration file for the application.

## License

This project is licensed under the Apache License 2.0. See the [`LICENSE`](LICENSE) file for details.

## Authors

- **Ralf Klammer** - TU Dresden
- **Moritz Wilhelm** - TU Dresden

## Contributing

Contributions are welcome! Please open an issue or submit a pull request on [GitLab](https://gitlab.gwdg.de/textplus/textplus-io/tgpublisher/-/issues).

---

Enjoy working with [tgpublisher](https://gitlab.gwdg.de/textplus/textplus-io/tgpublisher)!
