@@ -21,7 +21,7 @@ A tool that syncs Firefox bookmarks to markdown files for use with tools like Ob
21
21
22
22
### Basic Usage
23
23
24
- +++ bash
24
+ ``` bash
25
25
# Sync bookmarks from Firefox toolbar folder
26
26
ffbookmarks-to-markdown -folder toolbar -output bookmarks
27
27
@@ -30,11 +30,11 @@ ffbookmarks-to-markdown -list
30
30
31
31
# Enable verbose logging
32
32
ffbookmarks-to-markdown -verbose
33
- +++
33
+ ```
34
34
35
35
### Advanced Options
36
36
37
- +++ bash
37
+ ``` bash
38
38
# Ignore specific folders
39
39
ffbookmarks-to-markdown -ignore " Archive,Old Stuff"
40
40
@@ -43,29 +43,43 @@ ffbookmarks-to-markdown -llm-key "your-key" -llm-model "your-model"
43
43
44
44
# Use custom screenshot API
45
45
ffbookmarks-to-markdown -screenshot-api " https://your-screenshot-service"
46
- +++
47
-
48
- ## Running Locally
49
-
50
- 1 . Install Go 1.21 or later
51
- 2 . Clone the repository
52
- 3 . Install ffsclient:
53
- +++ bash
54
- # Download ffsclient
55
- curl -L -o ffsclient https://github.com/Mikescher/firefox-sync-client/releases/download/v1.8.0/ffsclient_linux-amd64-static
56
- chmod +x ffsclient
57
- sudo mv ffsclient /usr/local/bin/
58
- +++
59
- 4 . Build and run:
60
- +++ bash
61
- go build -o ffbookmarks-to-markdown ./cmd/main.go
62
- ./ffbookmarks-to-markdown -folder toolbar -output bookmarks
63
- +++
46
+ ```
47
+
48
+ ## Installing
49
+
50
+ Here is a single-liner to install the binary to your local bin directory:
51
+
52
+ ``` bash
53
+ mkdir -p ~ /.local/bin
54
+ curl -L https://github.com/xtruder/ffbookmarks-to-markdown/releases/download/v0.1.0/ffbookmarks-to-markdown-linux-amd64.tar.gz | tar -xz -C ~ /.local/bin
55
+ ```
56
+
57
+ ## Running
58
+
59
+ First you need to login to your Firefox Sync account using ` ffsclient ` tool:
60
+
61
+ ``` bash
62
+ ffsclient login
63
+ ```
64
+
65
+ It will ask you for your username and password.
66
+
67
+ After that you can run the tool, which will sync bookmarks from your Firefox Sync account and save them to the specified directory:
68
+
69
+ ``` bash
70
+ ffbookmarks-to-markdown -folder toolbar -output bookmarks
71
+ ```
72
+
73
+ If you want to use LLM to clean up the markdown content, you need to set ` GEMINI_API_KEY ` environment variable:
74
+
75
+ ``` bash
76
+ export GEMINI_API_KEY=" your-key"
77
+ ```
64
78
65
79
## Running with Podman
66
80
67
81
1 . Create required volumes:
68
- +++ bash
82
+ ``` bash
69
83
# Create volume for Firefox Sync credentials
70
84
podman volume create firefox-sync-creds
71
85
@@ -74,27 +88,51 @@ ffbookmarks-to-markdown -screenshot-api "https://your-screenshot-service"
74
88
75
89
# Create volume for cache
76
90
podman volume create ffbookmarks-cache
77
- +++
91
+ ```
78
92
79
93
2 . Copy Firefox Sync credentials:
80
- +++ bash
81
- # Get Firefox Sync credentials from your browser
82
- # ~ /.mozilla /firefox/PROFILE/logins.json
94
+ ``` bash
95
+ # Get Firefox Sync credentials you generated using ffsclient tool
96
+ # ~/.config /firefox-sync-client.secret
83
97
# Copy credentials to volume
84
- podman cp ~ /.mozilla /firefox/YOUR_PROFILE/logins.json \
85
- firefox-sync-creds:/root/.mozilla /firefox/PROFILE/
86
- +++
98
+ podman cp ~ /.config /firefox-sync-client.secret \
99
+ firefox-sync-creds:/home/nonroot/.config /firefox-sync-client.secret
100
+ ```
87
101
88
102
3 . Run the container:
89
- +++ bash
103
+ ``` bash
90
104
podman run -it --rm \
91
- -v firefox-sync-creds:/root/.mozilla/firefox : ro \
105
+ -v firefox-sync-creds:/home/nonroot/.config :ro \
92
106
-v bookmarks:/bookmarks \
93
- -v ffbookmarks-cache:/root /.cache \
107
+ -v ffbookmarks-cache:/home/nonroot /.cache \
94
108
-e GEMINI_API_KEY=" your-key" \
95
- ghcr.io/xtruder/ffbookmarks-to-markdown: latest \
109
+ ghcr.io/xtruder/ffbookmarks-to-markdown:v0.1.0 \
96
110
-folder toolbar -output /bookmarks
97
- +++
111
+ ```
112
+
113
+ ## Usage
114
+
115
+ ```
116
+ Usage of ./ffbookmarks-to-markdown:
117
+ -folder string
118
+ Base folder name to sync from Firefox bookmarks (default "toolbar")
119
+ -ignore string
120
+ Comma-separated list of folder names to ignore
121
+ -list
122
+ List all available bookmarks
123
+ -llm-key string
124
+ API key for LLM service
125
+ -llm-model string
126
+ Model to use for LLM service (default "gemini-2.0-flash")
127
+ -llm-url string
128
+ Base URL for LLM service (default "https://generativelanguage.googleapis.com/v1beta/openai/")
129
+ -output string
130
+ Output directory for markdown files (default "bookmarks")
131
+ -screenshot-api string
132
+ Screenshot API base URL (default "https://gowitness.cloud.x-truder.net")
133
+ -verbose
134
+ Enable verbose logging
135
+ ```
98
136
99
137
## Environment Variables
100
138
@@ -104,13 +142,13 @@ ffbookmarks-to-markdown -screenshot-api "https://your-screenshot-service"
104
142
105
143
The tool creates the following structure in your output directory:
106
144
107
- +++ text
145
+ ``` text
108
146
bookmarks/
109
147
├── 2024.md # Year index
110
148
├── 2023.md # Year index
111
149
└── folder/ # Bookmark folders
112
150
└── bookmark.md # Bookmark files
113
- +++
151
+ ```
114
152
115
153
Each bookmark file contains:
116
154
- Frontmatter with metadata
0 commit comments