aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjorn Monnens <bjorn.monnens@jidoka.be>2024-11-09 15:08:23 +0100
committerGitHub <noreply@github.com>2024-11-09 14:08:23 +0000
commite57937e118328a98d71325c536da1ee9e3537954 (patch)
treea58c70f686aa1b3bc54378026ce94adef1a7fb5e
parenta24755d92ce399beaf9575b75625c179e371b0c5 (diff)
downloadkarakeep-e57937e118328a98d71325c536da1ee9e3537954.tar.zst
docs: Update CLI importing docs to better handle large collections (#630)
Importing through a bash script, necessary in case the errror "xargs: command line cannot be assembled, too long" occurs. Only tested on Mac, but should work on all environments
-rw-r--r--docs/versioned_docs/version-v0.18.0/10-import.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/versioned_docs/version-v0.18.0/10-import.md b/docs/versioned_docs/version-v0.18.0/10-import.md
index b4e31d44..b2cb0dbf 100644
--- a/docs/versioned_docs/version-v0.18.0/10-import.md
+++ b/docs/versioned_docs/version-v0.18.0/10-import.md
@@ -36,6 +36,19 @@ If you can get your bookmarks in a text file with one link per line, you can use
cat all_links.txt | xargs -I{} hoarder --api-key <key> --server-addr <addr> bookmarks add --link {}
```
+alternatively if you get the error (xargs: command line cannot be assembled, too long), this means your URL is to long. Following bash script can be used to import a file that contains the URLs
+
+```
+#!/bin/bash
+
+api_key="<key>"
+server_addr="<addr>"
+
+while IFS= read -r url; do
+ hoarder --api-key "$api_key" --server-addr "$server_addr" bookmarks add --link "$url"
+done < all_links.txt
+```
+
## Exporting Bookmarks from Chrome
- Open Chrome and go to `chrome://bookmarks`