aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMoondragon85 <42060641+Moondragon85@users.noreply.github.com>2025-12-27 12:52:37 +0100
committerGitHub <noreply@github.com>2025-12-27 11:52:37 +0000
commit93630ce88dcb07bcdf7445185fe20612a5c22b7b (patch)
tree888cefced37ae1a136c322daf65e03d55cbc07c5
parent267db791290f4f539d7bda113992e3d1690b0e8b (diff)
downloadkarakeep-93630ce88dcb07bcdf7445185fe20612a5c22b7b.tar.zst
feat: add Matter import support (#2245)
* Matter import * use zod * fix date parsing --------- Co-authored-by: Mohamed Bassem <me@mbassem.com>
-rw-r--r--apps/web/components/settings/ImportExport.tsx17
-rw-r--r--apps/web/lib/i18n/locales/ar/translation.json1
-rw-r--r--apps/web/lib/i18n/locales/cs/translation.json1
-rw-r--r--apps/web/lib/i18n/locales/da/translation.json1
-rw-r--r--apps/web/lib/i18n/locales/de/translation.json1
-rw-r--r--apps/web/lib/i18n/locales/el/translation.json1
-rw-r--r--apps/web/lib/i18n/locales/en/translation.json1
-rw-r--r--apps/web/lib/i18n/locales/en_US/translation.json1
-rw-r--r--apps/web/lib/i18n/locales/es/translation.json1
-rw-r--r--apps/web/lib/i18n/locales/fa/translation.json1
-rw-r--r--apps/web/lib/i18n/locales/fi/translation.json1
-rw-r--r--apps/web/lib/i18n/locales/fr/translation.json1
-rw-r--r--apps/web/lib/i18n/locales/ga/translation.json1
-rw-r--r--apps/web/lib/i18n/locales/gl/translation.json1
-rw-r--r--apps/web/lib/i18n/locales/hr/translation.json1
-rw-r--r--apps/web/lib/i18n/locales/hu/translation.json1
-rw-r--r--apps/web/lib/i18n/locales/it/translation.json1
-rw-r--r--apps/web/lib/i18n/locales/ja/translation.json1
-rw-r--r--apps/web/lib/i18n/locales/ko/translation.json1
-rw-r--r--apps/web/lib/i18n/locales/nb_NO/translation.json1
-rw-r--r--apps/web/lib/i18n/locales/nl/translation.json1
-rw-r--r--apps/web/lib/i18n/locales/pl/translation.json1
-rw-r--r--apps/web/lib/i18n/locales/pt/translation.json1
-rw-r--r--apps/web/lib/i18n/locales/pt_BR/translation.json1
-rw-r--r--apps/web/lib/i18n/locales/ru/translation.json1
-rw-r--r--apps/web/lib/i18n/locales/sk/translation.json1
-rw-r--r--apps/web/lib/i18n/locales/sl/translation.json1
-rw-r--r--apps/web/lib/i18n/locales/sv/translation.json1
-rw-r--r--apps/web/lib/i18n/locales/tr/translation.json1
-rw-r--r--apps/web/lib/i18n/locales/uk/translation.json1
-rw-r--r--apps/web/lib/i18n/locales/vi/translation.json1
-rw-r--r--apps/web/lib/i18n/locales/zh/translation.json1
-rw-r--r--apps/web/lib/i18n/locales/zhtw/translation.json1
-rw-r--r--packages/shared/import-export/parsers.ts50
34 files changed, 99 insertions, 0 deletions
diff --git a/apps/web/components/settings/ImportExport.tsx b/apps/web/components/settings/ImportExport.tsx
index b6e4da9a..1cef8483 100644
--- a/apps/web/components/settings/ImportExport.tsx
+++ b/apps/web/components/settings/ImportExport.tsx
@@ -180,6 +180,23 @@ export function ImportExportRow() {
</FilePickerButton>
</ImportCard>
<ImportCard
+ text="Matter"
+ description={t("settings.import.import_bookmarks_from_matter_export")}
+ >
+ <FilePickerButton
+ size={"sm"}
+ loading={false}
+ accept=".csv"
+ multiple={false}
+ className="flex items-center gap-2"
+ onFileSelect={(file) =>
+ runUploadBookmarkFile({ file, source: "matter" })
+ }
+ >
+ <p>Import</p>
+ </FilePickerButton>
+ </ImportCard>
+ <ImportCard
text="Omnivore"
description={t(
"settings.import.import_bookmarks_from_omnivore_export",
diff --git a/apps/web/lib/i18n/locales/ar/translation.json b/apps/web/lib/i18n/locales/ar/translation.json
index 023d6f15..6e59e54d 100644
--- a/apps/web/lib/i18n/locales/ar/translation.json
+++ b/apps/web/lib/i18n/locales/ar/translation.json
@@ -163,6 +163,7 @@
"import_export_bookmarks": "استيراد / تصدير الإشارات المرجعية",
"import_bookmarks_from_html_file": "استيراد إشارات مرجعية من ملف HTML",
"import_bookmarks_from_pocket_export": "استيراد إشارات مرجعية من تصدير Pocket",
+ "import_bookmarks_from_matter_export": "استيراد إشارات مرجعية من تصدير Matter",
"import_bookmarks_from_omnivore_export": "استيراد إشارات مرجعية من تصدير Omnivore",
"import_bookmarks_from_linkwarden_export": "استيراد إشارات مرجعية من تصدير Linkwarden",
"import_bookmarks_from_karakeep_export": "استيراد إشارات مرجعية من تصدير Karakeep",
diff --git a/apps/web/lib/i18n/locales/cs/translation.json b/apps/web/lib/i18n/locales/cs/translation.json
index b0df5dab..0d8c41ec 100644
--- a/apps/web/lib/i18n/locales/cs/translation.json
+++ b/apps/web/lib/i18n/locales/cs/translation.json
@@ -223,6 +223,7 @@
"import_export_bookmarks": "Import / Export záložek",
"import_bookmarks_from_html_file": "Importovat záložky z HTML souboru",
"import_bookmarks_from_pocket_export": "Importovat záložky z exportu Pocket",
+ "import_bookmarks_from_matter_export": "Importovat záložky z exportu Matter",
"import_bookmarks_from_omnivore_export": "Importovat záložky z Omnivore exportu",
"import_bookmarks_from_linkwarden_export": "Importovat záložky z exportu Linkwarden",
"import_bookmarks_from_karakeep_export": "Importovat záložky z exportu Karakeep",
diff --git a/apps/web/lib/i18n/locales/da/translation.json b/apps/web/lib/i18n/locales/da/translation.json
index 0026b4d3..3368cf94 100644
--- a/apps/web/lib/i18n/locales/da/translation.json
+++ b/apps/web/lib/i18n/locales/da/translation.json
@@ -53,6 +53,7 @@
"import_export_bookmarks": "Import / eksport bogmærker",
"import_bookmarks_from_html_file": "Importer bogmærker fra HTML-fil",
"import_bookmarks_from_pocket_export": "Importer bogmærker fra Pocket-eksport",
+ "import_bookmarks_from_matter_export": "Importer bogmærker fra Matter-eksport",
"imported_bookmarks": "Importerede bogmærker",
"import_bookmarks_from_linkwarden_export": "Importer bogmærker fra Linkwarden-eksport",
"import_bookmarks_from_tab_session_manager_export": "Importer bogmærker fra Tab Session Manager",
diff --git a/apps/web/lib/i18n/locales/de/translation.json b/apps/web/lib/i18n/locales/de/translation.json
index 88bbe275..d7f14e52 100644
--- a/apps/web/lib/i18n/locales/de/translation.json
+++ b/apps/web/lib/i18n/locales/de/translation.json
@@ -142,6 +142,7 @@
"import_export_bookmarks": "Lesezeichen importieren / exportieren",
"import_bookmarks_from_html_file": "Lesezeichen aus HTML-Datei importieren",
"import_bookmarks_from_pocket_export": "Lesezeichen aus Pocket-Export importieren",
+ "import_bookmarks_from_matter_export": "Lesezeichen aus Matter-Export importieren",
"import_bookmarks_from_omnivore_export": "Lesezeichen aus Omnivore-Export importieren",
"import_bookmarks_from_karakeep_export": "Lesezeichen aus Karakeep-Export importieren",
"export_links_and_notes": "Links und Notizen exportieren",
diff --git a/apps/web/lib/i18n/locales/el/translation.json b/apps/web/lib/i18n/locales/el/translation.json
index 203e0f55..2fd9e06a 100644
--- a/apps/web/lib/i18n/locales/el/translation.json
+++ b/apps/web/lib/i18n/locales/el/translation.json
@@ -163,6 +163,7 @@
"import_export_bookmarks": "Εισαγωγή / Εξαγωγή Σελιδοδεικτών",
"import_bookmarks_from_html_file": "Εισαγωγή Σελιδοδεικτών από αρχείο HTML",
"import_bookmarks_from_pocket_export": "Εισαγωγή Σελιδοδεικτών από εξαγωγή Pocket",
+ "import_bookmarks_from_matter_export": "Εισαγωγή Σελιδοδεικτών από εξαγωγή Matter",
"import_bookmarks_from_omnivore_export": "Εισαγωγή Σελιδοδεικτών από εξαγωγή Omnivore",
"import_bookmarks_from_linkwarden_export": "Εισαγωγή Σελιδοδεικτών από εξαγωγή Linkwarden",
"import_bookmarks_from_karakeep_export": "Εισαγωγή Σελιδοδεικτών από εξαγωγή Karakeep",
diff --git a/apps/web/lib/i18n/locales/en/translation.json b/apps/web/lib/i18n/locales/en/translation.json
index 9ec25732..af9b2748 100644
--- a/apps/web/lib/i18n/locales/en/translation.json
+++ b/apps/web/lib/i18n/locales/en/translation.json
@@ -281,6 +281,7 @@
"import_export_bookmarks": "Import / Export Bookmarks",
"import_bookmarks_from_html_file": "Import Bookmarks from HTML file",
"import_bookmarks_from_pocket_export": "Import Bookmarks from Pocket export",
+ "import_bookmarks_from_matter_export": "Import Bookmarks from Matter export",
"import_bookmarks_from_omnivore_export": "Import Bookmarks from Omnivore export",
"import_bookmarks_from_linkwarden_export": "Import Bookmarks from Linkwarden export",
"import_bookmarks_from_karakeep_export": "Import Bookmarks from Karakeep export",
diff --git a/apps/web/lib/i18n/locales/en_US/translation.json b/apps/web/lib/i18n/locales/en_US/translation.json
index 2849f930..e8d626ca 100644
--- a/apps/web/lib/i18n/locales/en_US/translation.json
+++ b/apps/web/lib/i18n/locales/en_US/translation.json
@@ -271,6 +271,7 @@
"import_export_bookmarks": "Import / Export Bookmarks",
"import_bookmarks_from_html_file": "Import Bookmarks from HTML file",
"import_bookmarks_from_pocket_export": "Import Bookmarks from Pocket export",
+ "import_bookmarks_from_matter_export": "Import Bookmarks from Matter export",
"import_bookmarks_from_omnivore_export": "Import Bookmarks from Omnivore export",
"import_bookmarks_from_linkwarden_export": "Import Bookmarks from Linkwarden export",
"import_bookmarks_from_karakeep_export": "Import Bookmarks from Karakeep export",
diff --git a/apps/web/lib/i18n/locales/es/translation.json b/apps/web/lib/i18n/locales/es/translation.json
index 6b2b78a4..bc5f12fb 100644
--- a/apps/web/lib/i18n/locales/es/translation.json
+++ b/apps/web/lib/i18n/locales/es/translation.json
@@ -90,6 +90,7 @@
"import_export": "Importar / Exportar",
"import_export_bookmarks": "Importar / Exportar marcadores",
"import_bookmarks_from_pocket_export": "Importar marcadores desde exportación de Pocket",
+ "import_bookmarks_from_matter_export": "Importar marcadores desde exportación de Matter",
"export_links_and_notes": "Exportar links y notas",
"imported_bookmarks": "Marcadores importados",
"import_bookmarks_from_karakeep_export": "Importar marcadores desde exportación de Karakeep",
diff --git a/apps/web/lib/i18n/locales/fa/translation.json b/apps/web/lib/i18n/locales/fa/translation.json
index 5136e368..a8c1d414 100644
--- a/apps/web/lib/i18n/locales/fa/translation.json
+++ b/apps/web/lib/i18n/locales/fa/translation.json
@@ -214,6 +214,7 @@
"import_bookmarks_from_html_file": "درون‌ریزی نشانک‌ها از فایل HTML",
"import_export_bookmarks": "درون‌ریزی / برون‌بری نشانک‌ها",
"import_bookmarks_from_pocket_export": "درون‌ریزی نشانک‌ها از خروجی Pocket",
+ "import_bookmarks_from_matter_export": "درون‌ریزی نشانک‌ها از خروجی Matter",
"import_bookmarks_from_omnivore_export": "درون‌ریزی نشانک‌ها از خروجی Omnivore",
"import_bookmarks_from_linkwarden_export": "درون‌ریزی نشانک‌ها از خروجی Linkwarden",
"import_bookmarks_from_tab_session_manager_export": "درون‌ریزی نشانک‌ها از Tab Session Manager",
diff --git a/apps/web/lib/i18n/locales/fi/translation.json b/apps/web/lib/i18n/locales/fi/translation.json
index 33717a24..9941eb2f 100644
--- a/apps/web/lib/i18n/locales/fi/translation.json
+++ b/apps/web/lib/i18n/locales/fi/translation.json
@@ -163,6 +163,7 @@
"import_export_bookmarks": "Kirjanmerkkien tuonti / vienti",
"import_bookmarks_from_html_file": "Tuo kirjanmerkkejä HTML-tiedostosta",
"import_bookmarks_from_pocket_export": "Tuo kirjanmerkit Pocket-viennistä",
+ "import_bookmarks_from_matter_export": "Tuo kirjanmerkit Matter-viennistä",
"import_bookmarks_from_omnivore_export": "Tuo kirjanmerkit Omnivore-viennistä",
"import_bookmarks_from_linkwarden_export": "Tuo kirjanmerkit Linkwarden-viennistä",
"import_bookmarks_from_hoarder_export": "Tuo kirjanmerkit Hoarder-viennistä",
diff --git a/apps/web/lib/i18n/locales/fr/translation.json b/apps/web/lib/i18n/locales/fr/translation.json
index 3028d91d..fd2c1271 100644
--- a/apps/web/lib/i18n/locales/fr/translation.json
+++ b/apps/web/lib/i18n/locales/fr/translation.json
@@ -142,6 +142,7 @@
"import_export_bookmarks": "Importer / Exporter des favoris",
"import_bookmarks_from_html_file": "Importer des favoris depuis un fichier HTML",
"import_bookmarks_from_pocket_export": "Importer des favoris depuis une exportation Pocket",
+ "import_bookmarks_from_matter_export": "Importer des favoris depuis une exportation Matter",
"import_bookmarks_from_omnivore_export": "Importer des favoris depuis une exportation Omnivore",
"import_bookmarks_from_karakeep_export": "Importer des favoris depuis une exportation Karakeep",
"export_links_and_notes": "Exporter les liens et les notes",
diff --git a/apps/web/lib/i18n/locales/ga/translation.json b/apps/web/lib/i18n/locales/ga/translation.json
index abf4ecaf..2ef8bba5 100644
--- a/apps/web/lib/i18n/locales/ga/translation.json
+++ b/apps/web/lib/i18n/locales/ga/translation.json
@@ -223,6 +223,7 @@
"import_export_bookmarks": "Iompórtáil / Easpórtáil Leabharmharcanna",
"import_bookmarks_from_html_file": "Iompórtáil Leabharmharcanna ó chomhad HTML",
"import_bookmarks_from_pocket_export": "Iompórtáil Leabharmharcanna ó onnmhairiú Pocket",
+ "import_bookmarks_from_matter_export": "Iompórtáil Leabharmharcanna ó onnmhairiú Matter",
"import_bookmarks_from_omnivore_export": "Iompórtáil Leabharcmharcanna ó onnmhairiú Omnivore",
"import_bookmarks_from_linkwarden_export": "Iompórtáil Leabharmharcanna ó onnmhairiú Linkwarden",
"import_bookmarks_from_karakeep_export": "Iompórtáil Leabharmharcanna ó onnmhairiú Karakeep",
diff --git a/apps/web/lib/i18n/locales/gl/translation.json b/apps/web/lib/i18n/locales/gl/translation.json
index 40dcc3a6..8b69028b 100644
--- a/apps/web/lib/i18n/locales/gl/translation.json
+++ b/apps/web/lib/i18n/locales/gl/translation.json
@@ -149,6 +149,7 @@
"import_export_bookmarks": "Importar / Exportar marcadores",
"import_bookmarks_from_html_file": "Importar marcadores desde arquivo HTML",
"import_bookmarks_from_pocket_export": "Importar marcadores desde Pocket",
+ "import_bookmarks_from_matter_export": "Importar marcadores desde Matter",
"import_bookmarks_from_omnivore_export": "Importar marcadores desde Omnivore",
"import_bookmarks_from_linkwarden_export": "Importar marcadores desde Linkwarden",
"import_bookmarks_from_karakeep_export": "Importar marcadores desde Karakeep",
diff --git a/apps/web/lib/i18n/locales/hr/translation.json b/apps/web/lib/i18n/locales/hr/translation.json
index bd7a7a9d..4993b6a6 100644
--- a/apps/web/lib/i18n/locales/hr/translation.json
+++ b/apps/web/lib/i18n/locales/hr/translation.json
@@ -197,6 +197,7 @@
"import_export_bookmarks": "Import / Export knjižnih oznaka",
"import_bookmarks_from_linkwarden_export": "Import oznaka iz Linkwarden exporta",
"import_bookmarks_from_pocket_export": "Import oznaka iz Pocket exporta",
+ "import_bookmarks_from_matter_export": "Import oznaka iz Matter exporta",
"import_bookmarks_from_karakeep_export": "Import oznaka iz Karakeep exporta",
"export_links_and_notes": "Export veza i bilješki",
"imported_bookmarks": "Importirane oznake",
diff --git a/apps/web/lib/i18n/locales/hu/translation.json b/apps/web/lib/i18n/locales/hu/translation.json
index 72439434..9d352cab 100644
--- a/apps/web/lib/i18n/locales/hu/translation.json
+++ b/apps/web/lib/i18n/locales/hu/translation.json
@@ -125,6 +125,7 @@
"import_export_bookmarks": "Könyvjelző importálása / exportálása",
"import_bookmarks_from_html_file": "Könyvjelző importálása HTML fájlból",
"import_bookmarks_from_pocket_export": "Könyvjelző importálása Pocket-ből",
+ "import_bookmarks_from_matter_export": "Könyvjelző importálása Matter-ből",
"import_bookmarks_from_linkwarden_export": "Könyvjelző importálása Linkwarden-ből",
"export_links_and_notes": "Jegyzetek és hivatkozások exportálása",
"imported_bookmarks": "Importált könyvjelzők",
diff --git a/apps/web/lib/i18n/locales/it/translation.json b/apps/web/lib/i18n/locales/it/translation.json
index f154466d..97e36488 100644
--- a/apps/web/lib/i18n/locales/it/translation.json
+++ b/apps/web/lib/i18n/locales/it/translation.json
@@ -140,6 +140,7 @@
"import": {
"import_export": "Importa / Esporta",
"import_bookmarks_from_pocket_export": "Importa segnalibri da esportazione Pocket",
+ "import_bookmarks_from_matter_export": "Importa segnalibri da esportazione Matter",
"import_bookmarks_from_karakeep_export": "Importa segnalibri da esportazione Karakeep",
"export_links_and_notes": "Esporta link e note",
"imported_bookmarks": "Segnalibri importati",
diff --git a/apps/web/lib/i18n/locales/ja/translation.json b/apps/web/lib/i18n/locales/ja/translation.json
index b6c350e2..c1f8a1a7 100644
--- a/apps/web/lib/i18n/locales/ja/translation.json
+++ b/apps/web/lib/i18n/locales/ja/translation.json
@@ -217,6 +217,7 @@
"import_bookmarks_from_karakeep_export": "Karakeep エクスポートからブックマークをインポート",
"imported_bookmarks": "インポートされたブックマーク",
"import_bookmarks_from_pocket_export": "Pocketのエクスポートからブックマークをインポート",
+ "import_bookmarks_from_matter_export": "Matterのエクスポートからブックマークをインポート",
"import_bookmarks_from_omnivore_export": "Omnivoreエクスポートからブックマークをインポート",
"export_links_and_notes": "リンクとメモをエクスポートする",
"import_export": "インポート/エクスポート",
diff --git a/apps/web/lib/i18n/locales/ko/translation.json b/apps/web/lib/i18n/locales/ko/translation.json
index 7af4fd3e..91d6ea3e 100644
--- a/apps/web/lib/i18n/locales/ko/translation.json
+++ b/apps/web/lib/i18n/locales/ko/translation.json
@@ -336,6 +336,7 @@
"import_export_bookmarks": "북마크 가져오기 / 내보내기",
"import_bookmarks_from_html_file": "HTML 파일에서 북마크 가져오기",
"import_bookmarks_from_pocket_export": "Pocket 내보내기에서 북마크 가져오기",
+ "import_bookmarks_from_matter_export": "Matter 내보내기에서 북마크 가져오기",
"import_bookmarks_from_omnivore_export": "Omnivore 내보내기에서 북마크 가져오기",
"import_bookmarks_from_karakeep_export": "Karakeep 내보내기에서 북마크 가져오기",
"export_links_and_notes": "링크와 주석 내보내기",
diff --git a/apps/web/lib/i18n/locales/nb_NO/translation.json b/apps/web/lib/i18n/locales/nb_NO/translation.json
index 6cfebfc3..41edba0a 100644
--- a/apps/web/lib/i18n/locales/nb_NO/translation.json
+++ b/apps/web/lib/i18n/locales/nb_NO/translation.json
@@ -259,6 +259,7 @@
"import_export_bookmarks": "Importer / eksporter bokmerker",
"import_bookmarks_from_html_file": "Importer bokmerker fra HTML-fil",
"import_bookmarks_from_pocket_export": "Importer bokmerker fra Pocket-eksport",
+ "import_bookmarks_from_matter_export": "Importer bokmerker fra Matter-eksport",
"import_bookmarks_from_linkwarden_export": "Importer bokmerker fra Linkwarden-eksport",
"import_bookmarks_from_karakeep_export": "Importer bokmerker fra Karakeepp-eksport",
"export_links_and_notes": "Eksporter lenker og notater",
diff --git a/apps/web/lib/i18n/locales/nl/translation.json b/apps/web/lib/i18n/locales/nl/translation.json
index 9510d215..b4cadfdc 100644
--- a/apps/web/lib/i18n/locales/nl/translation.json
+++ b/apps/web/lib/i18n/locales/nl/translation.json
@@ -112,6 +112,7 @@
"import_export_bookmarks": "Importeer / Exporteer Bladwijzers",
"import_bookmarks_from_html_file": "Importeer Bladwijzers van HTML bestand",
"import_bookmarks_from_pocket_export": "Importeer Bladwijzers van Pocket export",
+ "import_bookmarks_from_matter_export": "Importeer Bladwijzers van Matter export",
"import_bookmarks_from_omnivore_export": "Bladwijzers importeren uit Omnivore export",
"import_bookmarks_from_linkwarden_export": "Bladwijzers importeren uit Linkwarden-export",
"import_bookmarks_from_karakeep_export": "Bladwijzers importeren uit Karakeep-export",
diff --git a/apps/web/lib/i18n/locales/pl/translation.json b/apps/web/lib/i18n/locales/pl/translation.json
index e82e8921..615be138 100644
--- a/apps/web/lib/i18n/locales/pl/translation.json
+++ b/apps/web/lib/i18n/locales/pl/translation.json
@@ -113,6 +113,7 @@
"import": {
"import_bookmarks_from_html_file": "Importuj zakładki z pliku HTML",
"import_bookmarks_from_pocket_export": "Importuj zakładki z eksportu Pocket",
+ "import_bookmarks_from_matter_export": "Importuj zakładki z eksportu Matter",
"import_export": "Import / Eksport",
"import_export_bookmarks": "Import / Eksport zakładek",
"import_bookmarks_from_omnivore_export": "Importuj zakładki z eksportu Omnivore",
diff --git a/apps/web/lib/i18n/locales/pt/translation.json b/apps/web/lib/i18n/locales/pt/translation.json
index a154726c..07adad25 100644
--- a/apps/web/lib/i18n/locales/pt/translation.json
+++ b/apps/web/lib/i18n/locales/pt/translation.json
@@ -107,6 +107,7 @@
},
"import": {
"import_bookmarks_from_pocket_export": "Importar marcadores da exportação do Pocket",
+ "import_bookmarks_from_matter_export": "Importar marcadores da exportação do Matter",
"import_bookmarks_from_omnivore_export": "Importar marcadores da exportação do Omnivore",
"import_export": "Importar / Exportar",
"import_export_bookmarks": "Importar/Exportar Marcadores",
diff --git a/apps/web/lib/i18n/locales/pt_BR/translation.json b/apps/web/lib/i18n/locales/pt_BR/translation.json
index 881c9783..df451815 100644
--- a/apps/web/lib/i18n/locales/pt_BR/translation.json
+++ b/apps/web/lib/i18n/locales/pt_BR/translation.json
@@ -154,6 +154,7 @@
"import_export_bookmarks": "Importar / Exportar Favoritos",
"import_bookmarks_from_html_file": "Importar Favoritos de arquivo HTML",
"import_bookmarks_from_pocket_export": "Importar Favoritos de exportação do Pocket",
+ "import_bookmarks_from_matter_export": "Importar Favoritos de exportação do Matter",
"import_bookmarks_from_omnivore_export": "Importar Favoritos de exportação do Omnivore",
"import_bookmarks_from_linkwarden_export": "Importar Favoritos de exportação do Linkwarden",
"import_bookmarks_from_karakeep_export": "Importar Favoritos de exportação do Karakeep",
diff --git a/apps/web/lib/i18n/locales/ru/translation.json b/apps/web/lib/i18n/locales/ru/translation.json
index 05a82088..c61c45d4 100644
--- a/apps/web/lib/i18n/locales/ru/translation.json
+++ b/apps/web/lib/i18n/locales/ru/translation.json
@@ -157,6 +157,7 @@
"import_export": "Импорт / Экспорт",
"import_export_bookmarks": "Импорт / Экспорт закладок",
"import_bookmarks_from_pocket_export": "Импортировать закладки из экспорта Pocket",
+ "import_bookmarks_from_matter_export": "Импортировать закладки из экспорта Matter",
"import_bookmarks_from_omnivore_export": "Импортировать закладки из экспорта Omnivore",
"imported_bookmarks": "Импортировано закладок",
"import_bookmarks_from_html_file": "Импортировать закладки из HTML файла",
diff --git a/apps/web/lib/i18n/locales/sk/translation.json b/apps/web/lib/i18n/locales/sk/translation.json
index 4fbcb06b..fac65119 100644
--- a/apps/web/lib/i18n/locales/sk/translation.json
+++ b/apps/web/lib/i18n/locales/sk/translation.json
@@ -178,6 +178,7 @@
"import_export_bookmarks": "Importovať / exportovať záložky",
"import_bookmarks_from_html_file": "Importovať záložky z HTML súboru",
"import_bookmarks_from_pocket_export": "Importovať záložky z Pocket exportu",
+ "import_bookmarks_from_matter_export": "Importovať záložky z Matter exportu",
"import_bookmarks_from_linkwarden_export": "Importovať záložky z Linkwarden exportu",
"import_bookmarks_from_karakeep_export": "Importovať záložky z Karakeep exportu",
"export_links_and_notes": "Exportovať odkazy a poznámky",
diff --git a/apps/web/lib/i18n/locales/sl/translation.json b/apps/web/lib/i18n/locales/sl/translation.json
index 671f34ca..e791eb4d 100644
--- a/apps/web/lib/i18n/locales/sl/translation.json
+++ b/apps/web/lib/i18n/locales/sl/translation.json
@@ -17,6 +17,7 @@
"import_bookmarks_from_linkwarden_export": "Uvozi zaznamke iz Linkwarden izvoza",
"imported_bookmarks": "Uvoženi zaznamki",
"import_bookmarks_from_pocket_export": "Uvozi zaznamke iz Pocket izvoza",
+ "import_bookmarks_from_matter_export": "Uvozi zaznamke iz Matter izvoza",
"import_export_bookmarks": "Uvoz / Izvoz zaznamkov",
"import_bookmarks_from_omnivore_export": "Uvozi zaznamke iz Omnivore izvoza",
"export_links_and_notes": "Izvozi povezave in zapiske",
diff --git a/apps/web/lib/i18n/locales/sv/translation.json b/apps/web/lib/i18n/locales/sv/translation.json
index f97949b7..1c62a2ee 100644
--- a/apps/web/lib/i18n/locales/sv/translation.json
+++ b/apps/web/lib/i18n/locales/sv/translation.json
@@ -144,6 +144,7 @@
"import_bookmarks_from_karakeep_export": "Importera bokmärken från Karakeep-export",
"import_bookmarks_from_html_file": "Importera bokmärken från HTML-fil",
"import_bookmarks_from_pocket_export": "Importera bokmärken från Pocket-export",
+ "import_bookmarks_from_matter_export": "Importera bokmärken från Matter-export",
"export_links_and_notes": "Exportera länkar och anteckningar",
"import_bookmarks_from_linkwarden_export": "Importera bokmärken från Linkwarden-export",
"import_bookmarks_from_tab_session_manager_export": "Importera bokmärken från Tab Session Manager",
diff --git a/apps/web/lib/i18n/locales/tr/translation.json b/apps/web/lib/i18n/locales/tr/translation.json
index 97af51e0..4280eb9c 100644
--- a/apps/web/lib/i18n/locales/tr/translation.json
+++ b/apps/web/lib/i18n/locales/tr/translation.json
@@ -145,6 +145,7 @@
"import_export_bookmarks": "Yer İşaretlerini İçe / Dışa Aktar",
"import_bookmarks_from_html_file": "HTML Dosyasından Yer İşaretlerini İçe Aktar",
"import_bookmarks_from_pocket_export": "Pocket Dışa Aktarımından Yer İşaretlerini İçe Aktar",
+ "import_bookmarks_from_matter_export": "Matter Dışa Aktarımından Yer İşaretlerini İçe Aktar",
"import_bookmarks_from_omnivore_export": "Omnivore Dışa Aktarımından Yer İşaretlerini İçe Aktar",
"import_bookmarks_from_karakeep_export": "Karakeep Dışa Aktarımından Yer İşaretlerini İçe Aktar",
"export_links_and_notes": "Bağlantı ve Notları Dışa Aktar",
diff --git a/apps/web/lib/i18n/locales/uk/translation.json b/apps/web/lib/i18n/locales/uk/translation.json
index 819584ef..f3c7ea9e 100644
--- a/apps/web/lib/i18n/locales/uk/translation.json
+++ b/apps/web/lib/i18n/locales/uk/translation.json
@@ -154,6 +154,7 @@
"import_export_bookmarks": "Імпорт / Експорт закладок",
"import_bookmarks_from_html_file": "Імпортувати закладки з HTML-файлу",
"import_bookmarks_from_pocket_export": "Імпортувати закладки з експорту Pocket",
+ "import_bookmarks_from_matter_export": "Імпортувати закладки з експорту Matter",
"import_bookmarks_from_omnivore_export": "Імпорт закладок з експорту Omnivore",
"import_bookmarks_from_linkwarden_export": "Імпортувати закладки з експорту Linkwarden",
"import_bookmarks_from_karakeep_export": "Імпортувати закладки з експорту Karakeep",
diff --git a/apps/web/lib/i18n/locales/vi/translation.json b/apps/web/lib/i18n/locales/vi/translation.json
index 920f3435..26a49a8f 100644
--- a/apps/web/lib/i18n/locales/vi/translation.json
+++ b/apps/web/lib/i18n/locales/vi/translation.json
@@ -65,6 +65,7 @@
"import_export_bookmarks": "Nhập / Xuất đánh dấu trang",
"import_bookmarks_from_linkwarden_export": "Nhập dấu trang từ bản xuất Linkwarden",
"import_bookmarks_from_pocket_export": "Nhập dấu trang từ bản xuất Pocket",
+ "import_bookmarks_from_matter_export": "Nhập dấu trang từ bản xuất Matter",
"import_bookmarks_from_omnivore_export": "Nhập dấu trang từ xuất Omnivore",
"import_bookmarks_from_karakeep_export": "Nhập dấu trang từ bản xuất Karakeep",
"import_bookmarks_from_tab_session_manager_export": "Nhập dấu trang từ Tab Session Manager",
diff --git a/apps/web/lib/i18n/locales/zh/translation.json b/apps/web/lib/i18n/locales/zh/translation.json
index 771f47f8..921feb40 100644
--- a/apps/web/lib/i18n/locales/zh/translation.json
+++ b/apps/web/lib/i18n/locales/zh/translation.json
@@ -142,6 +142,7 @@
"import_export_bookmarks": "导入/导出书签",
"import_bookmarks_from_html_file": "从HTML文件导入书签",
"import_bookmarks_from_pocket_export": "从Pocket导出导入书签",
+ "import_bookmarks_from_matter_export": "从Matter导出导入书签",
"import_bookmarks_from_omnivore_export": "从Omnivore导出导入书签",
"import_bookmarks_from_karakeep_export": "从Karakeep导出导入书签",
"export_links_and_notes": "导出链接和笔记",
diff --git a/apps/web/lib/i18n/locales/zhtw/translation.json b/apps/web/lib/i18n/locales/zhtw/translation.json
index 92c4f41b..40a3309a 100644
--- a/apps/web/lib/i18n/locales/zhtw/translation.json
+++ b/apps/web/lib/i18n/locales/zhtw/translation.json
@@ -142,6 +142,7 @@
"import_export_bookmarks": "匯入/匯出書籤",
"import_bookmarks_from_html_file": "從 HTML 檔案匯入書籤",
"import_bookmarks_from_pocket_export": "從 Pocket 匯出檔案匯入書籤",
+ "import_bookmarks_from_matter_export": "從 Matter 匯出檔案匯入書籤",
"import_bookmarks_from_omnivore_export": "從 Omnivore 匯出檔案匯入書籤",
"import_bookmarks_from_karakeep_export": "從 Karakeep 匯出檔案匯入書籤",
"export_links_and_notes": "匯出連結和筆記",
diff --git a/packages/shared/import-export/parsers.ts b/packages/shared/import-export/parsers.ts
index 5b8b01e8..a56cbb98 100644
--- a/packages/shared/import-export/parsers.ts
+++ b/packages/shared/import-export/parsers.ts
@@ -10,6 +10,7 @@ import { zExportSchema } from "./exporters";
export type ImportSource =
| "html"
| "pocket"
+ | "matter"
| "omnivore"
| "karakeep"
| "linkwarden"
@@ -97,6 +98,52 @@ function parsePocketBookmarkFile(textContent: string): ParsedBookmark[] {
});
}
+function parseMatterBookmarkFile(textContent: string): ParsedBookmark[] {
+ const zMatterRecordSchema = z.object({
+ Title: z.string(),
+ Author: z.string(),
+ Publisher: z.string(),
+ URL: z.string(),
+ Tags: z
+ .string()
+ .transform((tags) => (tags.length > 0 ? tags.split(";") : [])),
+ "Word Count": z.string(),
+ "In Queue": z.string().transform((inQueue) => inQueue === "False"),
+ Favorited: z.string(),
+ Read: z.string(),
+ Highlight_Count: z.string(),
+ "Last Interaction Date": z
+ .string()
+ .transform((date) => Date.parse(date) / 1000),
+ "File Id": z.string(),
+ });
+
+ const zMatterExportSchema = z.array(zMatterRecordSchema);
+
+ const records = parse(textContent, {
+ columns: true,
+ skip_empty_lines: true,
+ });
+
+ const parsed = zMatterExportSchema.safeParse(records);
+ if (!parsed.success) {
+ throw new Error(
+ `The uploaded CSV file contains an invalid Matter bookmark file: ${parsed.error.toString()}`,
+ );
+ }
+
+ return parsed.data.map((record) => {
+ return {
+ title: record.Title,
+ content: { type: BookmarkTypes.LINK as const, url: record.URL },
+ tags: record.Tags,
+ addDate: record["Last Interaction Date"],
+ archived: record["In Queue"],
+ paths: [], // TODO
+ };
+ });
+}
+
function parseKarakeepBookmarkFile(textContent: string): ParsedBookmark[] {
const parsed = zExportSchema.safeParse(JSON.parse(textContent));
if (!parsed.success) {
@@ -347,6 +394,9 @@ export function parseImportFile(
case "pocket":
result = parsePocketBookmarkFile(textContent);
break;
+ case "matter":
+ result = parseMatterBookmarkFile(textContent);
+ break;
case "karakeep":
result = parseKarakeepBookmarkFile(textContent);
break;