@sinoia/hubdoc-tools 1.0.4 → 1.2.1
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/README.md +115 -34
- package/dist/__tests__/fixtures/plugins/connection-plugin/index.d.ts +15 -0
- package/dist/__tests__/fixtures/plugins/connection-plugin/index.d.ts.map +1 -0
- package/dist/__tests__/fixtures/plugins/connection-plugin/index.js +37 -0
- package/dist/__tests__/fixtures/plugins/connection-plugin/index.js.map +1 -0
- package/dist/__tests__/fixtures/plugins/scan-plugin/index.d.ts +15 -0
- package/dist/__tests__/fixtures/plugins/scan-plugin/index.d.ts.map +1 -0
- package/dist/__tests__/fixtures/plugins/scan-plugin/index.js +54 -0
- package/dist/__tests__/fixtures/plugins/scan-plugin/index.js.map +1 -0
- package/dist/__tests__/fixtures/plugins/test-plugin/index.d.ts +15 -0
- package/dist/__tests__/fixtures/plugins/test-plugin/index.d.ts.map +1 -0
- package/dist/__tests__/fixtures/plugins/test-plugin/index.js +34 -0
- package/dist/__tests__/fixtures/plugins/test-plugin/index.js.map +1 -0
- package/dist/__tests__/fixtures/plugins/workflow-plugin/index.d.ts +16 -0
- package/dist/__tests__/fixtures/plugins/workflow-plugin/index.d.ts.map +1 -0
- package/dist/__tests__/fixtures/plugins/workflow-plugin/index.js +145 -0
- package/dist/__tests__/fixtures/plugins/workflow-plugin/index.js.map +1 -0
- package/dist/api/api/authentication-api.d.ts +208 -0
- package/dist/api/api/authentication-api.d.ts.map +1 -0
- package/dist/api/api/authentication-api.js +385 -0
- package/dist/api/api/authentication-api.js.map +1 -0
- package/dist/api/api/bulk-uploads-api.d.ts +101 -0
- package/dist/api/api/bulk-uploads-api.d.ts.map +1 -0
- package/dist/api/api/bulk-uploads-api.js +195 -0
- package/dist/api/api/bulk-uploads-api.js.map +1 -0
- package/dist/api/api/contacts-api.d.ts +246 -0
- package/dist/api/api/contacts-api.d.ts.map +1 -0
- package/dist/api/api/contacts-api.js +465 -0
- package/dist/api/api/contacts-api.js.map +1 -0
- package/dist/api/api/documents-api.d.ts +267 -0
- package/dist/api/api/documents-api.d.ts.map +1 -0
- package/dist/api/api/documents-api.js +506 -0
- package/dist/api/api/documents-api.js.map +1 -0
- package/dist/api/api/folders-api.d.ts +255 -0
- package/dist/api/api/folders-api.d.ts.map +1 -0
- package/dist/api/api/folders-api.js +479 -0
- package/dist/api/api/folders-api.js.map +1 -0
- package/dist/api/api/groups-api.d.ts +246 -0
- package/dist/api/api/groups-api.d.ts.map +1 -0
- package/dist/api/api/groups-api.js +465 -0
- package/dist/api/api/groups-api.js.map +1 -0
- package/dist/api/api/permissions-api.d.ts +246 -0
- package/dist/api/api/permissions-api.d.ts.map +1 -0
- package/dist/api/api/permissions-api.js +465 -0
- package/dist/api/api/permissions-api.js.map +1 -0
- package/dist/api/api/workspaces-api.d.ts +213 -0
- package/dist/api/api/workspaces-api.d.ts.map +1 -0
- package/dist/api/api/workspaces-api.js +424 -0
- package/dist/api/api/workspaces-api.js.map +1 -0
- package/dist/api/api.d.ts +20 -0
- package/dist/api/api.d.ts.map +1 -0
- package/dist/api/api.js +38 -0
- package/dist/api/api.js.map +1 -0
- package/dist/api/base.d.ts +43 -0
- package/dist/api/base.d.ts.map +1 -0
- package/dist/api/base.js +49 -0
- package/dist/api/base.js.map +1 -0
- package/dist/api/common.d.ts +29 -0
- package/dist/api/common.d.ts.map +1 -0
- package/dist/api/common.js +109 -0
- package/dist/api/common.js.map +1 -0
- package/dist/api/configuration.d.ts +99 -0
- package/dist/api/configuration.d.ts.map +1 -0
- package/dist/api/configuration.js +49 -0
- package/dist/api/configuration.js.map +1 -0
- package/dist/api/index.d.ts +15 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +33 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/models/api-v1-documents-documents-post-request1.d.ts +34 -0
- package/dist/api/models/api-v1-documents-documents-post-request1.d.ts.map +1 -0
- package/dist/api/models/api-v1-documents-documents-post-request1.js +16 -0
- package/dist/api/models/api-v1-documents-documents-post-request1.js.map +1 -0
- package/dist/api/models/api-v1-documents-documents-post201-response.d.ts +17 -0
- package/dist/api/models/api-v1-documents-documents-post201-response.d.ts.map +1 -0
- package/dist/api/models/api-v1-documents-documents-post201-response.js +16 -0
- package/dist/api/models/api-v1-documents-documents-post201-response.js.map +1 -0
- package/dist/api/models/api-v1-documents-folders-id-get200-response-all-of-items-inner-one-of.d.ts +17 -0
- package/dist/api/models/api-v1-documents-folders-id-get200-response-all-of-items-inner-one-of.d.ts.map +1 -0
- package/dist/api/models/api-v1-documents-folders-id-get200-response-all-of-items-inner-one-of.js +16 -0
- package/dist/api/models/api-v1-documents-folders-id-get200-response-all-of-items-inner-one-of.js.map +1 -0
- package/dist/api/models/api-v1-documents-folders-id-get200-response-all-of-items-inner-one-of1.d.ts +17 -0
- package/dist/api/models/api-v1-documents-folders-id-get200-response-all-of-items-inner-one-of1.d.ts.map +1 -0
- package/dist/api/models/api-v1-documents-folders-id-get200-response-all-of-items-inner-one-of1.js +16 -0
- package/dist/api/models/api-v1-documents-folders-id-get200-response-all-of-items-inner-one-of1.js.map +1 -0
- package/dist/api/models/api-v1-documents-folders-id-get200-response-all-of-items-inner.d.ts +18 -0
- package/dist/api/models/api-v1-documents-folders-id-get200-response-all-of-items-inner.d.ts.map +1 -0
- package/dist/api/models/api-v1-documents-folders-id-get200-response-all-of-items-inner.js +16 -0
- package/dist/api/models/api-v1-documents-folders-id-get200-response-all-of-items-inner.js.map +1 -0
- package/dist/api/models/api-v1-documents-folders-id-get200-response.d.ts +17 -0
- package/dist/api/models/api-v1-documents-folders-id-get200-response.d.ts.map +1 -0
- package/dist/api/models/api-v1-documents-folders-id-get200-response.js +16 -0
- package/dist/api/models/api-v1-documents-folders-id-get200-response.js.map +1 -0
- package/dist/api/models/bulk-upload-mutation.d.ts +34 -0
- package/dist/api/models/bulk-upload-mutation.d.ts.map +1 -0
- package/dist/api/models/bulk-upload-mutation.js +16 -0
- package/dist/api/models/bulk-upload-mutation.js.map +1 -0
- package/dist/api/models/bulk-upload.d.ts +91 -0
- package/dist/api/models/bulk-upload.d.ts.map +1 -0
- package/dist/api/models/bulk-upload.js +23 -0
- package/dist/api/models/bulk-upload.js.map +1 -0
- package/dist/api/models/contact-mutation.d.ts +30 -0
- package/dist/api/models/contact-mutation.d.ts.map +1 -0
- package/dist/api/models/contact-mutation.js +16 -0
- package/dist/api/models/contact-mutation.js.map +1 -0
- package/dist/api/models/contact.d.ts +54 -0
- package/dist/api/models/contact.d.ts.map +1 -0
- package/dist/api/models/contact.js +16 -0
- package/dist/api/models/contact.js.map +1 -0
- package/dist/api/models/document-document-type.d.ts +19 -0
- package/dist/api/models/document-document-type.d.ts.map +1 -0
- package/dist/api/models/document-document-type.js +16 -0
- package/dist/api/models/document-document-type.js.map +1 -0
- package/dist/api/models/document-domain.d.ts +19 -0
- package/dist/api/models/document-domain.d.ts.map +1 -0
- package/dist/api/models/document-domain.js +16 -0
- package/dist/api/models/document-domain.js.map +1 -0
- package/dist/api/models/document-folder.d.ts +19 -0
- package/dist/api/models/document-folder.d.ts.map +1 -0
- package/dist/api/models/document-folder.js +16 -0
- package/dist/api/models/document-folder.js.map +1 -0
- package/dist/api/models/document-mutation.d.ts +50 -0
- package/dist/api/models/document-mutation.d.ts.map +1 -0
- package/dist/api/models/document-mutation.js +16 -0
- package/dist/api/models/document-mutation.js.map +1 -0
- package/dist/api/models/document.d.ts +73 -0
- package/dist/api/models/document.d.ts.map +1 -0
- package/dist/api/models/document.js +16 -0
- package/dist/api/models/document.js.map +1 -0
- package/dist/api/models/folder-mutation.d.ts +38 -0
- package/dist/api/models/folder-mutation.d.ts.map +1 -0
- package/dist/api/models/folder-mutation.js +16 -0
- package/dist/api/models/folder-mutation.js.map +1 -0
- package/dist/api/models/folder-parent.d.ts +19 -0
- package/dist/api/models/folder-parent.d.ts.map +1 -0
- package/dist/api/models/folder-parent.js +16 -0
- package/dist/api/models/folder-parent.js.map +1 -0
- package/dist/api/models/folder.d.ts +65 -0
- package/dist/api/models/folder.d.ts.map +1 -0
- package/dist/api/models/folder.js +16 -0
- package/dist/api/models/folder.js.map +1 -0
- package/dist/api/models/group-mutation.d.ts +26 -0
- package/dist/api/models/group-mutation.d.ts.map +1 -0
- package/dist/api/models/group-mutation.js +16 -0
- package/dist/api/models/group-mutation.js.map +1 -0
- package/dist/api/models/group.d.ts +38 -0
- package/dist/api/models/group.d.ts.map +1 -0
- package/dist/api/models/group.js +16 -0
- package/dist/api/models/group.js.map +1 -0
- package/dist/api/models/index.d.ts +35 -0
- package/dist/api/models/index.d.ts.map +1 -0
- package/dist/api/models/index.js +51 -0
- package/dist/api/models/index.js.map +1 -0
- package/dist/api/models/model-error.d.ts +26 -0
- package/dist/api/models/model-error.d.ts.map +1 -0
- package/dist/api/models/model-error.js +16 -0
- package/dist/api/models/model-error.js.map +1 -0
- package/dist/api/models/oauth-revoke-post200-response.d.ts +15 -0
- package/dist/api/models/oauth-revoke-post200-response.d.ts.map +1 -0
- package/dist/api/models/oauth-revoke-post200-response.js +16 -0
- package/dist/api/models/oauth-revoke-post200-response.js.map +1 -0
- package/dist/api/models/permission-actor.d.ts +20 -0
- package/dist/api/models/permission-actor.d.ts.map +1 -0
- package/dist/api/models/permission-actor.js +16 -0
- package/dist/api/models/permission-actor.js.map +1 -0
- package/dist/api/models/permission-mutation.d.ts +44 -0
- package/dist/api/models/permission-mutation.d.ts.map +1 -0
- package/dist/api/models/permission-mutation.js +22 -0
- package/dist/api/models/permission-mutation.js.map +1 -0
- package/dist/api/models/permission-permissible.d.ts +20 -0
- package/dist/api/models/permission-permissible.d.ts.map +1 -0
- package/dist/api/models/permission-permissible.js +16 -0
- package/dist/api/models/permission-permissible.js.map +1 -0
- package/dist/api/models/permission.d.ts +60 -0
- package/dist/api/models/permission.d.ts.map +1 -0
- package/dist/api/models/permission.js +22 -0
- package/dist/api/models/permission.js.map +1 -0
- package/dist/api/models/token-response.d.ts +41 -0
- package/dist/api/models/token-response.d.ts.map +1 -0
- package/dist/api/models/token-response.js +16 -0
- package/dist/api/models/token-response.js.map +1 -0
- package/dist/api/models/user.d.ts +18 -0
- package/dist/api/models/user.d.ts.map +1 -0
- package/dist/api/models/user.js +16 -0
- package/dist/api/models/user.js.map +1 -0
- package/dist/api/models/workspace-mutation-settings-validation.d.ts +26 -0
- package/dist/api/models/workspace-mutation-settings-validation.d.ts.map +1 -0
- package/dist/api/models/workspace-mutation-settings-validation.js +16 -0
- package/dist/api/models/workspace-mutation-settings-validation.js.map +1 -0
- package/dist/api/models/workspace-mutation-settings.d.ts +60 -0
- package/dist/api/models/workspace-mutation-settings.d.ts.map +1 -0
- package/dist/api/models/workspace-mutation-settings.js +16 -0
- package/dist/api/models/workspace-mutation-settings.js.map +1 -0
- package/dist/api/models/workspace-mutation.d.ts +44 -0
- package/dist/api/models/workspace-mutation.d.ts.map +1 -0
- package/dist/api/models/workspace-mutation.js +16 -0
- package/dist/api/models/workspace-mutation.js.map +1 -0
- package/dist/api/models/workspace-settings-validation.d.ts +26 -0
- package/dist/api/models/workspace-settings-validation.d.ts.map +1 -0
- package/dist/api/models/workspace-settings-validation.js +16 -0
- package/dist/api/models/workspace-settings-validation.js.map +1 -0
- package/dist/api/models/workspace-settings.d.ts +60 -0
- package/dist/api/models/workspace-settings.d.ts.map +1 -0
- package/dist/api/models/workspace-settings.js +16 -0
- package/dist/api/models/workspace-settings.js.map +1 -0
- package/dist/api/models/workspace.d.ts +62 -0
- package/dist/api/models/workspace.d.ts.map +1 -0
- package/dist/api/models/workspace.js +16 -0
- package/dist/api/models/workspace.js.map +1 -0
- package/dist/cli/handlers/command-handlers.d.ts +29 -0
- package/dist/cli/handlers/command-handlers.d.ts.map +1 -0
- package/dist/cli/handlers/command-handlers.js +261 -0
- package/dist/cli/handlers/command-handlers.js.map +1 -0
- package/dist/cli/handlers/engine-handlers.d.ts +15 -0
- package/dist/cli/handlers/engine-handlers.d.ts.map +1 -0
- package/dist/cli/handlers/engine-handlers.js +174 -0
- package/dist/cli/handlers/engine-handlers.js.map +1 -0
- package/dist/cli/interactive.d.ts +15 -0
- package/dist/cli/interactive.d.ts.map +1 -0
- package/dist/cli/interactive.js +234 -0
- package/dist/cli/interactive.js.map +1 -0
- package/dist/cli.js +31 -740
- package/dist/cli.js.map +1 -1
- package/dist/commands/export.d.ts +1 -1
- package/dist/commands/export.d.ts.map +1 -1
- package/dist/commands/export.js +1 -1
- package/dist/commands/export.js.map +1 -1
- package/dist/commands/import.d.ts.map +1 -1
- package/dist/commands/import.js +5 -1
- package/dist/commands/import.js.map +1 -1
- package/dist/index.d.ts +27 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +63 -20
- package/dist/index.js.map +1 -1
- package/dist/services/hubdoc-api.d.ts +26 -6
- package/dist/services/hubdoc-api.d.ts.map +1 -1
- package/dist/services/hubdoc-api.js +194 -43
- package/dist/services/hubdoc-api.js.map +1 -1
- package/dist/services/hubdoc-export.d.ts +1 -1
- package/dist/services/hubdoc-export.d.ts.map +1 -1
- package/dist/services/hubdoc-export.js +1 -1
- package/dist/services/hubdoc-export.js.map +1 -1
- package/dist/services/oauth-token-service.d.ts +27 -14
- package/dist/services/oauth-token-service.d.ts.map +1 -1
- package/dist/services/oauth-token-service.js +147 -80
- package/dist/services/oauth-token-service.js.map +1 -1
- package/dist/services/plugin-import.d.ts +2 -2
- package/dist/services/plugin-import.d.ts.map +1 -1
- package/dist/services/plugin-import.js +2 -2
- package/dist/services/plugin-import.js.map +1 -1
- package/dist/services/plugin-manager.d.ts +6 -1
- package/dist/services/plugin-manager.d.ts.map +1 -1
- package/dist/services/plugin-manager.js +28 -2
- package/dist/services/plugin-manager.js.map +1 -1
- package/dist/types/index.d.ts +11 -37
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/config.d.ts +30 -1
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js +187 -40
- package/dist/utils/config.js.map +1 -1
- package/dist/utils/csv.d.ts.map +1 -1
- package/dist/utils/csv.js +14 -3
- package/dist/utils/csv.js.map +1 -1
- package/package.json +23 -6
- package/.env.example +0 -23
- package/BAUTECH_HubDoc_Import.pptx +0 -0
- package/CHANGELOG.md +0 -134
- package/DEMO-DOCUMENTATION.html +0 -356
- package/DEMO-DOCUMENTATION.md +0 -411
- package/EXPORT-DOCUMENTATION.md +0 -333
- package/HUBDOC-API-V2.md +0 -248
- package/INSTALL.md +0 -175
- package/PACKAGING.md +0 -206
- package/PLUGINS.md +0 -328
- package/PRESENTATION-CLIENT.md +0 -100
- package/README-hubdoc-tool.md +0 -369
- package/README-npm.md +0 -238
- package/TESTING.md +0 -129
- package/config-examples/README.md +0 -36
- package/config-examples/alfresco-config.example.json +0 -8
- package/config-examples/azure-blob-config.example.json +0 -7
- package/config-examples/box-config.example.json +0 -5
- package/config-examples/nuxeo-config.example.json +0 -8
- package/config-examples/opentext-config.example.json +0 -7
- package/config-examples/s3-config.example.json +0 -8
- package/config-examples/sharepoint-config.example.json +0 -7
- package/demo/README.md +0 -199
- package/demo/demo-script.md +0 -284
- package/demo/generate-sample-csv.js +0 -351
- package/demo/mapping_bautech_15k.csv +0 -1
- package/demo/simulate-import.js +0 -273
- package/dist/commands/export-v2.d.ts +0 -45
- package/dist/commands/export-v2.d.ts.map +0 -1
- package/dist/commands/export-v2.js +0 -369
- package/dist/commands/export-v2.js.map +0 -1
- package/dist/commands/import-v2.d.ts +0 -32
- package/dist/commands/import-v2.d.ts.map +0 -1
- package/dist/commands/import-v2.js +0 -331
- package/dist/commands/import-v2.js.map +0 -1
- package/dist/services/hubdoc-api-v2.d.ts +0 -150
- package/dist/services/hubdoc-api-v2.d.ts.map +0 -1
- package/dist/services/hubdoc-api-v2.js +0 -418
- package/dist/services/hubdoc-api-v2.js.map +0 -1
- package/dist/services/hubdoc-client.d.ts +0 -246
- package/dist/services/hubdoc-client.d.ts.map +0 -1
- package/dist/services/hubdoc-client.js +0 -714
- package/dist/services/hubdoc-client.js.map +0 -1
- package/dist/services/hubdoc-export-service.d.ts +0 -90
- package/dist/services/hubdoc-export-service.d.ts.map +0 -1
- package/dist/services/hubdoc-export-service.js +0 -443
- package/dist/services/hubdoc-export-service.js.map +0 -1
- package/dist/services/hubdoc-export-v2.d.ts +0 -77
- package/dist/services/hubdoc-export-v2.d.ts.map +0 -1
- package/dist/services/hubdoc-export-v2.js +0 -329
- package/dist/services/hubdoc-export-v2.js.map +0 -1
- package/dist/services/hubdoc-import-service.d.ts +0 -64
- package/dist/services/hubdoc-import-service.d.ts.map +0 -1
- package/dist/services/hubdoc-import-service.js +0 -374
- package/dist/services/hubdoc-import-service.js.map +0 -1
- package/docs/README.md +0 -65
- package/docs/connectors/alfresco.md +0 -211
- package/docs/connectors/aws-s3.md +0 -187
- package/docs/connectors/azure-blob.md +0 -195
- package/docs/connectors/box.md +0 -115
- package/docs/connectors/nuxeo.md +0 -214
- package/docs/connectors/opentext.md +0 -234
- package/docs/connectors/sharepoint.md +0 -207
- package/documentation.html +0 -273
- package/jest.config.js +0 -15
- package/plugins/core/README.md +0 -122
- package/plugins/core/TESTING.md +0 -155
- package/plugins/core/plugin.json +0 -26
- package/plugins/dropbox/plugin.json +0 -12
- package/plugins/filesystem/plugin.json +0 -12
- package/plugins/googledrive/plugin.json +0 -12
- package/plugins/onedrive/TESTING.md +0 -197
- package/plugins/onedrive/plugin.json +0 -12
- package/scripts/build-windows-installer.ps1 +0 -132
- package/scripts/build-windows-installer.sh +0 -106
- package/scripts/prepare-publish.js +0 -62
- package/scripts/restore-package.js +0 -29
package/INSTALL.md
DELETED
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
# Installation Guide - @sinoia/hubdoc-tools
|
|
2
|
-
|
|
3
|
-
## Requirements
|
|
4
|
-
|
|
5
|
-
- **Node.js**: Version 16 or higher
|
|
6
|
-
- **npm**: Version 7 or higher (included with Node.js)
|
|
7
|
-
- **Operating System**: Windows, macOS, or Linux
|
|
8
|
-
|
|
9
|
-
## Global Installation (Recommended)
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
# Install globally from npm registry
|
|
13
|
-
npm install -g @sinoia/hubdoc-tools
|
|
14
|
-
|
|
15
|
-
# Verify installation
|
|
16
|
-
hubdoc-tool --version
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Local Development Installation
|
|
20
|
-
|
|
21
|
-
For developers who want to contribute or modify the tool:
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
# Clone the repository
|
|
25
|
-
git clone https://github.com/your-org/hubdoc-tools.git
|
|
26
|
-
cd hubdoc-tools
|
|
27
|
-
|
|
28
|
-
# Install dependencies
|
|
29
|
-
npm install
|
|
30
|
-
|
|
31
|
-
# Build the project
|
|
32
|
-
npm run build
|
|
33
|
-
|
|
34
|
-
# Link globally for development
|
|
35
|
-
npm link
|
|
36
|
-
|
|
37
|
-
# Or run directly with npm
|
|
38
|
-
npm run dev -- --help
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## First-Time Configuration
|
|
42
|
-
|
|
43
|
-
After installation, configure your HubDoc API credentials:
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
# Run the configuration wizard
|
|
47
|
-
hubdoc-tool config
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
The wizard will prompt you for:
|
|
51
|
-
- **API URL**: Your HubDoc instance URL (e.g., `https://demo.hubdoc.sinoia.cloud/api/v1`)
|
|
52
|
-
- **API Token**: Your HubDoc authentication token
|
|
53
|
-
- **Storage Format**: Choose between JSON config file or environment variables
|
|
54
|
-
|
|
55
|
-
## Quick Start
|
|
56
|
-
|
|
57
|
-
### 1. Test Your Configuration
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
# Test API connection
|
|
61
|
-
hubdoc-tool import --interactive
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
### 2. Generate a Mapping File
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
# Generate mapping from a directory
|
|
68
|
-
hubdoc-tool generate-mapping ./documents
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### 3. Import Documents
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
# Direct import from directory
|
|
75
|
-
hubdoc-tool import --source ./documents
|
|
76
|
-
|
|
77
|
-
# Or use the generated mapping
|
|
78
|
-
hubdoc-tool import --mapping mapping.csv
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
## Troubleshooting
|
|
82
|
-
|
|
83
|
-
### Permission Errors (Linux/macOS)
|
|
84
|
-
|
|
85
|
-
If you get permission errors during global installation:
|
|
86
|
-
|
|
87
|
-
```bash
|
|
88
|
-
# Option 1: Use sudo (not recommended)
|
|
89
|
-
sudo npm install -g @sinoia/hubdoc-tools
|
|
90
|
-
|
|
91
|
-
# Option 2: Configure npm to use a different directory (recommended)
|
|
92
|
-
mkdir ~/.npm-global
|
|
93
|
-
npm config set prefix '~/.npm-global'
|
|
94
|
-
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.profile
|
|
95
|
-
source ~/.profile
|
|
96
|
-
npm install -g @sinoia/hubdoc-tools
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
### Node.js Version Issues
|
|
100
|
-
|
|
101
|
-
If you get compatibility errors:
|
|
102
|
-
|
|
103
|
-
```bash
|
|
104
|
-
# Check your Node.js version
|
|
105
|
-
node --version
|
|
106
|
-
|
|
107
|
-
# Update Node.js (using nvm)
|
|
108
|
-
nvm install 18
|
|
109
|
-
nvm use 18
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
### Network/Proxy Issues
|
|
113
|
-
|
|
114
|
-
If installation fails due to network issues:
|
|
115
|
-
|
|
116
|
-
```bash
|
|
117
|
-
# Configure npm for corporate proxy
|
|
118
|
-
npm config set proxy http://your-proxy:8080
|
|
119
|
-
npm config set https-proxy http://your-proxy:8080
|
|
120
|
-
|
|
121
|
-
# Or use a different registry
|
|
122
|
-
npm install -g @sinoia/hubdoc-tools --registry https://registry.npmjs.org
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
### Windows-Specific Issues
|
|
126
|
-
|
|
127
|
-
On Windows, you might need:
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
# Install Windows Build Tools (if needed)
|
|
131
|
-
npm install -g windows-build-tools
|
|
132
|
-
|
|
133
|
-
# Or use PowerShell as Administrator
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
## Uninstallation
|
|
137
|
-
|
|
138
|
-
```bash
|
|
139
|
-
# Remove global installation
|
|
140
|
-
npm uninstall -g @sinoia/hubdoc-tools
|
|
141
|
-
|
|
142
|
-
# Clean npm cache (optional)
|
|
143
|
-
npm cache clean --force
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
## Configuration Files
|
|
147
|
-
|
|
148
|
-
The tool creates configuration files in your current directory:
|
|
149
|
-
|
|
150
|
-
- `.hubdoc-config.json` - API credentials and settings
|
|
151
|
-
- `.env` - Environment variables (alternative to JSON config)
|
|
152
|
-
- `mapping.csv` - Generated mapping files for imports
|
|
153
|
-
|
|
154
|
-
## Getting Help
|
|
155
|
-
|
|
156
|
-
```bash
|
|
157
|
-
# Show all available commands
|
|
158
|
-
hubdoc-tool --help
|
|
159
|
-
|
|
160
|
-
# Show help for specific command
|
|
161
|
-
hubdoc-tool import --help
|
|
162
|
-
hubdoc-tool generate-mapping --help
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
## Next Steps
|
|
166
|
-
|
|
167
|
-
1. Read the [full documentation](./README-hubdoc-tool.md)
|
|
168
|
-
2. Check out [connector documentation](./docs/README.md) for cloud sources
|
|
169
|
-
3. Try the [interactive mode](./README-hubdoc-tool.md#interactive-mode) for guided workflows
|
|
170
|
-
|
|
171
|
-
## Support
|
|
172
|
-
|
|
173
|
-
- **Documentation**: [README-hubdoc-tool.md](./README-hubdoc-tool.md)
|
|
174
|
-
- **Connectors**: [docs/README.md](./docs/README.md)
|
|
175
|
-
- **Issues**: Report problems in the project repository
|
package/PACKAGING.md
DELETED
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
# Guide de Packaging HubDoc Tool
|
|
2
|
-
|
|
3
|
-
Ce guide explique comment créer des packages distribubables pour les clients Windows.
|
|
4
|
-
|
|
5
|
-
## 🎯 Options de Distribution
|
|
6
|
-
|
|
7
|
-
### **Option 1: Exécutable Standalone (Recommandé)**
|
|
8
|
-
- ✅ **Avantages** : Aucune installation requise, portable, pas besoin de Node.js
|
|
9
|
-
- ✅ **Taille** : ~50MB (inclut Node.js embarqué)
|
|
10
|
-
- ✅ **Utilisation** : Double-clic et ça marche
|
|
11
|
-
- ❌ **Inconvénients** : Pas d'intégration système (PATH, menu démarrer)
|
|
12
|
-
|
|
13
|
-
### **Option 2: Installateur Windows NSIS**
|
|
14
|
-
- ✅ **Avantages** : Installation professionnelle, ajout au PATH, menu démarrer
|
|
15
|
-
- ✅ **Fonctionnalités** : Désinstallation propre, raccourcis, documentation intégrée
|
|
16
|
-
- ❌ **Complexité** : Nécessite NSIS pour compiler
|
|
17
|
-
|
|
18
|
-
## 🚀 Création des Packages
|
|
19
|
-
|
|
20
|
-
### Méthode Rapide (Exécutable uniquement)
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
# 1. Build TypeScript
|
|
24
|
-
npm run build
|
|
25
|
-
|
|
26
|
-
# 2. Créer l'exécutable Windows
|
|
27
|
-
npm run pkg
|
|
28
|
-
|
|
29
|
-
# 3. Tester
|
|
30
|
-
./build/hubdoc-tool-windows.exe --help
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
### Méthode Complète (Scripts automatisés)
|
|
34
|
-
|
|
35
|
-
#### Sur macOS/Linux :
|
|
36
|
-
```bash
|
|
37
|
-
./scripts/build-windows-installer.sh
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
#### Sur Windows :
|
|
41
|
-
```powershell
|
|
42
|
-
.\scripts\build-windows-installer.ps1
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
#### Avec installateur NSIS :
|
|
46
|
-
```powershell
|
|
47
|
-
.\scripts\build-windows-installer.ps1 -BuildInstaller
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## 📦 Contenu des Packages
|
|
51
|
-
|
|
52
|
-
### Exécutable Standalone
|
|
53
|
-
```
|
|
54
|
-
hubdoc-tool-windows.exe (50MB)
|
|
55
|
-
├── Node.js runtime embarqué
|
|
56
|
-
├── Application complète
|
|
57
|
-
├── Tous les connecteurs
|
|
58
|
-
└── Documentation intégrée
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
### Installateur Complet
|
|
62
|
-
```
|
|
63
|
-
HubDoc-Tool-1.0.0-Setup.exe
|
|
64
|
-
├── hubdoc-tool.exe
|
|
65
|
-
├── docs/ (documentation complète)
|
|
66
|
-
├── config-examples/ (exemples de configuration)
|
|
67
|
-
├── Raccourcis menu démarrer
|
|
68
|
-
├── Ajout au PATH système
|
|
69
|
-
└── Désinstallateur
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## 🛠️ Prérequis pour Compilation
|
|
73
|
-
|
|
74
|
-
### Pour l'Exécutable (pkg)
|
|
75
|
-
```bash
|
|
76
|
-
npm install pkg --save-dev
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
### Pour l'Installateur (NSIS)
|
|
80
|
-
1. **Windows** : [Télécharger NSIS](https://nsis.sourceforge.io/Download)
|
|
81
|
-
2. **macOS** : `brew install makensis`
|
|
82
|
-
3. **Linux** : `sudo apt install nsis`
|
|
83
|
-
|
|
84
|
-
## 📋 Scripts Disponibles
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
# Exécutables
|
|
88
|
-
npm run pkg # Windows x64 uniquement
|
|
89
|
-
npm run pkg:all # Windows + macOS + Linux
|
|
90
|
-
npm run installer:win # Build + Package Windows
|
|
91
|
-
|
|
92
|
-
# Tests
|
|
93
|
-
npm run test-connectors # Valider avant packaging
|
|
94
|
-
npm run typecheck # Vérifier TypeScript
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
## 🎯 Guide de Distribution Client
|
|
98
|
-
|
|
99
|
-
### Pour un Client Technique
|
|
100
|
-
**Recommandation** : Exécutable standalone
|
|
101
|
-
|
|
102
|
-
```
|
|
103
|
-
1. Télécharger: hubdoc-tool-windows.exe
|
|
104
|
-
2. Placer dans: C:\Tools\HubDoc\
|
|
105
|
-
3. Utiliser: hubdoc-tool-windows.exe --interactive
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
### Pour un Client Entreprise
|
|
109
|
-
**Recommandation** : Installateur complet
|
|
110
|
-
|
|
111
|
-
```
|
|
112
|
-
1. Télécharger: HubDoc-Tool-1.0.0-Setup.exe
|
|
113
|
-
2. Exécuter en tant qu'administrateur
|
|
114
|
-
3. Suivre l'assistant d'installation
|
|
115
|
-
4. Utiliser: hubdoc-tool depuis n'importe où
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
## 🔧 Configuration Client
|
|
119
|
-
|
|
120
|
-
### Après Installation
|
|
121
|
-
1. **Créer config** : Copier les exemples depuis `config-examples/`
|
|
122
|
-
2. **Éditer credentials** : Remplir les tokens/clés appropriés
|
|
123
|
-
3. **Tester connexion** : `hubdoc-tool --engine [connecteur] --limit 5`
|
|
124
|
-
|
|
125
|
-
### Exemple de Déploiement
|
|
126
|
-
```bash
|
|
127
|
-
# 1. Configuration Box
|
|
128
|
-
copy config-examples\box-config.example.json box-config.json
|
|
129
|
-
# Éditer box-config.json avec le vrai token
|
|
130
|
-
|
|
131
|
-
# 2. Test de connexion
|
|
132
|
-
hubdoc-tool --engine box --limit 5
|
|
133
|
-
|
|
134
|
-
# 3. Import réel
|
|
135
|
-
hubdoc-tool --engine box --limit 100
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
## 📊 Tailles des Packages
|
|
139
|
-
|
|
140
|
-
| Package | Taille | Contenu |
|
|
141
|
-
|---------|--------|---------|
|
|
142
|
-
| **Standalone .exe** | ~50MB | Exécutable + Runtime |
|
|
143
|
-
| **Installer .exe** | ~52MB | Installateur + Documentation |
|
|
144
|
-
| **Sources complètes** | ~15MB | Code source + dépendances |
|
|
145
|
-
|
|
146
|
-
## 🛡️ Sécurité
|
|
147
|
-
|
|
148
|
-
### Signature de Code (Optionnel)
|
|
149
|
-
Pour les déploiements entreprise, signer les exécutables :
|
|
150
|
-
|
|
151
|
-
```bash
|
|
152
|
-
# Avec un certificat code signing
|
|
153
|
-
signtool sign /f certificate.pfx /p password hubdoc-tool-windows.exe
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
### Antivirus
|
|
157
|
-
Les exécutables pkg peuvent déclencher des faux positifs. Solutions :
|
|
158
|
-
- Signer le code avec un certificat valide
|
|
159
|
-
- Soumettre à VirusTotal pour validation
|
|
160
|
-
- Documenter pour les équipes IT client
|
|
161
|
-
|
|
162
|
-
## 🔍 Résolution de Problèmes
|
|
163
|
-
|
|
164
|
-
### Erreur "pkg: Failed to make bytecode"
|
|
165
|
-
**Solution** : Ces warnings sont normaux et n'affectent pas le fonctionnement
|
|
166
|
-
|
|
167
|
-
### Exécutable ne démarre pas
|
|
168
|
-
**Vérifications** :
|
|
169
|
-
1. Architecture correcte (x64)
|
|
170
|
-
2. Windows 10+ requis
|
|
171
|
-
3. Antivirus non bloquant
|
|
172
|
-
4. Droits d'exécution
|
|
173
|
-
|
|
174
|
-
### Taille de l'exécutable importante
|
|
175
|
-
**Explication** : Inclut Node.js complet (~40MB) + application (~10MB)
|
|
176
|
-
**Alternative** : Distribuer avec Node.js séparé (plus complexe)
|
|
177
|
-
|
|
178
|
-
## 📚 Ressources
|
|
179
|
-
|
|
180
|
-
- **PKG Documentation** : https://github.com/vercel/pkg
|
|
181
|
-
- **NSIS Documentation** : https://nsis.sourceforge.io/Docs/
|
|
182
|
-
- **Node.js Packaging** : https://nodejs.org/en/docs/guides/getting-started-guide/
|
|
183
|
-
|
|
184
|
-
## 🎉 Déploiement Final
|
|
185
|
-
|
|
186
|
-
### Checklist Avant Distribution
|
|
187
|
-
- [ ] Build sans erreurs TypeScript
|
|
188
|
-
- [ ] Tests connecteurs passent
|
|
189
|
-
- [ ] Exécutable fonctionne (`--help`)
|
|
190
|
-
- [ ] Documentation incluse
|
|
191
|
-
- [ ] Exemples de config présents
|
|
192
|
-
- [ ] LICENSE créé
|
|
193
|
-
- [ ] README à jour
|
|
194
|
-
|
|
195
|
-
### Livraison Client
|
|
196
|
-
```
|
|
197
|
-
📦 HubDoc-Tool-Package/
|
|
198
|
-
├── 🚀 hubdoc-tool-windows.exe (standalone)
|
|
199
|
-
├── 💿 HubDoc-Tool-1.0.0-Setup.exe (installer)
|
|
200
|
-
├── 📚 docs/ (documentation)
|
|
201
|
-
├── ⚙️ config-examples/ (exemples)
|
|
202
|
-
├── 📋 README.md (guide utilisateur)
|
|
203
|
-
└── 🧪 TESTING.md (guide de test)
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
**Le client peut choisir entre l'exécutable portable ou l'installateur complet selon ses besoins !** 🎯
|
package/PLUGINS.md
DELETED
|
@@ -1,328 +0,0 @@
|
|
|
1
|
-
# 🔌 HubDoc Tool - Plugin System
|
|
2
|
-
|
|
3
|
-
Le système de plugins permet d'étendre HubDoc Tool pour importer des documents depuis des sources externes (cloud, GED, etc.).
|
|
4
|
-
|
|
5
|
-
## 📦 Plugins Disponibles
|
|
6
|
-
|
|
7
|
-
### ✅ Plugins Intégrés
|
|
8
|
-
|
|
9
|
-
| Plugin | Description | Import | Export | Authentification |
|
|
10
|
-
|--------|-------------|--------|--------|------------------|
|
|
11
|
-
| **filesystem** | Système de fichiers local | ✅ | ✅ | Aucune |
|
|
12
|
-
| **onedrive** | Microsoft OneDrive/SharePoint | ✅ | ✅ | OAuth2 + Azure App |
|
|
13
|
-
| **googledrive** | Google Drive | ✅ | ✅ | OAuth2 + Google API |
|
|
14
|
-
| **dropbox** | Dropbox | ✅ | ✅ | Access Token |
|
|
15
|
-
|
|
16
|
-
### 🚧 Plugins Future (Roadmap)
|
|
17
|
-
|
|
18
|
-
- **sharepoint** : Microsoft SharePoint Server
|
|
19
|
-
- **box** : Box.com
|
|
20
|
-
- **nextcloud** : Nextcloud/ownCloud
|
|
21
|
-
- **alfresco** : Alfresco GED
|
|
22
|
-
- **documentum** : OpenText Documentum
|
|
23
|
-
- **sharefileS** : Citrix ShareFile
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## 🚀 Utilisation
|
|
28
|
-
|
|
29
|
-
### 1. Lister les Plugins Disponibles
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
hubdoc-tool plugins
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### 2. Créer une Connexion
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
# Configuration interactive
|
|
39
|
-
hubdoc-tool connect onedrive --interactive --name "OneDrive-Corporate"
|
|
40
|
-
|
|
41
|
-
# Configuration depuis fichier
|
|
42
|
-
hubdoc-tool connect googledrive --config ./google-config.json --name "Google-Drive"
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### 3. Scanner une Source Externe
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
# Scan complet
|
|
49
|
-
hubdoc-tool plugin-scan conn_1234567890 --output onedrive-mapping.csv
|
|
50
|
-
|
|
51
|
-
# Scan avec filtres
|
|
52
|
-
hubdoc-tool plugin-scan conn_1234567890 \
|
|
53
|
-
--path "/Documents/2024" \
|
|
54
|
-
--max-size 52428800 \
|
|
55
|
-
--mime-types "application/pdf,image/jpeg" \
|
|
56
|
-
--output filtered-mapping.csv
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
### 4. Import depuis Source Externe
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
hubdoc-tool plugin-import plugin-mapping.csv --temp-dir ./temp
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
---
|
|
66
|
-
|
|
67
|
-
## ⚙️ Configuration des Plugins
|
|
68
|
-
|
|
69
|
-
### OneDrive
|
|
70
|
-
|
|
71
|
-
```json
|
|
72
|
-
{
|
|
73
|
-
"clientId": "your-azure-app-client-id",
|
|
74
|
-
"clientSecret": "your-azure-app-client-secret",
|
|
75
|
-
"tenantId": "your-tenant-id",
|
|
76
|
-
"accessToken": "obtained-via-oauth",
|
|
77
|
-
"rootPath": "/Documents"
|
|
78
|
-
}
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
**Setup Azure App :**
|
|
82
|
-
1. Azure Portal > App Registrations > New
|
|
83
|
-
2. API Permissions : Files.Read.All, Sites.Read.All
|
|
84
|
-
3. Authentication > Redirect URI : `http://localhost:3000/callback`
|
|
85
|
-
|
|
86
|
-
### Google Drive
|
|
87
|
-
|
|
88
|
-
```json
|
|
89
|
-
{
|
|
90
|
-
"clientId": "your-google-client-id",
|
|
91
|
-
"clientSecret": "your-google-client-secret",
|
|
92
|
-
"redirectUri": "http://localhost:3000/callback",
|
|
93
|
-
"accessToken": "obtained-via-oauth",
|
|
94
|
-
"rootFolderId": "folder-id-or-root"
|
|
95
|
-
}
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
**Setup Google API :**
|
|
99
|
-
1. Google Cloud Console > APIs & Services
|
|
100
|
-
2. Enable Google Drive API
|
|
101
|
-
3. Create OAuth2 Credentials
|
|
102
|
-
4. Configure consent screen
|
|
103
|
-
|
|
104
|
-
### Dropbox
|
|
105
|
-
|
|
106
|
-
```json
|
|
107
|
-
{
|
|
108
|
-
"accessToken": "your-dropbox-access-token",
|
|
109
|
-
"rootPath": "/Documents"
|
|
110
|
-
}
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
**Setup Dropbox App :**
|
|
114
|
-
1. Dropbox App Console > Create App
|
|
115
|
-
2. Generate Access Token
|
|
116
|
-
3. Permissions : files.metadata.read, files.content.read
|
|
117
|
-
|
|
118
|
-
### Filesystem (Local)
|
|
119
|
-
|
|
120
|
-
```json
|
|
121
|
-
{
|
|
122
|
-
"basePath": "/path/to/documents",
|
|
123
|
-
"includeHidden": false,
|
|
124
|
-
"followSymlinks": false
|
|
125
|
-
}
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
---
|
|
129
|
-
|
|
130
|
-
## 📋 Format du Mapping Plugin
|
|
131
|
-
|
|
132
|
-
Le fichier CSV généré par `plugin-scan` contient :
|
|
133
|
-
|
|
134
|
-
| Colonne | Description | Modifiable |
|
|
135
|
-
|---------|-------------|------------|
|
|
136
|
-
| Connection ID | ID de la connexion | ❌ |
|
|
137
|
-
| Source ID | ID du document source | ❌ |
|
|
138
|
-
| Source Name | Nom du fichier | ❌ |
|
|
139
|
-
| Source Path | Chemin relatif | ❌ |
|
|
140
|
-
| Target Folder | Dossier HubDoc | ✅ |
|
|
141
|
-
| Workspace | Projet HubDoc | ✅ |
|
|
142
|
-
| Domain | Domaine métier | ✅ |
|
|
143
|
-
| Plan Classement | Plan de classification | ✅ |
|
|
144
|
-
| Read/Write Permissions | Permissions | ✅ |
|
|
145
|
-
|
|
146
|
-
### Exemple de Mapping
|
|
147
|
-
|
|
148
|
-
```csv
|
|
149
|
-
Connection ID,Source ID,Source Name,Target Folder (editable),Workspace (editable)
|
|
150
|
-
conn_1234567890,/Documents/plans/facade.pdf,facade.pdf,Technique/Plans Architecture,Les Jardins de Meudon
|
|
151
|
-
conn_1234567890,/Documents/contrats/marche.pdf,marche.pdf,Administrative/Marchés,Les Jardins de Meudon
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
---
|
|
155
|
-
|
|
156
|
-
## 🔧 Workflow Complet
|
|
157
|
-
|
|
158
|
-
### Exemple : Import depuis OneDrive
|
|
159
|
-
|
|
160
|
-
```bash
|
|
161
|
-
# 1. Configurer la connexion OneDrive
|
|
162
|
-
hubdoc-tool connect onedrive --interactive --name "OneDrive-Entreprise"
|
|
163
|
-
|
|
164
|
-
# 2. Scanner les documents
|
|
165
|
-
hubdoc-tool plugin-scan conn_1701234567 --output onedrive-docs.csv
|
|
166
|
-
|
|
167
|
-
# 3. Éditer le CSV pour définir l'organisation HubDoc
|
|
168
|
-
# (Excel, LibreOffice, etc.)
|
|
169
|
-
|
|
170
|
-
# 4. Importer vers HubDoc
|
|
171
|
-
hubdoc-tool plugin-import onedrive-docs.csv
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
### Workflow avec Filtres
|
|
175
|
-
|
|
176
|
-
```bash
|
|
177
|
-
# Scanner uniquement les PDFs de 2024 < 10MB
|
|
178
|
-
hubdoc-tool plugin-scan conn_1701234567 \
|
|
179
|
-
--path "/Documents/2024" \
|
|
180
|
-
--max-size 10485760 \
|
|
181
|
-
--mime-types "application/pdf" \
|
|
182
|
-
--output pdfs-2024.csv
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
---
|
|
186
|
-
|
|
187
|
-
## 🛠️ Développement de Plugins
|
|
188
|
-
|
|
189
|
-
### Structure d'un Plugin
|
|
190
|
-
|
|
191
|
-
```
|
|
192
|
-
plugins/
|
|
193
|
-
└── myplugin/
|
|
194
|
-
├── plugin.json # Manifest
|
|
195
|
-
├── index.ts # Code principal
|
|
196
|
-
└── README.md # Documentation
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
### Manifest (plugin.json)
|
|
200
|
-
|
|
201
|
-
```json
|
|
202
|
-
{
|
|
203
|
-
"name": "myplugin",
|
|
204
|
-
"version": "1.0.0",
|
|
205
|
-
"description": "My custom document source plugin",
|
|
206
|
-
"author": "Your Name",
|
|
207
|
-
"main": "index.js",
|
|
208
|
-
"hubdocToolVersion": "^1.0.0",
|
|
209
|
-
"dependencies": {
|
|
210
|
-
"axios": "^1.5.0"
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
### Interface Plugin
|
|
216
|
-
|
|
217
|
-
```typescript
|
|
218
|
-
export default class MyPlugin implements DocumentSourcePlugin {
|
|
219
|
-
readonly name = 'myplugin';
|
|
220
|
-
readonly version = '1.0.0';
|
|
221
|
-
readonly description = 'My custom plugin';
|
|
222
|
-
readonly supportedOperations = ['import', 'export'] as const;
|
|
223
|
-
|
|
224
|
-
async testConnection(config: PluginConfig): Promise<boolean> {
|
|
225
|
-
// Test de connectivité
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
async scan(config: PluginConfig, options?: PluginImportOptions): Promise<ScanResult> {
|
|
229
|
-
// Scanner les documents disponibles
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
async import(config: PluginConfig, sources: DocumentSource[], targetDir: string): Promise<ImportResult[]> {
|
|
233
|
-
// Télécharger les documents
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
async export?(config: PluginConfig, localSources: DocumentSource[]): Promise<ExportResult[]> {
|
|
237
|
-
// Upload vers la source externe
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
getConfigSchema(): Record<string, any> {
|
|
241
|
-
// Schema de configuration JSON
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
async initialize(config: PluginConfig): Promise<void> {
|
|
245
|
-
// Initialisation
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
async destroy(): Promise<void> {
|
|
249
|
-
// Nettoyage
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
### Installation Plugin Personnalisé
|
|
255
|
-
|
|
256
|
-
1. Créer le dossier plugin dans `./plugins/`
|
|
257
|
-
2. Implémenter l'interface `DocumentSourcePlugin`
|
|
258
|
-
3. Le plugin sera chargé automatiquement au démarrage
|
|
259
|
-
|
|
260
|
-
---
|
|
261
|
-
|
|
262
|
-
## 🔍 Debug & Troubleshooting
|
|
263
|
-
|
|
264
|
-
### Logs Plugin
|
|
265
|
-
|
|
266
|
-
```bash
|
|
267
|
-
# Activer les logs détaillés
|
|
268
|
-
DEBUG=hubdoc-tool:plugins hubdoc-tool plugin-scan conn_123
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
### Tester une Connexion
|
|
272
|
-
|
|
273
|
-
```bash
|
|
274
|
-
hubdoc-tool plugins # Voir l'état des connexions
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
### Erreurs Courantes
|
|
278
|
-
|
|
279
|
-
**❌ Plugin not found**
|
|
280
|
-
- Vérifier que le plugin est dans `./plugins/`
|
|
281
|
-
- Vérifier le manifest `plugin.json`
|
|
282
|
-
|
|
283
|
-
**❌ Authentication failed**
|
|
284
|
-
- Renouveler les tokens OAuth2
|
|
285
|
-
- Vérifier les permissions API
|
|
286
|
-
|
|
287
|
-
**❌ Rate limit exceeded**
|
|
288
|
-
- Réduire `batchSize` dans les options
|
|
289
|
-
- Ajouter des délais entre requêtes
|
|
290
|
-
|
|
291
|
-
---
|
|
292
|
-
|
|
293
|
-
## 🚀 Exemples d'Usage Avancés
|
|
294
|
-
|
|
295
|
-
### Import Massif Multi-Sources
|
|
296
|
-
|
|
297
|
-
```bash
|
|
298
|
-
# OneDrive Corporate
|
|
299
|
-
hubdoc-tool plugin-scan conn_onedrive --path "/Shared Documents" -o onedrive.csv
|
|
300
|
-
|
|
301
|
-
# Google Drive Personnel
|
|
302
|
-
hubdoc-tool plugin-scan conn_gdrive --path "/Work" -o gdrive.csv
|
|
303
|
-
|
|
304
|
-
# Fusionner et importer
|
|
305
|
-
hubdoc-tool plugin-import onedrive.csv
|
|
306
|
-
hubdoc-tool plugin-import gdrive.csv
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
### Pipeline d'Import Automatisé
|
|
310
|
-
|
|
311
|
-
```bash
|
|
312
|
-
#!/bin/bash
|
|
313
|
-
# Script d'import automatique
|
|
314
|
-
|
|
315
|
-
# Scanner toutes les connexions
|
|
316
|
-
for conn in conn_onedrive conn_gdrive conn_dropbox; do
|
|
317
|
-
hubdoc-tool plugin-scan $conn --output ${conn}-mapping.csv
|
|
318
|
-
done
|
|
319
|
-
|
|
320
|
-
# Import automatique (mapping pré-configuré)
|
|
321
|
-
for mapping in *-mapping.csv; do
|
|
322
|
-
hubdoc-tool plugin-import $mapping
|
|
323
|
-
done
|
|
324
|
-
```
|
|
325
|
-
|
|
326
|
-
---
|
|
327
|
-
|
|
328
|
-
*HubDoc Tool Plugin System v1.0.0 - Extension modulaire pour sources documentaires externes*
|