UNPKG

myst-cli

Version:
38 lines 1.62 kB
import type { CitationRenderer, CSL } from 'citation-js-utils'; import type { GenericNode, GenericParent } from 'myst-common'; import type { SingleCitationRenderer } from './types.js'; import type { VFile } from 'vfile'; import type { ISession } from '../session/types.js'; /** * Resolve the given doi.org DOI URL into its BibTeX metadata * * @param session - CLI session * @param url - doi.org DOI URL */ export declare function resolveDOIAsBibTeX(session: ISession, url: string): Promise<CSL[] | undefined>; /** * Resolve the given doi.org DOI URL into its CSL-JSON metadata * * @param session - CLI session * @param url - doi.org DOI URL */ export declare function resolveDOIAsCSLJSON(session: ISession, url: string): Promise<CSL[] | undefined>; /** * Fetch CSL-JSON formatted metadata for the given doi.org DOI * * @param session - CLI session * @param doiString - DOI * @param vfile * @param node */ export declare function resolveDoiOrg(session: ISession, doiString: string): Promise<CSL[] | undefined>; /** * Fetch DOI from doi.org to see if it resolves */ export declare function doiOrgResolves(session: ISession, doiString: string): Promise<boolean>; export declare function getCitation(session: ISession, vfile: VFile, doiString: string, node?: GenericNode): Promise<SingleCitationRenderer | null>; /** * Find in-line DOIs and add them to the citation renderer */ export declare function transformLinkedDOIs(session: ISession, vfile: VFile, mdast: GenericParent, doiRenderer: Record<string, SingleCitationRenderer>, path: string): Promise<CitationRenderer>; //# sourceMappingURL=dois.d.ts.map