|
1 | | -<!-- Build Status --> |
2 | | - |
| 1 | +# Munich Transport CLI |
3 | 2 |
|
4 | | -<!-- License --> |
5 | | -[](https://opensource.org/licenses/MIT) |
| 3 | + [](https://opensource.org/licenses/MIT) [](https://openjdk.org/projects/jdk/21/) [](https://spring.io/projects/spring-boot) [](https://gradle.org/) |
6 | 4 |
|
7 | | -<!-- License --> |
8 | | -[](https://openjdk.org/projects/jdk/21/) |
| 5 | +A Spring Boot CLI application for accessing Munich public transport information via the MVG (Münchner Verkehrsgesellschaft) API. Get real-time departure information, plan routes, and search for stations right from your command line. |
9 | 6 |
|
10 | | -<!-- Framework --> |
11 | | -[](https://spring.io/projects/spring-boot) |
| 7 | +## Features |
12 | 8 |
|
13 | | -<!-- Gradle --> |
14 | | -[](https://gradle.org/) |
| 9 | +- 🚇 **Real-time departure information** - Get live updates for all transport modes |
| 10 | +- 🗺️ **Route planning** - Plan journeys between any two stations |
| 11 | +- 🔍 **Location-based station search** - Find nearby stations and stops |
| 12 | +- 🚊 **Full transport support** - U-Bahn, S-Bahn, Bus, and Tram coverage |
| 13 | +- 🖥️ **Cross-platform** - Works on Windows, macOS, and Linux |
15 | 14 |
|
| 15 | +## Requirements |
16 | 16 |
|
| 17 | +- Java 21 or higher |
| 18 | +- Internet connection for real-time data |
| 19 | + |
| 20 | +## Installation |
| 21 | + |
| 22 | +### Option 1: Download and Run (Requires Java 21+) |
| 23 | + |
| 24 | +```bash |
| 25 | +# Download the JAR file |
| 26 | +wget https://github.com/anisul/transport-cli/releases/download/v1.1.0/transport-cli-1.1.0.jar |
| 27 | + |
| 28 | +# Run directly |
| 29 | +java -jar transport-cli-1.1.0.jar --help |
| 30 | +``` |
| 31 | + |
| 32 | +### Option 2: Unix/Linux/macOS Package |
| 33 | + |
| 34 | +```bash |
| 35 | +# Download and extract |
| 36 | +wget https://github.com/anisul/transport-cli/releases/download/v1.1.0/transport-cli-1.1.0-unix.tar.gz |
| 37 | +tar -xzf transport-cli-1.1.0-unix.tar.gz |
| 38 | + |
| 39 | +# Run the CLI |
| 40 | +./transport-cli --help |
| 41 | + |
| 42 | +# Optional: Add to your PATH |
| 43 | +sudo cp transport-cli transport-cli.jar /usr/local/bin/ |
| 44 | +``` |
| 45 | + |
| 46 | +### Option 3: Windows Package |
| 47 | + |
| 48 | +1. Download `transport-cli-1.1.0-windows.zip` from the [releases page](https://github.com/anisul/transport-cli/releases) |
| 49 | +2. Extract the ZIP file |
| 50 | +3. Run: `transport-cli.bat --help` |
| 51 | + |
| 52 | +### File Verification |
| 53 | + |
| 54 | +Download `checksums.txt` to verify file integrity: |
| 55 | + |
| 56 | +```bash |
| 57 | +sha256sum -c checksums.txt |
| 58 | +``` |
| 59 | + |
| 60 | +## Usage |
| 61 | + |
| 62 | +### Basic Commands |
| 63 | + |
| 64 | +```bash |
| 65 | +# Show help |
| 66 | +transport-cli --help |
| 67 | + |
| 68 | +# Get departures from a specific station |
| 69 | +transport-cli departures -s Marienplatz |
| 70 | + |
| 71 | +# Get departures with custom limit |
| 72 | +transport-cli departures - Hauptbahnhof --limit 5 |
| 73 | + |
| 74 | +# Get routes from source station to destination station |
| 75 | +transport-cli route -s Haar -d Hauptbahnhof |
| 76 | + |
| 77 | +# Get routes from source station to destination station with specific transport type |
| 78 | +transport-cli route -s Haar -d Hauptbahnhof -t SBAHN |
| 79 | + |
| 80 | +# Search for stations |
| 81 | +transport-cli stations --search Universität |
| 82 | +``` |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | +## Development |
| 87 | + |
| 88 | +### Building from Source |
| 89 | + |
| 90 | +```bash |
| 91 | +# Clone the repository |
| 92 | +git clone https://github.com/anisul/transport-cli.git |
| 93 | +cd transport-cli |
| 94 | + |
| 95 | +# Build with Gradle |
| 96 | +./gradlew build |
| 97 | + |
| 98 | +# Run locally |
| 99 | +./gradlew bootRun --args="--help" |
| 100 | + |
| 101 | +# Create distribution packages |
| 102 | +./gradlew assembleDist |
| 103 | +``` |
| 104 | + |
| 105 | +### Testing |
| 106 | + |
| 107 | +```bash |
| 108 | +# Run all tests |
| 109 | +./gradlew test |
| 110 | + |
| 111 | +# Run with coverage |
| 112 | +./gradlew test jacocoTestReport |
| 113 | +``` |
| 114 | + |
| 115 | +## Contributing |
| 116 | + |
| 117 | +We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details. |
| 118 | + |
| 119 | +1. Fork the repository |
| 120 | +2. Create a feature branch (`git checkout -b feature/amazing-feature`) |
| 121 | +3. Commit your changes (`git commit -m 'Add amazing feature'`) |
| 122 | +4. Push to the branch (`git push origin feature/amazing-feature`) |
| 123 | +5. Open a Pull Request |
| 124 | + |
| 125 | +## Transport Types Supported |
| 126 | + |
| 127 | +- **UBAHN** - Munich subway system |
| 128 | +- **SBAHN** - Suburban railway network |
| 129 | +- **BUS** - City and regional buses |
| 130 | +- **TRAM** - Munich tram network |
| 131 | + |
| 132 | +## Issues & Support |
| 133 | + |
| 134 | +Found a bug or have a feature request? Please report issues at: |
| 135 | +**https://github.com/anisul/transport-cli/issues** |
| 136 | + |
| 137 | +## License |
| 138 | + |
| 139 | +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
| 140 | + |
| 141 | +## Acknowledgments |
| 142 | + |
| 143 | +- [MVG API](https://www.mvg.de/) for providing the transport data |
| 144 | +- The Munich public transport community |
| 145 | + |
| 146 | +--- |
| 147 | + |
| 148 | +**Latest Release**: [v1.1.0](https://github.com/anisul/transport-cli/releases/latest) | **Issues**: [Report here](https://github.com/anisul/transport-cli/issues) | **License**: [MIT](LICENSE) |
0 commit comments