Skip to content

Commit 25dc85d

Browse files
committed
Updating to include new Notion field
1 parent 2869552 commit 25dc85d

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,14 @@ try {
2727

2828
// Prepare structured data
2929
const links = {}
30-
const headers = ['Name', 'Category', 'Created', 'Summary', 'Tags', 'URL']
30+
const headers = ['Name', 'Category', 'Created', 'Property', 'Summary', 'Tags', 'URL']
3131

3232
// Configure minimum date
3333
const start = Date.parse(cli.start)
3434
if (isNaN(start)) quit(`We couldn't parse ${cli.start} as a date.`)
3535

36+
console.log('Parsing ...')
37+
3638
// Open and parse CSV
3739
fs.createReadStream(cli.input)
3840
.pipe(csv({headers, skipLines: 1}))
@@ -42,6 +44,7 @@ try {
4244
item[row] = data[row]
4345
})
4446
let parsedCreatedDate = Date.parse(item['Created'])
47+
4548
if (isNaN(parsedCreatedDate) || parsedCreatedDate < start) return
4649

4750
if (item['Name'].trim().length === 0) return
@@ -109,6 +112,8 @@ try {
109112

110113
})
111114

115+
console.log('Done')
116+
112117
} catch (err) {
113118
quit(err)
114119
}

package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)