Skip to content

Commit add0189

Browse files
committed
chore: clean project and keep only Go migration code
1 parent cc10ef1 commit add0189

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+23
-8317
lines changed

Dockerfile.go

Lines changed: 0 additions & 30 deletions
This file was deleted.

Export_Trakt_4_Letterboxd.sh

Lines changed: 0 additions & 77 deletions
This file was deleted.

README.md

Lines changed: 20 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,22 @@
1717

1818
This project allows you to export your Trakt.tv data to a format compatible with Letterboxd.
1919

20-
## 🚨 Important Update: Migration to Go 🚨
20+
## 🚀 Go Implementation 🚀
2121

22-
We're migrating the application from Bash to Go for better performance, maintainability, and extended features. The Go version is currently under development in the `feature/go-migration` branch and includes:
22+
This application is now built entirely in Go, providing:
2323

2424
- Modern, modular Go architecture with clean separation of concerns
2525
- Improved error handling and logging with multiple levels
2626
- Internationalization (i18n) support for multiple languages
2727
- Robust test coverage (over 80% across all packages)
2828
- Enhanced Trakt.tv API client with retry mechanism and rate limiting
2929

30-
Stay tuned for the upcoming 2.0 release with these improvements!
31-
3230
## Quick Start
3331

3432
### Prerequisites
3533

3634
- A Trakt.tv account
3735
- A Trakt.tv application (Client ID and Client Secret)
38-
- jq and curl (for local installation)
3936
- Docker (for containerized installation)
4037

4138
### Using Docker (Recommended)
@@ -60,8 +57,7 @@ Stay tuned for the upcoming 2.0 release with these improvements!
6057
docker run -it --name trakt-export \
6158
-v $(pwd)/config:/app/config \
6259
-v $(pwd)/logs:/app/logs \
63-
-v $(pwd)/copy:/app/copy \
64-
-v $(pwd)/backup:/app/backup \
60+
-v $(pwd)/exports:/app/exports \
6561
johandevl/export-trakt-4-letterboxd:latest
6662
```
6763

@@ -71,9 +67,7 @@ Stay tuned for the upcoming 2.0 release with these improvements!
7167
docker compose --profile scheduled up -d
7268
```
7369

74-
See [Docker Usage Guide](docs/DOCKER_USAGE.md) for more details.
75-
76-
### Local Installation
70+
### Local Installation (From Source)
7771

7872
1. Clone the repository:
7973

@@ -82,74 +76,40 @@ See [Docker Usage Guide](docs/DOCKER_USAGE.md) for more details.
8276
cd Export_Trakt_4_Letterboxd
8377
```
8478

85-
2. Run the installation script:
86-
87-
```bash
88-
./install.sh
89-
```
90-
91-
3. Configure Trakt authentication:
79+
2. Build the Go application:
9280

9381
```bash
94-
./setup_trakt.sh
82+
go build -o export_trakt ./cmd/export_trakt/
9583
```
9684

97-
4. Export your data:
85+
3. Run the application:
9886
```bash
99-
./Export_Trakt_4_Letterboxd.sh [option]
87+
./export_trakt --config ./config/config.toml
10088
```
101-
Options: `normal` (default), `initial`, or `complete`
10289

10390
## Features
10491

10592
- Export rated movies and TV shows
10693
- Export watch history with dates and ratings
10794
- Export watchlist items
10895
- Automatic detection of rewatched movies
109-
- Supports various export modes (normal, initial, complete)
96+
- Supports various export modes
11097
- Modular code structure for better maintainability
111-
- Automated exports with cron
98+
- Automated exports with scheduling
11299
- Docker support
113-
- Coming soon: Go implementation with improved performance and reliability
100+
- Complete Go implementation with improved performance and reliability
114101

115102
## Project Structure
116103

117-
### Current Bash Version
118-
119-
The codebase has been modularized for better maintenance and readability:
120-
121-
```
122-
Export_Trakt_4_Letterboxd/
123-
├── lib/ # Library modules
124-
│ ├── config.sh # Configuration management
125-
│ ├── utils.sh # Utility functions and debugging
126-
│ ├── trakt_api.sh # API interaction functions
127-
│ ├── data_processing.sh # Data transformation functions
128-
│ └── main.sh # Main orchestration module
129-
├── config/ # Configuration files
130-
├── logs/ # Log output
131-
├── backup/ # Backup of API responses
132-
├── TEMP/ # Temporary processing files
133-
├── copy/ # Output CSV files
134-
├── tests/ # Automated tests
135-
│ ├── unit/ # Unit tests for library modules
136-
│ ├── integration/ # Integration tests
137-
│ ├── mocks/ # Mock API responses
138-
│ ├── run_tests.sh # Test runner script
139-
│ └── test_helper.bash # Test helper functions
140-
├── Export_Trakt_4_Letterboxd.sh # Main script (simplified)
141-
├── setup_trakt.sh # Authentication setup
142-
└── install.sh # Installation script
143-
```
144-
145-
### Go Version (In Development)
146-
147-
The new Go implementation follows a modern application structure:
104+
The Go implementation follows a modern application structure:
148105

149106
```
150107
Export_Trakt_4_Letterboxd/
151108
├── cmd/ # Application entry points
152109
│ └── export_trakt/ # Main executable
110+
├── internal/ # Private application code
111+
│ ├── models/ # Data models
112+
│ └── utils/ # Private utilities
153113
├── pkg/ # Packages for core functionality
154114
│ ├── api/ # Trakt.tv API client
155115
│ ├── config/ # Configuration management
@@ -160,9 +120,8 @@ Export_Trakt_4_Letterboxd/
160120
│ ├── en.json # English translations
161121
│ └── fr.json # French translations
162122
├── config/ # Configuration files
163-
├── tests/ # Test files
164-
│ └── integration/ # Integration tests
165-
└── coverage.html # Test coverage report
123+
├── build/ # Compiled binaries
124+
└── logs/ # Log output
166125
```
167126

168127
## Testing
@@ -171,45 +130,21 @@ The project includes comprehensive automated tests to ensure code quality and pr
171130

172131
### Running Tests
173132

174-
To run the tests, you need to have the following dependencies installed:
175-
176-
- jq
177-
- bats-core (installed as Git submodule)
178-
- Go (for Go version)
179-
180-
Run all tests for the Bash version:
181-
182-
```bash
183-
./tests/run_tests.sh
184-
```
133+
To run the tests, you need to have Go installed.
185134

186-
Run all tests for the Go version:
135+
Run all tests:
187136

188137
```bash
189138
go test -v ./...
190139
```
191140

192-
Generate a coverage report for the Go version:
141+
Generate a coverage report:
193142

194143
```bash
195144
go test -coverprofile=coverage.out ./...
196145
go tool cover -html=coverage.out -o coverage.html
197146
```
198147

199-
### Testing Framework
200-
201-
The testing framework uses:
202-
203-
- Bats (Bash Automated Testing System) for testing the Bash version
204-
- Go testing framework for the Go version
205-
- Mock API responses to test without real API calls
206-
- Integration tests to verify the complete export process
207-
- Unit tests for core library functions
208-
209-
### Continuous Integration
210-
211-
Tests are automatically run in the CI/CD pipeline for every pull request to ensure code quality before merging.
212-
213148
## Documentation
214149

215150
La documentation complète est disponible dans le [Wiki du projet](https://github.com/JohanDevl/Export_Trakt_4_Letterboxd/wiki).

0 commit comments

Comments
 (0)