Bookmarklet for Creating a UIPedia Page by Extracting Information from ACM Digital Library
To slightly modify this bookmarklet to only include the necessary information:
javascript:(async () => {
const url = location.href;
const m = url.match(/acm\.org.*doi\/((.*)\/(.*))$/);
if (m == null) return;
const doi = m[1];
const resp = await fetch("https://dl.acm.org/action/exportCiteProcCitation", {
"headers": {
"content-type": "application/x-www-form-urlencoded; charset=UTF-8"
},
"referrer": `https://dl.acm.org/doi/${doi}`,
"referrerPolicy": "strict-origin-when-cross-origin",
"body": `dois=${doi}&targetFile=custom-endNote&format=endNote`,
"method": "POST",
"mode": "cors",
"credentials": "include"
});
const json = await resp.json();
const entry = json.items[0][doi];
const authors = entry.author;
var body = [];
body.push(encodeURI(`[${entry.title} ${url}]`));
body.push('[[Authors:]] ' + authors.map(author => `[${author.given} ${author.family}]`).join(' ') + ' ' + entry.issued['date-parts']);
body.push('[[Keywords:]] ' + entry.keyword);
const title0 = entry.title.replace(/\?/g, '%27%%27+%273f%27').replace(/&/g, '%27%%27+%2726%27');
const body0 = body.join('%27+%270d%27').replace(/\?/g, '%27%%27+%273f%27').replace(/\&/g, '%27%%27+%2726%27');
window.open(`https://scrapbox.io/blu3mo/${title0}?body=${body0}`);
})();
[Click here](https://scrapbox.io/UIPedia/ACM Digital Libraryから情報取得してUIPediaページを作成するブックマークレット) for more information on creating a UIPedia page by extracting information from the ACM Digital Library.