pkrsplitter


Namepkrsplitter JSON
Version 1.1.4 PyPI version JSON
download
home_pagehttps://github.com/manggy94/PokerSplitter
SummaryA package to split poker history files
upload_time2024-08-21 11:48:36
maintainerNone
docs_urlNone
authorAlexandre MANGWA
requires_python>=3.10
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Poker Splitter

A package to split poker history files

[![Documentation Status](https://readthedocs.org/projects/pkrsplitter/badge/?version=latest)](https://pkrsplitter.readthedocs.io/en/latest/?badge=latest)
[![PyPI version](https://badge.fury.io/py/pkrsplitter.svg)](https://badge.fury.io/py/pkrsplitter)

## Table of Contents

- [Description](#description)
- [Setup](#setup)
- [Usage](#usage)
- [License](#license)
- [Documentation](#documentation)

## Description
A package to split poker history files
Currently only supports Winamax history files

## Setup

From PyPi:

```bash
pip install pkrsplitter
```

From source:

```bash
git clone https://github.com/manggy94/PokerSplitter.git
cd PokerSplitter
```

Add a .env file in the root directory with the following content:

```.env
DATA_DIR=path/to/data/dir
BUCKET_NAME=your_bucket_name on s3
```

You can also directly set the environment variable in your system.


## Usage

Basic Usage from the command line:

```bash
# Split all files in the directory to local split directory
python -m pkrsplitter.runs.local.split_files

# split only the files that have not been split yet from S3 raw histories to S3 split histories
python -m pkrsplitter.runs.s3.split_new_files
```

Usage in a script:

```python
from pkrsplitter.splitters.local import LocalFileSplitter

splitter = LocalFileSplitter(data_dir='path/to/data/dir')
splitter.split_files()
```

You can choose to split all the files in the directory or only the files that have not been split yet.:

```python
from pkrsplitter.splitters.local import LocalFileSplitter

splitter = LocalFileSplitter(data_dir='path/to/data/dir')
splitter.split_new_files()
```
This will result in overwriting the files if they already exist in the split directory.
The same can be done considering splitting only raw histories that have never been split before:

```python
from pkrsplitter.splitters.local import LocalFileSplitter

splitter = LocalFileSplitter(data_dir='path/to/data/dir')
splitter.split_new_histories()

```
We can also replace the LocalFileSplitter with the S3FileSplitter to split files from an S3 bucket:


## License

This project is licensed under the MIT License -
You can check out the full license [here](LICENSE.txt)

## Documentation

The documentation can be found [here](https://pkrsplitter.readthedocs.io/en/latest/)





            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/manggy94/PokerSplitter",
    "name": "pkrsplitter",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": null,
    "author": "Alexandre MANGWA",
    "author_email": "alex.mangwa@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/d0/2e/b16ea033045cc72a7f35a15b25d74c1505ed184affd729bc3d66aee500d1/pkrsplitter-1.1.4.tar.gz",
    "platform": null,
    "description": "# Poker Splitter\n\nA package to split poker history files\n\n[![Documentation Status](https://readthedocs.org/projects/pkrsplitter/badge/?version=latest)](https://pkrsplitter.readthedocs.io/en/latest/?badge=latest)\n[![PyPI version](https://badge.fury.io/py/pkrsplitter.svg)](https://badge.fury.io/py/pkrsplitter)\n\n## Table of Contents\n\n- [Description](#description)\n- [Setup](#setup)\n- [Usage](#usage)\n- [License](#license)\n- [Documentation](#documentation)\n\n## Description\nA package to split poker history files\nCurrently only supports Winamax history files\n\n## Setup\n\nFrom PyPi:\n\n```bash\npip install pkrsplitter\n```\n\nFrom source:\n\n```bash\ngit clone https://github.com/manggy94/PokerSplitter.git\ncd PokerSplitter\n```\n\nAdd a .env file in the root directory with the following content:\n\n```.env\nDATA_DIR=path/to/data/dir\nBUCKET_NAME=your_bucket_name on s3\n```\n\nYou can also directly set the environment variable in your system.\n\n\n## Usage\n\nBasic Usage from the command line:\n\n```bash\n# Split all files in the directory to local split directory\npython -m pkrsplitter.runs.local.split_files\n\n# split only the files that have not been split yet from S3 raw histories to S3 split histories\npython -m pkrsplitter.runs.s3.split_new_files\n```\n\nUsage in a script:\n\n```python\nfrom pkrsplitter.splitters.local import LocalFileSplitter\n\nsplitter = LocalFileSplitter(data_dir='path/to/data/dir')\nsplitter.split_files()\n```\n\nYou can choose to split all the files in the directory or only the files that have not been split yet.:\n\n```python\nfrom pkrsplitter.splitters.local import LocalFileSplitter\n\nsplitter = LocalFileSplitter(data_dir='path/to/data/dir')\nsplitter.split_new_files()\n```\nThis will result in overwriting the files if they already exist in the split directory.\nThe same can be done considering splitting only raw histories that have never been split before:\n\n```python\nfrom pkrsplitter.splitters.local import LocalFileSplitter\n\nsplitter = LocalFileSplitter(data_dir='path/to/data/dir')\nsplitter.split_new_histories()\n\n```\nWe can also replace the LocalFileSplitter with the S3FileSplitter to split files from an S3 bucket:\n\n\n## License\n\nThis project is licensed under the MIT License -\nYou can check out the full license [here](LICENSE.txt)\n\n## Documentation\n\nThe documentation can be found [here](https://pkrsplitter.readthedocs.io/en/latest/)\n\n\n\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A package to split poker history files",
    "version": "1.1.4",
    "project_urls": {
        "Bug Tracker": "https://github.com/manggy94//issues",
        "Documentation": "https://pkrsplitter.readthedocs.io/en/latest/",
        "Homepage": "https://github.com/manggy94/PokerSplitter"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cfa8f484775ce011769ea3202c5c91f480aebdac5c1ace2e89d3abd5e4120718",
                "md5": "633f15a0e0a3bff0a7cd5bc86354e921",
                "sha256": "f814212c1ea7c6965612ae7a37b2d8c57696c1f19b11bad37963e5892297e7ed"
            },
            "downloads": -1,
            "filename": "pkrsplitter-1.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "633f15a0e0a3bff0a7cd5bc86354e921",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 13494,
            "upload_time": "2024-08-21T11:48:35",
            "upload_time_iso_8601": "2024-08-21T11:48:35.650928Z",
            "url": "https://files.pythonhosted.org/packages/cf/a8/f484775ce011769ea3202c5c91f480aebdac5c1ace2e89d3abd5e4120718/pkrsplitter-1.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d02eb16ea033045cc72a7f35a15b25d74c1505ed184affd729bc3d66aee500d1",
                "md5": "41a9e861a9b41fde9db56a3c4b3869bc",
                "sha256": "2d55c196f1bafb0d9733ca3fbfa496024f64006b343714a87a0ecfebcbae3d7e"
            },
            "downloads": -1,
            "filename": "pkrsplitter-1.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "41a9e861a9b41fde9db56a3c4b3869bc",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 10642,
            "upload_time": "2024-08-21T11:48:36",
            "upload_time_iso_8601": "2024-08-21T11:48:36.828445Z",
            "url": "https://files.pythonhosted.org/packages/d0/2e/b16ea033045cc72a7f35a15b25d74c1505ed184affd729bc3d66aee500d1/pkrsplitter-1.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-21 11:48:36",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "manggy94",
    "github_project": "PokerSplitter",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "pkrsplitter"
}
        
Elapsed time: 0.29695s