A Chrome extension for downloading character data from Sakura.fm chat pages.
SakuraTool is a Chrome extension that allows users to easily download character data from Sakura.fm chat pages. The extension extracts character information including name, persona, scenario, and example dialogues, and saves them in a standardized JSON format.
- One-click character data download
- Extracts comprehensive character information:
- Character name
- Persona/Personality
- Scenario/World setting
- First message
- Example dialogues
- Description
- Saves data in a standardized JSON format
- Supports dynamic content extraction
- User-friendly popup interface
- Internationalization support
- Clone this repository:
git clone https://github.com/WTPieh/SakuraTool.git-
Open Chrome and navigate to
chrome://extensions/ -
Enable "Developer mode" in the top right corner
-
Click "Load unpacked" and select the extension directory
-
Navigate to any character chat page on Sakura.fm (e.g.,
https://www.sakura.fm/chat/[character-id]) -
Click the SakuraTool extension icon in your browser toolbar
-
Click the "Download" button in the popup
-
The character data will be downloaded as a JSON file
SakuraTool/
├── src/
│ ├── popup.jsx # Popup UI component
│ └── popup.html # Popup HTML template
├── _locales/ # Internationalization files
│ └── en/
│ └── messages.json
├── background.js # Background script
├── manifest.json # Extension manifest
├── postcss.config.js # PostCSS configuration
├── tailwind.config.js # Tailwind CSS configuration
└── vite.config.js # Vite build configuration
- Install dependencies:
npm install- Build the extension:
npm run build- React for UI components
- TailwindCSS for styling
- Vite for building
- Chrome Extension APIs for browser integration
The extension uses a strict regex pattern to validate Sakura.fm chat URLs:
/^https:\/\/www\.sakura\.fm\/chat\/[a-zA-Z0-9]+$/The extension handles both static and dynamic content:
- Static content is extracted directly from the page
- Dynamic content is processed using pattern matching and data retrieval functions
The extension includes comprehensive error handling for:
- Invalid URLs
- Missing character data
- Network errors
- Download failures
MIT License
Copyright (c) 2024 William Pieh and PiehSoft LLC
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
For support, please open an issue in the GitHub repository or contact the maintainers.
- Sakura.fm for providing the platform
- Chrome Extension development community
- All contributors and users of the extension