You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-85Lines changed: 20 additions & 85 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,25 +17,22 @@
17
17
18
18
This project allows you to export your Trakt.tv data to a format compatible with Letterboxd.
19
19
20
-
## 🚨 Important Update: Migration to Go 🚨
20
+
## 🚀 Go Implementation 🚀
21
21
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:
23
23
24
24
- Modern, modular Go architecture with clean separation of concerns
25
25
- Improved error handling and logging with multiple levels
26
26
- Internationalization (i18n) support for multiple languages
27
27
- Robust test coverage (over 80% across all packages)
28
28
- Enhanced Trakt.tv API client with retry mechanism and rate limiting
29
29
30
-
Stay tuned for the upcoming 2.0 release with these improvements!
31
-
32
30
## Quick Start
33
31
34
32
### Prerequisites
35
33
36
34
- A Trakt.tv account
37
35
- A Trakt.tv application (Client ID and Client Secret)
38
-
- jq and curl (for local installation)
39
36
- Docker (for containerized installation)
40
37
41
38
### Using Docker (Recommended)
@@ -60,8 +57,7 @@ Stay tuned for the upcoming 2.0 release with these improvements!
60
57
docker run -it --name trakt-export \
61
58
-v $(pwd)/config:/app/config \
62
59
-v $(pwd)/logs:/app/logs \
63
-
-v $(pwd)/copy:/app/copy \
64
-
-v $(pwd)/backup:/app/backup \
60
+
-v $(pwd)/exports:/app/exports \
65
61
johandevl/export-trakt-4-letterboxd:latest
66
62
```
67
63
@@ -71,9 +67,7 @@ Stay tuned for the upcoming 2.0 release with these improvements!
71
67
docker compose --profile scheduled up -d
72
68
```
73
69
74
-
See [Docker Usage Guide](docs/DOCKER_USAGE.md) for more details.
75
-
76
-
### Local Installation
70
+
### Local Installation (From Source)
77
71
78
72
1. Clone the repository:
79
73
@@ -82,74 +76,40 @@ See [Docker Usage Guide](docs/DOCKER_USAGE.md) for more details.
82
76
cd Export_Trakt_4_Letterboxd
83
77
```
84
78
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:
92
80
93
81
```bash
94
-
./setup_trakt.sh
82
+
go build -o export_trakt ./cmd/export_trakt/
95
83
```
96
84
97
-
4. Export your data:
85
+
3. Run the application:
98
86
```bash
99
-
./Export_Trakt_4_Letterboxd.sh [option]
87
+
./export_trakt --config ./config/config.toml
100
88
```
101
-
Options: `normal` (default), `initial`, or `complete`
102
89
103
90
## Features
104
91
105
92
- Export rated movies and TV shows
106
93
- Export watch history with dates and ratings
107
94
- Export watchlist items
108
95
- Automatic detection of rewatched movies
109
-
- Supports various export modes (normal, initial, complete)
96
+
- Supports various export modes
110
97
- Modular code structure for better maintainability
111
-
- Automated exports with cron
98
+
- Automated exports with scheduling
112
99
- Docker support
113
-
-Coming soon: Go implementation with improved performance and reliability
100
+
-Complete Go implementation with improved performance and reliability
114
101
115
102
## Project Structure
116
103
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:
148
105
149
106
```
150
107
Export_Trakt_4_Letterboxd/
151
108
├── cmd/ # Application entry points
152
109
│ └── export_trakt/ # Main executable
110
+
├── internal/ # Private application code
111
+
│ ├── models/ # Data models
112
+
│ └── utils/ # Private utilities
153
113
├── pkg/ # Packages for core functionality
154
114
│ ├── api/ # Trakt.tv API client
155
115
│ ├── config/ # Configuration management
@@ -160,9 +120,8 @@ Export_Trakt_4_Letterboxd/
160
120
│ ├── en.json # English translations
161
121
│ └── fr.json # French translations
162
122
├── 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
166
125
```
167
126
168
127
## Testing
@@ -171,45 +130,21 @@ The project includes comprehensive automated tests to ensure code quality and pr
171
130
172
131
### Running Tests
173
132
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.
185
134
186
-
Run all tests for the Go version:
135
+
Run all tests:
187
136
188
137
```bash
189
138
go test -v ./...
190
139
```
191
140
192
-
Generate a coverage report for the Go version:
141
+
Generate a coverage report:
193
142
194
143
```bash
195
144
go test -coverprofile=coverage.out ./...
196
145
go tool cover -html=coverage.out -o coverage.html
197
146
```
198
147
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
-
213
148
## Documentation
214
149
215
150
La documentation complète est disponible dans le [Wiki du projet](https://github.com/JohanDevl/Export_Trakt_4_Letterboxd/wiki).
0 commit comments