Skip to content

Commit

Permalink
Prepare v0.32.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Girbons committed Oct 12, 2021
1 parent 2889bde commit 434a9f6
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 25 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
[Changes][v0.32.0]
<a name="v0.32.0"></a>

# [0.32.0 (v0.32.0)](https://github.com/Girbons/comics-downloader/releases/tag/v0.32.0) - 12 Oct 2021

# What's new

- Introduced `custom-comic-name` option to support comic/manga renaming. -- (Thanks @ChristofferGreen)

# Changes

- Mangadex has been re-enabled. (Thanks @bake)

# Fixes

- #93: Downloading single issues with issue links does not work with the new sites mangakakalot.com/readmanganato.com. -- (Thanks @Jan0660)

[Changes][v0.31.0]
<a name="v0.31.0"></a>

Expand Down
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@

Download the latest release:

- [Linux](https://github.com/Girbons/comics-downloader/releases/download/v0.31.0/comics-downloader)
- [Mac OSX](https://github.com/Girbons/comics-downloader/releases/download/v0.31.0/comics-downloader-osx)
- [Windows](https://github.com/Girbons/comics-downloader/releases/download/v0.31.0/comics-downloader.exe)
- [Linux ARM](https://github.com/Girbons/comics-downloader/releases/download/v0.31.0/comics-downloader-linux-arm)
- [Linux ARM64](https://github.com/Girbons/comics-downloader/releases/download/v0.31.0/comics-downloader-linux-arm64)
- [Linux](https://github.com/Girbons/comics-downloader/releases/download/v0.32.0/comics-downloader)
- [Mac OSX](https://github.com/Girbons/comics-downloader/releases/download/v0.32.0/comics-downloader-osx)
- [Windows](https://github.com/Girbons/comics-downloader/releases/download/v0.32.0/comics-downloader.exe)
- [Linux ARM](https://github.com/Girbons/comics-downloader/releases/download/v0.32.0/comics-downloader-linux-arm)
- [Linux ARM64](https://github.com/Girbons/comics-downloader/releases/download/v0.32.0/comics-downloader-linux-arm64)

Download the latest GUI release:

- [Linux](https://github.com/Girbons/comics-downloader/releases/download/v0.31.0/comics-downloader-gui)
- [Mac OSX](https://github.com/Girbons/comics-downloader/releases/download/v0.31.0/comics-downloader-gui-osx)
- [Windows](https://github.com/Girbons/comics-downloader/releases/download/v0.31.0/comics-downloader-gui-windows.exe)
- [Linux](https://github.com/Girbons/comics-downloader/releases/download/v0.32.0/comics-downloader-gui)
- [Mac OSX](https://github.com/Girbons/comics-downloader/releases/download/v0.32.0/comics-downloader-gui-osx)
- [Windows](https://github.com/Girbons/comics-downloader/releases/download/v0.32.0/comics-downloader-gui-windows.exe)

## Usage

Expand All @@ -49,6 +49,8 @@ Usage:
Set the country to retrieve a manga, Used by MangaDex which uses ISO 3166-1 codes
-create-default-path comics/[source]/[name]/
Using this flag your comics/issue will be downloaded without prepending the default folder structure, comics/[source]/[name]/ (default true)
-custom-comic-name string
Use a custom name for the comic output.
-daemon
Run the download as daemon
-daemon-timeout int
Expand Down
4 changes: 2 additions & 2 deletions cmd/downloader/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ var (
// manga/comic language
country string
// manga/comic final output
forceAspect bool
format string
forceAspect bool
format string
customComicName string
// force only issue number filenames
issueNumberNameOnly bool
Expand Down
2 changes: 2 additions & 0 deletions cmd/gui/gui.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type Downloader struct {
CreateDefaultPath *widget.Check
IssuesRange *widget.Entry
Debug *widget.Check
CustomComicName *widget.Entry
}

// ClearURLField resets the url text field.
Expand Down Expand Up @@ -51,6 +52,7 @@ func (d *Downloader) Submit() {
OutputFolder: d.OutputFolder.Text,
CreateDefaultPath: d.CreateDefaultPath.Checked,
IssuesRange: d.IssuesRange.Text,
CustomComicName: d.CustomComicName.Text,
}

downloader.GuiRun(opts)
Expand Down
7 changes: 6 additions & 1 deletion cmd/gui/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,16 @@ func main() {
imagesOnlyCheck := widget.NewCheck("", nil)

createDefaultPath := widget.NewCheck("", nil)
createDefaultPath.Checked = true
createDefaultPath.Checked = true

debugCheck := widget.NewCheck("", nil)

outputFolderEntry := widget.NewEntry()
outputFolderEntry.SetPlaceHolder("Folder where the comics will be saved")

customComicName := widget.NewEntry()
customComicName.SetPlaceHolder("Custom comic name")

issuesRange := widget.NewEntry()
issuesRange.SetPlaceHolder("1-10")

Expand All @@ -74,11 +77,13 @@ func main() {
OutputFolder: outputFolderEntry,
IssuesRange: issuesRange,
Debug: debugCheck,
CustomComicName: customComicName,
}

form := widget.NewForm()
form.Append("URL", d.URL)
form.Append("Country", d.Country)
form.Append("Custom comic name", d.CustomComicName)
form.Append("Output", d.Format)
form.Append("All chapters", d.AllChapters)
form.Append("Last chapter", d.LastChapter)
Expand Down
2 changes: 1 addition & 1 deletion internal/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

// Tag specifies the current release tag.
// It needs to be manually updated.
const Tag = "v0.31.0"
const Tag = "v0.32.0"

// IsNewAvailable will fetch the latest project releases
// and will compare the latest release Tag against the current Tag.
Expand Down
25 changes: 12 additions & 13 deletions pkg/sites/loader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ func TestCustomComicName(t *testing.T) {
outputFolder := filepath.Dir(os.Args[0])

options := &config.Options{
All: false,
Last: false,
ImagesOnly: false,
Source: "www.mangatown.com",
URL: url,
Format: "pdf",
ImagesFormat: "png",
CustomComicName: "Naruto",
OutputFolder: outputFolder,
All: false,
Last: false,
ImagesOnly: false,
Source: "www.mangatown.com",
URL: url,
Format: "pdf",
ImagesFormat: "png",
CustomComicName: "Naruto",
OutputFolder: outputFolder,
}

collection, err := LoadComicFromSource(options)
Expand All @@ -69,7 +69,6 @@ func TestCustomComicName(t *testing.T) {
assert.Equal(t, 20, len(comic.Links))
}


//func TestSiteLoaderMangareader(t *testing.T) {
//url := "https://www.mangareader.net/naruto/700"
//outputFolder := filepath.Dir(os.Args[0])
Expand Down Expand Up @@ -100,7 +99,7 @@ func TestCustomComicName(t *testing.T) {
//}

func TestSiteLoaderComicExtra(t *testing.T) {
url := "https://www.comicextra.com/daredevil-2016/chapter-600/full"
url := "https://www.comicextra.com/daredevil/chapter-600/full"
outputFolder := filepath.Dir(os.Args[0])
options := &config.Options{
All: false,
Expand All @@ -121,7 +120,7 @@ func TestSiteLoaderComicExtra(t *testing.T) {

assert.Equal(t, "www.comicextra.com", comic.Source)
assert.Equal(t, url, comic.URLSource)
assert.Equal(t, "daredevil-2016", comic.Name)
assert.Equal(t, "daredevil", comic.Name)
assert.Equal(t, "chapter-600", comic.IssueNumber)
assert.Equal(t, 43, len(comic.Links))
}
Expand Down Expand Up @@ -150,7 +149,7 @@ func TestLoaderUnknownSource(t *testing.T) {
}

func TestIssuesRange(t *testing.T) {
url := "https://www.comicextra.com/daredevil-2016/chapter-600/full"
url := "https://www.comicextra.com/daredevil/chapter-600/full"
outputFolder := filepath.Dir(os.Args[0])
options := &config.Options{
All: true,
Expand Down

0 comments on commit 434a9f6

Please sign in to comment.