31 Commits
Author SHA1 Message Date
nite 5b46c58262 fix: remove EPUB ad gaps and preserve chapter titles 2026-07-17 23:55:22 +08:00
nite 1c5e11e8ef chore: regenerate templ files with v0.3.1020 2026-07-16 19:15:32 +08:00
nite 0650bbfdba fix: upgrade playwright-go and fix file:// resource loading
- Upgrade playwright-go v0.5200.1 -> v0.6100.0 (module path changed
  from playwright-community to mxschmitt). The old Azure CDN driver
  download endpoint returns 404 for all versions; v0.6100.0 switches
  to npm registry which works correctly.
- Fix file:// resource loading: replace absolute path src="/..."
  and href="/..." with full URLs so browser can fetch remote
  resources (chapterlog.js) when loading local HTML files.
- Replace removed Devtools field with Args --auto-open-devtools-for-tabs.
- Include error details in playwright install failure log.
- Fix nil pointer in tests: check err before calling SetTextOnly.
- Update all dependencies: goquery, templ, resty, cobra, pflag, etc.
- Bump go toolchain 1.24.2 -> 1.25.0
2026-07-16 19:01:55 +08:00
nite 6c00b1329d build(deps): Update font-mapper dependency to new repository 2025-10-29 18:53:17 +11:00
nite b650030f26 README 2025-10-22 02:25:35 +11:00
nite b136556822 test(unscrambleParagraphs): try a crawling method without playwright 2025-10-22 02:17:11 +11:00
nite 17c3859e9e feat(logging): Implement structured logging and debug mode
fix: Windows cannot download novels correctly
2025-10-17 01:36:23 +11:00
nite 11fccdb05f ci(goreleaser): Install templ before generating templates
Adds a `go install` hook to `.goreleaser.yaml` to ensure the `templ` binary is
installed and up-to-date before `templ generate` is executed. This prevents
potential build failures in CI/CD environments where `templ` might not be
pre-installed or could be an outdated version, making the release process
more robust and self-contained.
2025-10-06 18:20:47 +11:00
nite af968cbc9a ci(workflow): Upgrade GitHub Actions in release workflow
Updated the major versions of several GitHub Actions used in the release workflow:
- actions/checkout from v4 to v5
- actions/setup-go from v4 to v5
- goreleaser/goreleaser-action from v5 to v6

This ensures we are using the latest features, bug fixes, and security updates provided by these actions.
2025-10-06 18:11:27 +11:00
nite 08e6280c34 feat: Add NFPM packaging and defer Playwright installation
This commit introduces NFPM configuration in `.goreleaser.yaml` to
generate native packages for various Linux distributions (e.g., .deb,
.rpm, .apk). This provides a more streamlined installation experience
for Linux users.

The Playwright browser installation logic has been moved from `main.go`
to the `Run` function of the `download` command. This change ensures
that Playwright binaries are only downloaded and installed when the
`download` command is actually invoked, improving initial application
startup performance and reducing unnecessary overhead for other commands.

The Goreleaser configuration has also been updated to version 2 syntax
and the `arm` architecture has been removed from builds.
2025-10-06 18:07:54 +11:00
niteandGitHub 34179b4dc0 Create LICENSE 2025-10-06 18:03:04 +11:00
nite b0f8f31dcc feat: Add concurrency and headless options for downloads
This commit introduces new features for controlling the download process:

-   **Concurrency**: Users can now specify the number of concurrent volume downloads using the `--concurrency` flag. This significantly speeds up the download of entire novels.
-   **Headless Mode**: A `--headless` flag has been added to control whether the browser operates in headless mode (without a visible UI). This is useful for debugging or running in environments without a display.

**Changes include:**

-   Updated `download` command to accept `--concurrency` and `--headless` flags.
-   Refactored `bilinovel` downloader to support `BilinovelNewOption` for configuring headless mode and concurrency.
-   Implemented a page pool and concurrency control mechanism within the `bilinovel` downloader to manage concurrent browser page usage.
-   Added `DownloadNovel` and `DownloadVolume` methods to the `bilinovel` downloader, utilizing goroutines and wait groups for parallel processing.
-   Updated `.vscode/launch.json` with new configurations for testing novel and volume downloads with the new options.
2025-10-06 10:20:36 +11:00
nite 6084386989 refactor(bilinovel): Migrate browser automation from Chromedp to Playwright
This commit replaces the `chromedp` library with `playwright-go` for browser automation within the Bilinovel downloader.

Changes include:
*   Updated `Bilinovel` struct to manage Playwright browser, context, and page instances.
*   Rewrote `initBrowser` and `Close` methods to use Playwright's API for browser lifecycle management.
*   Refactored `processContentWithChromedp` to `processContentWithPlaywright`, adapting the logic to use Playwright's page evaluation capabilities.
*   Removed unused `context` and `time` imports.
*   Added HTML cleanup in `getChapterByPage` to remove `class` attributes from images and `data-k` attributes from all elements, improving content consistency.
2025-10-06 07:58:31 +11:00
niteandGitHub f1320cb978 Merge pull request #2 from sarymo/patch-3
fix: normalize path separators in wrapper.go
2025-09-03 13:02:07 +10:00
nite b8cd053b00 refactor: improve network event handling and cleanup of hidden elements in Bilinovel processing 2025-08-24 20:51:09 +10:00
nite 560cdfdec9 refactor: streamline download process and enhance browser handling in Bilinovel 2025-08-24 19:04:00 +10:00
nite ed5440f5fb Update dependencies and templates: bump templ to v0.3.943, update pflag to v1.0.7, and golang.org/x/net to v0.43.0; adjust XML declaration formatting in cover template 2025-08-24 17:11:14 +10:00
nite 26f82dd9ea fix: trim whitespace from text before writing to chapter file 2025-08-24 16:57:51 +10:00
nite e9fbe5c5db refactor 2025-08-24 16:53:05 +10:00
nite 75745b9431 fix: kavita 无法正确加载字体 2025-07-17 14:03:10 +08:00
nite ca3fdf8980 Update templ dependency to v0.3.906 and adjust XML declaration formatting in templates 2025-07-16 21:02:15 +08:00
nite 042b383988 u 2025-05-03 13:40:27 +10:00
nite c9a7853cef fix font error 2025-04-21 14:59:51 +10:00
nite b2130f60d5 fix missing images 2025-04-20 21:44:28 +10:00
nite d80c6053ab fix font error 2025-04-20 21:34:52 +10:00
nite 0c746c984b remove test 2025-04-20 02:24:24 +10:00
nite 9d1d3f0f17 fix font error 2025-04-20 02:13:59 +10:00
nite 6028e7d8c2 add metadatas 2025-04-20 01:13:51 +10:00
nite 6076069338 mod cmd/download.go 2025-04-20 00:35:45 +10:00
nite bd31eb62d9 README 2025-04-20 00:33:58 +10:00
nite 9a098b205a start 2025-04-20 00:32:41 +10:00