mirror of
https://github.com/go-shiori/shiori.git
synced 2025-09-29 16:25:58 +08:00
Change module path to relative, add check for empty tag on import
This commit is contained in:
parent
837c470176
commit
222ff0371e
10 changed files with 15 additions and 13 deletions
|
@ -5,8 +5,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"../model"
|
||||||
"github.com/RadhiFadlillah/go-readability"
|
"github.com/RadhiFadlillah/go-readability"
|
||||||
"github.com/RadhiFadlillah/shiori/model"
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/RadhiFadlillah/shiori/model"
|
"../model"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"../model"
|
||||||
"github.com/PuerkitoBio/goquery"
|
"github.com/PuerkitoBio/goquery"
|
||||||
"github.com/RadhiFadlillah/shiori/model"
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -73,7 +73,9 @@ func importBookmarks(pth string, generateTag bool) error {
|
||||||
// Get bookmark tags
|
// Get bookmark tags
|
||||||
tags := []model.Tag{}
|
tags := []model.Tag{}
|
||||||
for _, strTag := range strings.Split(strTags, ",") {
|
for _, strTag := range strings.Split(strTags, ",") {
|
||||||
tags = append(tags, model.Tag{Name: strTag})
|
if strTag != "" {
|
||||||
|
tags = append(tags, model.Tag{Name: strTag})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get bookmark excerpt
|
// Get bookmark excerpt
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/RadhiFadlillah/shiori/model"
|
"../model"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/RadhiFadlillah/shiori/database"
|
"../database"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/RadhiFadlillah/shiori/assets"
|
"../assets"
|
||||||
"github.com/RadhiFadlillah/shiori/model"
|
"../model"
|
||||||
"github.com/dgrijalva/jwt-go"
|
"github.com/dgrijalva/jwt-go"
|
||||||
"github.com/dgrijalva/jwt-go/request"
|
"github.com/dgrijalva/jwt-go/request"
|
||||||
"github.com/julienschmidt/httprouter"
|
"github.com/julienschmidt/httprouter"
|
||||||
|
|
|
@ -8,8 +8,8 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"../model"
|
||||||
"github.com/RadhiFadlillah/go-readability"
|
"github.com/RadhiFadlillah/go-readability"
|
||||||
"github.com/RadhiFadlillah/shiori/model"
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ package database
|
||||||
import (
|
import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
|
|
||||||
"github.com/RadhiFadlillah/shiori/model"
|
"../model"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Database is interface for manipulating data in database.
|
// Database is interface for manipulating data in database.
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/RadhiFadlillah/shiori/model"
|
"../model"
|
||||||
"github.com/jmoiron/sqlx"
|
"github.com/jmoiron/sqlx"
|
||||||
"golang.org/x/crypto/bcrypt"
|
"golang.org/x/crypto/bcrypt"
|
||||||
)
|
)
|
||||||
|
|
4
main.go
4
main.go
|
@ -2,8 +2,8 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/RadhiFadlillah/shiori/cmd"
|
"./cmd"
|
||||||
db "github.com/RadhiFadlillah/shiori/database"
|
db "./database"
|
||||||
_ "github.com/mattn/go-sqlite3"
|
_ "github.com/mattn/go-sqlite3"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue