feat: goodreads -> storygraph
This commit is contained in:
parent
ac504b2837
commit
bbb9f59e76
10 changed files with 470 additions and 81 deletions
|
@ -44,8 +44,8 @@ module.exports = {
|
|||
},
|
||||
tagLookup: (url, tagMap) => {
|
||||
if (!url) return
|
||||
if (url.includes('goodreads.com')) return '#Books #NowReading #Goodreads'
|
||||
if (url.includes('trakt.tv')) return '#Movies #Trakt'
|
||||
if (url.includes('thestorygraph.com')) return '#Books #NowReading #StoryGraph'
|
||||
if (url.includes('trakt.tv')) return '#Movies #Watching #Trakt'
|
||||
return tagMap[url] || ''
|
||||
},
|
||||
webmentionsByUrl: (webmentions, url) => {
|
||||
|
|
|
@ -15,7 +15,8 @@ module.exports = {
|
|||
normalized['alt'] = `${item['title']} at #${item['rank']}`
|
||||
normalized['subtext'] = `#${item['rank']}`
|
||||
}
|
||||
if (item.type === 'book' || item.type === 'movie') normalized['alt'] = item['title']
|
||||
if (item.type === 'movie') normalized['alt'] = item['title']
|
||||
if (item.type === 'book') normalized['alt'] = `${item['title']} by ${item['author']}`
|
||||
if (item.type === 'tv') {
|
||||
normalized['title'] = item['title']
|
||||
normalized['alt'] = `${item['title']} from ${item['name']}`
|
||||
|
|
Reference in a new issue