emeamarsha 1.0.2
Marsha or BlueZone Automation
License: MIT
Keywords: python,marsha,bluezone,marriott-systems

# emeamarsha
## Provides a complete Integrated Development Environment to automate Marsha commands

The BlueZone Host Automation Object is a Component Object Model (COM) software component for 32-bit Windows platforms.

[![PyPI Latest Release](https://img.shields.io/pypi/v/emeamarsha.svg)](https://pypi.org/project/emeamarsha/)
[![Package Status](https://img.shields.io/pypi/status/emeamarsha.svg)](https://pypi.org/project/emeamarsha/)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/emeamarsha/community)

## Main Features
Here are just a few of the things that emeamarsha does well:

### Combine Reservations Data
Extract the following reports from Opera PMS, Profile Address for individual guests only and Optional.
This Sample code will join the following files into one reusable Excel workbook.

* Arrivals: Detailed (res_detail with RES1.FMX)
* Reservations with Rate Changes (res_rate_changes with RES18.FMX) by rate amount change.
* Profile Address (pr_address with PRF7.FMX).
* Or you can use osr_landscape.osr to collect the guest profile data.

You can add as many as files and hotels in one folder.
You will be asked to choose the folder where all the above files are saved.
Final output will be 'opera_pms_meta_data.xlsx' file in same folder.
Warning: Do not change the Excel file data structure or data format.
Use this file to feed the Excel Booking Template and start validating the output and
mapping the rate code, pn number, iata, preferences codes, feature codes

```
from emeamarsha.marsha import combine_opera_data

# Collect Opera data
df = combine_opera_data()
```

### Generate Bookings

In order to demonstrate adding a new bookings, this sample will submit command to Marsha to generate
a new bookings and add a new csv files with the new booking metadata.
Please LSI to Marsha first, then run this command submit_bookings_batch(marsha),
* You will be asked to choose the batch meta-data file: either reservation_data.xlsx or reservation_data.csv.
* You will see progress in marsha screen, wait till last booking is confirmed.

```
from emeamarsha.marsha.terminal import MarshaTerminal, submit_bookings_batch

# Initiate Marsha BlueZone Object and Connect to current session
marsha = MarshaTerminal()
is_connected = marsha.status()
if is_connected != 'Connected': marsha.Connect()
marsha.clear()
marsha.send_key('JT')
# Submit LSI command and sign in, if you are not already signed in
 marsha.login(id_number='', location='', enterprise_id='')

# Start Generating bookings
submit_bookings_batch(marsha)

```

## Where to get it
The source code is currently hosted on GitHub at: 
https://github.com/muhammadhamoud/emeamarsha

Binary installers for the latest released version are available at the [Python
Package Index (PyPI)](https://pypi.org/project/emeamarsha).

```
pip install emeamarsha

# or Trusted host PyPI
pip install --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.org emeamarsha
```

## Python
Python 32bit is required, you can install it from the following sources.
* [python.org](https://www.python.org/downloads/)
* [Portable Python](https://winpython.github.io/)

## Dependencies
- comtypes
- dateutil
- emeamarsha
- xlsxwriter
- lxml

See the [full installation instructions](https://github.com/muhammadhamoud/emeamarsha) for minimum supported versions of required, recommended and optional dependencies.

## License
[MIT](LICENSE)

## Documentation
The official documentation is hosted on [readthedocs.org](https://readthedocs.org/projects/emeamarsha)

## Getting Help

Further, general questions and discussions can also take place on the [Gitter](https://gitter.im/emeamarsha/community).

## Contributing to emeamarsha

All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome.

If you are simply looking to start working with the emeamarsha codebase, navigate to the [GitHub "issues" tab](https://github.com/emeamarsha-dev/emeamarsha/issues) and start looking through interesting issues.

Feel free to ask questions on the on [Gitter](https://gitter.im/emeamarsha/community).