crewcal


Namecrewcal JSON
Version 0.8.1 PyPI version JSON
download
home_pagehttps://github.com/EJOOSTEROP/crewcal
SummaryConvert an airline crew schedule pdf into iCalendar format.
upload_time2023-11-21 02:49:45
maintainer
docs_urlNone
authorErik Oosterop
requires_python>=3.11,<4.0
licenseMIT
keywords x y z
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <!-- Inspired by https://github.com/othneildrew/Best-README-Template/blob/master/BLANK_README.md -->

<a name="readme-top"></a>

<!-- SHIELDS HEADER -->
<div align="center">

[![Current Release][release-shield]][release-url] [![Contributors][contributors-shield]][contributors-url] [![Forks][forks-shield]][forks-url] [![Stargazers][stars-shield]][stars-url] [![Issues][issues-shield]][issues-url] [![MIT License][license-shield]][license-url] [![LinkedIn][linkedin-shield]][linkedin-url]

![PyPI - Python Version][pypi-python-shield]
![PyPi - Package Version][pypi-version-shield]

[![PyPi - License][pypi-license-shield]][license-url]

[release-shield]:https://img.shields.io/github/release/EJOOSTEROP/crewcal.svg
[release-url]:https://github.com/EJOOSTEROP/crewcal/releases

[contributors-shield]: https://img.shields.io/github/contributors/EJOOSTEROP/crewcal.svg?logo=github
[contributors-url]: https://github.com/EJOOSTEROP/crewcal/graphs/contributors

[forks-shield]: https://img.shields.io/github/forks/EJOOSTEROP/crewcal.svg?logo=github
[forks-url]: https://github.com/EJOOSTEROP/crewcal/network/members

[stars-shield]: https://img.shields.io/github/stars/EJOOSTEROP/crewcal.svg?logo=github
[stars-url]: https://github.com/EJOOSTEROP/crewcal/stargazers

[issues-shield]: https://img.shields.io/github/issues/EJOOSTEROP/crewcal.svg?logo=github
[issues-url]: https://github.com/EJOOSTEROP/crewcal/issues

[license-shield]: https://img.shields.io/github/license/EJOOSTEROP/crewcal.svg
[license-url]: https://github.com/EJOOSTEROP/crewcal/blob/main/LICENSE.txt

