@li-canghai/dsh-paper 0.0.0-stage → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +150 -2
  3. package/cordis.patch.yml +4 -0
  4. package/lib/annotate-tool.js +334 -0
  5. package/lib/arxiv-id.js +74 -0
  6. package/lib/asset-routes.js +210 -0
  7. package/lib/bibliography-formats.js +126 -0
  8. package/lib/bibliography-import.js +105 -0
  9. package/lib/bibliography-service.js +43 -0
  10. package/lib/bibliography.js +42 -0
  11. package/lib/block-authors.js +292 -0
  12. package/lib/block-cache.js +39 -0
  13. package/lib/blocks-markdown.js +157 -0
  14. package/lib/blocks-reconcile.js +218 -0
  15. package/lib/blocks.js +1344 -0
  16. package/lib/citation-metadata.js +260 -0
  17. package/lib/citation-styles.js +120 -0
  18. package/lib/client-parts/01-pure-helpers.js +2762 -0
  19. package/lib/client-parts/02-author-year.js +95 -0
  20. package/lib/client.js +10381 -0
  21. package/lib/code-source.js +68 -0
  22. package/lib/concurrency-gate.js +91 -0
  23. package/lib/context.js +233 -0
  24. package/lib/csl/SOURCES.md +10 -0
  25. package/lib/csl/gb-t-7714.csl +441 -0
  26. package/lib/csl/ieee.csl +520 -0
  27. package/lib/csl/locales-zh-CN.xml +438 -0
  28. package/lib/csl/nature.csl +190 -0
  29. package/lib/discussion.js +400 -0
  30. package/lib/documents.js +67 -0
  31. package/lib/export.js +848 -0
  32. package/lib/file-lock.js +177 -0
  33. package/lib/gloss.js +181 -0
  34. package/lib/glossary.js +279 -0
  35. package/lib/index.js +3862 -0
  36. package/lib/inline-html.js +53 -0
  37. package/lib/install-dependency.js +120 -0
  38. package/lib/item-ops.js +83 -0
  39. package/lib/job-facade.js +58 -0
  40. package/lib/json-store.js +54 -0
  41. package/lib/library-model.js +132 -0
  42. package/lib/library-service.js +180 -0
  43. package/lib/library-tool.js +982 -0
  44. package/lib/library.js +814 -0
  45. package/lib/markdown-assets.js +138 -0
  46. package/lib/markdown-literals.js +93 -0
  47. package/lib/metadata-enrichment.js +516 -0
  48. package/lib/metadata-fetch.js +146 -0
  49. package/lib/metadata-node.js +158 -0
  50. package/lib/metadata-proxy.ps1 +35 -0
  51. package/lib/mineru-config.js +95 -0
  52. package/lib/mineru-sdk-helper.py +123 -0
  53. package/lib/mineru-sdk.js +182 -0
  54. package/lib/mineru.js +268 -0
  55. package/lib/mirror-export.js +240 -0
  56. package/lib/outline.js +296 -0
  57. package/lib/page-image-helper.py +308 -0
  58. package/lib/page-image.js +454 -0
  59. package/lib/paper-metadata.js +242 -0
  60. package/lib/parse-export.js +631 -0
  61. package/lib/pdf-analysis-tool.js +750 -0
  62. package/lib/pdf-metadata-helper.py +75 -0
  63. package/lib/pdf-metadata.js +141 -0
  64. package/lib/pdf-page.js +261 -0
  65. package/lib/pdf-scan.js +134 -0
  66. package/lib/pdf-text.js +68 -0
  67. package/lib/picker.js +305 -0
  68. package/lib/portable.js +379 -0
  69. package/lib/purge.js +170 -0
  70. package/lib/read-tool.js +660 -0
  71. package/lib/reader-store.js +497 -0
  72. package/lib/reading-order.js +207 -0
  73. package/lib/rename-document.js +480 -0
  74. package/lib/rename.js +372 -0
  75. package/lib/renderer-status.js +161 -0
  76. package/lib/resolver.js +1152 -0
  77. package/lib/result-archive.js +157 -0
  78. package/lib/revisions.js +330 -0
  79. package/lib/search-database.js +62 -0
  80. package/lib/search-index.js +601 -0
  81. package/lib/search-scan.js +185 -0
  82. package/lib/search-source.js +23 -0
  83. package/lib/search-terms.js +539 -0
  84. package/lib/section-audit.js +209 -0
  85. package/lib/selection-message.js +332 -0
  86. package/lib/serial-tail.js +21 -0
  87. package/lib/slicing.js +425 -0
  88. package/lib/source-resolver.js +581 -0
  89. package/lib/stem-repair.js +189 -0
  90. package/lib/storage.js +562 -0
  91. package/lib/store-paths.js +253 -0
  92. package/lib/table-gfm.js +236 -0
  93. package/lib/tasks.js +270 -0
  94. package/lib/tex-align.js +509 -0
  95. package/lib/tex-blocks.js +653 -0
  96. package/lib/tex-fetch.js +455 -0
  97. package/lib/tex-figures.js +140 -0
  98. package/lib/tex-inline.js +166 -0
  99. package/lib/tex-merge.js +279 -0
  100. package/lib/tex-pipeline.js +242 -0
  101. package/lib/tex-prepare.js +746 -0
  102. package/lib/tex-tables.js +210 -0
  103. package/lib/text-similarity.js +85 -0
  104. package/lib/tool-contract.js +86 -0
  105. package/lib/tool-host.js +1058 -0
  106. package/lib/tool-identity.js +214 -0
  107. package/lib/translatable-text.js +48 -0
  108. package/lib/translate-prompts.js +709 -0
  109. package/lib/translate-queue.js +418 -0
  110. package/lib/translate-task.js +158 -0
  111. package/lib/translate.js +909 -0
  112. package/lib/update-check.js +438 -0
  113. package/lib/update-contracts.js +75 -0
  114. package/lib/usage.js +282 -0
  115. package/package.json +55 -4
