This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// init | |
let xhr = new XMLHttpRequest() | |
let domain = 'https://read.amazon.com/' | |
let items = [] | |
let csvData = "" | |
// function | |
function getItemsList(paginationToken = null, callback) { | |
let url = domain + 'kindle-library/search?query=&libraryType=BOOKS' + ( paginationToken ? '&paginationToken=' + paginationToken : '' ) + '&sortType=recency&querySize=50' | |
xhr.open('GET', url, async=false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Capitalize first letters of words in a field (e.g. names) | |
[upper_first_letters(1)] | |
args = field | |
definition = mvjoin(mvmap(split($field$, " "), upper(substr($field$, 1, 1)).substr($field$, 2)), " ") | |
# Add keywords to subsearch output to improve search performance when values are in the raw events | |
[subsearch_add_keywords(1)] | |
args = field | |
definition = format | eval search=replace(search, "(\b$field$=\"([^\"]+)\")", "\1 \2") |