Skip to content

Commit 845eb5e

Browse files
committed
Update README
1 parent e107546 commit 845eb5e

File tree

1 file changed

+74
-36
lines changed

1 file changed

+74
-36
lines changed

README.md

+74-36
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ A tool that syncs Firefox bookmarks to markdown files for use with tools like Ob
2121

2222
### Basic Usage
2323

24-
+++ bash
24+
```bash
2525
# Sync bookmarks from Firefox toolbar folder
2626
ffbookmarks-to-markdown -folder toolbar -output bookmarks
2727

@@ -30,11 +30,11 @@ ffbookmarks-to-markdown -list
3030

3131
# Enable verbose logging
3232
ffbookmarks-to-markdown -verbose
33-
+++
33+
```
3434

3535
### Advanced Options
3636

37-
+++ bash
37+
``` bash
3838
# Ignore specific folders
3939
ffbookmarks-to-markdown -ignore "Archive,Old Stuff"
4040

@@ -43,29 +43,43 @@ ffbookmarks-to-markdown -llm-key "your-key" -llm-model "your-model"
4343

4444
# Use custom screenshot API
4545
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+
```
6478

6579
## Running with Podman
6680

6781
1. Create required volumes:
68-
+++ bash
82+
```bash
6983
# Create volume for Firefox Sync credentials
7084
podman volume create firefox-sync-creds
7185

@@ -74,27 +88,51 @@ ffbookmarks-to-markdown -screenshot-api "https://your-screenshot-service"
7488

7589
# Create volume for cache
7690
podman volume create ffbookmarks-cache
77-
+++
91+
```
7892

7993
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
8397
# 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+
```
87101

88102
3. Run the container:
89-
+++ bash
103+
```bash
90104
podman run -it --rm \
91-
-v firefox-sync-creds:/root/.mozilla/firefox:ro \
105+
-v firefox-sync-creds:/home/nonroot/.config:ro \
92106
-v bookmarks:/bookmarks \
93-
-v ffbookmarks-cache:/root/.cache \
107+
-v ffbookmarks-cache:/home/nonroot/.cache \
94108
-e GEMINI_API_KEY="your-key" \
95-
ghcr.io/xtruder/ffbookmarks-to-markdown:latest \
109+
ghcr.io/xtruder/ffbookmarks-to-markdown:v0.1.0 \
96110
-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+
```
98136

99137
## Environment Variables
100138

@@ -104,13 +142,13 @@ ffbookmarks-to-markdown -screenshot-api "https://your-screenshot-service"
104142

105143
The tool creates the following structure in your output directory:
106144

107-
+++ text
145+
```text
108146
bookmarks/
109147
├── 2024.md # Year index
110148
├── 2023.md # Year index
111149
└── folder/ # Bookmark folders
112150
└── bookmark.md # Bookmark files
113-
+++
151+
```
114152

115153
Each bookmark file contains:
116154
- Frontmatter with metadata

0 commit comments

Comments
 (0)