A command-line tool for converting booking data from Edelweiss format to TravelLine-compatible Excel files.
This converter processes Edelweiss (PMS) booking spreadsheets and transforms them into the TravelLine (channel manager) import format. It automatically detects worksheets, parses booking entries, filters organizational bookings, and generates properly formatted Excel output ready for TravelLine import.
- Automatic worksheet detection: Finds the correct worksheet and header row in Edelweiss Excel files
- Smart filtering: Excludes bookings with organization assignments (keeps only individual bookings)
- Flexible I/O: Supports file input/output or stdin/stdout for pipeline integration
- Customizable mapping: Configurable room category mapping and check-in/check-out times based on tariff type
- Type-safe: Built with TypeScript in strict mode for reliability
- Bun runtime (v1.3.1 or later)
- Node.js-compatible environment
bun installThe most flexible way to use the converter is via stdin/stdout piping:
cat input.xlsx | bun start -- convert > output.xlsxThis approach allows you to:
- Use any file path for input and output
- Integrate with shell scripts and pipelines
- Avoid temporary files
Input from file, output to file:
bun start -- --input ./fixtures/sample.xlsx --output ./out/bookings.xlsxInput from stdin, output to file:
cat input.xlsx | bun start -- --output output.xlsxInput from file, output to stdout:
bun start -- --input ./fixtures/sample.xlsx | hexdump -C | head-i, --input [path]- Path to the input Edelweiss Excel file (optional if reading from stdin)-o, --output [path]- Path to the output TravelLine Excel file (optional, defaults to stdout)--version- Display version information--help- Display help information
The converter automatically filters out bookings where:
- Organization field is present and not empty
- Organization value is
-orНЕТ
Only individual bookings (without organization assignments) are included in the output.
Room categories are mapped based on room numbers:
- Room
102→Стандарт - Other rooms → Room number as-is
- Missing room number →
Не указано
- Check-in:
15:00for apartments (tariff contains "апартамент"),14:00otherwise - Check-out:
12:00for all bookings
Default currency is RUB (Russian Ruble). Currency from source data is preserved when available.
src/
├── index.ts # CLI entry point
└── lib/
├── edelweiss/ # Edelweiss format parsing
│ ├── reader.ts # Excel reading and worksheet detection
│ ├── parser.ts # Row parsing logic
│ ├── types.ts # Type definitions
│ └── utils.ts # Date parsing utilities
└── travelline/ # TravelLine format generation
├── converter.ts # Booking conversion logic
├── writer.ts # Excel writing
├── types.ts # Type definitions
└── utils.ts # Name parsing and formatting
bun start- Run the converter CLIbun run lint- Run Biome linter in check modebun run lint:fix- Run Biome linter with auto-fix
- TypeScript strict mode
- Biome for formatting and linting
- Tabs for indentation, 100-character line limit
- Named exports preferred (no default exports)
- Conventional Commits for git history
The converter expects Edelweiss Excel files with the following headers (in order):
№(Row number)Бронь(Booking ID)Создано(Creation date)Номер(Room number)Плательщик(Payer name)Организация(Organization)
Additional columns expected:
Пол(Gender)ВЗР(Adults count)Заезд(Check-in date)Выезд(Check-out date)Сут.(Nights)- Tariff (column P, no header)
- Amount paid (column Q, no header)
The converter generates TravelLine-compatible Excel files with the following required columns:
Номер бронирования (*)- Booking numberДата и время заезда (*)- Check-in datetimeДата и время выезда (*)- Check-out datetimeКатегория номера (*)- Room categoryТарифный план (*)- Rate plan/tariffКоличество взрослых (*)- Number of adultsСтоимость (*)- Total costВалюта (*)- Currency codeФамилия гостя (*)- Guest last name
Optional columns include: Количество детей, Оплачено, Имя гостя, Отчество гостя, Гражданство гостя, Телефон гостя, EMail гостя.
The converter exits with appropriate error codes:
1- File not found, invalid input format, or conversion errors0- Successful conversion
Error messages are written to stderr to avoid interfering with binary output when piping.
This project is licensed under the MIT License with a Commercial Attribution Clause.
Summary:
- ✅ Free to use, modify, and distribute for any purpose
- ✅ No liability - use at your own risk
- 📝 Commercial use: If you use this code in a commercial project or earn money with it, please:
- Provide attribution to the original author
- "Buy the author a beer" - make a reasonable contribution to support the project
See LICENSE.md for full license text.