Skip to content

dharminnagar/arc-bookmarks-exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Arc Browser Bookmarks Exporter

A Python script that exports bookmarks from Arc Browser to HTML format that is compatible with all other major browsers like Chrome, Firefox, Safari, or Edge.

Features

  • Multi-Profile Support: Exports bookmarks from all Arc profiles/containers
  • Complete Space Coverage: Handles both pinned and unpinned spaces
  • Standard Format: Generates Netscape bookmark format compatible with all major browsers
  • Hierarchical Structure: Preserves folder organization from Arc spaces
  • Cross-Platform: Works on macOS and Windows
  • Verbose Logging: Detailed output for troubleshooting
  • Flexible Options: Choose what to export with command-line flags

Quick Start

# Export everything (recommended)
python3 main.py --all -v

# Export with custom filename
python3 main.py --all -o my_bookmarks.html

# Export only pinned spaces (default)
python3 main.py -v

Installation

Prerequisites

  • Python 3.7 or higher
  • Arc Browser with some bookmarks

Setup

  1. Clone or download this repository
  2. No additional dependencies required (uses Python standard library only)

Usage

Command Line Options

python3 main.py [OPTIONS]
Option Description
--all Export from all containers and include unpinned spaces
--include-unpinned Include unpinned spaces in export
-o, --output FILE Specify output file path
-v, --verbose Enable detailed logging
-s, --silent Silence all output
--version Show version information

Examples

# Export everything with verbose output
python3 main.py --all -v

# Export only pinned spaces to specific file
python3 main.py -o bookmarks_pinned.html -v

# Silent export of everything
python3 main.py --all -s

# Include unpinned spaces only
python3 main.py --include-unpinned

How It Works

Arc Data Structure

Arc Browser stores bookmarks in StorableSidebar.json with the following structure:

StorableSidebar.json
├── sidebar
│   └── containers (multiple profiles)
│       ├── Container 0: (may be empty)
│       └── Container 1: (actual bookmark data)
│           ├── spaces: [mixed list of strings and dicts]
│           └── items: [bookmark items]
└── version: 1

Export Process

  1. Locate Arc Data: Finds StorableSidebar.json in Arc's data directory
  2. Parse Containers: Processes all containers with bookmark data
  3. Extract Spaces: Handles both pinned and unpinned space containers
  4. Build Hierarchy: Creates folder structure from Arc spaces
  5. Generate HTML: Converts to standard Netscape bookmark format

Output Structure

Bookmarks
├── Home Space
│   ├── Pinned Bookmarks (24 items)
│   └── Unpinned Bookmarks (4 items)
├── Work Space
├── Research Space
└── Other Spaces...

File Locations

macOS

~/Library/Application Support/Arc/StorableSidebar.json

Windows

~\AppData\Local\Packages\TheBrowserCompany.Arc*\LocalCache\Local\Arc\StorableSidebar.json

Troubleshooting

Common Issues

"File not found" Error

  • Cause: Arc Browser not installed or non-standard installation
  • Solution: Ensure Arc is installed and has been run at least once

"No bookmark data found"

  • Cause: Arc data file exists but contains no bookmarks
  • Solution: Add some bookmarks in Arc Browser first

"Unexpected error: 'spaces'"

  • Cause: Script looking in wrong container
  • Solution: Use --all flag to process all containers

Missing Bookmarks

  • Cause: Only pinned spaces being exported
  • Solution: Use --all or --include-unpinned flags

Debug Mode

For detailed troubleshooting, run with verbose output:

python3 main.py --all -v

Expected Verbose Output

12:19 INFO Reading Arc browser data...
12:19 DEBG Found StorableSidebar.json in Arc's data directory
12:19 INFO Parsing Arc browser data...
12:19 INFO Processing container 1...
12:19 INFO Parsing spaces...
12:19 DEBG Found 10 valid spaces
12:19 INFO Converting spaces to bookmark folders...
12:19 DEBG Space 'Work': 25 bookmarks
12:19 DEBG Space 'Personal': 15 bookmarks
12:19 DEBG Total bookmarks in this container: 40
12:19 INFO Converting bookmarks to HTML...
12:19 INFO Export completed successfully!

Importing to Other Browsers

Chrome/Chromium

  1. Open Chrome
  2. Go to chrome://bookmarks/
  3. Click ⋮ → "Import bookmarks"
  4. Select the exported HTML file

Firefox

  1. Open Firefox
  2. Press Ctrl+Shift+B (Bookmarks Manager)
  3. Click "Import and Backup" → "Import Bookmarks from HTML"
  4. Select the exported HTML file

Safari

  1. Open Safari
  2. Go to File → "Import From" → "Bookmarks HTML File"
  3. Select the exported HTML file

Edge

  1. Open Edge
  2. Click ⋯ → "Favorites" → "Manage favorites"
  3. Click ⋯ → "Import favorites"
  4. Choose "Bookmarks HTML file"

Technical Details

Architecture

  • ArcDataReader: Handles file location and JSON reading
  • ArcDataParser: Parses Arc's JSON structure into bookmark objects
  • HTMLExporter: Converts bookmarks to HTML format
  • BookmarkFolder/Bookmark: Data classes for bookmark structure

Data Classes

@dataclass
class Bookmark:
    title: str
    url: str

@dataclass  
class BookmarkFolder:
    title: str
    children: List[Union[Bookmark, BookmarkFolder]]

@dataclass
class Space:
    name: str
    container_id: str
    is_pinned: bool

Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.

If you encounter issues:

  1. Run with verbose output: python3 main.py --all -v
  2. Check the troubleshooting section above
  3. Ensure Arc Browser is properly installed
  4. Verify you have bookmarks in Arc Browser

For additional help, please create an issue with:

  • Your operating system
  • Python version
  • Complete error message
  • Verbose output (if possible)

Development Setup

git clone <repository-url>
cd arc-bookmarks
python3 main.py --version  # Verify setup

Changelog

Version 1.0

  • ✅ Fixed space parsing to handle all pinned/unpinned containers
  • ✅ Added null safety for bookmark titles and URLs
  • ✅ Improved error handling and logging
  • ✅ Added support for multiple containers/profiles

Support

Thank you for using this project! If you find it helpful and would like to support my work, kindly consider buying me a coffee. Your support is greatly appreciated!

Buy Me A Coffee

And do not forget to give the project a star if you like it! ⭐

License

This project is licensed under the MIT License.

About

Export Pinned Tabs from Arc Browser with one single command

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages