Skip to content

Build your personal knowledge base with Trilium Notes

docs(user): mention changes to OneNote import

Elian Doranb38db2e31c44
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Configuration (config.ini or environment variables).html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Configuration (config.ini or environment variables).html
index 82f32ca87c..464e9ae7d7 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Configuration (config.ini or environment variables).html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Configuration (config.ini or environment variables).html
@@ -12,9 +12,9 @@
to lowest):</p>
<ol>
<li><strong>Environment variables</strong> (checked first)</li>
- <li class="ck-list-marker-bold"><strong>config.ini file values</strong>
+ <li><strong>config.ini file values</strong>
</li>
- <li class="ck-list-marker-bold"><strong>Default values</strong>
+ <li><strong>Default values</strong>
</li>
</ol>
<h2>Environment Variable Patterns</h2>
@@ -227,7 +227,7 @@
</table>
</figure>
<h3>MultiFactorAuthentication Section</h3>
-<p>See&nbsp;<a class="reference-link" href="#root/WOcw2SLH6tbX/_help_x1lQNKQBqLcA">Signing in with OpenID Connect</a>.</p>
+<p>See&nbsp;<a class="reference-link" href="#root/_help_x1lQNKQBqLcA">Signing in with OpenID Connect</a>.</p>
<h3>Logging Section</h3>
<figure class="table">
<table>
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Import & Export/Importing data from other applications/Microsoft OneNote.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Import & Export/Importing data from other applications/Microsoft OneNote.html
index a38e9e7e0e..ad583a7f52 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Import & Export/Importing data from other applications/Microsoft OneNote.html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Import & Export/Importing data from other applications/Microsoft OneNote.html
@@ -48,6 +48,61 @@
<li>Creation and modification of both notes and sections is preserved. The
order of section or section groups is not preserved (see limitations).</li>
</ul>
+<h2>Error management and reporting</h2>
+<p>The OneNote importer uses Microsoft's Graph API which handles the HTML
+ export (that we later post-process for Trilium use). The Graph API itself
+ has to process the OneNote pages before sending them to us, and as such
+ it's a time-consuming operation that is directly proportional to the number
+ of notes and the complexity/size of the notes.</p>
+<p>The Graph API throttles access if it detects too many operations. The
+ importer takes that into account, but sometimes this means that most of
+ the time is spent waiting for the Graph API to unblock access rather than
+ actually importing data.</p>
+<p>In addition, some pages may fail at the Graph API level due to an internal
+ timeout on their side or other issues. Trilium will try to refetch pages
+ in order to avoid that but sometimes pages cannot be retrieved even after
+ multiple retries. In that case, the importer will still create a corresponding
+ note in Trilium but with an error report instead of a content. This preserves&nbsp;
+ <a
+ class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/iPIMuisry3hd/QEAPj01N5f7w/_help_hrZ1D00cLbal">Internal (reference) links</a>&nbsp;and makes it easy to identify and
+ manually fix the pages that failed.</p>
+<p>At the end of the import, the top-level note called <em>OneNote</em> <em>import</em> will
+ contain information about how the import went:</p>
+<ul>
+ <li>
+ <p>The number of notes imported;</p>
+ </li>
+ <li>
+ <p>The success rate;</p>
+ </li>
+ <li>
+ <p>A list of notes that could not be imported, as well as the failure reason;</p>
+ </li>
+ <li>
+ <p>Pages whose images/attachments failed to download</p>
+ </li>
+ <li>
+ <p>How long the import spent waiting out throttling.</p>
+ </li>
+</ul>
+<p>To avoid cases in which the import is fundamentally broken (e.g. an expired
+ sign-in), the import will error out if it fails to import 6 pages in a
+ row.</p>
+<h2>Attributes</h2>
+<p>Pages imported from OneNote have a few built-in <a href="#root/pOsGYCXsbNQG/tC7s2alapj8V/zEY4DaJG4YT5/_help_HI6GBBIduIgv">labels</a>:</p>
+<ul>
+ <li>
+ <p><code spellcheck="false">oneNotePageId</code>, with the corresponding
+ page ID in OneNote. This can be used to identify the original OneNote page.
+ Trilium doesn't use it in any way at this moment.</p>
+ </li>
+ <li>
+ <p><code spellcheck="false">oneNoteImportFailed</code> attached to notes that
+ couldn't be imported. This can be used to quickly&nbsp;<a class="reference-link"
+ href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/wArbEsdSae6g/_help_eIg8jdvaoNNd">Search</a>&nbsp;for
+ failed notes.</p>
+ </li>
+</ul>
<h2>Limitations</h2>
<h3>Regarding OneNote's freehand structure</h3>
<p>OneNote is fundamentally different to Trilium in structure because it
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Desktop Installation/Network Access.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Desktop Installation/Network Access.html
index 85edddf6f6..6d9161657c 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Desktop Installation/Network Access.html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Desktop Installation/Network Access.html
@@ -47,7 +47,7 @@ class="table">
<td><a class="reference-link" href="#root/_help_R9pX4DGra2Vt">Sharing</a>&nbsp;notes</td>
<td>❌️ completely disabled (403), if you are using&nbsp;<a class="reference-link"
href="#root/_help_cbkrhQjrkKrh">Synchronization</a>&nbsp;this will still work
- as part of the <a href="#root/pOsGYCXsbNQG/Otzi9La2YAUX/_help_WOcw2SLH6tbX">server</a>.</td>
+ as part of the <a href="#root/_help_WOcw2SLH6tbX">server</a>.</td>
<td>🌐 <code spellcheck="false">localhost</code> + LAN</td>
</tr>
</tbody>
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/Signing in with OpenID Connect.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/Signing in with OpenID Connect.html
index 6f037b04ce..f495d7050a 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/Signing in with OpenID Connect.html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/Signing in with OpenID Connect.html
@@ -15,9 +15,10 @@
</ol>
<h3>Configuring the authentication provider</h3>
<ol>
- <li>First, make sure the authentication provider (e.g. Google, Authelia) is
- configured properly. See&nbsp;<a class="reference-link" href="#root/pOsGYCXsbNQG/Otzi9La2YAUX/WOcw2SLH6tbX/x1lQNKQBqLcA/_help_IgkTHSaFfq6A">Setting up with various providers</a>&nbsp;for
- concrete examples.
+ <li>
+ <p>First, make sure the authentication provider (e.g. Google, Authelia) is
+ configured properly. See&nbsp;<a class="reference-link" href="#root/_help_IgkTHSaFfq6A">Setting up with various providers</a>&nbsp;for
+ concrete examples.</p>
<ol>
<li>The redirect URL of Trilium is <code spellcheck="false">https://&lt;your-trilium-domain&gt;/callback</code>.</li>
<li>You should obtain the base URL, client ID and client secret.</li>
@@ -26,14 +27,8 @@
<li>
<p>Set the following information using&nbsp;<a class="reference-link" href="#root/_help_Gzjqa934BdH4">Configuration (config.ini or environment variables)</a>:</p>
<figure
- class="table" style="width:101.29%;">
- <table class="ck-table-resized">
- <colgroup>
- <col style="width:11.67%;">
- <col style="width:23.7%;">
- <col style="width:29.4%;">
- <col style="width:35.23%;">
- </colgroup>
+ class="table">
+ <table>
<thead>
<tr>
<th>Configuration</th>
@@ -90,15 +85,8 @@
spellcheck="false">oauthIssuerName</code>, and <code spellcheck="false">oauthIssuerIcon</code> in
the <code spellcheck="false">config.ini</code> file. Alternatively, these
values can be set using environment variables:</p>
- <figure class="table"
- style="width:106.63%;">
- <table class="ck-table-resized">
- <colgroup>
- <col style="width:11.08%;">
- <col style="width:22.5%;">
- <col style="width:27.93%;">
- <col style="width:38.49%;">
- </colgroup>
+ <figure class="table">
+ <table>
<thead>
<tr>
<th>Configuration</th>
@@ -139,7 +127,9 @@
</figure>
<p>All the fields here are optional, since the default OAuth issuer is Google.</p>
</li>
- <li>Restart the server so that the changes are applied.</li>
+ <li>
+ <p>Restart the server so that the changes are applied.</p>
+ </li>
</ol>
<aside class="admonition note">
<p>Legacy environment variables are also supported: <code spellcheck="false">TRILIUM_OAUTH_BASE_URL</code>,
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/Signing in with OpenID Connect/Setting up with various providers.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/Signing in with OpenID Connect/Setting up with various providers.html
index 7e67f4a73d..676b866c1b 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/Signing in with OpenID Connect/Setting up with various providers.html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/Signing in with OpenID Connect/Setting up with various providers.html
@@ -1,6 +1,6 @@
<aside class="admonition note">
<p>This page contains instructions on how to set up&nbsp;<a class="reference-link"
- href="#root/pOsGYCXsbNQG/Otzi9La2YAUX/WOcw2SLH6tbX/_help_x1lQNKQBqLcA">Signing in with OpenID Connect</a>&nbsp;with
+ href="#root/_help_x1lQNKQBqLcA">Signing in with OpenID Connect</a>&nbsp;with
various providers such as Authelia, GitLab,. Google. Note that while the
configuration reference is correct and up to date, the steps to create
the OAuth application might differ slightly as providers change their UI.</p>
@@ -19,48 +19,32 @@
Authelia's <code spellcheck="false">configuration.yml</code>, replacing
<code
spellcheck="false">&lt;server&gt;</code>with the URL of your Trilium instance:</p><pre><code class="language-text-x-yaml">identity_providers:
-
oidc:
-
clients:
-
- client_id: 'trilium'
-
client_name: 'Trilium'
-
client_secret: '&lt;Digest&gt;'
-
public: false
-
authorization_policy: 'two_factor'
-
redirect_uris:
-
- 'https://&lt;server&gt;/callback'
-
scopes:
-
- 'openid'
-
- 'profile'
-
- 'email'</code></pre>
<p>Unlike GitLab, <code spellcheck="false">client_id</code> is a name you choose
rather than one the provider generates.</p>
</li>
- <li>Restart Authelia.</li>
+ <li>
+ <p>Restart Authelia.</p>
+ </li>
</ol>
<p>Adjust <code spellcheck="false">config.ini</code>, using the <code spellcheck="false">Random Password</code> from
step 1:</p><pre><code class="language-text-x-trilium-auto">[MultiFactorAuthentication]
-
oauthBaseUrl=https://&lt;server&gt;
-
oauthClientId=&lt;ClientId&gt;
-
oauthClientSecret=&lt;RandomPassword&gt;
-
oauthIssuerBaseUrl=https://&lt;server&gt;
-
oauthIssuerName=Authelia</code></pre>
<aside class="admonition important">
<p>Do <strong>not</strong> set <code spellcheck="false">oauthClientAuthMethod</code> for
@@ -111,28 +95,17 @@ oauthClientAuthMethod=client_secret_post
2.0 and not OpenID Connect, so it will fail with <code spellcheck="false">OAUTH_RESPONSE_IS_NOT_CONFORM</code>.</p>
<h2>Google</h2>
<ol>
- <li>
- <p>Go to <a href="https://console.cloud.google.com/auth/clients">Google Cloud's Clients</a> dashboard
- and select <em>Create client</em>.</p>
- </li>
- <li>
- <p>For <em>Application type,</em> select <em>Web application</em>.</p>
- </li>
- <li>
- <p>In <em>Authorized redirect URIs</em>, set &nbsp;<code spellcheck="false">https://&lt;server&gt;/callback</code>.</p>
- </li>
- <li>
- <p>Press <em>Create</em> and copy <em>Client ID</em> and <em>Client secret</em>.</p>
- </li>
+ <li>Go to <a href="https://console.cloud.google.com/auth/clients">Google Cloud's Clients</a> dashboard
+ and select <em>Create client</em>.</li>
+ <li>For <em>Application type,</em> select <em>Web application</em>.</li>
+ <li>In <em>Authorized redirect URIs</em>, set &nbsp;<code spellcheck="false">https://&lt;server&gt;/callback</code>.</li>
+ <li>Press <em>Create</em> and copy <em>Client ID</em> and <em>Client secret</em>.</li>
</ol>
<p>Adjust <code spellcheck="false">config.ini</code> as follows, replacing
<code
spellcheck="false">&lt;ClientID&gt;</code>and <code spellcheck="false">&lt;ClientSecret&gt;</code> with
the values from the last step as well as the <code spellcheck="false">&lt;server&gt;</code> with
a URL to your Trilium instance.</p><pre><code class="language-text-x-trilium-auto">[MultiFactorAuthentication]
-
oauthBaseUrl=https://&lt;server&gt;
-
oauthClientId=&lt;ClientID&gt;
-
oauthClientSecret=&lt;ClientSecret&gt;</code></pre>
\ No newline at end of file
diff --git a/docs/User Guide/!!!meta.json b/docs/User Guide/!!!meta.json
index 4bce750500..32e963d405 100644
--- a/docs/User Guide/!!!meta.json
+++ b/docs/User Guide/!!!meta.json
@@ -542,6 +542,13 @@
"name": "internalLink",
"value": "cbkrhQjrkKrh",
"isInheritable": false,
+ "position": 70
+ },
+ {
+ "type": "relation",
+ "name": "internalLink",
+ "value": "WOcw2SLH6tbX",
+ "isInheritable": false,
"position": 80
},
{
@@ -557,13 +564,6 @@
"value": "bx bx-network-chart",
"isInheritable": false,
"position": 90
- },
- {
- "type": "relation",
- "name": "internalLink",
- "value": "WOcw2SLH6tbX",
- "isInheritable": false,
- "position": 100
}
],
"format": "markdown",
@@ -1601,31 +1601,38 @@
{
"type": "relation",
"name": "internalLink",
- "value": "Gzjqa934BdH4",
+ "value": "IgkTHSaFfq6A",
"isInheritable": false,
"position": 20
},
{
"type": "relation",
"name": "internalLink",
- "value": "4TIF1oA4VQRO",
+ "value": "Gzjqa934BdH4",
"isInheritable": false,
"position": 30
},
{
"type": "relation",
"name": "internalLink",
- "value": "vcjrb3VVYPZI",
+ "value": "4TIF1oA4VQRO",
"isInheritable": false,
"position": 40
},
{
"type": "relation",
"name": "internalLink",
- "value": "ud6MShXL4WpO",
+ "value": "vcjrb3VVYPZI",
"isInheritable": false,
"position": 50
},
+ {
+ "type": "relation",
+ "name": "internalLink",
+ "value": "ud6MShXL4WpO",
+ "isInheritable": false,
+ "position": 60
+ },
{
"type": "label",
"name": "iconClass",
@@ -1639,13 +1646,6 @@
"value": "openid-connect",
"isInheritable": false,
"position": 70
- },
- {
- "type": "relation",
- "name": "internalLink",
- "value": "IgkTHSaFfq6A",
- "isInheritable": false,
- "position": 80
}
],
"format": "markdown",
@@ -1670,19 +1670,19 @@
"type": "text",
"mime": "text/html",
"attributes": [
+ {
+ "type": "relation",
+ "name": "internalLink",
+ "value": "x1lQNKQBqLcA",
+ "isInheritable": false,
+ "position": 10
+ },
{
"type": "label",
"name": "shareAlias",
"value": "setup",
"isInheritable": false,
"position": 30
- },
- {
- "type": "relation",
- "name": "internalLink",
- "value": "x1lQNKQBqLcA",
- "isInheritable": false,
- "position": 40
}
],
"format": "markdown",
@@ -7467,6 +7467,20 @@
"value": "bx bx-window-open",
"isInheritable": false,
"position": 20
+ },
+ {
+ "type": "relation",
+ "name": "internalLink",
+ "value": "HI6GBBIduIgv",
+ "isInheritable": false,
+ "position": 90
+ },
+ {
+ "type": "relation",
+ "name": "internalLink",
+ "value": "eIg8jdvaoNNd",
+ "isInheritable": false,
+ "position": 100
}
],
"format": "markdown",
@@ -17867,6 +17881,13 @@
"isInheritable": false,
"position": 10
},
+ {
+ "type": "relation",
+ "name": "internalLink",
+ "value": "x1lQNKQBqLcA",
+ "isInheritable": false,
+ "position": 20
+ },
{
"type": "label",
"name": "shareAlias",
@@ -17880,13 +17901,6 @@
"value": "bx bx-cog",
"isInheritable": false,
"position": 30
- },
- {
- "type": "relation",
- "name": "internalLink",
- "value": "x1lQNKQBqLcA",
- "isInheritable": false,
- "position": 40
}
],
"format": "markdown",
diff --git a/docs/User Guide/User Guide.md b/docs/User Guide/User Guide.md
index 3e5537135c..06d9821f8a 100644
--- a/docs/User Guide/User Guide.md
+++ b/docs/User Guide/User Guide.md
@@ -1,5 +1,5 @@
# User Guide
-Trilium is an open-source solution for note-taking and organizing a personal knowledge base. Use it locally on your desktop, or sync it with your self-hosted server to keep your notes everywhere you go.
+Trilium is an open-source solution for note-takinong and organizing a personal knowledge base. Use it locally on your desktop, or sync it with your self-hosted server to keep your notes everywhere you go.
> [!TIP]
> The same documentation can be accessed locally from within the Trilium Notes application by pressing <kbd>F1</kbd>.
diff --git a/docs/User Guide/User Guide/Basic Concepts and Features/Import & Export/Importing data from other applications/Microsoft OneNote.md b/docs/User Guide/User Guide/Basic Concepts and Features/Import & Export/Importing data from other applications/Microsoft OneNote.md
index bcd1b84642..184f5c4a6b 100644
--- a/docs/User Guide/User Guide/Basic Concepts and Features/Import & Export/Importing data from other applications/Microsoft OneNote.md
+++ b/docs/User Guide/User Guide/Basic Concepts and Features/Import & Export/Importing data from other applications/Microsoft OneNote.md
@@ -29,6 +29,31 @@ Regarding the note structure:
* Sub-pages and section groups are maintained by nesting notes in a hierarchical structure.
* Creation and modification of both notes and sections is preserved. The order of section or section groups is not preserved (see limitations).
+## Error management and reporting
+
+The OneNote importer uses Microsoft's Graph API which handles the HTML export (that we later post-process for Trilium use). The Graph API itself has to process the OneNote pages before sending them to us, and as such it's a time-consuming operation that is directly proportional to the number of notes and the complexity/size of the notes.
+
+The Graph API throttles access if it detects too many operations. The importer takes that into account, but sometimes this means that most of the time is spent waiting for the Graph API to unblock access rather than actually importing data.
+
+In addition, some pages may fail at the Graph API level due to an internal timeout on their side or other issues. Trilium will try to refetch pages in order to avoid that but sometimes pages cannot be retrieved even after multiple retries. In that case, the importer will still create a corresponding note in Trilium but with an error report instead of a content. This preserves <a class="reference-link" href="../../../Note%20Types/Text/Links/Internal%20(reference)%20links.md">Internal (reference) links</a> and makes it easy to identify and manually fix the pages that failed.
+
+At the end of the import, the top-level note called _OneNote_ _import_ will contain information about how the import went:
+
+* The number of notes imported;
+* The success rate;
+* A list of notes that could not be imported, as well as the failure reason;
+* Pages whose images/attachments failed to download
+* How long the import spent waiting out throttling.
+
+To avoid cases in which the import is fundamentally broken (e.g. an expired sign-in), the import will error out if it fails to import 6 pages in a row.
+
+## Attributes
+
+Pages imported from OneNote have a few built-in [labels](../../../Advanced%20Usage/Attributes/Labels.md):
+
+* `oneNotePageId`, with the corresponding page ID in OneNote. This can be used to identify the original OneNote page. Trilium doesn't use it in any way at this moment.
+* `oneNoteImportFailed` attached to notes that couldn't be imported. This can be used to quickly <a class="reference-link" href="../../Navigation/Search.md">Search</a> for failed notes.
+
## Limitations
### Regarding OneNote's freehand structure
diff --git a/docs/User Guide/User Guide/Installation & Setup/Server Installation/Signing in with OpenID Connect.md b/docs/User Guide/User Guide/Installation & Setup/Server Installation/Signing in with OpenID Connect.md
index 219b5d554a..15a5889c3a 100644
--- a/docs/User Guide/User Guide/Installation & Setup/Server Installation/Signing in with OpenID Connect.md
+++ b/docs/User Guide/User Guide/Installation & Setup/Server Installation/Signing in with OpenID Connect.md
@@ -13,6 +13,7 @@ Setting up authentication with OpenID connect is a two-step process:
### Configuring the authentication provider
1. First, make sure the authentication provider (e.g. Google, Authelia) is configured properly. See <a class="reference-link" href="Signing%20in%20with%20OpenID%20Connect/Setting%20up%20with%20various%20providers.md">Setting up with various providers</a> for concrete examples.
+
1. The redirect URL of Trilium is `https://<your-trilium-domain>/callback`.
2. You should obtain the base URL, client ID and client secret.
2. Set the following information using <a class="reference-link" href="../../Advanced%20Usage/Configuration%20(config.ini%20or%20environment%20variables).md">Configuration (config.ini or environment variables)</a>: