feat: Initial clean release of CHM
一些检查失败了
automerge / automerge (push) Has been cancelled
react-native-android-build-apk / AssembleRelease (push) Has been cancelled
Build macOS M1 / Main (push) Has been cancelled
Joplin Continuous Integration / Main (macos-15-intel) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-11-vs2026-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-2025) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04-arm) (push) Has been cancelled
Joplin UI tests / Main (ubuntu-22.04) (push) Has been cancelled
Joplin UI tests / Main (windows-2025) (push) Has been cancelled
Joplin UI tests / Mobile (push) Has been cancelled
Close stale issues / ProcessStaleIssues (push) Has been cancelled
一些检查失败了
automerge / automerge (push) Has been cancelled
react-native-android-build-apk / AssembleRelease (push) Has been cancelled
Build macOS M1 / Main (push) Has been cancelled
Joplin Continuous Integration / Main (macos-15-intel) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-11-vs2026-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-2025) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04-arm) (push) Has been cancelled
Joplin UI tests / Main (ubuntu-22.04) (push) Has been cancelled
Joplin UI tests / Main (windows-2025) (push) Has been cancelled
Joplin UI tests / Mobile (push) Has been cancelled
Close stale issues / ProcessStaleIssues (push) Has been cancelled
这个提交包含在:
@@ -0,0 +1,50 @@
|
||||
/* eslint-disable multiline-comment-style */
|
||||
|
||||
import InteropService from '../../interop/InteropService';
|
||||
import InteropService_Exporter_Custom from '../../interop/InteropService_Exporter_Custom';
|
||||
import InteropService_Importer_Custom from '../../interop/InteropService_Importer_Custom';
|
||||
import { makeExportModule, makeImportModule } from '../../interop/Module';
|
||||
import { ExportModuleOutputFormat, ModuleType } from '../../interop/types';
|
||||
import { ExportModule, ImportModule } from './types';
|
||||
|
||||
/**
|
||||
* Provides a way to create modules to import external data into Joplin or to export notes into any arbitrary format.
|
||||
*
|
||||
* [View the demo plugin](https://github.com/laurent22/joplin/tree/dev/packages/app-cli/tests/support/plugins/json_export)
|
||||
*
|
||||
* To implement an import or export module, you would simply define an object with various event handlers that are called
|
||||
* by the application during the import/export process.
|
||||
*
|
||||
* See the documentation of the [[ExportModule]] and [[ImportModule]] for more information.
|
||||
*
|
||||
* You may also want to refer to the Joplin API documentation to see the list of properties for each item (note, notebook, etc.) - https://joplinapp.org/help/api/references/rest_api
|
||||
*
|
||||
* <span class="platform-desktop">desktop</span>: While it is possible to register import and export
|
||||
* modules on mobile, there is no GUI to activate them.
|
||||
*/
|
||||
export default class JoplinInterop {
|
||||
|
||||
public async registerExportModule(module: ExportModule) {
|
||||
const internalModule = makeExportModule({
|
||||
...module,
|
||||
format: module.format as ExportModuleOutputFormat,
|
||||
type: ModuleType.Exporter,
|
||||
fileExtensions: module.fileExtensions ? module.fileExtensions : [],
|
||||
}, () => new InteropService_Exporter_Custom(module));
|
||||
|
||||
return InteropService.instance().registerModule(internalModule);
|
||||
}
|
||||
|
||||
public async registerImportModule(module: ImportModule) {
|
||||
const internalModule = makeImportModule({
|
||||
...module,
|
||||
type: ModuleType.Importer,
|
||||
fileExtensions: module.fileExtensions ? module.fileExtensions : [],
|
||||
}, () => {
|
||||
return new InteropService_Importer_Custom(module);
|
||||
});
|
||||
|
||||
return InteropService.instance().registerModule(internalModule);
|
||||
}
|
||||
|
||||
}
|
||||
在新工单中引用
屏蔽一个用户