# Firefox Tab Extractor 🔥
[](https://www.python.org/downloads/)
[](https://opensource.org/licenses/MIT)
[](https://badge.fury.io/py/firefox-tab-extractor)
A powerful Python library to extract and organize Firefox browser tabs for productivity, study organization, and workflow management.
## 🎯 Why Firefox Tab Extractor?
**Tired of losing track of important tabs?** This library helps you:
- 📚 **Organize study materials** - Extract all your research tabs into structured formats
- 📊 **Productivity tracking** - See which sites you visit most and optimize your workflow
- 🔄 **Session backup** - Save your browsing sessions before major cleanup
- 📋 **Notion integration** - Export tabs directly to Notion for task management
- 🎓 **Learning management** - Create structured study schedules from your open tabs
## ✨ Features
- 🔍 **Smart profile detection** - Automatically finds Firefox profiles across different OS
- 📁 **Multiple output formats** - JSON for developers, CSV for Notion/Excel
- 🏷️ **Rich metadata** - Tab titles, URLs, access times, pinned status, domains
- 📊 **Statistics & analytics** - Get insights about your browsing patterns
- 🛠️ **Developer-friendly** - Clean API, type hints, comprehensive error handling
- 🚀 **CLI & Library** - Use as command-line tool or import in your Python code
## 🚀 Quick Start
### Installation
```bash
pip install firefox-tab-extractor
```
### Command Line Usage
```bash
# Extract all tabs to default files
firefox-tab-extractor
# Save to specific files
firefox-tab-extractor --json my_tabs.json --csv my_tabs.csv
# Show statistics only
firefox-tab-extractor --stats-only
# Verbose output with preview
firefox-tab-extractor --verbose --preview 10
```
### Python Library Usage
```python
from firefox_tab_extractor import FirefoxTabExtractor
# Initialize extractor
extractor = FirefoxTabExtractor()
# Extract tabs
tabs = extractor.extract_tabs()
# Get statistics
stats = extractor.get_statistics(tabs)
print(f"Found {stats['total_tabs']} tabs across {stats['total_windows']} windows")
# Save to files
extractor.save_to_json(tabs, "my_tabs.json")
extractor.save_to_csv(tabs, "my_tabs.csv")
# Group by windows
windows = extractor.get_windows(tabs)
for window in windows:
print(f"Window {window.window_index}: {window.tab_count} tabs")
```
## 📊 Output Formats
### JSON Output
```json
{
"extraction_time": "2024-01-15T10:30:00",
"total_tabs": 25,
"windows": 3,
"pinned_tabs": 5,
"hidden_tabs": 2,
"tabs": [
{
"window_index": 1,
"tab_index": 1,
"title": "GitHub - Your Repository",
"url": "https://github.com/username/repo",
"last_accessed": 1705312200000,
"last_accessed_readable": "2024-01-15 10:30:00",
"pinned": true,
"hidden": false,
"domain": "github.com"
}
]
}
```
### CSV Output (Notion-ready)
```csv
window_index,tab_index,title,url,last_accessed_readable,pinned,hidden,domain
1,1,GitHub - Your Repository,https://github.com/username/repo,2024-01-15 10:30:00,true,false,github.com
```
## 🎓 Study Organization Workflow
### 1. Extract Your Tabs
```bash
firefox-tab-extractor --csv study_materials.csv
```
### 2. Import to Notion
1. Create a new Notion database
2. Import the CSV file
3. Add custom properties:
- **Category** (JavaScript, Python, System Design, etc.)
- **Priority** (High, Medium, Low)
- **Estimated Reading Time** (15min, 30min, 1hr)
- **Status** (Not Started, In Progress, Completed)
- **Study Day** (Monday, Wednesday, Friday, Weekend)
### 3. Create Study Schedule
```
Monday (1 hour):
- 1 book chapter (30 min)
- 2-3 short articles (30 min)
Wednesday (1 hour):
- 1 book chapter (30 min)
- 1 long technical article (30 min)
Friday (1 hour):
- 1 book chapter (30 min)
- Practice problems/coding (30 min)
Weekend (2 hours):
- 1 book chapter (30 min)
- 2-3 comprehensive tutorials (90 min)
```
## 🛠️ Advanced Usage
### Custom Firefox Profile
```python
extractor = FirefoxTabExtractor(profile_path="~/.mozilla/firefox/custom.profile")
```
### Filtering and Analysis
```python
# Get only pinned tabs
pinned_tabs = [tab for tab in tabs if tab.pinned]
# Get tabs by domain
github_tabs = [tab for tab in tabs if tab.domain == "github.com"]
# Get recently accessed tabs
from datetime import datetime, timedelta
recent_tabs = [
tab for tab in tabs
if tab.last_accessed_datetime > datetime.now() - timedelta(days=7)
]
```
### Error Handling
```python
from firefox_tab_extractor import FirefoxTabExtractor
from firefox_tab_extractor.exceptions import FirefoxProfileNotFoundError
try:
extractor = FirefoxTabExtractor()
tabs = extractor.extract_tabs()
except FirefoxProfileNotFoundError:
print("Firefox profile not found. Make sure Firefox is installed.")
```
## 🔧 Troubleshooting
### Firefox Profile Not Found
- Make sure Firefox has been run at least once
- Check if Firefox is installed via snap: `snap list firefox`
- Use `--profile` to specify custom profile path
### Permission Issues
- Ensure you have read access to Firefox profile directory
- On some systems, you might need to close Firefox first
### No Tabs Found
- Ensure Firefox has active tabs open
- Try closing and reopening Firefox to refresh session data
- Check if Firefox is in private browsing mode (private tabs aren't saved)
## 🤝 Contributing
We welcome contributions! Here's how you can help:
### 🐛 Reporting Bugs
- Use the [GitHub issue tracker](https://github.com/ViniciusPuerto/firefox-tab-extractor/issues)
- Include your OS, Firefox version, and Python version
- Provide error messages and steps to reproduce
### 💡 Feature Requests
- Open an issue with the "enhancement" label
- Describe the feature and its use case
- Consider contributing the implementation
### 🔧 Development Setup
```bash
# Clone the repository
git clone https://github.com/ViniciusPuerto/firefox-tab-extractor.git
cd firefox-tab-extractor
# Install development dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Format code
black firefox_tab_extractor/
# Type checking
mypy firefox_tab_extractor/
```
### 📝 Code Style
- Follow PEP 8 style guidelines
- Use type hints for all functions
- Add docstrings for all public methods
- Write tests for new features
## 🚀 Roadmap
### Planned Features
- [ ] **Chrome/Edge support** - Extract tabs from other browsers
- [ ] **Tab categorization** - AI-powered content classification
- [ ] **Reading time estimation** - Based on content analysis
- [ ] **Duplicate detection** - Find and merge similar tabs
- [ ] **Scheduled extraction** - Automatically extract tabs at intervals
- [ ] **Web interface** - Browser-based tab management
- [ ] **Cloud sync** - Backup and sync across devices
- [ ] **Tab analytics** - Detailed browsing pattern analysis
### Integration Ideas
- [ ] **Notion API** - Direct integration with Notion
- [ ] **Obsidian** - Export to Obsidian vault
- [ ] **Roam Research** - Integration with Roam
- [ ] **Todoist** - Create tasks from tabs
- [ ] **Slack** - Share tab collections with teams
## 📄 License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## 🙏 Acknowledgments
- **Firefox** - For providing an accessible session storage format
- **LZ4** - For the compression library used by Firefox
- **Python community** - For the excellent ecosystem of tools and libraries
## 📞 Support
- 📧 **Email**: vinicius.alves.porto@gmail.com
- 🐛 **Issues**: [GitHub Issues](https://github.com/ViniciusPuerto/firefox-tab-extractor/issues)
- 📖 **Documentation**: [GitHub Wiki](https://github.com/ViniciusPuerto/firefox-tab-extractor/wiki)
- 💬 **Discussions**: [GitHub Discussions](https://github.com/ViniciusPuerto/firefox-tab-extractor/discussions)
---
**Made with ❤️ for the productivity community**
If this project helps you organize your digital life, consider giving it a ⭐ on GitHub!
Raw data
{
"_id": null,
"home_page": null,
"name": "firefox-tab-extractor",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "Vinicius Porto <vinicius.alves.porto@gmail.com>",
"keywords": "firefox, browser, tabs, extraction, organization, productivity",
"author": null,
"author_email": "Vinicius Porto <vinicius.alves.porto@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/7a/07/c9ed3fb846ab6b2d0df0ece0b0b17b1439efe827a315015f44b8a0b67e4d/firefox_tab_extractor-1.0.0.tar.gz",
"platform": null,
"description": "# Firefox Tab Extractor \ud83d\udd25\n\n[](https://www.python.org/downloads/)\n[](https://opensource.org/licenses/MIT)\n[](https://badge.fury.io/py/firefox-tab-extractor)\n\nA powerful Python library to extract and organize Firefox browser tabs for productivity, study organization, and workflow management.\n\n## \ud83c\udfaf Why Firefox Tab Extractor?\n\n**Tired of losing track of important tabs?** This library helps you:\n\n- \ud83d\udcda **Organize study materials** - Extract all your research tabs into structured formats\n- \ud83d\udcca **Productivity tracking** - See which sites you visit most and optimize your workflow\n- \ud83d\udd04 **Session backup** - Save your browsing sessions before major cleanup\n- \ud83d\udccb **Notion integration** - Export tabs directly to Notion for task management\n- \ud83c\udf93 **Learning management** - Create structured study schedules from your open tabs\n\n## \u2728 Features\n\n- \ud83d\udd0d **Smart profile detection** - Automatically finds Firefox profiles across different OS\n- \ud83d\udcc1 **Multiple output formats** - JSON for developers, CSV for Notion/Excel\n- \ud83c\udff7\ufe0f **Rich metadata** - Tab titles, URLs, access times, pinned status, domains\n- \ud83d\udcca **Statistics & analytics** - Get insights about your browsing patterns\n- \ud83d\udee0\ufe0f **Developer-friendly** - Clean API, type hints, comprehensive error handling\n- \ud83d\ude80 **CLI & Library** - Use as command-line tool or import in your Python code\n\n## \ud83d\ude80 Quick Start\n\n### Installation\n\n```bash\npip install firefox-tab-extractor\n```\n\n### Command Line Usage\n\n```bash\n# Extract all tabs to default files\nfirefox-tab-extractor\n\n# Save to specific files\nfirefox-tab-extractor --json my_tabs.json --csv my_tabs.csv\n\n# Show statistics only\nfirefox-tab-extractor --stats-only\n\n# Verbose output with preview\nfirefox-tab-extractor --verbose --preview 10\n```\n\n### Python Library Usage\n\n```python\nfrom firefox_tab_extractor import FirefoxTabExtractor\n\n# Initialize extractor\nextractor = FirefoxTabExtractor()\n\n# Extract tabs\ntabs = extractor.extract_tabs()\n\n# Get statistics\nstats = extractor.get_statistics(tabs)\nprint(f\"Found {stats['total_tabs']} tabs across {stats['total_windows']} windows\")\n\n# Save to files\nextractor.save_to_json(tabs, \"my_tabs.json\")\nextractor.save_to_csv(tabs, \"my_tabs.csv\")\n\n# Group by windows\nwindows = extractor.get_windows(tabs)\nfor window in windows:\n print(f\"Window {window.window_index}: {window.tab_count} tabs\")\n```\n\n## \ud83d\udcca Output Formats\n\n### JSON Output\n```json\n{\n \"extraction_time\": \"2024-01-15T10:30:00\",\n \"total_tabs\": 25,\n \"windows\": 3,\n \"pinned_tabs\": 5,\n \"hidden_tabs\": 2,\n \"tabs\": [\n {\n \"window_index\": 1,\n \"tab_index\": 1,\n \"title\": \"GitHub - Your Repository\",\n \"url\": \"https://github.com/username/repo\",\n \"last_accessed\": 1705312200000,\n \"last_accessed_readable\": \"2024-01-15 10:30:00\",\n \"pinned\": true,\n \"hidden\": false,\n \"domain\": \"github.com\"\n }\n ]\n}\n```\n\n### CSV Output (Notion-ready)\n```csv\nwindow_index,tab_index,title,url,last_accessed_readable,pinned,hidden,domain\n1,1,GitHub - Your Repository,https://github.com/username/repo,2024-01-15 10:30:00,true,false,github.com\n```\n\n## \ud83c\udf93 Study Organization Workflow\n\n### 1. Extract Your Tabs\n```bash\nfirefox-tab-extractor --csv study_materials.csv\n```\n\n### 2. Import to Notion\n1. Create a new Notion database\n2. Import the CSV file\n3. Add custom properties:\n - **Category** (JavaScript, Python, System Design, etc.)\n - **Priority** (High, Medium, Low)\n - **Estimated Reading Time** (15min, 30min, 1hr)\n - **Status** (Not Started, In Progress, Completed)\n - **Study Day** (Monday, Wednesday, Friday, Weekend)\n\n### 3. Create Study Schedule\n```\nMonday (1 hour):\n- 1 book chapter (30 min)\n- 2-3 short articles (30 min)\n\nWednesday (1 hour):\n- 1 book chapter (30 min)\n- 1 long technical article (30 min)\n\nFriday (1 hour):\n- 1 book chapter (30 min)\n- Practice problems/coding (30 min)\n\nWeekend (2 hours):\n- 1 book chapter (30 min)\n- 2-3 comprehensive tutorials (90 min)\n```\n\n## \ud83d\udee0\ufe0f Advanced Usage\n\n### Custom Firefox Profile\n```python\nextractor = FirefoxTabExtractor(profile_path=\"~/.mozilla/firefox/custom.profile\")\n```\n\n### Filtering and Analysis\n```python\n# Get only pinned tabs\npinned_tabs = [tab for tab in tabs if tab.pinned]\n\n# Get tabs by domain\ngithub_tabs = [tab for tab in tabs if tab.domain == \"github.com\"]\n\n# Get recently accessed tabs\nfrom datetime import datetime, timedelta\nrecent_tabs = [\n tab for tab in tabs \n if tab.last_accessed_datetime > datetime.now() - timedelta(days=7)\n]\n```\n\n### Error Handling\n```python\nfrom firefox_tab_extractor import FirefoxTabExtractor\nfrom firefox_tab_extractor.exceptions import FirefoxProfileNotFoundError\n\ntry:\n extractor = FirefoxTabExtractor()\n tabs = extractor.extract_tabs()\nexcept FirefoxProfileNotFoundError:\n print(\"Firefox profile not found. Make sure Firefox is installed.\")\n```\n\n## \ud83d\udd27 Troubleshooting\n\n### Firefox Profile Not Found\n- Make sure Firefox has been run at least once\n- Check if Firefox is installed via snap: `snap list firefox`\n- Use `--profile` to specify custom profile path\n\n### Permission Issues\n- Ensure you have read access to Firefox profile directory\n- On some systems, you might need to close Firefox first\n\n### No Tabs Found\n- Ensure Firefox has active tabs open\n- Try closing and reopening Firefox to refresh session data\n- Check if Firefox is in private browsing mode (private tabs aren't saved)\n\n## \ud83e\udd1d Contributing\n\nWe welcome contributions! Here's how you can help:\n\n### \ud83d\udc1b Reporting Bugs\n- Use the [GitHub issue tracker](https://github.com/ViniciusPuerto/firefox-tab-extractor/issues)\n- Include your OS, Firefox version, and Python version\n- Provide error messages and steps to reproduce\n\n### \ud83d\udca1 Feature Requests\n- Open an issue with the \"enhancement\" label\n- Describe the feature and its use case\n- Consider contributing the implementation\n\n### \ud83d\udd27 Development Setup\n```bash\n# Clone the repository\ngit clone https://github.com/ViniciusPuerto/firefox-tab-extractor.git\ncd firefox-tab-extractor\n\n# Install development dependencies\npip install -e \".[dev]\"\n\n# Run tests\npytest\n\n# Format code\nblack firefox_tab_extractor/\n\n# Type checking\nmypy firefox_tab_extractor/\n```\n\n### \ud83d\udcdd Code Style\n- Follow PEP 8 style guidelines\n- Use type hints for all functions\n- Add docstrings for all public methods\n- Write tests for new features\n\n## \ud83d\ude80 Roadmap\n\n### Planned Features\n- [ ] **Chrome/Edge support** - Extract tabs from other browsers\n- [ ] **Tab categorization** - AI-powered content classification\n- [ ] **Reading time estimation** - Based on content analysis\n- [ ] **Duplicate detection** - Find and merge similar tabs\n- [ ] **Scheduled extraction** - Automatically extract tabs at intervals\n- [ ] **Web interface** - Browser-based tab management\n- [ ] **Cloud sync** - Backup and sync across devices\n- [ ] **Tab analytics** - Detailed browsing pattern analysis\n\n### Integration Ideas\n- [ ] **Notion API** - Direct integration with Notion\n- [ ] **Obsidian** - Export to Obsidian vault\n- [ ] **Roam Research** - Integration with Roam\n- [ ] **Todoist** - Create tasks from tabs\n- [ ] **Slack** - Share tab collections with teams\n\n## \ud83d\udcc4 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## \ud83d\ude4f Acknowledgments\n\n- **Firefox** - For providing an accessible session storage format\n- **LZ4** - For the compression library used by Firefox\n- **Python community** - For the excellent ecosystem of tools and libraries\n\n## \ud83d\udcde Support\n\n- \ud83d\udce7 **Email**: vinicius.alves.porto@gmail.com\n- \ud83d\udc1b **Issues**: [GitHub Issues](https://github.com/ViniciusPuerto/firefox-tab-extractor/issues)\n- \ud83d\udcd6 **Documentation**: [GitHub Wiki](https://github.com/ViniciusPuerto/firefox-tab-extractor/wiki)\n- \ud83d\udcac **Discussions**: [GitHub Discussions](https://github.com/ViniciusPuerto/firefox-tab-extractor/discussions)\n\n---\n\n**Made with \u2764\ufe0f for the productivity community**\n\nIf this project helps you organize your digital life, consider giving it a \u2b50 on GitHub!\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python library to extract and organize Firefox browser tabs",
"version": "1.0.0",
"project_urls": {
"Bug Tracker": "https://github.com/ViniciusPuerto/firefox-tab-extractor/issues",
"Discussions": "https://github.com/ViniciusPuerto/firefox-tab-extractor/discussions",
"Documentation": "https://github.com/ViniciusPuerto/firefox-tab-extractor#readme",
"Homepage": "https://github.com/ViniciusPuerto/firefox-tab-extractor",
"Repository": "https://github.com/ViniciusPuerto/firefox-tab-extractor"
},
"split_keywords": [
"firefox",
" browser",
" tabs",
" extraction",
" organization",
" productivity"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "ac4a297729723ea5224c1b56dfaeebc6f1708cddb49b946fca5ea209ab35702c",
"md5": "455681714fa506d5eb4186330238d41f",
"sha256": "cd613fdb1c7cf03c645b79d4b0b73e601ad802c4dcf8db2f02ab828a8690a6a7"
},
"downloads": -1,
"filename": "firefox_tab_extractor-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "455681714fa506d5eb4186330238d41f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 13111,
"upload_time": "2025-08-25T00:00:11",
"upload_time_iso_8601": "2025-08-25T00:00:11.646510Z",
"url": "https://files.pythonhosted.org/packages/ac/4a/297729723ea5224c1b56dfaeebc6f1708cddb49b946fca5ea209ab35702c/firefox_tab_extractor-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "7a07c9ed3fb846ab6b2d0df0ece0b0b17b1439efe827a315015f44b8a0b67e4d",
"md5": "a77d31889a9c3d850cd26f7859a2a426",
"sha256": "3618c8d70dd7ea968362e0c7fc5edc2192cc8e5d9ae56e7d75f5907dba903eae"
},
"downloads": -1,
"filename": "firefox_tab_extractor-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "a77d31889a9c3d850cd26f7859a2a426",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 25974,
"upload_time": "2025-08-25T00:00:13",
"upload_time_iso_8601": "2025-08-25T00:00:13.086185Z",
"url": "https://files.pythonhosted.org/packages/7a/07/c9ed3fb846ab6b2d0df0ece0b0b17b1439efe827a315015f44b8a0b67e4d/firefox_tab_extractor-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-25 00:00:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ViniciusPuerto",
"github_project": "firefox-tab-extractor",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "lz4",
"specs": [
[
">=",
"3.1.0"
]
]
}
],
"lcname": "firefox-tab-extractor"
}