@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/PRESENTATION-CLIENT.md
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
# 🔄 HubDoc Tool - Migration Documentaire Simplifiée
|
|
2
|
-
|
|
3
|
-
## 📋 Le Défi de la Migration Documentaire
|
|
4
|
-
|
|
5
|
-
Vous avez **des milliers de documents** éparpillés sur vos serveurs de fichiers, dans des arborescences complexes, avec des permissions variées ? HubDoc Tool résout ce défi en **3 étapes simples**.
|
|
6
|
-
|
|
7
|
-
## 🚀 Principe Import : De Vos Serveurs vers HubDoc
|
|
8
|
-
|
|
9
|
-
### 🎯 **Objectif** : Centraliser vos documents dans HubDoc avec l'organisation que VOUS décidez
|
|
10
|
-
|
|
11
|
-
**Comment ça marche :**
|
|
12
|
-
|
|
13
|
-
1. **📊 Scan Intelligent**
|
|
14
|
-
- Notre outil scanne vos répertoires existants
|
|
15
|
-
- Génère un fichier Excel/CSV avec TOUS vos documents listés
|
|
16
|
-
|
|
17
|
-
2. **✏️ Personnalisation Métier**
|
|
18
|
-
- Vous éditez le fichier pour définir OÙ va chaque document
|
|
19
|
-
- Vous assignez les projets, domaines, permissions selon VOS règles métier
|
|
20
|
-
- Vous prévisualisez l'organisation avant le transfert
|
|
21
|
-
|
|
22
|
-
3. **⚡ Import Automatique**
|
|
23
|
-
- L'outil transfère vos documents selon votre mapping
|
|
24
|
-
- Création automatique des projets et dossiers HubDoc
|
|
25
|
-
- Application des permissions utilisateurs/groupes
|
|
26
|
-
|
|
27
|
-
**📈 Résultat :** 15 000 documents organisés et sécurisés en quelques heures au lieu de semaines
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
## 📤 Principe Export : De HubDoc vers Vos Archives
|
|
32
|
-
|
|
33
|
-
### 🎯 **Objectif** : Récupérer vos documents HubDoc avec l'arborescence de VOTRE choix
|
|
34
|
-
|
|
35
|
-
**Comment ça marche :**
|
|
36
|
-
|
|
37
|
-
1. **🔍 Scan HubDoc**
|
|
38
|
-
- L'outil liste tous vos documents disponibles
|
|
39
|
-
- Génère un fichier Excel/CSV avec leur localisation actuelle
|
|
40
|
-
|
|
41
|
-
2. **🗂️ Réorganisation**
|
|
42
|
-
- Vous définissez la nouvelle structure de dossiers souhaitée
|
|
43
|
-
- Vous personnalisez les chemins selon vos besoins d'archivage
|
|
44
|
-
- Exemple : "Projets 2024/Meudon/Plans" au lieu de "Les Jardins de Meudon/Technique"
|
|
45
|
-
|
|
46
|
-
3. **💾 Export Structuré**
|
|
47
|
-
- Téléchargement automatique avec création de l'arborescence
|
|
48
|
-
- Conservation des métadonnées et informations projets
|
|
49
|
-
- Prêt pour archivage ou migration vers autre système
|
|
50
|
-
|
|
51
|
-
**🎯 Résultat :** Vos documents récupérés dans l'organisation exacte que vous souhaitez
|
|
52
|
-
|
|
53
|
-
---
|
|
54
|
-
|
|
55
|
-
## ⚙️ La Force du Mapping CSV : Votre Contrôle Total
|
|
56
|
-
|
|
57
|
-
**Le fichier de mapping est votre tableau de bord :**
|
|
58
|
-
- ✅ **Transparence** : Vous voyez exactement où va chaque document
|
|
59
|
-
- ✅ **Contrôle** : Vous décidez de l'organisation finale
|
|
60
|
-
- ✅ **Flexibilité** : Modification facile avant exécution
|
|
61
|
-
- ✅ **Traçabilité** : Historique complet des opérations
|
|
62
|
-
|
|
63
|
-
**Métadonnées automatiques :**
|
|
64
|
-
- Type de document, projet associé, entreprise
|
|
65
|
-
- Permissions par utilisateur/groupe
|
|
66
|
-
- Informations techniques (montants, dates, références)
|
|
67
|
-
|
|
68
|
-
---
|
|
69
|
-
|
|
70
|
-
## 🏆 Avantages Business
|
|
71
|
-
|
|
72
|
-
### Pour l'Import :
|
|
73
|
-
- **⏱️ Gain de temps** : 15 000 docs en 3h au lieu de 3 semaines manuelles
|
|
74
|
-
- **🎯 Zéro erreur** : Organisation automatisée selon vos règles
|
|
75
|
-
- **🔒 Sécurité** : Permissions appliquées dès l'import
|
|
76
|
-
- **📊 Traçabilité** : Suivi complet des opérations
|
|
77
|
-
|
|
78
|
-
### Pour l'Export :
|
|
79
|
-
- **📁 Arborescence personnalisée** : Structure adaptée à vos besoins
|
|
80
|
-
- **💾 Archivage facilité** : Format standard pour conservation légale
|
|
81
|
-
- **🔄 Migration simplifiée** : Passage vers autres systèmes documentaires
|
|
82
|
-
- **🎯 Extraction ciblée** : Par projet, domaine ou période
|
|
83
|
-
|
|
84
|
-
---
|
|
85
|
-
|
|
86
|
-
## 🔧 Mise en Œuvre
|
|
87
|
-
|
|
88
|
-
**Prérequis techniques :**
|
|
89
|
-
- Accès aux serveurs de fichiers existants
|
|
90
|
-
- Configuration API HubDoc (nous nous en chargeons)
|
|
91
|
-
- Définition des règles métier d'organisation
|
|
92
|
-
|
|
93
|
-
**Accompagnement inclus :**
|
|
94
|
-
- Formation à l'utilisation de l'outil
|
|
95
|
-
- Support technique pendant la migration
|
|
96
|
-
- Validation des mappings avant exécution
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
|
|
100
|
-
*HubDoc Tool : La solution technique qui respecte VOS choix d'organisation métier*
|
package/README-hubdoc-tool.md
DELETED
|
@@ -1,369 +0,0 @@
|
|
|
1
|
-
# @sinoia/hubdoc-tools
|
|
2
|
-
|
|
3
|
-
A professional Node.js command-line tool for bulk document import/export with HubDoc solution. This tool allows you to import documents either directly from a directory structure or using a CSV mapping file with custom metadata, permissions, domain classification, and project assignments.
|
|
4
|
-
|
|
5
|
-
**🚀 Latest Updates (v1.1):**
|
|
6
|
-
- **Flexible Source Directories**: Import from any directory without changing working directory
|
|
7
|
-
- **New `--source` option**: Alternative to `--direct` for better workflow integration
|
|
8
|
-
- **Enhanced mapping generation**: Support for both positional arguments and options
|
|
9
|
-
- **Improved validation**: Better error handling for conflicting options
|
|
10
|
-
|
|
11
|
-
## Features
|
|
12
|
-
|
|
13
|
-
- **Direct Import Mode**: Import all files from a directory, preserving folder structure
|
|
14
|
-
- **Flexible Source Directories**: Import from any directory without changing working directory
|
|
15
|
-
- **Mapping Import Mode**: Use CSV mapping file for precise control over document placement
|
|
16
|
-
- **Interactive & CLI Modes**: Both interactive wizard and command-line interface
|
|
17
|
-
- **Configuration Wizard**: First-time setup for API credentials
|
|
18
|
-
- **Folder Management**: Automatic folder creation in HubDoc
|
|
19
|
-
- **Project Support**: Assign documents to specific projects with classification plans
|
|
20
|
-
- **Permissions Management**: Set user and group permissions on imported documents
|
|
21
|
-
- **Progress Tracking**: Real-time import progress with detailed feedback
|
|
22
|
-
|
|
23
|
-
## Installation
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
# Global installation (recommended)
|
|
27
|
-
npm install -g @sinoia/hubdoc-tools
|
|
28
|
-
|
|
29
|
-
# Verify installation
|
|
30
|
-
hubdoc-tool --version
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## Configuration
|
|
34
|
-
|
|
35
|
-
First, configure your HubDoc API credentials:
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
# Quick OAuth setup (recommended)
|
|
39
|
-
hubdoc-tool get-token rec.hubdoc.sinoia.cloud --save
|
|
40
|
-
|
|
41
|
-
# Interactive configuration wizard
|
|
42
|
-
hubdoc-tool config
|
|
43
|
-
|
|
44
|
-
# Or run any command and it will prompt for configuration
|
|
45
|
-
hubdoc-tool import --interactive
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
### OAuth Token Retrieval (Recommended)
|
|
49
|
-
|
|
50
|
-
The easiest way to get started is using the OAuth token retrieval:
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
# Get token automatically and save to .hubdoc-config.json
|
|
54
|
-
hubdoc-tool get-token rec.hubdoc.sinoia.cloud --save
|
|
55
|
-
|
|
56
|
-
# Custom port and timeout
|
|
57
|
-
hubdoc-tool get-token rec.hubdoc.sinoia.cloud --port 8889 --timeout 600 --save
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
This will:
|
|
61
|
-
1. Start a local server on port 8888 (or specified port)
|
|
62
|
-
2. Open your browser to the HubDoc authentication page
|
|
63
|
-
3. Automatically retrieve the OAuth token after login
|
|
64
|
-
4. Save the token to `.hubdoc-config.json` file if `--save` is used
|
|
65
|
-
|
|
66
|
-
### Manual Configuration
|
|
67
|
-
|
|
68
|
-
The wizard will ask for:
|
|
69
|
-
- **API URL**: Your HubDoc API endpoint (e.g., `https://demo.hubdoc.sinoia.cloud/api/v1`)
|
|
70
|
-
- **API Token**: Your authentication token
|
|
71
|
-
- **Storage Format**: Choose between JSON config file or environment file
|
|
72
|
-
|
|
73
|
-
## Usage
|
|
74
|
-
|
|
75
|
-
### 1. Generate Mapping File
|
|
76
|
-
|
|
77
|
-
Create a CSV mapping file from a directory:
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
# Generate mapping.csv from documents directory (relative path)
|
|
81
|
-
hubdoc-tool generate-mapping ./documents
|
|
82
|
-
|
|
83
|
-
# Generate from absolute path
|
|
84
|
-
hubdoc-tool generate-mapping --source /path/to/documents
|
|
85
|
-
|
|
86
|
-
# Custom output file
|
|
87
|
-
hubdoc-tool gen ./documents -o my-mapping.csv
|
|
88
|
-
|
|
89
|
-
# Generate from any directory with custom output
|
|
90
|
-
hubdoc-tool gen --source /home/user/invoices --output invoices-mapping.csv
|
|
91
|
-
|
|
92
|
-
# Use current directory if no path specified
|
|
93
|
-
hubdoc-tool generate-mapping
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
This creates a CSV file with columns:
|
|
97
|
-
- **File Path**: Path to the source file
|
|
98
|
-
- **Target Folder**: Destination folder in HubDoc (will be created if doesn't exist)
|
|
99
|
-
- **Projet**: Project name (optional)
|
|
100
|
-
- **Domain**: Business domain for transverse classification
|
|
101
|
-
- **Metadata (JSON)**: Additional metadata as JSON object
|
|
102
|
-
- **Read Permissions**: Users and groups who can read the document (format: `users:user1,user2|groups:group1,group2`)
|
|
103
|
-
- **Write Permissions**: Users and groups who can edit the document (format: `users:user1,user2|groups:group1,group2`)
|
|
104
|
-
|
|
105
|
-
### 2. Edit Mapping File
|
|
106
|
-
|
|
107
|
-
Edit the generated CSV to specify:
|
|
108
|
-
|
|
109
|
-
```csv
|
|
110
|
-
File Path,Target Folder,Workspace,Domain,Plan Classement,Metadata (JSON),Read Permissions,Write Permissions
|
|
111
|
-
# === DÉFINITION DES PROJETS ===
|
|
112
|
-
./docs/projets/finance/,CREATE_PROJECT,Projet Finance 2024,Administration,ADMINISTRATION_GENERALE,"{\"type\":\"projet\",\"budget\":500000}",groups:direction,comptabilite,groups:direction
|
|
113
|
-
|
|
114
|
-
# === DOCUMENTS ===
|
|
115
|
-
./docs/invoice.pdf,Financier/Factures,Projet Finance 2024,Administration,,"{\"department\":\"accounting\"}",users:john,jane|groups:finance,groups:finance
|
|
116
|
-
./docs/contract.pdf,Juridique/Contrats,Projet Finance 2024,Légal & Conformité,,"{\"type\":\"legal\"}",groups:legal,management,groups:legal
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
### 3. Import Documents
|
|
120
|
-
|
|
121
|
-
#### Direct Import Mode
|
|
122
|
-
Import all files from a directory:
|
|
123
|
-
|
|
124
|
-
```bash
|
|
125
|
-
# Import all files from documents directory (relative path)
|
|
126
|
-
hubdoc-tool import --direct ./documents
|
|
127
|
-
|
|
128
|
-
# Import from any directory (absolute path)
|
|
129
|
-
hubdoc-tool import --source /path/to/documents
|
|
130
|
-
|
|
131
|
-
# Alternative syntax (same as --source)
|
|
132
|
-
hubdoc-tool import --direct /home/user/invoices
|
|
133
|
-
|
|
134
|
-
# Interactive mode (allows choosing any directory)
|
|
135
|
-
hubdoc-tool import --interactive
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
#### Mapping Import Mode
|
|
139
|
-
Import using CSV mapping file:
|
|
140
|
-
|
|
141
|
-
```bash
|
|
142
|
-
# Import using mapping file
|
|
143
|
-
hubdoc-tool import --mapping mapping.csv
|
|
144
|
-
|
|
145
|
-
# Interactive mode
|
|
146
|
-
hubdoc-tool import --interactive
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
## Command Reference
|
|
150
|
-
|
|
151
|
-
### Global Options
|
|
152
|
-
- `--help`: Show help information
|
|
153
|
-
- `--version`: Show version number
|
|
154
|
-
|
|
155
|
-
### Commands
|
|
156
|
-
|
|
157
|
-
#### `generate-mapping [source-dir]`
|
|
158
|
-
Generate a CSV mapping file from directory structure.
|
|
159
|
-
|
|
160
|
-
**Options:**
|
|
161
|
-
- `-s, --source <dir>`: Source directory to scan (if not provided as argument)
|
|
162
|
-
- `-o, --output <file>`: Output CSV file (default: mapping.csv)
|
|
163
|
-
|
|
164
|
-
**Examples:**
|
|
165
|
-
```bash
|
|
166
|
-
# Using argument
|
|
167
|
-
hubdoc-tool generate-mapping ./documents
|
|
168
|
-
hubdoc-tool gen ./documents -o invoices-mapping.csv
|
|
169
|
-
|
|
170
|
-
# Using --source option (flexible path)
|
|
171
|
-
hubdoc-tool generate-mapping --source /path/to/documents
|
|
172
|
-
hubdoc-tool gen --source /home/user/invoices --output invoices.csv
|
|
173
|
-
|
|
174
|
-
# Use current directory
|
|
175
|
-
hubdoc-tool generate-mapping
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
#### `import`
|
|
179
|
-
Import documents to HubDoc.
|
|
180
|
-
|
|
181
|
-
**Options:**
|
|
182
|
-
- `-d, --direct <dir>`: Direct import mode - import all files from directory
|
|
183
|
-
- `-s, --source <dir>`: Source directory for direct import (alternative to --direct)
|
|
184
|
-
- `-m, --mapping <file>`: Mapping mode - use CSV mapping file
|
|
185
|
-
- `-i, --interactive`: Interactive mode (prompts for options)
|
|
186
|
-
|
|
187
|
-
**Examples:**
|
|
188
|
-
```bash
|
|
189
|
-
# Direct import (relative path)
|
|
190
|
-
hubdoc-tool import --direct ./documents
|
|
191
|
-
|
|
192
|
-
# Direct import from any directory
|
|
193
|
-
hubdoc-tool import --source /path/to/documents
|
|
194
|
-
hubdoc-tool import --direct /home/user/invoices
|
|
195
|
-
|
|
196
|
-
# Mapping import
|
|
197
|
-
hubdoc-tool import --mapping mapping.csv
|
|
198
|
-
|
|
199
|
-
# Interactive mode
|
|
200
|
-
hubdoc-tool import --interactive
|
|
201
|
-
hubdoc-tool import # defaults to interactive if no options
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
**Note:** You cannot use both `--direct` and `--source` options together, as they serve the same purpose. Choose the one that fits your workflow better.
|
|
205
|
-
|
|
206
|
-
## Workflow Examples
|
|
207
|
-
|
|
208
|
-
### Scenario 1: Import from Remote/Network Directory
|
|
209
|
-
```bash
|
|
210
|
-
# Working from your project directory, import documents from network share
|
|
211
|
-
cd /workspace/hubdoc-project
|
|
212
|
-
hubdoc-tool generate-mapping --source /mnt/shared/corporate-docs --output corporate-mapping.csv
|
|
213
|
-
# Edit corporate-mapping.csv to configure folders and permissions
|
|
214
|
-
hubdoc-tool import --mapping corporate-mapping.csv
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
### Scenario 2: Batch Processing Multiple Directories
|
|
218
|
-
```bash
|
|
219
|
-
# Process invoices from different locations
|
|
220
|
-
hubdoc-tool generate-mapping --source /data/invoices/2024 --output invoices-2024.csv
|
|
221
|
-
hubdoc-tool generate-mapping --source /backup/invoices/2023 --output invoices-2023.csv
|
|
222
|
-
# Configure each mapping file separately
|
|
223
|
-
hubdoc-tool import --mapping invoices-2024.csv
|
|
224
|
-
hubdoc-tool import --mapping invoices-2023.csv
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
### Scenario 3: Direct Import for Simple Cases
|
|
228
|
-
```bash
|
|
229
|
-
# Quick import without mapping customization
|
|
230
|
-
hubdoc-tool import --source /home/user/scanned-docs
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
#### `config`
|
|
234
|
-
Configure HubDoc API settings.
|
|
235
|
-
|
|
236
|
-
**Examples:**
|
|
237
|
-
```bash
|
|
238
|
-
hubdoc-tool config
|
|
239
|
-
```
|
|
240
|
-
|
|
241
|
-
#### `get-token`
|
|
242
|
-
Get OAuth token for CLI usage with automatic browser authentication.
|
|
243
|
-
|
|
244
|
-
**Options:**
|
|
245
|
-
- `--save`: Save token to .hubdoc-config.json file automatically
|
|
246
|
-
- `--port <number>`: Local server port for OAuth callback (default: 8888)
|
|
247
|
-
- `--timeout <seconds>`: OAuth flow timeout in seconds (default: 300)
|
|
248
|
-
|
|
249
|
-
**Examples:**
|
|
250
|
-
```bash
|
|
251
|
-
# Get token and display it
|
|
252
|
-
hubdoc-tool get-token rec.hubdoc.sinoia.cloud
|
|
253
|
-
|
|
254
|
-
# Get token and save to .hubdoc-config.json automatically
|
|
255
|
-
hubdoc-tool get-token rec.hubdoc.sinoia.cloud --save
|
|
256
|
-
|
|
257
|
-
# Use custom port and timeout
|
|
258
|
-
hubdoc-tool get-token demo.hubdoc.sinoia.cloud --port 8889 --timeout 600 --save
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
#### `revoke-token`
|
|
262
|
-
Revoke an OAuth token.
|
|
263
|
-
|
|
264
|
-
**Examples:**
|
|
265
|
-
```bash
|
|
266
|
-
hubdoc-tool revoke-token rec.hubdoc.sinoia.cloud token-id-here
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
## Configuration Files
|
|
270
|
-
|
|
271
|
-
The tool supports two configuration formats:
|
|
272
|
-
|
|
273
|
-
### JSON Configuration (`.hubdoc-config.json`)
|
|
274
|
-
|
|
275
|
-
#### Manual Configuration
|
|
276
|
-
```json
|
|
277
|
-
{
|
|
278
|
-
"apiUrl": "https://demo.hubdoc.sinoia.cloud/api/v1",
|
|
279
|
-
"token": "your-api-token"
|
|
280
|
-
}
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
#### OAuth Generated Configuration
|
|
284
|
-
When using `hubdoc-tool get-token --save`, the configuration includes additional metadata:
|
|
285
|
-
|
|
286
|
-
```json
|
|
287
|
-
{
|
|
288
|
-
"apiUrl": "https://rec.hubdoc.sinoia.cloud",
|
|
289
|
-
"token": "xxx-oauth-token-xxx",
|
|
290
|
-
"tokenGenerated": "2024-09-23T15:30:00.000Z",
|
|
291
|
-
"tokenExpires": "2025-09-23T15:30:00.000Z",
|
|
292
|
-
"tokenScopes": ["read", "write", "admin"]
|
|
293
|
-
}
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
### Environment File (`.env`)
|
|
297
|
-
```env
|
|
298
|
-
HUBDOC_API_URL=https://demo.hubdoc.sinoia.cloud/api/v1
|
|
299
|
-
HUBDOC_TOKEN=your-api-token
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
## CSV Mapping Format
|
|
303
|
-
|
|
304
|
-
The CSV mapping file supports the following columns:
|
|
305
|
-
|
|
306
|
-
| Column | Description | Required | Example |
|
|
307
|
-
|--------|-------------|----------|---------|
|
|
308
|
-
| File Path | Path to source file | Yes | `./docs/invoice.pdf` |
|
|
309
|
-
| Target Folder | Destination folder name | No | `Invoices` |
|
|
310
|
-
| Workspace | Project name (technical field) | No | `Projet Finance 2024` |
|
|
311
|
-
| Domain | Business domain | No | `Administration` |
|
|
312
|
-
| Plan Classement | Classification plan template | No | `ADMINISTRATION_GENERALE` |
|
|
313
|
-
| Metadata (JSON) | Additional metadata | No | `{"type":"invoice","amount":1000}` |
|
|
314
|
-
| Read Permissions | Users/groups with read access | No | `users:john,jane\|groups:finance` |
|
|
315
|
-
| Write Permissions | Users/groups with write access | No | `groups:finance` |
|
|
316
|
-
|
|
317
|
-
### Permission Format
|
|
318
|
-
Both Read and Write permissions use the format: `users:user1,user2|groups:group1,group2`
|
|
319
|
-
|
|
320
|
-
- **users**: Comma-separated list of usernames
|
|
321
|
-
- **groups**: Comma-separated list of group names
|
|
322
|
-
- **separator**: Use `|` to separate users and groups
|
|
323
|
-
|
|
324
|
-
**Examples:**
|
|
325
|
-
- Read only for specific users: `users:john,jane`
|
|
326
|
-
- Write access for a group: `groups:editors`
|
|
327
|
-
- Mixed permissions: `users:admin|groups:finance,legal`
|
|
328
|
-
|
|
329
|
-
## Error Handling
|
|
330
|
-
|
|
331
|
-
The tool provides detailed error reporting:
|
|
332
|
-
- Connection failures to HubDoc API
|
|
333
|
-
- File not found errors
|
|
334
|
-
- Permission errors
|
|
335
|
-
- API response errors
|
|
336
|
-
- Invalid CSV format errors
|
|
337
|
-
|
|
338
|
-
Failed imports are logged with specific error messages for troubleshooting.
|
|
339
|
-
|
|
340
|
-
## Development
|
|
341
|
-
|
|
342
|
-
```bash
|
|
343
|
-
# Install dependencies
|
|
344
|
-
npm install
|
|
345
|
-
|
|
346
|
-
# Development mode (for contributors)
|
|
347
|
-
npm install
|
|
348
|
-
npm run build
|
|
349
|
-
npm run dev -- import --interactive
|
|
350
|
-
|
|
351
|
-
# Build
|
|
352
|
-
npm run build
|
|
353
|
-
|
|
354
|
-
# Test
|
|
355
|
-
npm test
|
|
356
|
-
```
|
|
357
|
-
|
|
358
|
-
## API Integration
|
|
359
|
-
|
|
360
|
-
This tool integrates with the HubDoc API and supports:
|
|
361
|
-
- Document upload with multipart form data
|
|
362
|
-
- Folder creation and management
|
|
363
|
-
- Project integration with classification plans
|
|
364
|
-
- Permission management
|
|
365
|
-
- Metadata assignment
|
|
366
|
-
|
|
367
|
-
## License
|
|
368
|
-
|
|
369
|
-
MIT License
|
package/README-npm.md
DELETED
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
# @sinoia/hubdoc-tools
|
|
2
|
-
|
|
3
|
-
🚀 **Professional document import/export tool for HubDoc solution**
|
|
4
|
-
|
|
5
|
-
[](https://www.npmjs.com/package/@sinoia/hubdoc-tools)
|
|
6
|
-
[](https://opensource.org/licenses/MIT)
|
|
7
|
-
|
|
8
|
-
## 📋 Overview
|
|
9
|
-
|
|
10
|
-
`@sinoia/hubdoc-tools` is a powerful command-line tool for bulk document management with HubDoc. Import documents from local filesystem or cloud sources, export with folder structure preservation, and manage workspaces, folders, and permissions.
|
|
11
|
-
|
|
12
|
-
## 🚀 Quick Start
|
|
13
|
-
|
|
14
|
-
### Installation
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
# Global installation (recommended)
|
|
18
|
-
npm install -g @sinoia/hubdoc-tools
|
|
19
|
-
|
|
20
|
-
# Local installation
|
|
21
|
-
npm install @sinoia/hubdoc-tools
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
### Configuration
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
# First-time setup
|
|
28
|
-
hubdoc-tool config
|
|
29
|
-
|
|
30
|
-
# Or create config file manually
|
|
31
|
-
echo '{
|
|
32
|
-
"apiUrl": "https://your.hubdoc.instance/api/v1",
|
|
33
|
-
"token": "your-jwt-token"
|
|
34
|
-
}' > .hubdoc-config.json
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## 📥 Import Documents
|
|
38
|
-
|
|
39
|
-
### Direct Import
|
|
40
|
-
```bash
|
|
41
|
-
# Import all files from a directory
|
|
42
|
-
hubdoc-tool import --source /path/to/documents
|
|
43
|
-
|
|
44
|
-
# With workspace assignment
|
|
45
|
-
hubdoc-tool import --source /path/to/documents --workspace "Project ABC"
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
### CSV Mapping Import
|
|
49
|
-
```bash
|
|
50
|
-
# Generate mapping file
|
|
51
|
-
hubdoc-tool generate-mapping /path/to/documents
|
|
52
|
-
|
|
53
|
-
# Edit mapping.csv to specify folders, workspaces, permissions
|
|
54
|
-
# Then import
|
|
55
|
-
hubdoc-tool import --mapping mapping.csv
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
## 📤 Export Documents
|
|
59
|
-
|
|
60
|
-
### Scan Mode
|
|
61
|
-
```bash
|
|
62
|
-
# Generate export mapping
|
|
63
|
-
hubdoc-tool export --scan
|
|
64
|
-
|
|
65
|
-
# Export with custom filters
|
|
66
|
-
hubdoc-tool export --scan --project "Client Project" --domain "legal"
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
### Export Mode
|
|
70
|
-
```bash
|
|
71
|
-
# Export documents using mapping
|
|
72
|
-
hubdoc-tool export --mapping export-mapping.csv
|
|
73
|
-
|
|
74
|
-
# Export with XML metadata
|
|
75
|
-
hubdoc-tool export --generate-xml-metadata
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
## 🔌 Plugin Architecture
|
|
79
|
-
|
|
80
|
-
Support for multiple document sources:
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
# Microsoft OneDrive/SharePoint
|
|
84
|
-
hubdoc-tool --engine onedrive
|
|
85
|
-
|
|
86
|
-
# Google Drive
|
|
87
|
-
hubdoc-tool --engine googledrive
|
|
88
|
-
|
|
89
|
-
# AWS S3
|
|
90
|
-
hubdoc-tool --engine s3
|
|
91
|
-
|
|
92
|
-
# Local filesystem with XML metadata
|
|
93
|
-
hubdoc-tool --engine filesystem --source /path/to/docs
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
## 📋 CSV Mapping Format
|
|
97
|
-
|
|
98
|
-
| Column | Description | Example |
|
|
99
|
-
|--------|-------------|---------|
|
|
100
|
-
| File Path | Source file path | `/docs/contract.pdf` |
|
|
101
|
-
| Target Folder | Destination in HubDoc | `Legal/Contracts` |
|
|
102
|
-
| Workspace | Workspace name | `Client Project` |
|
|
103
|
-
| Domain | Business domain | `legal` |
|
|
104
|
-
| Metadata (JSON) | Custom metadata | `{"author": "John", "type": "contract"}` |
|
|
105
|
-
| Permissions | Access control | `users:john,jane\|groups:legal,admin` |
|
|
106
|
-
|
|
107
|
-
## ⚙️ Configuration Options
|
|
108
|
-
|
|
109
|
-
### JSON Config (.hubdoc-config.json)
|
|
110
|
-
```json
|
|
111
|
-
{
|
|
112
|
-
"apiUrl": "https://your.hubdoc.instance/api/v1",
|
|
113
|
-
"token": "your-jwt-token",
|
|
114
|
-
"defaultWorkspace": "Main Project",
|
|
115
|
-
"defaultDomain": "general"
|
|
116
|
-
}
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
### Environment Variables (.env)
|
|
120
|
-
```bash
|
|
121
|
-
HUBDOC_API_URL=https://your.hubdoc.instance/api/v1
|
|
122
|
-
HUBDOC_TOKEN=your-jwt-token
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
## 🛠️ Advanced Usage
|
|
126
|
-
|
|
127
|
-
### Concurrent Processing
|
|
128
|
-
```bash
|
|
129
|
-
# Import with 5 concurrent jobs
|
|
130
|
-
hubdoc-tool import --mapping mapping.csv --concurrent 5
|
|
131
|
-
|
|
132
|
-
# Export with parallel downloads
|
|
133
|
-
hubdoc-tool export --mapping export.csv --concurrent 3
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
### Interactive Mode
|
|
137
|
-
```bash
|
|
138
|
-
# Interactive configuration and processing
|
|
139
|
-
hubdoc-tool --interactive
|
|
140
|
-
|
|
141
|
-
# Interactive engine selection
|
|
142
|
-
hubdoc-tool --interactive --engine
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
### Permission Management
|
|
146
|
-
```bash
|
|
147
|
-
# Set read permissions
|
|
148
|
-
hubdoc-tool import --source /docs --read-users "john,jane" --read-groups "team"
|
|
149
|
-
|
|
150
|
-
# Set write permissions
|
|
151
|
-
hubdoc-tool import --source /docs --write-users "admin" --write-groups "managers"
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
## 🏢 Enterprise Features
|
|
155
|
-
|
|
156
|
-
- **Workspace Management**: Create and organize workspaces
|
|
157
|
-
- **Folder Hierarchy**: Automatic folder structure creation
|
|
158
|
-
- **Permission Control**: User and group-based access control
|
|
159
|
-
- **Metadata Support**: Rich metadata with JSON format
|
|
160
|
-
- **Domain Classification**: Cross-workspace business domains
|
|
161
|
-
- **Bulk Operations**: Process thousands of documents efficiently
|
|
162
|
-
- **Error Recovery**: Detailed error reporting and retry mechanisms
|
|
163
|
-
- **XML Metadata Export**: Full metadata preservation
|
|
164
|
-
|
|
165
|
-
## 🔧 API Integration
|
|
166
|
-
|
|
167
|
-
### HubDoc API Support
|
|
168
|
-
- OAuth2 authentication
|
|
169
|
-
- RESTful API endpoints
|
|
170
|
-
- Pagination handling
|
|
171
|
-
- Rate limiting compliance
|
|
172
|
-
- Error handling and retry logic
|
|
173
|
-
|
|
174
|
-
### Supported Operations
|
|
175
|
-
- ✅ Workspace CRUD operations
|
|
176
|
-
- ✅ Folder hierarchy management
|
|
177
|
-
- ✅ Document upload/download
|
|
178
|
-
- ✅ Permission management
|
|
179
|
-
- ✅ Metadata operations
|
|
180
|
-
- ✅ Search and filtering
|
|
181
|
-
|
|
182
|
-
## 📊 Performance
|
|
183
|
-
|
|
184
|
-
- **Concurrent Processing**: Up to 10 parallel operations
|
|
185
|
-
- **Large Files**: Support for files up to 100MB
|
|
186
|
-
- **Bulk Operations**: Process 1000+ documents efficiently
|
|
187
|
-
- **Memory Optimization**: Streaming for large datasets
|
|
188
|
-
- **Progress Tracking**: Real-time progress indicators
|
|
189
|
-
|
|
190
|
-
## 🐛 Troubleshooting
|
|
191
|
-
|
|
192
|
-
### Common Issues
|
|
193
|
-
|
|
194
|
-
**Connection Failed**
|
|
195
|
-
```bash
|
|
196
|
-
# Test API connection
|
|
197
|
-
hubdoc-tool config --test
|
|
198
|
-
|
|
199
|
-
# Check configuration
|
|
200
|
-
hubdoc-tool config --show
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
**Permission Denied**
|
|
204
|
-
```bash
|
|
205
|
-
# Verify token permissions
|
|
206
|
-
hubdoc-tool --debug import --mapping test.csv
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
**Large File Upload**
|
|
210
|
-
```bash
|
|
211
|
-
# Check file size limits
|
|
212
|
-
hubdoc-tool import --source /docs --skip-large-files
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
## 📚 Documentation
|
|
216
|
-
|
|
217
|
-
- [Full Documentation](https://gitlab.com/sinoia/hubdoc-tools/-/blob/main/README.md)
|
|
218
|
-
- [API Reference](https://gitlab.com/sinoia/hubdoc-tools/-/blob/main/docs/)
|
|
219
|
-
- [Plugin Development](https://gitlab.com/sinoia/hubdoc-tools/-/blob/main/docs/plugins.md)
|
|
220
|
-
- [Examples](https://gitlab.com/sinoia/hubdoc-tools/-/tree/main/examples)
|
|
221
|
-
|
|
222
|
-
## 🤝 Contributing
|
|
223
|
-
|
|
224
|
-
We welcome contributions! Please see our [Contributing Guide](https://gitlab.com/sinoia/hubdoc-tools/-/blob/main/CONTRIBUTING.md).
|
|
225
|
-
|
|
226
|
-
## 📄 License
|
|
227
|
-
|
|
228
|
-
MIT License - see [LICENSE](https://gitlab.com/sinoia/hubdoc-tools/-/blob/main/LICENSE) file for details.
|
|
229
|
-
|
|
230
|
-
## 🆘 Support
|
|
231
|
-
|
|
232
|
-
- 🐛 [Report Issues](https://gitlab.com/sinoia/hubdoc-tools/-/issues)
|
|
233
|
-
- 💬 [Discussions](https://gitlab.com/sinoia/hubdoc-tools/-/discussions)
|
|
234
|
-
- 📧 [Email Support](mailto:support@sinoia.com)
|
|
235
|
-
|
|
236
|
-
---
|
|
237
|
-
|
|
238
|
-
**Made with ❤️ by [Sinoia](https://sinoia.com) - Professional Document Management Solutions**
|