Skip to content

Commit 657887c

Browse files
authored
Upgrade project to dotnet 10 (#6)
1 parent f4642df commit 657887c

File tree

6 files changed

+23
-12
lines changed

6 files changed

+23
-12
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
1+
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
22
ARG BUILD_CONFIGURATION=Release
33

44
WORKDIR /src
@@ -28,7 +28,7 @@ RUN dotnet publish "SafariBooksDownloader.App.csproj" \
2828
--output /app/publish \
2929
/p:UseAppHost=false
3030

31-
FROM mcr.microsoft.com/dotnet/runtime:9.0 AS base
31+
FROM mcr.microsoft.com/dotnet/runtime:10.0 AS base
3232
WORKDIR /app
3333

3434
COPY --from=publish /app/publish .

Dockerfile.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS test
1+
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS test
22

33
WORKDIR /src
44

README.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SafariBooks .NET Downloader
22

3-
*This project is a .NET 9 rewrite of the original [SafariBooks downloader](https://github.com/lorenzodifuccia/safaribooks) by [lorenzodifuccia](https://github.com/lorenzodifuccia). All credits for the original concept and implementation go to the original author.*
3+
*This project is a .NET 10 rewrite of the original [SafariBooks downloader](https://github.com/lorenzodifuccia/safaribooks) by [lorenzodifuccia](https://github.com/lorenzodifuccia). All credits for the original concept and implementation go to the original author.*
44

55
*This project was ported using GitHub Copilot in order to test its features and development flows. Given the educational purposes of this program, I am not responsible for its use. Before any usage please read the *O'Reilly*'s [Terms of Service](https://learning.oreilly.com/terms/).*
66

@@ -90,34 +90,39 @@ optional arguments:
9090
The project includes a complete development environment configuration that works with any IDE supporting dev containers:
9191

9292
**Visual Studio Code:**
93+
9394
1. Install the "Dev Containers" extension
9495
2. Open the project folder
9596
3. Open Command Palette (`Ctrl+Shift+P`)
9697
4. Select "Dev Containers: Reopen in Container"
97-
5. The environment will be automatically configured with .NET 9 SDK
98+
5. The environment will be automatically configured with .NET 10 SDK
9899

99100
**JetBrains Rider/IntelliJ:**
101+
100102
1. Use the "Remote Development" feature
101103
2. Select "Dev Container" option
102104
3. Point to the project's `.devcontainer/devcontainer.json`
103105

104106
**Other IDEs:**
107+
105108
1. Use Docker directly with the dev container:
109+
106110
```bash
107111
docker build -f .devcontainer/Dockerfile -t safaribooks-dev .
108112
docker run -it -v "$(pwd):/workspaces/safaribooks" safaribooks-dev
109113
```
110114

111115
The dev container includes:
112-
- .NET 9 SDK
116+
117+
- .NET 10 SDK
113118
- All required extensions and tools
114119
- Automatic project restoration
115120

116121
### Project Structure
117122

118123
The project is organized into separate libraries for better maintainability and reusability:
119124

120-
```
125+
```tree
121126
src/
122127
├── SafariBooksDownloader.Core/
123128
│ └── SafariBooksDownloader.Core.csproj
@@ -178,7 +183,7 @@ docker run --rm -v "$(pwd)/coverage:/app/TestResults" safaribooks-tests
178183

179184
The application creates the following structure:
180185

181-
```
186+
```tree
182187
Books/
183188
└── Book Title (BOOK_ID)/
184189
├── BOOK_ID.epub # Final EPUB file
@@ -199,13 +204,15 @@ Books/
199204
The generated EPUB files are compatible with most e-readers. For optimal compatibility:
200205

201206
### Calibre Conversion
207+
202208
For best quality, convert the generated EPUB using [Calibre](https://calibre-ebook.com/):
203209

204210
```bash
205211
ebook-convert "input.epub" "output.epub"
206212
```
207213

208214
### Kindle Compatibility
215+
209216
Use the `--kindle` option for better Kindle compatibility:
210217

211218
```bash
@@ -217,6 +224,7 @@ docker run -v "$(pwd)/cookies.json:/app/cookies.json" \
217224
This adds CSS rules that improve rendering of tables and code blocks on Kindle devices.
218225

219226
To convert for Kindle:
227+
220228
```bash
221229
ebook-convert "input.epub" "output.azw3"
222230
```
@@ -245,6 +253,7 @@ ebook-convert "input.epub" "output.azw3"
245253
### Docker Issues
246254

247255
1. **Volume Mount Problems**
256+
248257
```bash
249258
# Ensure absolute paths
250259
docker run -v "$(pwd)/cookies.json:/app/cookies.json" \
@@ -261,6 +270,7 @@ ebook-convert "input.epub" "output.azw3"
261270
## Legal Notice
262271

263272
This tool is for personal and educational use only. Please:
273+
264274
- Respect O'Reilly's Terms of Service
265275
- Only download books you have legitimate access to
266276
- Do not redistribute downloaded content
@@ -271,11 +281,12 @@ This tool is for personal and educational use only. Please:
271281
## Contributing
272282

273283
Feel free to open issues or submit pull requests. When contributing:
284+
274285
1. Use the dev container environment for consistency
275286
2. Follow the existing code style
276287
3. Add tests for new functionality
277288
4. Update documentation as needed
278289

279290
---
280291

281-
*For any issues, please don't hesitate to open an issue on GitHub.*
292+
*For any issues, please don't hesitate to open an issue on GitHub.*

src/SafariBooksDownloader.App/SafariBooksDownloader.App.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net9.0</TargetFramework>
5+
<TargetFramework>net10.0</TargetFramework>
66
<AssemblyName>SafariBooksDownloader.App</AssemblyName>
77
<RootNamespace>SafariBooksDownloader.App</RootNamespace>
88
</PropertyGroup>

src/SafariBooksDownloader.Core/SafariBooksDownloader.Core.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<RootNamespace>SafariBooksDownloader.Core</RootNamespace>
66
<AssemblyName>SafariBooksDownloader.Core</AssemblyName>
77
</PropertyGroup>

src/SafariBooksDownloader.UnitTests/SafariBooksDownloader.UnitTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
</PropertyGroup>
77

0 commit comments

Comments
 (0)