Skip to content

Commit 14a3637

Browse files
committed
Adds comment
1 parent 8707ea2 commit 14a3637

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cmd/pocket.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ maintaining the original metadata including tags and read/unread status.`,
6666
},
6767
}
6868

69+
// CSV structure for Pocket import is:
70+
//
71+
// title,url,time_added,tags,status
72+
// Opération Bobcat 1942-1946 - Tahiti Heritage,https://www.tahitiheritage.pf/operation-bobcat-1942-1946/,1689230329,history|military|polynesie|usa,unread
6973
func importFromPocketCSV(ctx context.Context, c *cli.Command) error {
7074
path := c.StringArg("path")
7175
if c.StringArg("path") == "" {
@@ -117,7 +121,7 @@ func importFromPocketCSV(ctx context.Context, c *cli.Command) error {
117121
timeAdded := row[2]
118122
tags := row[4]
119123

120-
i, err := strconv.ParseUint(string(timeAdded), 10, 64)
124+
modified, err := strconv.ParseUint(string(timeAdded), 10, 64)
121125
if err != nil {
122126
panic(err)
123127
}
@@ -127,7 +131,7 @@ func importFromPocketCSV(ctx context.Context, c *cli.Command) error {
127131
Title: title,
128132
Tags: strings.Split(tags, "|"),
129133
Module: PocketImporterID,
130-
Modified: i,
134+
Modified: modified,
131135
}
132136

133137
if err = DB.UpsertBookmark(bookmark); err != nil {

0 commit comments

Comments
 (0)