[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?logo=linkedin&colorB=555
[linkedin-url]: https://linkedin.com/in/erik-oosterop-9505a21

[pypi-python-shield]: https://img.shields.io/pypi/pyversions/crewcal?logo=python
[pypi-version-shield]: https://img.shields.io/pypi/v/crewcal?logo=python
[pypi-license-shield]: https://img.shields.io/pypi/l/crewcal?logo=python
</div>


<!-- PROJECT SUMMARY AND LOGO -->
<div align="center">
  <a href="https://github.com/EJOOSTEROP/crewcal">
    <img src="https://github.com/EJOOSTEROP/crewcal/blob/main/etc/logo.png?raw=true" alt="Logo" width="180" height="180">
  </a>

<h3 align="center">crewcal</h3>

  <p align="center">
    Convert an airline crew schedule pdf into iCalendar format using a machine learning Large Language Model.
    <br />
    <a href="https://github.com/EJOOSTEROP/crewcal"><strong>Explore the docs »</strong></a>
    <br />
    <br />
    <!--
    <a href="https://github.com/EJOOSTEROP/crewcal">View Demo</a>
    ·
    -->
    <a href="https://github.com/EJOOSTEROP/crewcal/issues">Report Bug</a>
    ·
    <a href="https://github.com/EJOOSTEROP/crewcal/issues">Request Feature</a>
  </p>
</div>


<!-- TABLE OF CONTENTS -->
<br />
<details>
  <summary>Table of Contents</summary>
  <ol>
    <li>
      <a href="#about-the-project">About the Project</a>
      <!-- <ul>
        <li><a href="#built-with">Built With</a></li>
      </ul> -->
    </li>
    <li>
      <a href="#getting-started">Getting Started</a>
      <ul>
        <li><a href="#prerequisites">Prerequisites</a></li>
        <li><a href="#installation">Installation</a></li>
      </ul>
    </li>
    <li><a href="#usage">Usage</a></li>
    <li><a href="#roadmap">Roadmap</a></li>
    <li><a href="#contributing">Contributing</a></li>
    <!-- <li><a href="#license">License</a></li> -->
    <li><a href="#contact">Contact</a></li>
    <!-- <li><a href="#acknowledgments">Acknowledgments</a></li> -->
  </ol>
</details>

<p align="right">(<a href="#readme-top">back to top</a>)</p>


<!-- ABOUT THE PROJECT -->
## About the Project

<div  align="center">
  <a href="https://github.com/EJOOSTEROP/crewcal">
    <img src="https://github.com/EJOOSTEROP/crewcal/blob/main/etc/intro_image.jpg?raw=true" alt="intro_image" width="75%" height="75%">
  </a>
</div>

<div>

  Convert an airline crew schedule pdf into iCalendar format using a machine learning Large Language Model. An LLM (Large Language Model, specifically OpenAI's gpt-3.5-turbo) is used to extract the schedule information. iCalender files are recognized by most calendar systems (iOS, Android, Google, ++) and will create the flights on your phone/device calendar.

  The PDF schedule does not need to follow a very prescribed structured format.

  Development performed mostly using AIMS eCrew pdf schedules.

</div>

<p align="right">(<a href="#readme-top">back to top</a>)</p>


<!-- BUILT WITH -->
<!--
### Built With

<p align="right">(<a href="#readme-top">back to top</a>)</p>
-->


<!-- GETTING STARTED -->
## Getting Started

<!--To get a local copy up and running follow these simple example steps.
-->

### Prerequisites

Obtain an OpenAI API key.

Make this available as an environment variable:
```shell
export OPENAI_API_KEY=YOUR_KEY
```
Alternatively specify the API Key in a .env file.
<p align="right">(<a href="#readme-top">back to top</a>)</p>

### Installation
Strongly consider using pipx or a virtual environment depending on your needs.
```shell
pip install crewcal
```
<p align="right">(<a href="#readme-top">back to top</a>)</p>


<!-- USAGE EXAMPLES -->
## Usage
### CLI
To create the calendar file (schedule.ics) from a pdf schedule file (schedule.pdf):
```shell
crewcal extract schedule.pdf schedule.ics
```

`crewcal --help` shows a brief manual page.


### Python Package
The following sript extracts the schedule from `schedule.pdf` and stores the icalendar file in `schedule.ics` file.

```python
from crewcal.llm_extract import OpenAISchedule

sched = OpenAISchedule(schedule_path='schedule.pdf', to_icalendar_file='schedule.ics')
```

The resulting .ics file can be read by most calendar software.
<p align="right">(<a href="#readme-top">back to top</a>)</p>


<!-- ROADMAP -->
## Roadmap

- [ ] None (feel free to suggest)


<p align="right">(<a href="#readme-top">back to top</a>)</p>


<!-- CONTRIBUTING -->
## Contributing

<!-- Contributions are what make the open source community such an amazing place to learn, inspire, and create. -->
Any contributions you make are **greatly appreciated**.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also [open](https://github.com/EJOOSTEROP/crewcal/issues/new/choose) a feature request or bug report.
Don't forget to give the project a star! Thanks again!

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

<p align="right">(<a href="#readme-top">back to top</a>)</p>


<!-- LICENSE -->
<!--
## License

Distributed under the MIT License. See `LICENSE.txt` for more information. The tools and the sample data are subject to their own respective licenses.

<p align="right">(<a href="#readme-top">back to top</a>)</p>
-->


<!-- CONTACT -->
## Contact

<!--
Your Name - [@twitter_handle](https://twitter.com/twitter_handle) - email@email_client.com
-->

Project Link: [crewcal](https://github.com/EJOOSTEROP/crewcal)

<p align="right">(<a href="#readme-top">back to top</a>)</p>


<!-- ACKNOWLEDGMENTS -->
<!--
## Acknowledgments

* []()
* []()
* []()

<p align="right">(<a href="#readme-top">back to top</a>)</p>

-->

<!-- MARKDOWN LINKS & IMAGES -->
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/EJOOSTEROP/crewcal",
    "name": "crewcal",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.11,<4.0",
    "maintainer_email": "",
    "keywords": "x,y,z",
    "author": "Erik Oosterop",
    "author_email": "ni7h4txi@duck.com",
    "download_url": "https://files.pythonhosted.org/packages/bb/9e/72d5a42020e7a10c816afcca4436b1206e5e6a045e24d167bdb1a0e386b2/crewcal-0.8.1.tar.gz",
    "platform": null,
    "description": "<!-- Inspired by https://github.com/othneildrew/Best-README-Template/blob/master/BLANK_README.md -->\n\n<a name=\"readme-top\"></a>\n\n<!-- SHIELDS HEADER -->\n<div align=\"center\">\n\n[![Current Release][release-shield]][release-url] [![Contributors][contributors-shield]][contributors-url] [![Forks][forks-shield]][forks-url] [![Stargazers][stars-shield]][stars-url] [![Issues][issues-shield]][issues-url] [![MIT License][license-shield]][license-url] [![LinkedIn][linkedin-shield]][linkedin-url]\n\n![PyPI - Python Version][pypi-python-shield]\n![PyPi - Package Version][pypi-version-shield]\n\n[![PyPi - License][pypi-license-shield]][license-url]\n\n[release-shield]:https://img.shields.io/github/release/EJOOSTEROP/crewcal.svg\n[release-url]:https://github.com/EJOOSTEROP/crewcal/releases\n\n[contributors-shield]: https://img.shields.io/github/contributors/EJOOSTEROP/crewcal.svg?logo=github\n[contributors-url]: https://github.com/EJOOSTEROP/crewcal/graphs/contributors\n\n[forks-shield]: https://img.shields.io/github/forks/EJOOSTEROP/crewcal.svg?logo=github\n[forks-url]: https://github.com/EJOOSTEROP/crewcal/network/members\n\n[stars-shield]: https://img.shields.io/github/stars/EJOOSTEROP/crewcal.svg?logo=github\n[stars-url]: https://github.com/EJOOSTEROP/crewcal/stargazers\n\n[issues-shield]: https://img.shields.io/github/issues/EJOOSTEROP/crewcal.svg?logo=github\n[issues-url]: https://github.com/EJOOSTEROP/crewcal/issues\n\n[license-shield]: https://img.shields.io/github/license/EJOOSTEROP/crewcal.svg\n[license-url]: https://github.com/EJOOSTEROP/crewcal/blob/main/LICENSE.txt\n\n[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?logo=linkedin&colorB=555\n[linkedin-url]: https://linkedin.com/in/erik-oosterop-9505a21\n\n[pypi-python-shield]: https://img.shields.io/pypi/pyversions/crewcal?logo=python\n[pypi-version-shield]: https://img.shields.io/pypi/v/crewcal?logo=python\n[pypi-license-shield]: https://img.shields.io/pypi/l/crewcal?logo=python\n</div>\n\n\n<!-- PROJECT SUMMARY AND LOGO -->\n<div align=\"center\">\n  <a href=\"https://github.com/EJOOSTEROP/crewcal\">\n    <img src=\"https://github.com/EJOOSTEROP/crewcal/blob/main/etc/logo.png?raw=true\" alt=\"Logo\" width=\"180\" height=\"180\">\n  </a>\n\n<h3 align=\"center\">crewcal</h3>\n\n  <p align=\"center\">\n    Convert an airline crew schedule pdf into iCalendar format using a machine learning Large Language Model.\n    <br />\n    <a href=\"https://github.com/EJOOSTEROP/crewcal\"><strong>Explore the docs \u00bb</strong></a>\n    <br />\n    <br />\n    <!--\n    <a href=\"https://github.com/EJOOSTEROP/crewcal\">View Demo</a>\n    \u00b7\n    -->\n    <a href=\"https://github.com/EJOOSTEROP/crewcal/issues\">Report Bug</a>\n    \u00b7\n    <a href=\"https://github.com/EJOOSTEROP/crewcal/issues\">Request Feature</a>\n  </p>\n</div>\n\n\n<!-- TABLE OF CONTENTS -->\n<br />\n<details>\n  <summary>Table of Contents</summary>\n  <ol>\n    <li>\n      <a href=\"#about-the-project\">About the Project</a>\n      <!-- <ul>\n        <li><a href=\"#built-with\">Built With</a></li>\n      </ul> -->\n    </li>\n    <li>\n      <a href=\"#getting-started\">Getting Started</a>\n      <ul>\n        <li><a href=\"#prerequisites\">Prerequisites</a></li>\n        <li><a href=\"#installation\">Installation</a></li>\n      </ul>\n    </li>\n    <li><a href=\"#usage\">Usage</a></li>\n    <li><a href=\"#roadmap\">Roadmap</a></li>\n    <li><a href=\"#contributing\">Contributing</a></li>\n    <!-- <li><a href=\"#license\">License</a></li> -->\n    <li><a href=\"#contact\">Contact</a></li>\n    <!-- <li><a href=\"#acknowledgments\">Acknowledgments</a></li> -->\n  </ol>\n</details>\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n\n<!-- ABOUT THE PROJECT -->\n## About the Project\n\n<div  align=\"center\">\n  <a href=\"https://github.com/EJOOSTEROP/crewcal\">\n    <img src=\"https://github.com/EJOOSTEROP/crewcal/blob/main/etc/intro_image.jpg?raw=true\" alt=\"intro_image\" width=\"75%\" height=\"75%\">\n  </a>\n</div>\n\n<div>\n\n  Convert an airline crew schedule pdf into iCalendar format using a machine learning Large Language Model. An LLM (Large Language Model, specifically OpenAI's gpt-3.5-turbo) is used to extract the schedule information. iCalender files are recognized by most calendar systems (iOS, Android, Google, ++) and will create the flights on your phone/device calendar.\n\n  The PDF schedule does not need to follow a very prescribed structured format.\n\n  Development performed mostly using AIMS eCrew pdf schedules.\n\n</div>\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n\n<!-- BUILT WITH -->\n<!--\n### Built With\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n-->\n\n\n<!-- GETTING STARTED -->\n## Getting Started\n\n<!--To get a local copy up and running follow these simple example steps.\n-->\n\n### Prerequisites\n\nObtain an OpenAI API key.\n\nMake this available as an environment variable:\n```shell\nexport OPENAI_API_KEY=YOUR_KEY\n```\nAlternatively specify the API Key in a .env file.\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n### Installation\nStrongly consider using pipx or a virtual environment depending on your needs.\n```shell\npip install crewcal\n```\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n\n<!-- USAGE EXAMPLES -->\n## Usage\n### CLI\nTo create the calendar file (schedule.ics) from a pdf schedule file (schedule.pdf):\n```shell\ncrewcal extract schedule.pdf schedule.ics\n```\n\n`crewcal --help` shows a brief manual page.\n\n\n### Python Package\nThe following sript extracts the schedule from `schedule.pdf` and stores the icalendar file in `schedule.ics` file.\n\n```python\nfrom crewcal.llm_extract import OpenAISchedule\n\nsched = OpenAISchedule(schedule_path='schedule.pdf', to_icalendar_file='schedule.ics')\n```\n\nThe resulting .ics file can be read by most calendar software.\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n\n<!-- ROADMAP -->\n## Roadmap\n\n- [ ] None (feel free to suggest)\n\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n\n<!-- CONTRIBUTING -->\n## Contributing\n\n<!-- Contributions are what make the open source community such an amazing place to learn, inspire, and create. -->\nAny contributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request. You can also [open](https://github.com/EJOOSTEROP/crewcal/issues/new/choose) a feature request or bug report.\nDon't forget to give the project a star! Thanks again!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n\n<!-- LICENSE -->\n<!--\n## License\n\nDistributed under the MIT License. See `LICENSE.txt` for more information. The tools and the sample data are subject to their own respective licenses.\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n-->\n\n\n<!-- CONTACT -->\n## Contact\n\n<!--\nYour Name - [@twitter_handle](https://twitter.com/twitter_handle) - email@email_client.com\n-->\n\nProject Link: [crewcal](https://github.com/EJOOSTEROP/crewcal)\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n\n<!-- ACKNOWLEDGMENTS -->\n<!--\n## Acknowledgments\n\n* []()\n* []()\n* []()\n\n<p align=\"right\">(<a href=\"#readme-top\">back to top</a>)</p>\n\n-->\n\n<!-- MARKDOWN LINKS & IMAGES -->\n<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Convert an airline crew schedule pdf into iCalendar format.",
    "version": "0.8.1",
    "project_urls": {
        "Documentation": "https://github.com/EJOOSTEROP/crewcal",
        "Homepage": "https://github.com/EJOOSTEROP/crewcal",
        "Repository": "https://github.com/EJOOSTEROP/crewcal"
    },
    "split_keywords": [
        "x",
        "y",
        "z"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ed9514344cde4e354fcf906ed65009484f3fc4f08b38fa054aca08571e8fe97f",
                "md5": "98063b94ede5e18e9522e2aa67251d86",
                "sha256": "8619230993ce23b33f36f4da75cc9c241bb72041f9dffd9588912def87be9952"
            },
            "downloads": -1,
            "filename": "crewcal-0.8.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "98063b94ede5e18e9522e2aa67251d86",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11,<4.0",
            "size": 11127,
            "upload_time": "2023-11-21T02:49:44",
            "upload_time_iso_8601": "2023-11-21T02:49:44.613596Z",
            "url": "https://files.pythonhosted.org/packages/ed/95/14344cde4e354fcf906ed65009484f3fc4f08b38fa054aca08571e8fe97f/crewcal-0.8.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bb9e72d5a42020e7a10c816afcca4436b1206e5e6a045e24d167bdb1a0e386b2",
                "md5": "c70b3c2ba07ca5b22353a33711da03ad",
                "sha256": "de73c68427f24b1db6f1baf5a91d022280281f0364c4ab5dbb1d5858524f535b"
            },
            "downloads": -1,
            "filename": "crewcal-0.8.1.tar.gz",
            "has_sig": false,
            "md5_digest": "c70b3c2ba07ca5b22353a33711da03ad",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11,<4.0",
            "size": 12752,
            "upload_time": "2023-11-21T02:49:45",
            "upload_time_iso_8601": "2023-11-21T02:49:45.668722Z",
            "url": "https://files.pythonhosted.org/packages/bb/9e/72d5a42020e7a10c816afcca4436b1206e5e6a045e24d167bdb1a0e386b2/crewcal-0.8.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-21 02:49:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "EJOOSTEROP",
    "github_project": "crewcal",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "crewcal"
}
        
Elapsed time: 0.15138s