@@ -0,0 +1,441 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <style xmlns="http://purl.org/net/xbiblio/csl" version="1.0" class="in-text" name-as-sort-order="all" sort-separator=" " demote-non-dropping-particle="never" initialize-with=" " initialize-with-hyphen="false" page-range-format="expanded" default-locale="zh-CN">
3
+ <info>
4
+ <title>China National Standard GB/T 7714-2015 (numeric, 中文)</title>
5
+ <id>http://www.zotero.org/styles/china-national-standard-gb-t-7714-2015-numeric</id>
6
+ <link href="http://www.zotero.org/styles/china-national-standard-gb-t-7714-2015-numeric" rel="self"/>
7
+ <link href="https://std.samr.gov.cn/gb/search/gbDetailed?id=71F772D8055ED3A7E05397BE0A0AB82A" rel="documentation"/>
8
+ <author>
9
+ <name>牛耕田</name>
10
+ <email>buffalo_d@163.com</email>
11
+ </author>
12
+ <contributor>
13
+ <name>Zeping Lee</name>
14
+ <email>zepinglee@gmail.com</email>
15
+ </contributor>
16
+ <category citation-format="numeric"/>
17
+ <category field="generic-base"/>
18
+ <summary>The Chinese GB/T 7714-2015 numeric style</summary>
19
+ <updated>2024-01-22T22:07:03+08:00</updated>
20
+ <rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
21
+ </info>
22
+ <locale xml:lang="zh">
23
+ <date form="text">
24
+ <date-part name="year" suffix="年" range-delimiter="&#8212;"/>
25
+ <date-part name="month" form="numeric" suffix="月" range-delimiter="&#8212;"/>
26
+ <date-part name="day" suffix="日" range-delimiter="&#8212;"/>
27
+ </date>
28
+ <terms>
29
+ <term name="edition" form="short">版</term>
30
+ <term name="open-quote">“</term>
31
+ <term name="close-quote">”</term>
32
+ <term name="open-inner-quote">‘</term>
33
+ <term name="close-inner-quote">’</term>
34
+ </terms>
35
+ </locale>
36
+ <locale>
37
+ <date form="numeric">
38
+ <date-part name="year" range-delimiter="/"/>
39
+ <date-part name="month" form="numeric-leading-zeros" prefix="-" range-delimiter="/"/>
40
+ <date-part name="day" form="numeric-leading-zeros" prefix="-" range-delimiter="/"/>
41
+ </date>
42
+ <terms>
43
+ <term name="page-range-delimiter">-</term>
44
+ </terms>
45
+ </locale>
46
+ <!-- 主要责任者 -->
47
+ <macro name="author">
48
+ <names variable="author">
49
+ <name>
50
+ <name-part name="family" text-case="uppercase"/>
51
+ </name>
52
+ <!-- <institution/> -->
53
+ <substitute>
54
+ <names variable="composer"/>
55
+ <names variable="illustrator"/>
56
+ <names variable="director"/>
57
+ <choose>
58
+ <if variable="container-title" match="none">
59
+ <names variable="editor"/>
60
+ </if>
61
+ </choose>
62
+ </substitute>
63
+ </names>
64
+ </macro>
65
+ <!-- 题名 -->
66
+ <macro name="title">
67
+ <group delimiter=", ">
68
+ <group delimiter=": ">
69
+ <text variable="title"/>
70
+ <group delimiter="&#8195;">
71
+ <choose>
72
+ <if variable="container-title" type="chapter entry-dictionary entry-encyclopedia paper-conference" match="none">
73
+ <text macro="volume"/>
74
+ <text variable="volume-title"/>
75
+ </if>
76
+ </choose>
77
+ <choose>
78
+ <if type="article article-journal" match="none">
79
+ <!-- 预印本和期刊文章的编号用于其他位置 -->
80
+ <text variable="number"/>
81
+ </if>
82
+ </choose>
83
+ <choose>
84
+ <if type="collection manuscript personal_communication" match="any">
85
+ <!-- 档案的卷宗号 -->
86
+ <text variable="archive_location"/>
87
+ </if>
88
+ </choose>
89
+ </group>
90
+ </group>
91
+ <choose>
92
+ <if variable="container-title" type="paper-conference" match="none">
93
+ <choose>
94
+ <if variable="event-date">
95
+ <text variable="event-place"/>
96
+ <date variable="event-date" form="text"/>
97
+ </if>
98
+ </choose>
99
+ </if>
100
+ </choose>
101
+ </group>
102
+ <group delimiter="/" prefix="[" suffix="]">
103
+ <text macro="type-id"/>
104
+ <text macro="medium-id"/>
105
+ </group>
106
+ </macro>
107
+ <!-- 书籍的卷号(“第 x 卷”或“第 x 册”) -->
108
+ <macro name="volume">
109
+ <choose>
110
+ <if type="article article-journal article-magazine article-newspaper periodical" match="none">
111
+ <choose>
112
+ <if is-numeric="volume">
113
+ <group delimiter=" ">
114
+ <label variable="volume" form="short" text-case="capitalize-first"/>
115
+ <text variable="volume"/>
116
+ </group>
117
+ </if>
118
+ <else>
119
+ <text variable="volume"/>
120
+ </else>
121
+ </choose>
122
+ </if>
123
+ </choose>
124
+ </macro>
125
+ <!-- 文献类型标识 -->
126
+ <macro name="type-id">
127
+ <choose>
128
+ <if type="article bill collection hearing legal_case legislation personal_communication regulation treaty" match="any">
129
+ <!-- 档案,A:分类保存以备查考的文件和材料,如人事档案、科技档案、法律法规、政府文件等。
130
+ article 为预印本,符合“科技档案”
131
+ -->
132
+ <text value="A"/>
133
+ </if>
134
+ <else-if type="article-journal article-magazine periodical" match="any">
135
+ <text value="J"/>
136
+ </else-if>
137
+ <else-if type="article-newspaper">
138
+ <text value="N"/>
139
+ </else-if>
140
+ <else-if type="book chapter classic entry-dictionary entry-encyclopedia" match="any">
141
+ <text value="M"/>
142
+ </else-if>
143
+ <else-if type="dataset">
144
+ <text value="DS"/>
145
+ </else-if>
146
+ <else-if type="map">
147
+ <text value="CM"/>
148
+ </else-if>
149
+ <else-if type="paper-conference">
150
+ <text value="C"/>
151
+ </else-if>
152
+ <else-if type="patent">
153
+ <text value="P"/>
154
+ </else-if>
155
+ <else-if type="post post-weblog webpage" match="any">
156
+ <text value="EB"/>
157
+ </else-if>
158
+ <else-if type="report">
159
+ <text value="R"/>
160
+ </else-if>
161
+ <else-if type="software">
162
+ <text value="CP"/>
163
+ </else-if>
164
+ <else-if type="standard">
165
+ <text value="S"/>
166
+ </else-if>
167
+ <else-if type="thesis">
168
+ <text value="D"/>
169
+ </else-if>
170
+ <else>
171
+ <text value="Z"/>
172
+ </else>
173
+ </choose>
174
+ </macro>
175
+ <!-- 文献载体标识 -->
176
+ <macro name="medium-id">
177
+ <choose>
178
+ <if variable="medium">
179
+ <text variable="medium"/>
180
+ </if>
181
+ <else-if variable="URL DOI" match="any">
182
+ <text value="OL"/>
183
+ </else-if>
184
+ </choose>
185
+ </macro>
186
+ <!-- 其他责任者 -->
187
+ <macro name="secondary-contributors">
188
+ <names variable="translator">
189
+ <name>
190
+ <name-part name="family" text-case="uppercase"/>
191
+ </name>
192
+ <!-- <institution/> -->
193
+ <label form="short" prefix=", "/>
194
+ </names>
195
+ </macro>
196
+ <!-- 专著主要责任者 -->
197
+ <macro name="container-contributors">
198
+ <names variable="editor">
199
+ <name>
200
+ <name-part name="family" text-case="uppercase"/>
201
+ </name>
202
+ <!-- <institution/> -->
203
+ <substitute>
204
+ <names variable="editorial-director"/>
205
+ <names variable="collection-editor"/>
206
+ <names variable="container-author"/>
207
+ </substitute>
208
+ </names>
209
+ </macro>
210
+ <!-- 专著题名 -->
211
+ <macro name="container-booklike">
212
+ <group delimiter=", ">
213
+ <choose>
214
+ <if variable="container-title">
215
+ <!-- 优先使用专著或会议论文集的题名 -->
216
+ <group delimiter=": ">
217
+ <text variable="container-title"/>
218
+ <text macro="volume"/>
219
+ </group>
220
+ </if>
221
+ <else-if type="paper-conference">
222
+ <!-- 有些会议没有论文集,使用会议名代替 -->
223
+ <text variable="event-title"/>
224
+ </else-if>
225
+ </choose>
226
+ <!-- 会议时间和会议地点 -->
227
+ <choose>
228
+ <if type="paper-conference" variable="event-date" match="all">
229
+ <date variable="event-date" form="text"/>
230
+ <text variable="event-place"/>
231
+ </if>
232
+ </choose>
233
+ </group>
234
+ </macro>
235
+ <!-- 连续出版物中的出处项 -->
236
+ <macro name="container-periodical">
237
+ <choose>
238
+ <if type="article-newspaper">
239
+ <!-- 报纸的出处项:“刊名, 出版日期(版次): 页码[引用日期]” -->
240
+ <group delimiter=", ">
241
+ <text variable="container-title"/>
242
+ <text macro="issued-date"/>
243
+ </group>
244
+ <text variable="page" prefix="(" suffix=")"/>
245
+ </if>
246
+ <else>
247
+ <!-- 期刊、杂志的出处项:“刊名, 年, 卷(期): 页码[引用日期]” -->
248
+ <group delimiter=": ">
249
+ <group>
250
+ <group delimiter=", ">
251
+ <text variable="container-title"/>
252
+ <text macro="issued-year"/>
253
+ <text variable="volume"/>
254
+ </group>
255
+ <text variable="issue" prefix="(" suffix=")"/>
256
+ </group>
257
+ <text variable="page"/>
258
+ </group>
259
+ </else>
260
+ </choose>
261
+ <text macro="accessed-date"/>
262
+ </macro>
263
+ <!-- 版本项 -->
264
+ <macro name="edition">
265
+ <choose>
266
+ <if is-numeric="edition">
267
+ <group delimiter=" ">
268
+ <number variable="edition" form="ordinal"/>
269
+ <label variable="edition" form="short"/>
270
+ </group>
271
+ </if>
272
+ <else>
273
+ <text variable="edition"/>
274
+ </else>
275
+ </choose>
276
+ </macro>
277
+ <!-- 连续出版物的年卷期 -->
278
+ <macro name="year-volume-issue">
279
+ <group delimiter=", ">
280
+ <text macro="issued-year"/>
281
+ <text variable="volume"/>
282
+ </group>
283
+ <text variable="issue" prefix="(" suffix=")"/>
284
+ </macro>
285
+ <!-- 出版项 -->
286
+ <macro name="publisher">
287
+ <choose>
288
+ <if type="patent">
289
+ <!-- 专利的出版项格式“公告日期[引用日期]” -->
290
+ <text macro="issued-date"/>
291
+ <text macro="accessed-date"/>
292
+ </if>
293
+ <else-if type="book chapter paper-conference periodical thesis" variable="archive archive-place publisher publisher-place page" match="any">
294
+ <!-- 非纯电子资源的格式“出版地: 出版者, 出版年: 页码[引用日期]” -->
295
+ <group delimiter=": ">
296
+ <group delimiter=", ">
297
+ <group delimiter=": ">
298
+ <choose>
299
+ <if variable="publisher publisher-place" match="any">
300
+ <text variable="publisher-place"/>
301
+ <text variable="publisher"/>
302
+ </if>
303
+ <else>
304
+ <!-- 档案的馆藏地以及收藏机构或单位 -->
305
+ <text variable="archive-place"/>
306
+ <text variable="archive"/>
307
+ </else>
308
+ </choose>
309
+ </group>
310
+ <text macro="issued-year"/>
311
+ </group>
312
+ <text variable="page"/>
313
+ </group>
314
+ <text macro="accessed-date"/>
315
+ </else-if>
316
+ <else-if variable="URL DOI" match="any">
317
+ <!-- 纯电子资源联机网络文献的格式“(更新或修改日期)[引用日期]”。
318
+ 原国标中,电子公告、无出版社的报告、法规等文献都可以作为“纯电子文献”。
319
+ -->
320
+ <text macro="issued-date" prefix="(" suffix=")"/>
321
+ <text macro="accessed-date"/>
322
+ </else-if>
323
+ <else>
324
+ <text macro="issued-year"/>
325
+ </else>
326
+ </choose>
327
+ </macro>
328
+ <!-- 出版年 -->
329
+ <macro name="issued-year">
330
+ <choose>
331
+ <if variable="issued">
332
+ <choose>
333
+ <if is-uncertain-date="issued">
334
+ <!-- 出版年无法确定时, 估计的出版年应置于方括号内。 -->
335
+ <date variable="issued" form="numeric" date-parts="year" prefix="[" suffix="]"/>
336
+ </if>
337
+ <else>
338
+ <date variable="issued" form="numeric" date-parts="year"/>
339
+ </else>
340
+ </choose>
341
+ </if>
342
+ <else-if type="article-journal" variable="available-date" match="all">
343
+ <!-- 网络首发(advance online publication)的期刊文章的日期使用 available-date -->
344
+ <date variable="available-date" form="numeric" date-parts="year"/>
345
+ </else-if>
346
+ <else>
347
+ <!-- 选取引用日期的年份作为估计的出版年 -->
348
+ <date variable="accessed" form="numeric" date-parts="year" prefix="[" suffix="]"/>
349
+ </else>
350
+ </choose>
351
+ </macro>
352
+ <!-- 出版日期,用于报纸文献、专利的“公告日期或公开日期”、电子资源的“更新或修改日期” -->
353
+ <macro name="issued-date">
354
+ <date variable="issued" form="numeric"/>
355
+ </macro>
356
+ <!-- 引用日期 -->
357
+ <macro name="accessed-date">
358
+ <choose>
359
+ <if variable="URL DOI" match="any">
360
+ <date variable="accessed" form="numeric" prefix="[" suffix="]"/>
361
+ </if>
362
+ </choose>
363
+ </macro>
364
+ <!-- 获取和访问路径、数字对象唯一标识符 -->
365
+ <macro name="access">
366
+ <group delimiter=". ">
367
+ <text variable="URL"/>
368
+ <text variable="DOI" prefix="DOI:"/>
369
+ </group>
370
+ </macro>
371
+ <!-- 参考文献表格式 -->
372
+ <macro name="entry-layout">
373
+ <group delimiter=". ">
374
+ <text macro="author"/>
375
+ <choose>
376
+ <if type="periodical">
377
+ <!-- 4.3 连续出版物 -->
378
+ <text macro="title"/>
379
+ <text macro="year-volume-issue"/>
380
+ <text macro="publisher"/>
381
+ </if>
382
+ <else-if type="article-journal article-magazine article-newspaper" match="any">
383
+ <!-- 4.4 连续出版物中的析出文献 -->
384
+ <text macro="title"/>
385
+ <text macro="container-periodical"/>
386
+ </else-if>
387
+ <else-if type="patent">
388
+ <!-- 4.5 专利文献 -->
389
+ <text macro="title"/>
390
+ <text macro="publisher"/>
391
+ </else-if>
392
+ <else-if type="dataset post post-weblog software webpage" match="any">
393
+ <!-- 4.6 电子资源 -->
394
+ <text macro="title"/>
395
+ <text macro="publisher"/>
396
+ </else-if>
397
+ <else-if type="chapter entry-dictionary entry-encyclopedia paper-conference" variable="container-title" match="any">
398
+ <!-- 4.2 专著中的析出文献 -->
399
+ <group delimiter="//">
400
+ <group delimiter=". ">
401
+ <text macro="title"/>
402
+ <text macro="secondary-contributors"/>
403
+ </group>
404
+ <group delimiter=". ">
405
+ <text macro="container-contributors"/>
406
+ <text macro="container-booklike"/>
407
+ </group>
408
+ </group>
409
+ <text macro="edition"/>
410
+ <text macro="publisher"/>
411
+ </else-if>
412
+ <else>
413
+ <!-- 4.1 专著 -->
414
+ <text macro="title"/>
415
+ <text macro="secondary-contributors"/>
416
+ <text macro="edition"/>
417
+ <text macro="publisher"/>
418
+ </else>
419
+ </choose>
420
+ <text macro="access"/>
421
+ </group>
422
+ </macro>
423
+ <citation collapse="citation-number" after-collapse-delimiter=",">
424
+ <sort>
425
+ <key variable="citation-number"/>
426
+ </sort>
427
+ <layout vertical-align="sup" delimiter="," prefix="[" suffix="]">
428
+ <text variable="citation-number"/>
429
+ </layout>
430
+ </citation>
431
+ <bibliography entry-spacing="0" et-al-min="4" et-al-use-first="3" second-field-align="flush">
432
+ <!-- 取消这部分注释可以开启 CSL-M 的多语言功能:按照文献的语言输出“et al.”等术语 -->
433
+ <!-- <layout suffix="." locale="en"><text variable="citation-number" prefix="[" suffix="]"/><text macro="entry-layout"/></layout>
434
+ -->
435
+ <layout suffix=".">
436
+ <text variable="citation-number" prefix="[" suffix="]"/>
437
+ <text macro="entry-layout"/>
438
+ </layout>
439
+ </bibliography>
440
+ </style>
441
+