Commit graph

551 commits

Author SHA1 Message Date
Felipe Martin
595cb45a2c
fix: point go-epub go correct repository (#842) 2024-02-13 19:19:43 +01:00
Felipe Martin
0368f4eaab
fix: update go-epub to latest version to avoid filename errors on windows (#840)
* link to pr latest commit

* latest go-epub from main branch
2024-02-13 09:01:43 +01:00
Felipe Martin
1ee762a161
fix: fix problems that may be raised from a 1.5.5 upgrade (#837)
* add missing flag to deprecated serve command

* docs references to initial account

* modify shiori serve references

* update dependencies

* remove serve from shiori -h docs output

* remove migrated routes

* fix faq heading levels

* downgrade go-epub to 1.2.0
2024-02-08 09:26:33 +01:00
Felipe M.
09bc9b4786
ci: improved autogenerated changelog on releases by categorizing the changes 2024-02-06 18:55:44 +01:00
Monirzadeh
82aa1e5080
fix: fixes path issues on windows (#829)
* return corrent path in windows with usiing path lib

* ci: run tests in windows and macos too

* avoid testing mysql/psql in windows and macos

* windows & macos matrix

* disable gotestfmt

* replace which in shell script

* handle error in test db removal

* fix expected path baseed on platform

* add leading seprator

* proper temporary storage dir and db cleanup

* fix failed to create destination dir file does not exist in windows

* move temp to /tmp

* update temp folder

* fix config tests in windows

* apply patch for db

* revert temp dir creation.

* unify account db tests pach

* remove TmpDir for sqlite tests

* try to force CGO disable with enviroment variable

* Remove unneeded log

Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>

* remove unneeded comment

Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>

* fix file path for download images

* change way to create temp directory

* use diffrent file name for each test

* fix typo

* fix absolute path in successful download image

* correct filename with png

* change test to download image from internet instead of local machine

* remvoe unneeded import

* remove os.RemoveAll(.env)

* unify variable names in unit test

* return CGO_ENABLED=0

* test other way to set enviroment variable

* try to set enviroment variable sepratly in macos and windows

* set enviroment variable before run commands in windows

* fix windows test name

* combine two workflow for windows and macos again

* fix typo

* remove env

* change env path

* cleanup unneeded env

* general CGO_ENABLED environ

* use absolute path to run fileserver instead of relative

* serve file test from internet shiori repository

* check file existance after download and unify varibale name from temp to tmpDir

* remove unneeded log

---------

Co-authored-by: Felipe M <me@fmartingr.com>
Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>
2024-02-05 10:21:23 +01:00
dependabot[bot]
15b2a1e5f1
chore(deps): bump the all group with 3 updates (#830)
Bumps the all group with 3 updates: [actions/upload-artifact](https://github.com/actions/upload-artifact), [actions/cache](https://github.com/actions/cache) and [codecov/codecov-action](https://github.com/codecov/codecov-action).


Updates `actions/upload-artifact` from 4.1.0 to 4.3.0
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](1eb3cb2b3e...26f96dfa69)

Updates `actions/cache` from 3.3.3 to 4.0.0
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](e12d46a63a...13aacd865c)

Updates `codecov/codecov-action` from 3.1.4 to 3.1.5
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](eaaf4bedf3...4fe8c5f003)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: all
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-03 17:34:33 +01:00
dependabot[bot]
84e5b09c4c
chore(deps): bump the all group with 3 updates (#815)
Bumps the all group with 3 updates: [actions/download-artifact](https://github.com/actions/download-artifact), [actions/upload-artifact](https://github.com/actions/upload-artifact) and [actions/cache](https://github.com/actions/cache).


Updates `actions/download-artifact` from 4.1.0 to 4.1.1
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](f44cd7b40b...6b208ae046)

Updates `actions/upload-artifact` from 4.0.0 to 4.1.0
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](c7d193f32e...1eb3cb2b3e)

Updates `actions/cache` from 3.3.2 to 3.3.3
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](704facf57e...e12d46a63a)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-16 21:24:59 +01:00
dependabot[bot]
0c876bcd89
chore(deps): update ci dependencies (#812)
Bumps the all group with 3 updates: [actions/download-artifact](https://github.com/actions/download-artifact), [actions/setup-go](https://github.com/actions/setup-go) and [actions/upload-artifact](https://github.com/actions/upload-artifact).


Updates `actions/download-artifact` from 3.0.2 to 4.1.0
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](9bc31d5ccc...f44cd7b40b)

Updates `actions/setup-go` from 4.1.0 to 5.0.0
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](93397bea11...0c52d547c9)

Updates `actions/upload-artifact` from 3.1.3 to 4.0.0
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](a8a3f3ad30...c7d193f32e)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: all
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: all
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-13 09:10:24 +01:00
Felipe Martin
f72e2dec4a
deps: updated docker image versions (#809)
* deps: updated docker image versions

* use dockerhub alpine image

* use alpine image from dockerhub in ci
2023-12-30 08:03:10 +01:00
Felipe Martin
7c13626a5b
fix: strict usage of shiori prefix for environment variables in configuration (#807)
* fix: disable direct os lookuper

* config.setdefaults call config.http.setdefaults

* tests

* log level default in local run server

* store log level in configuration
2023-12-30 00:46:29 +01:00
Felipe Martin
55ec418070
docs: updated configuration page (#808) 2023-12-30 00:40:29 +01:00
Felipe Martin
cf7301c78f
Fixed lint errors after refactor (#806)
* removed git diff from swagger check script

* updated swagger docs

* removed ununsed calls
2023-12-28 18:37:19 +01:00
Felipe Martin
cc7c75116d
refactor: migrate bookmark static pages to new http server (#775)
* migrate bookmark content route to new http server

* new archive page

* remove unused go generate comment

* database mock

* utils cleanup

* unused var

* domains refactor and tests

* fixed secret key type

* redirect to login on ui errors

* fixed archive folder with storage domain

* webroot documentation

* some bookmark route tests

* fixed error in bookmark domain for non existant bookmarks

* centralice errors

* add coverage data to unittests

* added tests, refactor storage to use afero

* removed mock to avoid increasing complexity

* using deps to copy files around

* remove config usage (to deps)

* remove handler-ui file
2023-12-28 18:18:32 +01:00
Felipe Martin
fe6a306e9e
deps: upgrade (#804) 2023-12-27 12:41:25 +01:00
istiak101
f01f2dbc0d
fix: use noreferer to prevent exposing shiori instance url to archived websites (#802) 2023-12-27 11:59:16 +01:00
Felipe Martin
188ce68761
fix: generate coverage profile (#797) 2023-12-10 14:21:09 +01:00
Kirill A Kustov
3df4c0bcfb
Add Documentation>CLI>Add bookmark (#794)
* Create CLI.md

* Update index.md
2023-12-09 09:00:48 +01:00
JPFrancoia
00582090e4
docs: example deployment for kubernetes (#754)
* Adding docs on how to install with Kubernetes manifests.

* docs: community section

---------

Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>
Co-authored-by: Felipe M <me@fmartingr.com>
2023-11-18 08:34:30 +01:00
Monirzadeh
d371ee6037
fix: typo in URL under documentation (#778) 2023-11-17 10:49:47 +01:00
Felipe Martin
9746add224
deps: update go dependencies (#777) 2023-11-12 14:20:23 +01:00
Felipe Martin
7c4e5fb4e7
ci: add codecov reporting (#776) 2023-11-12 14:07:14 +01:00
cbe
7765e5bf42
chore: frontend formatting (#764)
* Install `prettier`

Ignore everything in the first step as I want to see the size of changes
that are going to happen first

* Configure prettier

- use tabs as the whole project prefers tabs
- ignore a bunch of files that shouldn't be formatted

* Check & format with prettier when compiling less

* Update docs to use bun

Since bun handles the dependencies used for the CSS compilation this
should be the preferred method from now on.

* Check actual result of prettier

* Use LF line endings

All files where formatted in LF and since it's most common in git repos
we should probably keep it this way

* Limit prettier to `internal/view/`

See pull request review
https://github.com/go-shiori/shiori/pull/764#pullrequestreview-1702935417

* Format code with prettier
2023-11-05 11:02:31 +01:00
Felipe M.
1d58455b53
chore: comment unused functions 2023-10-29 15:42:57 +01:00
cbe
f16dd42e10
Make suggestion clickable in bookmark creation (#765)
This was especially noticeable when using the web app on mobile devices
as the suggestion looks like it's clickable. It should be also a little
bit more convenient UX-wise when it's allowed to be clicked in non-
mobile context as well.

Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>
2023-10-29 15:26:39 +01:00
Monirzadeh
5e9847a288
refactor: migrate ebook routes to new http server (#742)
* add new api

* UI use new API

* remove legacy route

* fix request to new api destination and read that response

* feat: allow authentication using cookies

* fix: return proper error on validatesession

* typo: secret key envionment variable in makefile

* serve ebook file with new api

* cache update use new api path

* add skipexist and batch download use same route as cache

* fix bug - update hasebook status

* remove unneeded part of code

* add swagger documentation

* fix swagger documentation

* fix swagger response

* better statuscode

* fix swagger documentation

* covert to snake_case

* recover coverage.txt that remove

---------

Co-authored-by: Felipe M <me@fmartingr.com>
Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>
2023-10-29 11:57:07 +01:00
dependabot[bot]
29b1d97581
chore(deps): bump the all group with 1 update (#767)
Bumps the all group with 1 update: [actions/checkout](https://github.com/actions/checkout).

- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](8ade135a41...b4ffde65f4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-29 11:01:47 +01:00
Yuta Hayashibe
c64e858a23
Fix typos (#756)
Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>
2023-10-22 17:43:49 +02:00
Monirzadeh
013270acb3
Update documentation for add links to shiori in android devices from share menu (#757)
* add shiori save to android device share menu

* better section for community contributions

* add new line

* fix typo

* fix typo

* fix typo

---------

Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>
2023-10-22 17:22:44 +02:00
Monirzadeh
03df5e8399
fix: allow webp thumbnails (#758)
* use webp as thumbnail

* simpler way to use webp

---------

Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>
2023-10-22 15:06:08 +02:00
cbe
1ae82f48a3
fix: Actions in overlays on mobile hard to press (#759)
* fix: Actions in overlays on mobile hard to press

Buttons on mobile devices could've been cut off, depending on the browsers
chrome size which rendered them either completely off-screen or at least hard
to reach. Using `dvh` (dynamic viewport height) should fix this issue for
most newer browsers.

* fix: provide fallback values for newer dynamic viewport units

Since `dvh` and `dvw` are rather new and required an up-to-date browser
providing percentage values is a bit safer

---------

Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>
2023-10-22 13:37:25 +02:00
Monirzadeh
f82b97dec5
add create ebook by default in settings (#761)
* add create ebook by default in settings

* ebook automatic generate for new bookmark

* fix empty ebook for new bookmark
2023-10-22 13:25:16 +02:00
Monirzadeh
106bf163ca
refactor: remove unneeded variable and unify the way send token in header (#763) 2023-10-17 18:36:55 +02:00
Monirzadeh
c05d617fbd
feat: allow per-user settings and store them in database (#639)
* create needed field in sqlite database

* update account model

* update Account struct for save Account options

* update sqlite database return account settings

* save configure in sqlite as text and return that

* read configure from user account and defualt configure for shiori

* add api/ui for update settings in database user can save settings in database (in sqlite database)

* check configures be in json format before save in database

* support MariaDB

* fix wrong comment

* support PostgreSQL

* revert unneeded change in new logic

* change configures to config

* change SaveAccount to SaveAccountSettings

* add migrate database scripts

* change default in migration scrtipts

* update model

* read config field as json from database

* fix parse value config value & update config update

* update default value for new user

* update settings variable name to reflect database value in UI

* fix typo

* not panic if user not exist and update worng comment

* visitor user can update there settings now

* remove unneeded loading dialog

* fix typo

* update function for pg and mysql

* remove IsJson

* move scan method to model

* simplify jsonify

* simplify assignees value to account.Config

* missing part of function

* fix some typo and unneeded field in struct

* add down migrate script for all database

* change createEbook to CreateEbook

* use json instead of text in mysql and postgres

* implement

* remove unneeded part

* remove unneeded jsonify in code

* return SelectContext and GetContext

* remove defualt config in reques for new user it will be set in backend

* New API

* remove legacy API

* remove validateSessionWithoutOwnerStatus

* remove Jsonify function don't need that anymore

* add unit test for database

* update migrate script name

* change put to patch

* return PUT

* fix Patch problem and now use PATCH instead of PUT

* remove unneeded retuen

* more cleaner code for request new settings

* fix bug to handle string in Scan method thanks to fmartingr

* fix Authorization & use GetAccount & remove username from request

* shiori-settings remove and it read from shiori-account

* add swagger documentation

* API unit test

* fix typo

* remove unneeded coment

Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>

* better Documentation

Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>

* shiori-toke remove on logout

* fix typo

* add unit test check update config in database

* update swag documentation

* fix swag formaing error

---------

Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>
2023-10-15 15:27:54 +02:00
Monirzadeh
46c1a6ae8f
feat: allow resize the dialogbox for bigger/hidpi screens (#732)
* resize dialogbox with drag corner of box

* update style.css

* resizable just for more than full HD display

* fix size for initial size for small and big size

* full screen dialog box on mobile device - wider dialogbox on device

* remvoe custom-dialog.css that combine with style.css

* disable resize for moile device

Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>

* use new generated style.css

* not limit minimum size to 400px

* set default value in .custom-dialog

---------

Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>
2023-10-09 16:07:37 +00:00
Monirzadeh
c6aabc49f1
fix: styles-check and swag-check monitor just needed directory not project root (#747)
* styles-check just work on less and css directory

* just cheack css directory

* make swag-check just monitor generated files
2023-10-09 18:02:05 +02:00
dependabot[bot]
2c31048634
chore(deps): bump golang dependencies (#746)
Bumps the all group with 1 update: [modernc.org/sqlite](https://gitlab.com/cznic/sqlite).

- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.25.0...v1.26.0)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-03 07:54:08 +02:00
Felipe Martin
eb666cd2f5
feat: use new JWT auth in all frontend API calls (#743)
* properly store jwt token

* use a secret in the local dev server

* send jwt token in all api calls
2023-09-30 12:45:35 +02:00
dependabot[bot]
a3fb07560d
chore(deps):Update Github Actions dependencies (#740)
Bumps the all group with 1 update: [actions/checkout](https://github.com/actions/checkout).

- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](3df4ab11eb...8ade135a41)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-30 08:33:41 +02:00
dependabot[bot]
36b0121fc6
chore(deps): bump the all group with 6 updates (#738)
Bumps the all group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `3.4.0` | `4.0.0` |
| [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) | `3.6.0` | `3.7.0` |
| [actions/setup-go](https://github.com/actions/setup-go) | `3.5.0` | `4.1.0` |
| [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) | `4.3.0` | `5.0.0` |
| [actions/upload-artifact](https://github.com/actions/upload-artifact) | `3.1.2` | `3.1.3` |
| [actions/cache](https://github.com/actions/cache) | `3.3.1` | `3.3.2` |


Updates `actions/checkout` from 3.4.0 to 4.0.0
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](24cb908017...3df4ab11eb)

Updates `golangci/golangci-lint-action` from 3.6.0 to 3.7.0
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](639cd343e1...3a91952989)

Updates `actions/setup-go` from 3.5.0 to 4.1.0
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](6edd4406fa...93397bea11)

Updates `goreleaser/goreleaser-action` from 4.3.0 to 5.0.0
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](336e29918d...7ec5c2b0c6)

Updates `actions/upload-artifact` from 3.1.2 to 3.1.3
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](0b7f8abb15...a8a3f3ad30)

Updates `actions/cache` from 3.3.1 to 3.3.2
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](88522ab9f3...704facf57e)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: all
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: all
- dependency-name: goreleaser/goreleaser-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: all
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-22 16:45:52 +02:00
Monirzadeh
9e91029e43
refactor: Migrate ePub generation to go-epub (#679) 2023-09-16 20:45:09 +02:00
Felipe Martin
4df7e1dd8e
feat: build css from less files locally (#735)
* build less using lessc and bun

* build

* make styles-check

* Added workflow to check updates

* avoid embed less files

* docs

* updated tests to reflect changes

* typo

* fixed archive page css

* call styles check on pull requests

* comments in style.less

* fix archive styles affecting other pages

* minify using clean-css

* Split archive.css and style.css

* Updated docs
2023-09-16 19:58:55 +02:00
Monirzadeh
3fb3f6075b
just use one dependency for uuid (#736) 2023-09-16 18:34:51 +02:00
Felipe Martin
9082f98f41
deps: upgrade to Go 1.21 (#698)
* go 1.21

* update dependencies

* Updated direct dependencies

* -count=1 to test flags

* group dependabot updates into one PR

* get swag version from go.mod

* show changes in swagger check

* go mod tidy

* updated swag generated files

* use go version from go.mod

* remove stray \

* proper grep
2023-09-16 08:20:55 +02:00
András Rutkai
e722cb6961
fix: properly parse mysql connection string, docs update (#730)
Mysql connection string update, docs update
2023-09-13 18:31:41 +02:00
Felipe M
1d52569731
fix(ci): rc handling 2023-09-11 19:19:18 +02:00
Felipe Martin
ef1d18d81f
fix(db): handle usage of special characters in searches (#721)
* handle full text search for failing cases

* added test

* test getbookmarkcount too

* replaceall, fix getbookmarkcount
2023-09-11 18:20:09 +02:00
Monirzadeh
f4817cb9c3
fix: Ensure bookmark files are correctly downloaded before deleting current ones (#683)
* generate ebook get dstPath

* Archive and ebook can recover if download faild

* recover thumb if download faild

* thumb image create just if image processing is sucssesful

* create epub in tmp if it sucssesful copy to destination

* archive file create in tmp if it successful move to destination

* move to destination as function

* update ebook download api and remove .epub from file name

* report faild item to user

* not show dialog if error not happen

* update thumbnail based on last status of bookmark fix #524

* better warning massage

Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>

* tmpFile without .epub

* MoveToDestination change to MoveFileToDestination

* return .epub

* log if downloadBookImage return error

* fix bug remove imgPath just if download last image be unsuccessful

* update old unit test

* add processing.go unit test

* small massage for report failded item to the user

* add some more unit test and samplefile

* use sample image in unit test

* use local sample file and unit test not need internet connection anymore

* update error to user and log that too

* add more comment

* update comment

* change variable name parentDir to dstDir

* more simpler error handling

* remove unneeded defer

* remvoe unneeded epubWriter.Close()

* more readable unit test in processing

* more readable unit test for ebooks

* delete all defer os.RemoveAll from unit tests

* Better comment

Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>

* Better Error output

Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>

* fix err.String() method

---------

Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>
2023-08-20 18:20:13 +02:00
Felipe Martin
8b015a3850
Swagger improvements (#666)
* refactor: swagger docs into a folder

* added scripts for the swaggger tasks

* check version and fmt

* CI

* formatted swag comments

* using custom delims

* revert custom delims

* swag 1.16.1

* update swagger docs

* avoid make swagger output

* swagger check

* test

* swag-fmt

* swagger run

* gofmt

* avoid swag-fmt check for now due to inconsistencies with gofmt

* re-enabled by using go fmt afterwards

* use newer swag in CI

* add gopath to path

* using go binary instead of unset env

* alternative

* correct swag version

* formatted

* formatted

* correct go fmt command

* make swagger

* swagger-check -> swag-check

* run swag-check on lint
2023-08-12 08:38:52 +02:00
arakimo
2e1016e5f1
preserve fragment in URLs (#315) (#687)
* preserve fragment in URLs (#315)

* fix: correctly handle URLs without a fragment

* simplify solution to (#315)
2023-08-05 09:04:25 +02:00
Felipe Martin
e5f2de0930
Fix CI incorrectly tagging RC releases and disables docker builds on forks (#686)
* properly tag rc releases

* avoid builds on forked prs

* simplify condition
2023-07-30 08:12:23 +02:00