Skip to content

Commit

Permalink
For now, ignore modified from import since we don't use it
Browse files Browse the repository at this point in the history
  • Loading branch information
RadhiFadlillah committed Aug 12, 2019
1 parent e55070c commit bd9d4b1
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions internal/cmd/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ import (
"fmt"
nurl "net/url"
"os"
"strconv"
"strings"
"time"

"github.com/PuerkitoBio/goquery"
"github.com/go-shiori/shiori/internal/model"
Expand Down Expand Up @@ -74,9 +72,6 @@ func importHandler(cmd *cobra.Command, args []string) {
title := a.Text()
url, _ := a.Attr("href")
strTags, _ := a.Attr("tags")
strModified, _ := a.Attr("last_modified")
intModified, _ := strconv.ParseInt(strModified, 10, 64)
modified := time.Unix(intModified, 0)

// Clean up URL by removing its fragment and UTM parameters
tmp, err := nurl.Parse(url)
Expand Down Expand Up @@ -123,11 +118,10 @@ func importHandler(cmd *cobra.Command, args []string) {

// Add item to list
bookmark := model.Bookmark{
ID: bookID,
URL: url,
Title: normalizeSpace(title),
Modified: modified.Format("2006-01-02 15:04:05"),
Tags: tags,
ID: bookID,
URL: url,
Title: normalizeSpace(title),
Tags: tags,
}

bookID++
Expand Down

0 comments on commit bd9d4b1

Please sign in to comment.