Felipe Martin
3fcb295d72
Make migrations transparent to the user ( #530 )
...
* refactor: remove migrate command
* reafactor: avoid migration errors on no changes
2022-11-27 15:39:27 +01:00
Felipe Martin
c86cf12638
fix: remove createnewid usages ( #520 )
...
* remove CreateNewID usages
* remove CreateNewID implementations and definition
* added missing sqlite envvar to compose file
2022-10-15 23:01:52 +02:00
Felipe Martin Garcia
05fee53bd0
fix: saving bookmarks inconsistencies ( #500 )
...
* chore: updated go-migrate dependencies
* fix: specify if we're saving bookmarks expecting a creation
up until now the SaveBookmarks method was doing some "magic" to do
"upserts" on the databases, but consistency between engines was scarce
and not knowing if we were expecting saving a new bookmark or updating
an existing one was leading to errors and inconsistencies in logic all
around the place. Now we need to specify a creation boolean when
saving and a differnt query will be make (INSERT vs UPDATE).
* fix(api): using incorrect bookmark for content downlaod
* test(db): added test pipeline for databases
Added functions that will share logic among the engines and will be
called on fresh databases on each test run
* dev: added basic docker-compose for development
* chore: uncommented tests
* ci(test): added mysql service
* typo
* test(mysql): select database after reset
* fix(mysql): ignore empty row errors when parsing tags
* fix(mysql): handle insert errors
* chore: added mysql variables to compose
* ci: explicit mysql service port exposed
2022-10-11 23:47:38 +02:00
Felipe Martin Garcia
158c52a325
fix: data dir permissions having execute for all ( #493 )
2022-10-09 18:50:42 +02:00
Felipe Martin Garcia
d0210447d2
fix: import should respect add_date or last_modified fields ( #490 )
...
* fix: handle last_modified and add_date in imports
* refactor: moved date format to a constant
* fix: use provided modified date when set
2022-10-09 17:05:52 +02:00
Felipe Martin Garcia
460014581c
fix(import): check for no rows error ( #487 )
2022-10-04 13:54:33 +02:00
hulb
09f2465065
refactor:pass ctx to db layer, return err instead of recover panic ( #450 )
2022-09-30 12:19:36 +02:00
Felipe Martin Garcia
81d52a2e24
feat: sqlite migrations ( #398 )
...
- Moved migrations from code to SQL files
- Using golang-migrate/v4
- Added a new CLI command: migrate
2022-03-26 08:33:57 +01:00
Felipe Martin Garcia
560a677f50
fix: trying to mkdir over an incorrect data path ( #378 )
2022-02-23 19:00:16 +01:00
Emmanuel Frecon
e1e2c7bfd8
Web Server and CI Improvements ( #374 )
...
* Fix for infinite redirect loop
path.Join trims the trailing slash if the path isn't /, use configured
root instead.
* Add repo root independence
This makes the workflows agnostic of the repository root, making it
possible to build in forked repos.
* Add HTTP request logging
* Fix proper RootPath handler
* Add logging for all resources
This adds proper logging for all resources, including errors. Logging
is on by default, but can be turned off.
* Report effective length of written data
2022-02-19 08:22:50 +01:00
Felipe Martin Garcia
a76b121098
fix: golangci-lint errors ( #366 )
2022-02-13 16:38:27 +01:00
n8225
f1c98a8e98
Update Dependencies and Replace mattn/go-sqlite with modernc.org/sqlite ( #345 )
...
* No more CGO
* Update all dependencies to current
* Only test against go 1.17.
2022-02-11 13:59:49 +01:00
Dean Jackson
4ff6ddd65a
Merge pull request #246 from Midek/master
...
update url also when offline mode
2020-08-06 22:28:04 +02:00
Dean Jackson
a0ce725167
Exit with non-zero status when add fails
2020-08-06 21:12:34 +02:00
Dean Jackson
acc86d74e2
Exit with non-zero status when add fails
2020-08-06 20:03:25 +02:00
Midov
3fe593d2e7
update url also when offline mode
2020-05-04 00:29:44 +02:00
Dean Jackson
32f9d2695f
Explicit charset for MySQL connection
2019-12-13 08:52:26 +01:00
Radhi Fadlillah
a3e1563dff
Move warc to another package
2019-10-09 20:10:12 +07:00
Radhi Fadlillah
99d27930ea
Initial support for subpath #39
2019-10-07 13:38:40 +07:00
Radhi Fadlillah
28ee496a68
Fix title is empty when adding bookmark
2019-10-03 20:23:28 +07:00
Radhi Fadlillah
9f145e27ef
Tidy up code for opening database
2019-09-26 06:24:49 +07:00
bvp
4eb86d60d7
Initial PostgreSQL support
2019-09-24 19:59:25 +03:00
Radhi Fadlillah
3a9e53cc71
Initial unit test..
2019-09-23 15:55:17 +07:00
Marko Korhonen
59a0594155
Fixed some typos
2019-09-23 10:43:29 +03:00
Dean Jackson
c55b1a3fef
Default to webpage title, not URL, if user specifies no title
2019-09-22 18:36:36 +02:00
Radhi Fadlillah
fbd4e37643
Fix custom title and excerpt doesn't saved
2019-09-22 16:17:51 +07:00
Radhi Fadlillah
018f33228a
Fix import skipped when title missing #153
2019-09-22 10:55:22 +07:00
Radhi Fadlillah
df98c281d3
Make MySQL address changeable #156
2019-09-22 08:25:34 +07:00
Radhi Fadlillah
2eb6415fa8
Add check command
2019-09-21 16:30:39 +07:00
Radhi Fadlillah
0bf5772022
Remove unneeded local variables
2019-09-21 16:19:45 +07:00
Radhi Fadlillah
7e16b020d6
Minor gofmt change
2019-09-21 11:10:53 +07:00
Radhi Fadlillah
f68835fdef
Minor improvement in cmd description
2019-09-20 17:27:49 +07:00
Radhi Fadlillah
64c62d6b12
Remove repeated code for archiving bookmarks
2019-09-20 16:48:57 +07:00
Radhi Fadlillah
a5b4f78f10
Fix typo
2019-08-30 11:43:53 +07:00
Radhi Fadlillah
806a3cff40
Add flag to specify custom address
2019-08-27 12:36:24 +07:00
Radhi Fadlillah
bd9d4b1d0c
For now, ignore modified from import since we don't use it
2019-08-12 21:41:44 +07:00
Radhi Fadlillah
4e76288e09
Add method to exclude or include some tags
2019-08-11 15:55:31 +07:00
Radhi Fadlillah
11c6680397
Add options to keep title and excerpt when update
2019-08-10 20:13:13 +07:00
Radhi Fadlillah
667e5b2e74
Initial MySQL support
2019-08-10 08:13:13 +07:00
Radhi Fadlillah
ad502c6749
Add portable mode
2019-08-09 10:19:43 +07:00
Radhi Fadlillah
af1a32ac4f
Now only fetch text content if page is readable
2019-08-05 20:22:27 +07:00
Radhi Fadlillah
f35325ba48
Make add and updateworks on non HTML file
2019-06-10 20:15:09 +07:00
Radhi Fadlillah
a88a25c41a
Make no-archival flags works
2019-06-10 15:49:54 +07:00
Radhi Fadlillah
e0474d6865
Open archive in browser
2019-06-10 14:34:49 +07:00
Radhi Fadlillah
2077d8fa2c
Fix: open doesnt stop after using text mode
2019-06-10 08:44:31 +07:00
Radhi Fadlillah
10ddb3fbbe
Use gzip which make archive 1/3 smaller
2019-06-10 07:01:53 +07:00
Radhi Fadlillah
b1464bd89b
Add flags for seeing log
2019-06-10 00:20:24 +07:00
Radhi Fadlillah
0efe7eae82
Fix: confirmation not show up on batch update
2019-06-10 00:06:51 +07:00
Radhi Fadlillah
94b59a29a7
Refactor archiver
2019-06-09 22:49:25 +07:00
Radhi Fadlillah
89cc8caa23
Confirm to user for batch updating archive
2019-06-09 17:20:51 +07:00