citeclaw 2.0.6 → 2.0.7
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.
- package/README.md +3 -8
- package/package.json +1 -1
- package/scripts/botcite.js +4 -5
package/README.md
CHANGED
|
@@ -23,7 +23,6 @@ Run from npm:
|
|
|
23
23
|
|
|
24
24
|
```bash
|
|
25
25
|
npx citeclaw --help
|
|
26
|
-
npx citeclaw translators sync
|
|
27
26
|
npx citeclaw citoid formats
|
|
28
27
|
npx citeclaw cite bibtex 10.48550/arXiv.1706.03762
|
|
29
28
|
npx citeclaw crossref "10.1021/acsomega.2c05310"
|
|
@@ -38,11 +37,7 @@ npx citeclaw citoid bibtex "https://aclanthology.org/2023.emnlp-main.398/"
|
|
|
38
37
|
npx citeclaw cite mediawiki "https://arxiv.org/abs/1706.03762"
|
|
39
38
|
```
|
|
40
39
|
|
|
41
|
-
Fresh npm installs
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
npx citeclaw translators sync
|
|
45
|
-
```
|
|
40
|
+
Fresh npm installs can run normal citation commands directly. `CiteClaw` will bootstrap Zotero and build a local translator runtime automatically from the bundled Zotero translator set.
|
|
46
41
|
|
|
47
42
|
## Local Service
|
|
48
43
|
|
|
@@ -125,7 +120,7 @@ Safety defaults:
|
|
|
125
120
|
|
|
126
121
|
## Runtime Sync
|
|
127
122
|
|
|
128
|
-
For npm installs, runtime assets
|
|
123
|
+
For npm installs, extra runtime assets can be synced explicitly when you want broader coverage or local style rendering:
|
|
129
124
|
|
|
130
125
|
```bash
|
|
131
126
|
npx citeclaw translators sync
|
|
@@ -135,7 +130,7 @@ npx citeclaw styles sync
|
|
|
135
130
|
Notes:
|
|
136
131
|
|
|
137
132
|
- `translators sync` will clone or update the translator sources with `git` when needed
|
|
138
|
-
- `styles sync` will clone or update style repositories with `git` when
|
|
133
|
+
- `styles sync` will clone or update style repositories with `git` when local CSL styles are unavailable
|
|
139
134
|
- if `git` is not installed, the commands fail with an explicit message
|
|
140
135
|
|
|
141
136
|
## Bibliography Curation
|
package/package.json
CHANGED
package/scripts/botcite.js
CHANGED
|
@@ -644,9 +644,8 @@ function bootstrapLocalEnvironment() {
|
|
|
644
644
|
if ( !fileExists( path.join( zoteroDir, 'node_modules' ) ) ) {
|
|
645
645
|
runCommandOrThrow( installer.command, installer.args, zoteroDir );
|
|
646
646
|
}
|
|
647
|
-
if (
|
|
648
|
-
|
|
649
|
-
throw new Error( 'translators are not synced. Run: citeclaw translators sync' );
|
|
647
|
+
if ( translatorsNeedSync() ) {
|
|
648
|
+
syncMergedTranslators();
|
|
650
649
|
}
|
|
651
650
|
}
|
|
652
651
|
|
|
@@ -670,7 +669,7 @@ function ensureStyleRuntime() {
|
|
|
670
669
|
if ( fileExists( cslDir ) && fileExists( localeDir ) ) {
|
|
671
670
|
return;
|
|
672
671
|
}
|
|
673
|
-
|
|
672
|
+
syncStyles( {} );
|
|
674
673
|
}
|
|
675
674
|
|
|
676
675
|
function ensureDefaultStyleSources() {
|
|
@@ -1505,7 +1504,7 @@ async function runCitationFromPdf( pdfPath, options ) {
|
|
|
1505
1504
|
} );
|
|
1506
1505
|
}
|
|
1507
1506
|
|
|
1508
|
-
|
|
1507
|
+
function syncStyles( options ) {
|
|
1509
1508
|
ensureDirs();
|
|
1510
1509
|
fs.mkdirSync( cslDir, { recursive: true } );
|
|
1511
1510
|
fs.mkdirSync( localeDir, { recursive: true } );
|