citeclaw 2.0.5 → 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 +6 -6
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
|
@@ -612,6 +612,7 @@ function ensureDefaultZoteroSource() {
|
|
|
612
612
|
throw new Error( 'git is required to update bundled zotero source' );
|
|
613
613
|
}
|
|
614
614
|
runCommandOrThrow( 'git', [ '-C', zoteroDir, 'pull', '--ff-only' ] );
|
|
615
|
+
runCommandOrThrow( 'git', [ '-C', zoteroDir, 'submodule', 'update', '--init', '--recursive' ] );
|
|
615
616
|
}
|
|
616
617
|
return;
|
|
617
618
|
}
|
|
@@ -621,7 +622,7 @@ function ensureDefaultZoteroSource() {
|
|
|
621
622
|
);
|
|
622
623
|
}
|
|
623
624
|
fs.mkdirSync( path.dirname( zoteroDir ), { recursive: true } );
|
|
624
|
-
runCommandOrThrow( 'git', [ 'clone', '--depth', '1', defaultZoteroGitSource, zoteroDir ] );
|
|
625
|
+
runCommandOrThrow( 'git', [ 'clone', '--depth', '1', '--recurse-submodules', defaultZoteroGitSource, zoteroDir ] );
|
|
625
626
|
}
|
|
626
627
|
|
|
627
628
|
function bootstrapLocalEnvironment() {
|
|
@@ -643,9 +644,8 @@ function bootstrapLocalEnvironment() {
|
|
|
643
644
|
if ( !fileExists( path.join( zoteroDir, 'node_modules' ) ) ) {
|
|
644
645
|
runCommandOrThrow( installer.command, installer.args, zoteroDir );
|
|
645
646
|
}
|
|
646
|
-
if (
|
|
647
|
-
|
|
648
|
-
throw new Error( 'translators are not synced. Run: citeclaw translators sync' );
|
|
647
|
+
if ( translatorsNeedSync() ) {
|
|
648
|
+
syncMergedTranslators();
|
|
649
649
|
}
|
|
650
650
|
}
|
|
651
651
|
|
|
@@ -669,7 +669,7 @@ function ensureStyleRuntime() {
|
|
|
669
669
|
if ( fileExists( cslDir ) && fileExists( localeDir ) ) {
|
|
670
670
|
return;
|
|
671
671
|
}
|
|
672
|
-
|
|
672
|
+
syncStyles( {} );
|
|
673
673
|
}
|
|
674
674
|
|
|
675
675
|
function ensureDefaultStyleSources() {
|
|
@@ -1504,7 +1504,7 @@ async function runCitationFromPdf( pdfPath, options ) {
|
|
|
1504
1504
|
} );
|
|
1505
1505
|
}
|
|
1506
1506
|
|
|
1507
|
-
|
|
1507
|
+
function syncStyles( options ) {
|
|
1508
1508
|
ensureDirs();
|
|
1509
1509
|
fs.mkdirSync( cslDir, { recursive: true } );
|
|
1510
1510
|
fs.mkdirSync( localeDir, { recursive: true } );
|