Skip to content

Commit

Permalink
优化语言显示;更新测试用例;增加翻译映射
Browse files Browse the repository at this point in the history
  • Loading branch information
jiaojiaodubai committed Oct 28, 2024
1 parent 3e90320 commit 934b33d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
29 changes: 17 additions & 12 deletions Founder.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"lastUpdated": "2024-10-11 09:16:17"
"lastUpdated": "2024-10-28 07:28:41"
}

/*
Expand All @@ -36,7 +36,7 @@
*/


function detectWeb(doc, url) {
function detectWeb(doc, _url) {
const hasScript = doc.querySelector('script[src*="portal.founderss.cn"]');
if (!hasScript) return false;
return 'journalArticle';
Expand Down Expand Up @@ -84,10 +84,12 @@ async function scrapeAPI(doc, url) {
? proxy.firstPageNum
: `${proxy.firstPageNum}-${proxy.lastPageNum}`;
newItem.date = ZU.strToISO(proxy.ppubDate || proxy.publishDate);
newItem.language = proxy.language;
newItem.language = proxy.language == 'zh' ? 'zh-CN' : 'en-US';
newItem.DOI = proxy.doi;
newItem.ISSN = attr(doc, 'meta[name="citation_issn"]', 'content');
newItem.url = url;
extra.set('view', proxy.visits);
extra.set('download', proxy.downloads);
const creatorsZh = proxy.authors.split(';');
const creatorsEn = proxy.enAuthors.split(';');
newItem.creators = creatorsZh.map(name => cleanAuthor(name));
Expand Down Expand Up @@ -120,14 +122,17 @@ async function scrapeAPI(doc, url) {
newItem.complete();
}

async function scrapeDoc(doc) {
async function scrapeDoc(doc, url = doc.location.href) {
const translator = Zotero.loadTranslator('web');
// Embedded Metadata
translator.setTranslator('951c027d-74ac-47d4-a107-9c3069ab7b48');
translator.setDocument(doc);
translator.setHandler('itemDone', (_obj, item) => {
const language = tryMatch(url, /\blanguage=([a-z]+)/, 1) || tryMatch(url, /\/([a-z]+)\/article/, 1);
item.title = attr(doc, 'meta[name="title"]', 'content');
if (language == 'zh') item.title = ZU.capitalizeTitle(item.title);
delete item.publisher;
item.language = language == 'zh' ? 'zh-CN' : 'en-US';
item.creators.forEach((creator) => {
if (/\u4e00-\u9fff/.test(creator.lastName)) {
creator.fieldMode = 1;
Expand Down Expand Up @@ -230,9 +235,9 @@ var testCases = [
"DOI": "10.3724/SP.J.1329.2022.02013",
"ISSN": "2095-1531",
"abstractNote": "太极拳作为我国传统运动康复疗法,可提高神经系统的兴奋性和对脑功能活动调节能力。文章总结归纳太极拳训练对脑效应机制的国内外研究现状,主要从脑电、超声多普勒、近红外线、磁共振成像等多种技术探索太极拳对脑电波信号特征、事件相关电位(P300/N400等)、脑血流、脑血氧含量和脑结构及功能网络影响,为太极拳的脑效应机制提供初步证据。太极拳训练过程中对注意力控制的改善可能与调节大脑皮层α波的节律和活动有关;太极拳训练后P300、N400潜伏期缩短,改善资源分配、信息处理和词语加工能力,提高大脑感知信息容量与资源。太极拳训练可能通过改善神经内分泌调节功能,促进代谢酶的活性,降低血脂而改善脑血流速度。基于静息态功能核磁成像的横断面研究显示,长期太极拳训练调节大脑功能网络,且与训练的经验、对认知功能的保护显著相关;太极拳对认知功能的改善与其调节相关认知神经环路结构和功能有关。任务态功能核磁研究显示,太极拳训练对记忆、执行功能加工相关脑区和网络具有调控作用。此外,长期太极拳训练对脑灰质体积和白质形态结构具有可塑性改变。然而,目前研究中也存在着一定的问题,如样本量偏小、以单模态脑影像为主、缺少纵向研究和长期随访、缺乏剂量-效应关系研究等。下一步研究还需开展多中心、大样本、多模态联合、不同训练剂量对比等高质量研究,以更深入探索太极拳的脑效应相关机制。",
"extra": "original-title: Research Progress on the Brain Effect Mechanism of Tai Chi Chuan Training\noriginal-author: Wang Yajun\noriginal-author: Xu Shurui\noriginal-author: Liu Jiao\noriginal-container-title: Rehabilitation Medicine\ncreatorsExt: [{\"firstName\":\"\",\"lastName\":\"王雅君\",\"creatorType\":\"author\",\"fieldMode\":1,\"original\":\"Wang Yajun\"},{\"firstName\":\"\",\"lastName\":\"徐姝蕊\",\"creatorType\":\"author\",\"fieldMode\":1,\"original\":\"Xu Shurui\"},{\"firstName\":\"\",\"lastName\":\"刘娇\",\"creatorType\":\"author\",\"fieldMode\":1,\"original\":\"Liu Jiao\"}]",
"extra": "original-title: Research Progress on the Brain Effect Mechanism of Tai Chi Chuan Training\noriginal-author: Wang Yajun\noriginal-author: Xu Shurui\noriginal-author: Liu Jiao\noriginal-container-title: Rehabilitation Medicine\nview: 192\ndownload: 27\ncreatorsExt: [{\"firstName\":\"\",\"lastName\":\"王雅君\",\"creatorType\":\"author\",\"fieldMode\":1,\"original\":\"Wang Yajun\"},{\"firstName\":\"\",\"lastName\":\"徐姝蕊\",\"creatorType\":\"author\",\"fieldMode\":1,\"original\":\"Xu Shurui\"},{\"firstName\":\"\",\"lastName\":\"刘娇\",\"creatorType\":\"author\",\"fieldMode\":1,\"original\":\"Liu Jiao\"}]",
"issue": "2",
"language": "zh",
"language": "zh-CN",
"libraryCatalog": "Founder",
"pages": "177-182",
"publicationTitle": "康复学报",
Expand Down Expand Up @@ -301,9 +306,9 @@ var testCases = [
"date": "2022-07-28",
"ISSN": "2095-1531",
"abstractNote": "上篇通过对《黄帝内经》《难经》和历代文献对三焦的论述进行归纳后认为,三焦充塞整个躯体,包容五脏六腑,大而无形;是五脏、六腑、四肢百骸等器官之间诸气、水液运行和代谢物质交换的通道。下篇以上篇为基础,并结合2002年来所研究的中医藏象实质的系列成果,认为三焦的形态学实质,在细胞的微观的层次是细胞质,在人体的宏观层次是细胞间隙。",
"extra": "original-title: Discussion on Microscopic and Macroscopic Substance of Triple Energizerin Traditional Chinese Medicine\noriginal-author: Minlin Zhang\noriginal-author: Xinglin Ruan\noriginal-author: Haolong Huang\noriginal-container-title: FUJIAN JOURNAL OF TRADITIONAL CHINESE MEDICINE\ncreatorsExt: [{\"firstName\":\"\",\"lastName\":\"郑敏麟\",\"creatorType\":\"author\",\"fieldMode\":1,\"original\":\"Minlin Zhang\"},{\"firstName\":\"\",\"lastName\":\"阮杏林\",\"creatorType\":\"author\",\"fieldMode\":1,\"original\":\"Xinglin Ruan\"},{\"firstName\":\"\",\"lastName\":\"黄浩龙\",\"creatorType\":\"author\",\"fieldMode\":1,\"original\":\"Haolong Huang\"}]",
"extra": "original-title: Discussion on Microscopic and Macroscopic Substance of Triple Energizerin Traditional Chinese Medicine\noriginal-author: Minlin Zhang\noriginal-author: Xinglin Ruan\noriginal-author: Haolong Huang\noriginal-container-title: FUJIAN JOURNAL OF TRADITIONAL CHINESE MEDICINE\nview: 110\ndownload: 33\ncreatorsExt: [{\"firstName\":\"\",\"lastName\":\"郑敏麟\",\"creatorType\":\"author\",\"fieldMode\":1,\"original\":\"Minlin Zhang\"},{\"firstName\":\"\",\"lastName\":\"阮杏林\",\"creatorType\":\"author\",\"fieldMode\":1,\"original\":\"Xinglin Ruan\"},{\"firstName\":\"\",\"lastName\":\"黄浩龙\",\"creatorType\":\"author\",\"fieldMode\":1,\"original\":\"Haolong Huang\"}]",
"issue": "7",
"language": "zh",
"language": "zh-CN",
"libraryCatalog": "Founder",
"pages": "30-34",
"publicationTitle": "福建中医药",
Expand Down Expand Up @@ -367,9 +372,9 @@ var testCases = [
"DOI": "10.13471/j.cnki.j.sun.yat-sen.univ(med.sci).20240004.017",
"ISSN": "1672-3554",
"abstractNote": "死因鉴定是法医实践中的重要内容。死后生物化学分析现已成为法医学死因鉴定的重要辅助分析手段,具有操作简便、检验效率高、便于了解死亡机制等优势。本文就死后生物化学分析方法的发展现状、自身优势及存在问题进行综述,并通过提出可行的解决办法,探讨死后生物化学分析方法在法医学死因鉴定研究中的应用前景,以期为该问题的解决提供新的研究思路。",
"extra": "original-title: The Progression of Postmortem Biochemistry Analysis in Forensic Discrimination of Cause of Death\noriginal-author: Ma Xingyu\noriginal-author: Zhao Dong\noriginal-container-title: Journal of Sun Yat-sen University (Medical Sciences)\ncreatorsExt: [{\"firstName\":\"\",\"lastName\":\"马星宇\",\"creatorType\":\"author\",\"fieldMode\":1,\"original\":\"Ma Xingyu\"},{\"firstName\":\"\",\"lastName\":\"赵东\",\"creatorType\":\"author\",\"fieldMode\":1,\"original\":\"Zhao Dong\"}]",
"extra": "original-title: The Progression of Postmortem Biochemistry Analysis in Forensic Discrimination of Cause of Death\noriginal-author: Ma Xingyu\noriginal-author: Zhao Dong\noriginal-container-title: Journal of Sun Yat-sen University (Medical Sciences)\nview: 194\ndownload: 1128\ncreatorsExt: [{\"firstName\":\"\",\"lastName\":\"马星宇\",\"creatorType\":\"author\",\"fieldMode\":1,\"original\":\"Ma Xingyu\"},{\"firstName\":\"\",\"lastName\":\"赵东\",\"creatorType\":\"author\",\"fieldMode\":1,\"original\":\"Zhao Dong\"}]",
"issue": "1",
"language": "zh",
"language": "zh-CN",
"libraryCatalog": "Founder",
"pages": "13-20",
"publicationTitle": "中山大学学报(医学科学版)",
Expand Down Expand Up @@ -437,9 +442,9 @@ var testCases = [
"date": "2023-04-23",
"ISSN": "1000-3436",
"abstractNote": "本工作研究了目前国内市场上有商品可供应的特种有机玻璃、三醋酸纤维素、聚苯乙烯、聚乙烯醇、聚碳酸酯和涤纶等六种透明塑料薄膜(片)对<sup>60</sup>Coγ射线的剂量响应特性和用于测量吸收剂量的精密度以及这些塑料薄膜(片)照射以后光密度的稳定性和环境条件对剂量响应的影响。结果表明,通过仔细地选择薄膜(片)及检测厚度和本底光密度,并对每一批号的薄膜(片)在使用条件(例如剂量率,温度、湿度……)下做刻度曲线,除了聚乙烯醇薄膜外,其它五种透明塑料薄膜(片)还是能够满足辐射工艺过程中日常剂量测量的要求。其中以特种有机玻璃、三醋酸纤维素、聚碳酸酯和涤纶等薄膜(片)更为合适。为测量1×10<sup>5</sup>rad到10<sup>8</sup>rad剂量,可以采用不同厚度的前二种薄膜(片),测量10<sup>8</sup>rad以上剂量,可以选用后二者。",
"extra": "original-title: INVESTIGATION OF THE DOSE RESPONSE CHARACTERISTICS OF SEVERAL CLEAR PLASTIC FILMS (OR PIECE) FOR <sup>60</sup>Coγ-RAYS\noriginal-author: Wu Zhili\noriginal-author: Chen Xinwei\noriginal-author: Zhang Jiashan\noriginal-container-title: Journal of Radiation Research and Radiation Processing\ncreatorsExt: [{\"firstName\":\"\",\"lastName\":\"吴智力\",\"creatorType\":\"author\",\"fieldMode\":1,\"original\":\"Wu Zhili\"},{\"firstName\":\"\",\"lastName\":\"陈新薇\",\"creatorType\":\"author\",\"fieldMode\":1,\"original\":\"Chen Xinwei\"},{\"firstName\":\"\",\"lastName\":\"张加山\",\"creatorType\":\"author\",\"fieldMode\":1,\"original\":\"Zhang Jiashan\"}]",
"extra": "original-title: INVESTIGATION OF THE DOSE RESPONSE CHARACTERISTICS OF SEVERAL CLEAR PLASTIC FILMS (OR PIECE) FOR <sup>60</sup>Coγ-RAYS\noriginal-author: Wu Zhili\noriginal-author: Chen Xinwei\noriginal-author: Zhang Jiashan\noriginal-container-title: Journal of Radiation Research and Radiation Processing\nview: 11\ndownload: 5\ncreatorsExt: [{\"firstName\":\"\",\"lastName\":\"吴智力\",\"creatorType\":\"author\",\"fieldMode\":1,\"original\":\"Wu Zhili\"},{\"firstName\":\"\",\"lastName\":\"陈新薇\",\"creatorType\":\"author\",\"fieldMode\":1,\"original\":\"Chen Xinwei\"},{\"firstName\":\"\",\"lastName\":\"张加山\",\"creatorType\":\"author\",\"fieldMode\":1,\"original\":\"Zhang Jiashan\"}]",
"issue": "4",
"language": "zh",
"language": "zh-CN",
"libraryCatalog": "Founder",
"pages": "11-19",
"publicationTitle": "辐射研究与辐射工艺学报",
Expand Down
3 changes: 2 additions & 1 deletion data/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,6 @@
"Xinhuanet": "新华网",
"Yiigle": "中华医学期刊全文数据库",
"zhangqiaokeyan": " 掌桥科研",
"Zhihu": "知乎"
"Zhihu": "知乎",
"Founder": "方正鸿云"
}

0 comments on commit 934b33d

Please sign in to comment.