Newer
Older
web-dumps / wos-dumps / 02-download.ini
append = pack

[use]
plugin = basics
plugin = conditor
plugin = analytics

[TXTConcat]

[replace]
path = usrQuery
value = self().trim()

path = databaseId
value = WOK

path = optionView
value = FS

path = sortField
value = LD+D

[throttle]
bySecond = 1

[WOSFetch]
url = https://wos-api.clarivate.com/api/wos
retries = 5
timeout = 120000
token = env('WOS_API_KEY')
step = 100

[ungroup]

[replace]

path = AccessionNumber
value = get("UID","")

path = Identifiers
value = get("dynamic_data.cluster_related.identifiers.identifier", []) \
  .thru(identifiers => _.castArray(identifiers) \
    .reduce((acc, i) => { \
      if (i.type === "doi") acc.DOI = i.value; \
      if (i.type === "issn") acc.ISSN = i.value; \
      if (i.type === "eissn") acc.eISSN = i.value; \
      if (i.type === "eisbn") acc.eISBN = i.value; \
      if (i.type === "art_no") acc.ArticleNumber = i.value; \
      if (i.type === "pmid") acc.PMID = i.value; \
      return acc}, { DOI: "", ISSN: "", eISSN: "", eISBN: "", ArticleNumber: "", PMID: "" }))

path = DocumentType
value = get("static_data.summary.doctypes").thru(obj => [].concat(obj || []).map(i => i?.doctype || null)).flatten()

path = Titles
value = get("static_data.summary.titles.title") \
  .thru(titles => ({ DocumentTitle: titles.find(i => i.type === "item")?.content || "", \
  Source: titles.find(i => i.type === "source")?.content || "" }))

path = Publisher
value = get("static_data.summary.publishers.publisher.names.name") \
  .thru(pub => _.toUpper(pub?.unified_name || pub?.full_name || ""))

path = PubInfo
value = get("static_data.summary.pub_info") \
  .thru(pub => ({ Volume: pub?.vol || "", Issue: pub?.issue || "", \
  BeginningPage: pub?.page?.begin || "", EndingPage: pub?.page?.end || "", \
  YearPublished: pub?.pubyear || "", EarlyAccessYear: pub?.early_access_year || "" }))

path = Conference
value = get("static_data.summary.conferences.conference") \
  .thru(conf => ({ ConferenceDate: conf?.conf_dates?.conf_date?.content || "", \
  ConferenceTitle: conf?.conf_titles?.conf_title || "", \
  ConferenceCity: conf?.conf_locations?.conf_location?.conf_city || "", \
  ConferenceState: conf?.conf_locations?.conf_location?.conf_state || "" }))

path = Authors
value = get("static_data.summary.names.name") \
  .thru(authors => [].concat(authors || []).filter(i => i.role === "author") \
  .map(i => ({ wos_standard: i.wos_standard, \
  full_name_deburred: _.deburr(i.preferred_name?.full_name || ""), \
  full_name: i.preferred_name?.full_name || "" })))

path = AuthorsWithAddress
value = get("static_data.fullrecord_metadata.addresses.address_name", []) \
  .thru(addresses => { \
    let authorsData = {}; \
    [].concat(addresses || []).forEach(addr => { \
        [].concat(addr.names?.name || []).filter(a => a.role === "author").forEach(author => { \
            let key = author.wos_standard || author.full_name || "Unknown"; \
            if (!authorsData[key]) { \
                authorsData[key] = { \
                    wos_standard: author.wos_standard || "Unknown", \
                    full_name: author.preferred_name?.full_name || author.full_name || "Unknown", \
                    full_name_deburred: _.deburr(author.preferred_name?.full_name || author.full_name || "Unknown"), \
                    addresses: [] \
                }; \
            } \
            let full_address = addr.address_spec?.full_address || "Unknown address"; \
            let country = addr.address_spec?.country || "Unknown country"; \
            let city = addr.address_spec?.city || "Unknown city"; \
            let organizations = _.castArray(addr.address_spec?.organizations?.organization || []) \
                .filter(org => org.pref === "Y") \
                .map(org => org.content); \
            authorsData[key].addresses.push({ full_address, country, city, organizations }); \
        }); \
    }); \
    return Object.values(authorsData); \
  })


path = ReprintAddresses
value = get("static_data.fullrecord_metadata.reprint_addresses.address_name", []) \
  .thru(reprints => { \
    let authorsData = {}; \
    [].concat(reprints || []).forEach(addr => { \
        let author = addr.names?.name || {}; \
        let key = author.wos_standard || author.full_name || "Unknown"; \
        if (!authorsData[key]) { \
            authorsData[key] = { \
                wos_standard: author.wos_standard || "Unknown", \
                full_name: author.full_name || "Unknown", \
                full_name_deburred: _.deburr(author.full_name || "Unknown"), \
                addresses: [] \
            }; \
        } \
        authorsData[key].addresses.push({ \
            full_address: addr.address_spec?.full_address || "Unknown address", \
            country: addr.address_spec?.country || "Unknown country", \
            city: addr.address_spec?.city || "Unknown city", \
            organizations: _.castArray(addr.address_spec?.organizations?.organization || []) \
                .filter(org => org.pref === "Y") \
                .map(org => org.content) \
        }); \
    }); \
    return Object.values(authorsData); \
  })

path = KeywordsPlus
value = get("static_data.item.keywords_plus.keyword", []) \
  .thru(kw => [].concat(kw || []))

path = AuthorKeywords
value = get("static_data.fullrecord_metadata.keywords.keyword", []) \
  .thru(kw => [].concat(kw || []))

path = CitationCountWOS
value = get("dynamic_data.citation_related.tc_list.silo_tc", []) \
  .thru(silos => [].concat(silos || []).find(i => i.coll_id === "WOS")?.local_count || 0)

path = CitationTopics
value = get("dynamic_data.citation_related.citation_topics.subj-group.subject", []) \
  .thru(subjects => { \
    let subjectArray = [].concat(subjects || []); \
    return { \
      Macro: subjectArray.find(i => i["content-type"] === "macro") ? \
        `${subjectArray.find(i => i["content-type"] === "macro")["content-id"]} - ${subjectArray.find(i => i["content-type"] === "macro").content}` : "", \
      Meso: subjectArray.find(i => i["content-type"] === "meso") ? \
        `${subjectArray.find(i => i["content-type"] === "meso")["content-id"]} - ${subjectArray.find(i => i["content-type"] === "meso").content}` : "", \
      Micro: subjectArray.find(i => i["content-type"] === "micro") ? \
        `${subjectArray.find(i => i["content-type"] === "micro")["content-id"]} - ${subjectArray.find(i => i["content-type"] === "micro").content}` : "" \
    }; \
  })

path = Categories
value = get("static_data.fullrecord_metadata.category_info.subjects.subject", []) \
  .thru(subjects => ({ \
      ResearchAreas: _.castArray(subjects).filter(i => i.ascatype === "extended").map(i => i.content), \
      WebofScienceCategories: _.castArray(subjects).filter(i => i.ascatype === "traditional").map(i => i.content)}))

path = NormalizedLanguage
value = get("static_data.fullrecord_metadata.normalized_languages.language", []) \
  .thru(langs => [].concat(langs || []).map(i => i.content || ""))

path = Abstract
value = get("static_data.fullrecord_metadata.abstracts.abstract.abstract_text.p","")

path = SDG
value = get("dynamic_data.citation_related.SDG.sdg_category", []).castArray().map("content")