mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-24 08:12:24 +02:00
This commit is contained in:
parent
217fd20985
commit
5a5a8526c3
@ -403,6 +403,7 @@ function useMenu(props: Props) {
|
||||
label: module.fullLabel(moduleSource),
|
||||
click: () => onImportModuleClickRef.current(module, moduleSource),
|
||||
});
|
||||
if (module.separatorAfter) importItems.push({ type: 'separator' });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -59,6 +59,39 @@ export default class InteropService {
|
||||
description: _('Joplin Export File'),
|
||||
}, () => new InteropService_Importer_Jex()),
|
||||
|
||||
makeImportModule({
|
||||
format: 'raw',
|
||||
sources: [FileSystemItem.Directory],
|
||||
description: _('Joplin Export Directory'),
|
||||
separatorAfter: true,
|
||||
}, () => new InteropService_Importer_Raw()),
|
||||
|
||||
makeImportModule({
|
||||
format: 'enex',
|
||||
fileExtensions: ['enex'],
|
||||
sources: [FileSystemItem.File],
|
||||
description: _('Evernote Export File (as HTML)'),
|
||||
supportsMobile: false,
|
||||
outputFormat: ImportModuleOutputFormat.Html,
|
||||
}, dynamicRequireModuleFactory('./InteropService_Importer_EnexToHtml')),
|
||||
|
||||
makeImportModule({
|
||||
format: 'enex',
|
||||
fileExtensions: ['enex'],
|
||||
sources: [FileSystemItem.File],
|
||||
description: _('Evernote Export File (as Markdown)'),
|
||||
supportsMobile: false,
|
||||
isDefault: true,
|
||||
}, dynamicRequireModuleFactory('./InteropService_Importer_EnexToMd')),
|
||||
|
||||
makeImportModule({
|
||||
format: 'html',
|
||||
fileExtensions: ['html'],
|
||||
sources: [FileSystemItem.File, FileSystemItem.Directory],
|
||||
isNoteArchive: false, // Tells whether the file can contain multiple notes (eg. Enex or Jex format)
|
||||
description: _('HTML document'),
|
||||
}, () => new InteropService_Importer_Md()),
|
||||
|
||||
makeImportModule({
|
||||
format: 'md',
|
||||
fileExtensions: ['md', 'markdown', 'txt', 'html'],
|
||||
@ -76,28 +109,12 @@ export default class InteropService {
|
||||
}, () => new InteropService_Importer_Md_frontmatter()),
|
||||
|
||||
makeImportModule({
|
||||
format: 'raw',
|
||||
sources: [FileSystemItem.Directory],
|
||||
description: _('Joplin Export Directory'),
|
||||
}, () => new InteropService_Importer_Raw()),
|
||||
|
||||
makeImportModule({
|
||||
format: 'enex',
|
||||
fileExtensions: ['enex'],
|
||||
sources: [FileSystemItem.File],
|
||||
description: _('Evernote Export File (as Markdown)'),
|
||||
supportsMobile: false,
|
||||
isDefault: true,
|
||||
}, dynamicRequireModuleFactory('./InteropService_Importer_EnexToMd')),
|
||||
|
||||
makeImportModule({
|
||||
format: 'enex',
|
||||
fileExtensions: ['enex'],
|
||||
sources: [FileSystemItem.File],
|
||||
description: _('Evernote Export File (as HTML)'),
|
||||
supportsMobile: false,
|
||||
outputFormat: ImportModuleOutputFormat.Html,
|
||||
}, dynamicRequireModuleFactory('./InteropService_Importer_EnexToHtml')),
|
||||
format: 'txt',
|
||||
fileExtensions: ['txt'],
|
||||
sources: [FileSystemItem.File, FileSystemItem.Directory],
|
||||
isNoteArchive: false, // Tells whether the file can contain multiple notes (eg. Enex or Jex format)
|
||||
description: _('Text document'),
|
||||
}, () => new InteropService_Importer_Md()),
|
||||
];
|
||||
|
||||
const exportModules = [
|
||||
|
@ -10,6 +10,7 @@ interface BaseMetadata {
|
||||
fileExtensions: string[];
|
||||
description: string;
|
||||
isDefault: boolean;
|
||||
separatorAfter: boolean; // this isn't a property of the importer, but of how it should be displayed in the GUI
|
||||
|
||||
supportsMobile: boolean;
|
||||
|
||||
@ -51,6 +52,7 @@ const defaultBaseMetadata = {
|
||||
isNoteArchive: true,
|
||||
supportsMobile: true,
|
||||
isDefault: false,
|
||||
separatorAfter: false,
|
||||
};
|
||||
|
||||
const moduleFullLabel = (metadata: ImportMetadata|ExportMetadata, moduleSource: FileSystemItem = null) => {
|
||||
|
Loading…
Reference in New Issue
Block a user