@ncukondo/reference-manager 0.29.6 → 0.30.0
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/dist/chunks/{SearchableMultiSelect-28VG3xy7.js → SearchableMultiSelect-CpCrb-G1.js} +2 -2
- package/dist/chunks/{SearchableMultiSelect-28VG3xy7.js.map → SearchableMultiSelect-CpCrb-G1.js.map} +1 -1
- package/dist/chunks/{action-menu-C4nIA-Sl.js → action-menu-DwHspdjM.js} +3 -3
- package/dist/chunks/{action-menu-C4nIA-Sl.js.map → action-menu-DwHspdjM.js.map} +1 -1
- package/dist/chunks/{checker-hg3aQ_DJ.js → checker-DhHnmgq0.js} +4 -4
- package/dist/chunks/{checker-hg3aQ_DJ.js.map → checker-DhHnmgq0.js.map} +1 -1
- package/dist/chunks/{crossref-client-DozuWO_S.js → crossref-client-DG4AA_Ax.js} +2 -2
- package/dist/chunks/{crossref-client-DozuWO_S.js.map → crossref-client-DG4AA_Ax.js.map} +1 -1
- package/dist/chunks/{fix-interaction-B6FGIOz8.js → fix-interaction-CIstlQZN.js} +5 -5
- package/dist/chunks/{fix-interaction-B6FGIOz8.js.map → fix-interaction-CIstlQZN.js.map} +1 -1
- package/dist/chunks/{index-CGV9-f_j.js → index-4KRTx7Fg.js} +3 -3
- package/dist/chunks/index-4KRTx7Fg.js.map +1 -0
- package/dist/chunks/{index-KAr1YWtM.js → index-AvQ2XqcY.js} +4 -4
- package/dist/chunks/{index-KAr1YWtM.js.map → index-AvQ2XqcY.js.map} +1 -1
- package/dist/chunks/{index-Czz9ZhIH.js → index-C7BVI2qL.js} +70 -40
- package/dist/chunks/index-C7BVI2qL.js.map +1 -0
- package/dist/chunks/{index-6Aild0Uk.js → index-DoOmAYKd.js} +450 -80
- package/dist/chunks/index-DoOmAYKd.js.map +1 -0
- package/dist/chunks/{loader-B6sytmQd.js → loader-6TuXzBbw.js} +44 -1
- package/dist/chunks/loader-6TuXzBbw.js.map +1 -0
- package/dist/chunks/{pubmed-client-DJdEV1PO.js → pubmed-client-CyaNS4Y1.js} +2 -2
- package/dist/chunks/{pubmed-client-DJdEV1PO.js.map → pubmed-client-CyaNS4Y1.js.map} +1 -1
- package/dist/chunks/{reference-select-Hc3wU8jL.js → reference-select-CES2SpzK.js} +3 -3
- package/dist/chunks/{reference-select-Hc3wU8jL.js.map → reference-select-CES2SpzK.js.map} +1 -1
- package/dist/chunks/{style-select-CcRnu0nC.js → style-select-DrECo2bW.js} +3 -3
- package/dist/chunks/{style-select-CcRnu0nC.js.map → style-select-DrECo2bW.js.map} +1 -1
- package/dist/cli/commands/fulltext.d.ts +8 -1
- package/dist/cli/commands/fulltext.d.ts.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/schema.d.ts +77 -1
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/features/operations/fulltext/builtin-converters.d.ts +13 -0
- package/dist/features/operations/fulltext/builtin-converters.d.ts.map +1 -0
- package/dist/features/operations/fulltext/command-template.d.ts +16 -0
- package/dist/features/operations/fulltext/command-template.d.ts.map +1 -0
- package/dist/features/operations/fulltext/convert.d.ts +16 -1
- package/dist/features/operations/fulltext/convert.d.ts.map +1 -1
- package/dist/features/operations/fulltext/converter-check.d.ts +8 -0
- package/dist/features/operations/fulltext/converter-check.d.ts.map +1 -0
- package/dist/features/operations/fulltext/converter-resolver.d.ts +20 -0
- package/dist/features/operations/fulltext/converter-resolver.d.ts.map +1 -0
- package/dist/features/operations/fulltext/custom-converter.d.ts +17 -0
- package/dist/features/operations/fulltext/custom-converter.d.ts.map +1 -0
- package/dist/features/operations/fulltext/fetch.d.ts.map +1 -1
- package/dist/features/operations/fulltext/pdf-converter.d.ts +39 -0
- package/dist/features/operations/fulltext/pdf-converter.d.ts.map +1 -0
- package/dist/index.js +1 -1
- package/dist/mcp/tools/fulltext.d.ts +4 -0
- package/dist/mcp/tools/fulltext.d.ts.map +1 -1
- package/dist/server/routes/references.d.ts.map +1 -1
- package/dist/server.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/index-6Aild0Uk.js.map +0 -1
- package/dist/chunks/index-CGV9-f_j.js.map +0 -1
- package/dist/chunks/index-Czz9ZhIH.js.map +0 -1
- package/dist/chunks/loader-B6sytmQd.js.map +0 -1
|
@@ -5,9 +5,9 @@ import { promises, readFileSync, existsSync, mkdirSync, writeFileSync } from "no
|
|
|
5
5
|
import * as os from "node:os";
|
|
6
6
|
import * as path from "node:path";
|
|
7
7
|
import path__default, { join, basename, dirname } from "node:path";
|
|
8
|
-
import { n as normalizePathForOutput, d as deleteDirectoryIfEmpty, p as parseFilename, i as isReservedRole, e as ensureDirectory, a as addAttachment, R as RESERVED_ROLES, b as generateFilename, c as findFulltextFiles, h as findFulltextFile, j as extensionToFormat, k as fulltextAttach, l as fulltextDiscover, m as fulltextFetch, o as fulltextConvert, q as fulltextGet, r as getExtension, s as getDefaultExportFromCjs, B as BUILTIN_STYLES, t as getFulltextAttachmentTypes, u as startServerWithFileWatcher } from "./index-
|
|
8
|
+
import { n as normalizePathForOutput, d as deleteDirectoryIfEmpty, p as parseFilename, i as isReservedRole, e as ensureDirectory, a as addAttachment, R as RESERVED_ROLES, b as generateFilename, c as findFulltextFiles, h as findFulltextFile, j as extensionToFormat, k as fulltextAttach, l as fulltextDiscover, m as fulltextFetch, o as fulltextConvert, q as fulltextGet, r as getExtension, s as getDefaultExportFromCjs, B as BUILTIN_STYLES, t as getFulltextAttachmentTypes, u as startServerWithFileWatcher } from "./index-DoOmAYKd.js";
|
|
9
9
|
import { readFile, unlink, stat, readdir, rename } from "node:fs/promises";
|
|
10
|
-
import { o as openWithSystemApp, l as loadConfig, e as getDefaultCurrentDirConfigFilename, h as getDefaultUserConfigPath } from "./loader-
|
|
10
|
+
import { o as openWithSystemApp, l as loadConfig, e as getDefaultCurrentDirConfigFilename, h as getDefaultUserConfigPath } from "./loader-6TuXzBbw.js";
|
|
11
11
|
import { spawn, spawnSync } from "node:child_process";
|
|
12
12
|
import process$1, { stdin, stdout } from "node:process";
|
|
13
13
|
import * as readline from "node:readline";
|
|
@@ -19,7 +19,7 @@ import "@citation-js/plugin-csl";
|
|
|
19
19
|
import { ZodOptional as ZodOptional$2, z } from "zod";
|
|
20
20
|
import { serve } from "@hono/node-server";
|
|
21
21
|
const name = "@ncukondo/reference-manager";
|
|
22
|
-
const version$1 = "0.
|
|
22
|
+
const version$1 = "0.30.0";
|
|
23
23
|
const description$1 = "A local reference management tool using CSL-JSON as the single source of truth";
|
|
24
24
|
const packageJson = {
|
|
25
25
|
name,
|
|
@@ -901,15 +901,15 @@ class OperationsLibrary {
|
|
|
901
901
|
}
|
|
902
902
|
// High-level operations
|
|
903
903
|
async search(options) {
|
|
904
|
-
const { searchReferences } = await import("./index-
|
|
904
|
+
const { searchReferences } = await import("./index-DoOmAYKd.js").then((n) => n.E);
|
|
905
905
|
return searchReferences(this.library, options);
|
|
906
906
|
}
|
|
907
907
|
async list(options) {
|
|
908
|
-
const { listReferences } = await import("./index-
|
|
908
|
+
const { listReferences } = await import("./index-DoOmAYKd.js").then((n) => n.D);
|
|
909
909
|
return listReferences(this.library, options ?? {});
|
|
910
910
|
}
|
|
911
911
|
async cite(options) {
|
|
912
|
-
const { citeReferences } = await import("./index-
|
|
912
|
+
const { citeReferences } = await import("./index-DoOmAYKd.js").then((n) => n.C);
|
|
913
913
|
const defaultStyle = options.defaultStyle ?? this.citationConfig?.defaultStyle;
|
|
914
914
|
const cslDirectory = options.cslDirectory ?? this.citationConfig?.cslDirectory;
|
|
915
915
|
const mergedOptions = {
|
|
@@ -920,36 +920,36 @@ class OperationsLibrary {
|
|
|
920
920
|
return citeReferences(this.library, mergedOptions);
|
|
921
921
|
}
|
|
922
922
|
async import(inputs, options) {
|
|
923
|
-
const { addReferences } = await import("./index-
|
|
923
|
+
const { addReferences } = await import("./index-DoOmAYKd.js").then((n) => n.z);
|
|
924
924
|
return addReferences(inputs, this.library, options ?? {});
|
|
925
925
|
}
|
|
926
926
|
async check(options) {
|
|
927
|
-
const { checkReferences } = await import("./index-
|
|
927
|
+
const { checkReferences } = await import("./index-DoOmAYKd.js").then((n) => n.A);
|
|
928
928
|
return checkReferences(this.library, options);
|
|
929
929
|
}
|
|
930
930
|
// Attachment operations
|
|
931
931
|
async attachAdd(options) {
|
|
932
|
-
const { addAttachment: addAttachment2 } = await import("./index-
|
|
932
|
+
const { addAttachment: addAttachment2 } = await import("./index-4KRTx7Fg.js");
|
|
933
933
|
return addAttachment2(this.library, options);
|
|
934
934
|
}
|
|
935
935
|
async attachList(options) {
|
|
936
|
-
const { listAttachments: listAttachments2 } = await import("./index-
|
|
936
|
+
const { listAttachments: listAttachments2 } = await import("./index-4KRTx7Fg.js");
|
|
937
937
|
return listAttachments2(this.library, options);
|
|
938
938
|
}
|
|
939
939
|
async attachGet(options) {
|
|
940
|
-
const { getAttachment: getAttachment2 } = await import("./index-
|
|
940
|
+
const { getAttachment: getAttachment2 } = await import("./index-4KRTx7Fg.js");
|
|
941
941
|
return getAttachment2(this.library, options);
|
|
942
942
|
}
|
|
943
943
|
async attachDetach(options) {
|
|
944
|
-
const { detachAttachment: detachAttachment2 } = await import("./index-
|
|
944
|
+
const { detachAttachment: detachAttachment2 } = await import("./index-4KRTx7Fg.js");
|
|
945
945
|
return detachAttachment2(this.library, options);
|
|
946
946
|
}
|
|
947
947
|
async attachSync(options) {
|
|
948
|
-
const { syncAttachments: syncAttachments2 } = await import("./index-
|
|
948
|
+
const { syncAttachments: syncAttachments2 } = await import("./index-4KRTx7Fg.js");
|
|
949
949
|
return syncAttachments2(this.library, options);
|
|
950
950
|
}
|
|
951
951
|
async attachOpen(options) {
|
|
952
|
-
const { openAttachment: openAttachment2 } = await import("./index-
|
|
952
|
+
const { openAttachment: openAttachment2 } = await import("./index-4KRTx7Fg.js");
|
|
953
953
|
return openAttachment2(this.library, options);
|
|
954
954
|
}
|
|
955
955
|
}
|
|
@@ -1814,7 +1814,7 @@ function getAttachExitCode(result) {
|
|
|
1814
1814
|
}
|
|
1815
1815
|
async function executeInteractiveSelect$2(context, config2) {
|
|
1816
1816
|
const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
|
|
1817
|
-
const { selectReferencesOrExit } = await import("./reference-select-
|
|
1817
|
+
const { selectReferencesOrExit } = await import("./reference-select-CES2SpzK.js");
|
|
1818
1818
|
const allReferences = await context.library.getAll();
|
|
1819
1819
|
const identifiers = await withAlternateScreen2(
|
|
1820
1820
|
() => selectReferencesOrExit(allReferences, { multiSelect: false }, config2.cli.tui)
|
|
@@ -2479,7 +2479,7 @@ async function handleCheckAction(identifiers, options, globalOpts) {
|
|
|
2479
2479
|
const jsonOptions = buildJsonOptionsFromRefs(options, outputFormat, result, allRefs);
|
|
2480
2480
|
outputCheckResult(result, outputFormat, jsonOptions);
|
|
2481
2481
|
if (options.fix && result.summary.warnings > 0 && allRefs) {
|
|
2482
|
-
const { runFixInteraction } = await import("./fix-interaction-
|
|
2482
|
+
const { runFixInteraction } = await import("./fix-interaction-CIstlQZN.js");
|
|
2483
2483
|
const findItem = (id2) => allRefs.find((item) => item.id === id2);
|
|
2484
2484
|
const fixResult = await runFixInteraction(result.results, context.library, findItem);
|
|
2485
2485
|
const removedSuffix = fixResult.removed.length > 0 ? `, ${fixResult.removed.length} removed` : "";
|
|
@@ -2547,7 +2547,7 @@ function outputCheckError(error, format2) {
|
|
|
2547
2547
|
}
|
|
2548
2548
|
async function selectReferencesInteractively(context, config2) {
|
|
2549
2549
|
const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
|
|
2550
|
-
const { selectReferenceItemsOrExit } = await import("./reference-select-
|
|
2550
|
+
const { selectReferenceItemsOrExit } = await import("./reference-select-CES2SpzK.js");
|
|
2551
2551
|
const allReferences = await context.library.getAll();
|
|
2552
2552
|
if (allReferences.length === 0) {
|
|
2553
2553
|
process.stderr.write("No references in library.\n");
|
|
@@ -2615,8 +2615,8 @@ function getCiteExitCode(result) {
|
|
|
2615
2615
|
}
|
|
2616
2616
|
async function executeInteractiveCite(options, context, config2) {
|
|
2617
2617
|
const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
|
|
2618
|
-
const { runCiteFlow } = await import("./index-
|
|
2619
|
-
const { buildStyleChoices, listCustomStyles } = await import("./style-select-
|
|
2618
|
+
const { runCiteFlow } = await import("./index-AvQ2XqcY.js");
|
|
2619
|
+
const { buildStyleChoices, listCustomStyles } = await import("./style-select-DrECo2bW.js");
|
|
2620
2620
|
const { search } = await import("./file-watcher-CWHg1yol.js").then((n) => n.B);
|
|
2621
2621
|
const { tokenize } = await import("./file-watcher-CWHg1yol.js").then((n) => n.A);
|
|
2622
2622
|
const { checkTTY } = await import("./tty-BMyaEOhX.js");
|
|
@@ -7217,7 +7217,7 @@ function formatEditOutput(result) {
|
|
|
7217
7217
|
}
|
|
7218
7218
|
async function executeInteractiveEdit(options, context, config2) {
|
|
7219
7219
|
const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
|
|
7220
|
-
const { selectReferencesOrExit } = await import("./reference-select-
|
|
7220
|
+
const { selectReferencesOrExit } = await import("./reference-select-CES2SpzK.js");
|
|
7221
7221
|
const allReferences = await context.library.getAll();
|
|
7222
7222
|
const identifiers = await withAlternateScreen2(
|
|
7223
7223
|
() => selectReferencesOrExit(allReferences, { multiSelect: true }, config2.cli.tui)
|
|
@@ -10659,7 +10659,10 @@ async function executeFulltextConvert(options, context) {
|
|
|
10659
10659
|
const operationOptions = {
|
|
10660
10660
|
identifier: options.identifier,
|
|
10661
10661
|
idType: options.idType,
|
|
10662
|
-
fulltextDirectory: options.fulltextDirectory
|
|
10662
|
+
fulltextDirectory: options.fulltextDirectory,
|
|
10663
|
+
from: options.from,
|
|
10664
|
+
converter: options.converter,
|
|
10665
|
+
fulltextConfig: options.fulltextConfig
|
|
10663
10666
|
};
|
|
10664
10667
|
return fulltextConvert(context.library, operationOptions);
|
|
10665
10668
|
}
|
|
@@ -10770,16 +10773,27 @@ function formatFetchErrorOutput(result) {
|
|
|
10770
10773
|
}
|
|
10771
10774
|
function formatFulltextConvertOutput(result) {
|
|
10772
10775
|
if (!result.success) {
|
|
10773
|
-
|
|
10776
|
+
const lines = [`Error: ${result.error}`];
|
|
10777
|
+
if (result.stderr) {
|
|
10778
|
+
const stderrLines = result.stderr.trim().split("\n").slice(-5);
|
|
10779
|
+
lines.push("", " stderr (last lines):");
|
|
10780
|
+
for (const line of stderrLines) {
|
|
10781
|
+
lines.push(` ${line}`);
|
|
10782
|
+
}
|
|
10783
|
+
}
|
|
10784
|
+
if (result.hints) {
|
|
10785
|
+
lines.push("", result.hints);
|
|
10786
|
+
}
|
|
10787
|
+
return lines.join("\n");
|
|
10774
10788
|
}
|
|
10775
|
-
return `Converted
|
|
10789
|
+
return `Converted to Markdown: ${result.filename}`;
|
|
10776
10790
|
}
|
|
10777
10791
|
function getFulltextExitCode(result) {
|
|
10778
10792
|
return result.success ? 0 : 1;
|
|
10779
10793
|
}
|
|
10780
10794
|
async function executeInteractiveSelect$1(context, config2, multiSelect = false) {
|
|
10781
10795
|
const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
|
|
10782
|
-
const { selectReferencesOrExit } = await import("./reference-select-
|
|
10796
|
+
const { selectReferencesOrExit } = await import("./reference-select-CES2SpzK.js");
|
|
10783
10797
|
const allReferences = await context.library.getAll();
|
|
10784
10798
|
const identifiers = await withAlternateScreen2(
|
|
10785
10799
|
() => selectReferencesOrExit(allReferences, { multiSelect }, config2.cli.tui)
|
|
@@ -11158,7 +11172,11 @@ async function handleFulltextConvertAction(identifierArg, options, globalOpts) {
|
|
|
11158
11172
|
const convertOptions = {
|
|
11159
11173
|
identifier,
|
|
11160
11174
|
fulltextDirectory: config2.attachments.directory,
|
|
11161
|
-
...options.uuid && { idType: "uuid" }
|
|
11175
|
+
...options.uuid && { idType: "uuid" },
|
|
11176
|
+
...options.from && { from: options.from },
|
|
11177
|
+
...options.converter && { converter: options.converter },
|
|
11178
|
+
...options.force && { force: options.force },
|
|
11179
|
+
fulltextConfig: config2.fulltext
|
|
11162
11180
|
};
|
|
11163
11181
|
const result = await executeFulltextConvert(convertOptions, context);
|
|
11164
11182
|
const output = formatFulltextConvertOutput(result);
|
|
@@ -32015,9 +32033,11 @@ function registerFulltextConvertTool(server, getLibraryOperations, getConfig) {
|
|
|
32015
32033
|
server.registerTool(
|
|
32016
32034
|
"fulltext_convert",
|
|
32017
32035
|
{
|
|
32018
|
-
description: "Convert an attached PMC JATS XML
|
|
32036
|
+
description: "Convert an attached fulltext file (PMC JATS XML or PDF) to Markdown for a reference. Auto-detects format (XML preferred over PDF). Use 'from' to force a specific format.",
|
|
32019
32037
|
inputSchema: {
|
|
32020
|
-
id: z.string().describe("Reference ID")
|
|
32038
|
+
id: z.string().describe("Reference ID"),
|
|
32039
|
+
from: z.enum(["xml", "pdf"]).optional().describe("Input format: xml, pdf (default: auto-detect)"),
|
|
32040
|
+
converter: z.string().optional().describe("PDF converter: auto, marker, docling, mineru, pymupdf, or custom name")
|
|
32021
32041
|
}
|
|
32022
32042
|
},
|
|
32023
32043
|
async (args) => {
|
|
@@ -32025,11 +32045,18 @@ function registerFulltextConvertTool(server, getLibraryOperations, getConfig) {
|
|
|
32025
32045
|
const config2 = getConfig();
|
|
32026
32046
|
const result = await fulltextConvert(libraryOps, {
|
|
32027
32047
|
identifier: args.id,
|
|
32028
|
-
fulltextDirectory: config2.attachments.directory
|
|
32048
|
+
fulltextDirectory: config2.attachments.directory,
|
|
32049
|
+
from: args.from,
|
|
32050
|
+
converter: args.converter,
|
|
32051
|
+
fulltextConfig: config2.fulltext
|
|
32029
32052
|
});
|
|
32030
32053
|
if (!result.success) {
|
|
32054
|
+
const errorParts = [result.error ?? "Unknown error"];
|
|
32055
|
+
if (result.hints) {
|
|
32056
|
+
errorParts.push(result.hints);
|
|
32057
|
+
}
|
|
32031
32058
|
return {
|
|
32032
|
-
content: [{ type: "text", text:
|
|
32059
|
+
content: [{ type: "text", text: errorParts.join("\n\n") }],
|
|
32033
32060
|
isError: true
|
|
32034
32061
|
};
|
|
32035
32062
|
}
|
|
@@ -32037,7 +32064,7 @@ function registerFulltextConvertTool(server, getLibraryOperations, getConfig) {
|
|
|
32037
32064
|
content: [
|
|
32038
32065
|
{
|
|
32039
32066
|
type: "text",
|
|
32040
|
-
text: `Converted
|
|
32067
|
+
text: `Converted to Markdown for '${args.id}': ${result.filename}`
|
|
32041
32068
|
}
|
|
32042
32069
|
]
|
|
32043
32070
|
};
|
|
@@ -32234,7 +32261,7 @@ async function mcpStart(options) {
|
|
|
32234
32261
|
async function executeRemove(options, context) {
|
|
32235
32262
|
const { identifier, idType = "id", fulltextDirectory, deleteFulltext = false } = options;
|
|
32236
32263
|
if (context.mode === "local" && deleteFulltext && fulltextDirectory) {
|
|
32237
|
-
const { removeReference } = await import("./index-
|
|
32264
|
+
const { removeReference } = await import("./index-DoOmAYKd.js").then((n) => n.x);
|
|
32238
32265
|
return removeReference(context.library, {
|
|
32239
32266
|
identifier,
|
|
32240
32267
|
idType,
|
|
@@ -32289,7 +32316,7 @@ Continue?`;
|
|
|
32289
32316
|
}
|
|
32290
32317
|
async function executeInteractiveRemove(context, config2) {
|
|
32291
32318
|
const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
|
|
32292
|
-
const { selectReferenceItemsOrExit } = await import("./reference-select-
|
|
32319
|
+
const { selectReferenceItemsOrExit } = await import("./reference-select-CES2SpzK.js");
|
|
32293
32320
|
const allReferences = await context.library.getAll();
|
|
32294
32321
|
const selectedItems = await withAlternateScreen2(
|
|
32295
32322
|
() => selectReferenceItemsOrExit(allReferences, { multiSelect: false }, config2.cli.tui)
|
|
@@ -32514,7 +32541,7 @@ async function executeInteractiveSearch(options, context, config2) {
|
|
|
32514
32541
|
validateInteractiveOptions(options);
|
|
32515
32542
|
const { checkTTY } = await import("./tty-BMyaEOhX.js");
|
|
32516
32543
|
const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
|
|
32517
|
-
const { runSearchFlow } = await import("./index-
|
|
32544
|
+
const { runSearchFlow } = await import("./index-AvQ2XqcY.js");
|
|
32518
32545
|
const { search } = await import("./file-watcher-CWHg1yol.js").then((n) => n.B);
|
|
32519
32546
|
const { tokenize } = await import("./file-watcher-CWHg1yol.js").then((n) => n.A);
|
|
32520
32547
|
checkTTY();
|
|
@@ -32533,7 +32560,7 @@ async function executeInteractiveSearch(options, context, config2) {
|
|
|
32533
32560
|
})
|
|
32534
32561
|
);
|
|
32535
32562
|
if (result.selectedItems && !result.cancelled) {
|
|
32536
|
-
const { isSideEffectAction } = await import("./action-menu-
|
|
32563
|
+
const { isSideEffectAction } = await import("./action-menu-DwHspdjM.js");
|
|
32537
32564
|
if (isSideEffectAction(result.action)) {
|
|
32538
32565
|
await executeSideEffectAction(result.action, result.selectedItems, context, config2);
|
|
32539
32566
|
return { output: "", cancelled: false, action: result.action };
|
|
@@ -32549,7 +32576,7 @@ async function executeSideEffectAction(action, items2, context, config2) {
|
|
|
32549
32576
|
switch (action) {
|
|
32550
32577
|
case "open-url": {
|
|
32551
32578
|
const { resolveDefaultUrl: resolveDefaultUrl2 } = await Promise.resolve().then(() => url);
|
|
32552
|
-
const { openWithSystemApp: openWithSystemApp2 } = await import("./loader-
|
|
32579
|
+
const { openWithSystemApp: openWithSystemApp2 } = await import("./loader-6TuXzBbw.js").then((n) => n.j);
|
|
32553
32580
|
const item = items2[0];
|
|
32554
32581
|
if (!item) return;
|
|
32555
32582
|
const url$1 = resolveDefaultUrl2(item);
|
|
@@ -32944,7 +32971,7 @@ function formatUpdateOutput(result, identifier) {
|
|
|
32944
32971
|
}
|
|
32945
32972
|
async function executeInteractiveUpdate(context, config2) {
|
|
32946
32973
|
const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
|
|
32947
|
-
const { selectReferencesOrExit } = await import("./reference-select-
|
|
32974
|
+
const { selectReferencesOrExit } = await import("./reference-select-CES2SpzK.js");
|
|
32948
32975
|
const allReferences = await context.library.getAll();
|
|
32949
32976
|
const identifiers = await withAlternateScreen2(
|
|
32950
32977
|
() => selectReferencesOrExit(allReferences, { multiSelect: false }, config2.cli.tui)
|
|
@@ -33239,7 +33266,7 @@ function getUrlExitCode(result) {
|
|
|
33239
33266
|
}
|
|
33240
33267
|
async function executeInteractiveSelect(context, config2) {
|
|
33241
33268
|
const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
|
|
33242
|
-
const { selectReferencesOrExit } = await import("./reference-select-
|
|
33269
|
+
const { selectReferencesOrExit } = await import("./reference-select-CES2SpzK.js");
|
|
33243
33270
|
const allReferences = await context.library.getAll();
|
|
33244
33271
|
const identifiers = await withAlternateScreen2(
|
|
33245
33272
|
() => selectReferencesOrExit(allReferences, { multiSelect: false }, config2.cli.tui)
|
|
@@ -33796,7 +33823,7 @@ function shouldAutoFetch(cliFlag, configEnabled) {
|
|
|
33796
33823
|
return configEnabled;
|
|
33797
33824
|
}
|
|
33798
33825
|
async function performAutoFetch(addedItems, context, config2) {
|
|
33799
|
-
const { fulltextFetch: fulltextFetch2 } = await import("./index-
|
|
33826
|
+
const { fulltextFetch: fulltextFetch2 } = await import("./index-DoOmAYKd.js").then((n) => n.w);
|
|
33800
33827
|
const fetchResults = await autoFetchFulltext(addedItems, context, {
|
|
33801
33828
|
fulltextConfig: config2.fulltext,
|
|
33802
33829
|
fulltextDirectory: config2.attachments.directory,
|
|
@@ -34049,7 +34076,10 @@ function registerFulltextCommand(program) {
|
|
|
34049
34076
|
fulltextCmd.command("fetch").description("Download OA full text and auto-attach to a reference").argument("[identifier]", "Citation key or UUID (interactive selection if omitted)").option("--source <source>", "Preferred source: pmc, arxiv, unpaywall, core").option("-f, --force", "Overwrite existing fulltext attachment").option("--uuid", "Interpret identifier as UUID").action(async (identifier, options) => {
|
|
34050
34077
|
await handleFulltextFetchAction(identifier, options, program.opts());
|
|
34051
34078
|
});
|
|
34052
|
-
fulltextCmd.command("convert").description("Convert attached
|
|
34079
|
+
fulltextCmd.command("convert").description("Convert attached fulltext (XML or PDF) to Markdown").argument("[identifier]", "Citation key or UUID (interactive selection if omitted)").option("--uuid", "Interpret identifier as UUID").option("--from <format>", "Input format: xml, pdf (default: auto-detect)").option(
|
|
34080
|
+
"--converter <name>",
|
|
34081
|
+
"PDF converter: auto, marker, docling, mineru, pymupdf, or custom name"
|
|
34082
|
+
).option("--force", "Overwrite existing markdown attachment").action(async (identifier, options) => {
|
|
34053
34083
|
await handleFulltextConvertAction(identifier, options, program.opts());
|
|
34054
34084
|
});
|
|
34055
34085
|
}
|
|
@@ -34088,4 +34118,4 @@ export {
|
|
|
34088
34118
|
restoreStdinAfterInk as r,
|
|
34089
34119
|
syncAttachments as s
|
|
34090
34120
|
};
|
|
34091
|
-
//# sourceMappingURL=index-
|
|
34121
|
+
//# sourceMappingURL=index-C7BVI2qL.js.map
|