-
Notifications
You must be signed in to change notification settings - Fork 12
419 global importer update #497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 384-miga-task
Are you sure you want to change the base?
Conversation
All importers now use milestones, globalReferences and randomUUIDs. All importers now also have a separate "cellMetadata.ts" file containing all the added metadata fileds to the actual codex cells needed for the specific file importer.
It should work now hopefully
- Introduced `migration_hoistDocumentContextToNotebookMetadata` to consolidate per-cell documentContext into notebook-level metadata. - Updated `extension.ts` to include the new migration function. - Enhanced `migrationUtils.ts` with logic to handle hoisting and ensure idempotency. - Added tests to validate the migration behavior and ensure consistent handling of documentContext across cells. - Updated type definitions to include new metadata fields for originalFileName and importContext.
- Updated `createTempNotebook` function to use the workspace folder path as the base directory for temporary notebook files instead of the system's temporary directory. - This change ensures that temporary files are created within the context of the current workspace, improving organization and accessibility.
- Added importContext to various importer forms and cell metadata functions, consolidating file-related information such as fileName, originalFileName, fileSize, and importTimestamp. - Removed redundant documentContext from cell metadata to streamline data handling. - Ensured consistent implementation across audio, biblica, docx, ebibleCorpus, indesign, macula, markdown, obs, pdf, plaintext, recursiveTextSplitter, spreadsheet, subtitles, tms, and usfm importers.
…e-ben-update hoist metadata
| console.warn(`[USFM Export] Skipping ${fileName} - not imported with USFM importer (importerType: ${importerType}, corpusMarker: ${corpusMarker})`); | ||
| vscode.window.showWarningMessage(`Skipping ${fileName} - not imported with USFM importer`); | ||
| continue; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
USFM export validation mismatches detection criteria
Medium Severity
The USFM file detection logic (lines 1280-1292) routes files to the USFM exporter based on several criteria: importerType === 'usfm', NT/OT corpus markers with USFM file extensions, or any file with a .usfm/.sfm extension. However, the export function's validation (line 906) only accepts files where importerType === 'usfm-experimental' OR corpusMarker === 'usfm'. Files detected through the other criteria (like importerType === 'usfm' or NT/OT with USFM extension) will be routed to the exporter but then skipped with a warning, effectively failing silently.
Additional Locations (1)
…ferences in metadata - Updated the JSON and spreadsheet importers to generate unique UUIDs for each cell ID instead of relying on legacy naming conventions. - Introduced global references in the metadata structure for both JSON and spreadsheet cells, allowing for better tracking and linking of content. - Refactored the handling of global references in the spreadsheet importer to improve alignment and mapping of imported content. - Adjusted type definitions to reflect changes in column mapping and metadata structure.
All importers now use global references, new UUIDs and milestones.
Note
Adds new export capability and aligns metadata/importers with global references and UUIDs.
exportUsfmRoundtripwithlineMappingswhen available.globalReferences, UUIDs, and milestones; updates exporter to merge segmented paragraphs, enforce UTF‑8, and preserve unmodified IDML resources.importContext; addssaveFilecommand to provider.documentContextintometadata.importContext, promotes consistentimporterType/originalFileName; adds tests; stops normalizingcorpusMarker; improves MaculafileDisplayNamehandling.originalFileNameandimportContext; export UI lists USFM; plugin selection shows “in BETA”; improves webview refresh matching.Written by Cursor Bugbot for commit d015813. This will update automatically on new commits. Configure here.