<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
>
<channel>
<title><![CDATA[豆写工具箱]]></title> 
<atom:link href="https://tool.douxieai.com/rss.php" rel="self" type="application/rss+xml" />
<description><![CDATA[]]></description>
<link>https://tool.douxieai.com/</link>
<language>zh-cn</language>
<generator>emlog</generator>

<item>
    <title>豆写AI — 智聚星河，AI创未来心</title>
    <link>https://tool.douxieai.com/4.html</link>
    <description><![CDATA[<p><img src="https://tool.douxieai.com/content/uploadfile/202510/f5631760804867.webp" alt="f5631760804867.webp" /></p>]]></description>
    <pubDate>Sun, 19 Oct 2025 00:27:25 +0800</pubDate>
    <dc:creator>emer</dc:creator>
    <guid>https://tool.douxieai.com/4.html</guid>
</item>
<item>
    <title>密码生成器</title>
    <link>https://tool.douxieai.com/json/3.html</link>
    <description><![CDATA[<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>安全随机密码生成工具</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        /* 密码生成器样式 - 独立作用域 */
        .password-generator-embed {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            max-width: 500px;
            margin: 0 auto;
            background-color: #f8f9fa;
            border-radius: 16px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            padding: 25px;
            border: 1px solid #e1e5ea;
            color: #333;
        }

        .password-generator-embed h2 {
            color: #333;
            text-align: center;
            margin-bottom: 20px;
            font-weight: 600;
            font-size: 1.5rem;
            border-bottom: 2px solid #4a6ee0;
            padding-bottom: 10px;
        }

        .password-generator-embed .password-display {
            display: flex;
            margin-bottom: 20px;
            position: relative;
        }

        .password-generator-embed #password {
            flex: 1;
            padding: 15px;
            border: 2px solid #e1e5ea;
            border-radius: 8px;
            font-size: 16px;
            background-color: white;
            color: #333;
            font-family: 'Courier New', monospace;
            padding-right: 50px;
        }

        .password-generator-embed .password-actions {
            display: flex;
            gap: 10px;
            margin-bottom: 25px;
        }

        .password-generator-embed #generate-btn {
            flex: 1;
            padding: 15px;
            background-color: #4a6ee0;
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: background-color 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .password-generator-embed #generate-btn:hover {
            background-color: #3a5bc7;
        }

        .password-generator-embed #copy-btn {
            padding: 15px 20px;
            background-color: #2ecc71;
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: background-color 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .password-generator-embed #copy-btn:hover {
            background-color: #27ae60;
        }

        .password-generator-embed .controls {
            margin-bottom: 25px;
        }

        .password-generator-embed .control-group {
            margin-bottom: 15px;
        }

        .password-generator-embed label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            color: #444;
            font-size: 0.95rem;
        }

        .password-generator-embed .length-control {
            display: flex;
            align-items: center;
        }

        .password-generator-embed #length {
            flex: 1;
            margin-right: 15px;
        }

        .password-generator-embed #length-value {
            font-weight: 600;
            color: #4a6ee0;
            min-width: 30px;
            text-align: center;
        }

        .password-generator-embed input[type="range"] {
            -webkit-appearance: none;
            width: 100%;
            height: 6px;
            border-radius: 4px;
            background: #e1e5ea;
            outline: none;
        }

        .password-generator-embed input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: #4a6ee0;
            cursor: pointer;
        }

        .password-generator-embed .checkbox-group {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
        }

        .password-generator-embed .checkbox-item {
            display: flex;
            align-items: center;
        }

        .password-generator-embed .checkbox-item input {
            margin-right: 6px;
            width: 16px;
            height: 16px;
        }

        .password-generator-embed .checkbox-item label {
            margin-bottom: 0;
            font-size: 0.9rem;
        }

        .password-generator-embed .strength-meter {
            margin-top: 20px;
            height: 8px;
            border-radius: 4px;
            background-color: #e1e5ea;
            overflow: hidden;
        }

        .password-generator-embed .strength-fill {
            height: 100%;
            width: 0%;
            transition: width 0.3s, background-color 0.3s;
        }

        .password-generator-embed .strength-label {
            margin-top: 8px;
            font-size: 13px;
            text-align: right;
            color: #666;
        }

        .password-generator-embed .notification {
            position: absolute;
            top: 10px;
            right: 10px;
            padding: 10px 20px;
            background-color: #4CAF50;
            color: white;
            border-radius: 6px;
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
            opacity: 0;
            transition: opacity 0.3s;
            z-index: 1000;
            font-size: 0.9rem;
        }

        .password-generator-embed .notification.show {
            opacity: 1;
        }

        .password-generator-embed .history-section {
            margin-top: 30px;
            border-top: 1px solid #e1e5ea;
            padding-top: 20px;
        }

        .password-generator-embed .history-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
        }

        .password-generator-embed .history-title {
            font-weight: 600;
            color: #444;
        }

        .password-generator-embed #clear-history {
            background: none;
            border: none;
            color: #e74c3c;
            cursor: pointer;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .password-generator-embed #clear-history:hover {
            text-decoration: underline;
        }

        .password-generator-embed .history-list {
            max-height: 200px;
            overflow-y: auto;
            border: 1px solid #e1e5ea;
            border-radius: 8px;
            padding: 10px;
        }

        .password-generator-embed .history-item {
            padding: 10px;
            border-bottom: 1px solid #f0f0f0;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-family: 'Courier New', monospace;
        }

        .password-generator-embed .history-item:last-child {
            border-bottom: none;
        }

        .password-generator-embed .history-actions {
            display: flex;
            gap: 10px;
        }

        .password-generator-embed .history-copy {
            background: none;
            border: none;
            color: #4a6ee0;
            cursor: pointer;
            font-size: 14px;
        }

        .password-generator-embed .history-delete {
            background: none;
            border: none;
            color: #e74c3c;
            cursor: pointer;
            font-size: 14px;
        }

        .password-generator-embed .security-note {
            background-color: #fff8e1;
            border-left: 4px solid #ffc107;
            padding: 12px;
            margin-top: 15px;
            border-radius: 4px;
            font-size: 14px;
            color: #856404;
        }

        /* 移动端适配 */
        @media (max-width: 480px) {
            .password-generator-embed {
                padding: 20px;
            }

            .password-generator-embed h2 {
                font-size: 1.3rem;
            }

            .password-generator-embed .password-actions {
                flex-direction: column;
            }

            .password-generator-embed .checkbox-group {
                flex-direction: column;
                gap: 10px;
            }
        }
    </style>
</head>
<body>
    <!-- 密码生成器组件 -->
    <div class="password-generator-embed">
        <h2><i class="fas fa-key"></i> 安全密码生成器</h2>

        <div class="password-display">
            <input type="text" id="password" readonly placeholder="点击生成密码">
        </div>

        <div class="password-actions">
            <button id="generate-btn"><i class="fas fa-sync-alt"></i> 生成密码</button>
            <button id="copy-btn"><i class="far fa-copy"></i> 复制</button>
        </div>

        <div class="controls">
            <div class="control-group">
                <label for="length">密码长度: <span id="length-value">12</span></label>
                <div class="length-control">
                    <input type="range" id="length" min="6" max="32" value="12">
                </div>
            </div>

            <div class="control-group">
                <label>包含字符类型:</label>
                <div class="checkbox-group">
                    <div class="checkbox-item">
                        <input type="checkbox" id="uppercase" checked>
                        <label for="uppercase">大写字母 (A-Z)</label>
                    </div>
                    <div class="checkbox-item">
                        <input type="checkbox" id="lowercase" checked>
                        <label for="lowercase">小写字母 (a-z)</label>
                    </div>
                    <div class="checkbox-item">
                        <input type="checkbox" id="numbers" checked>
                        <label for="numbers">数字 (0-9)</label>
                    </div>
                    <div class="checkbox-item">
                        <input type="checkbox" id="symbols">
                        <label for="symbols">符号 (!@#$%等)</label>
                    </div>
                </div>
            </div>
        </div>

        <div class="strength-meter">
            <div class="strength-fill" id="strength-fill"></div>
        </div>
        <div class="strength-label" id="strength-label">密码强度: 未生成</div>

        <div class="history-section">
            <div class="history-header">
                <div class="history-title">密码生成记录</div>
                <button id="clear-history"><i class="fas fa-trash-alt"></i> 清除记录</button>
            </div>
            <div class="history-list" id="history-list">
                <!-- 历史记录将在这里显示 -->
            </div>
            <div class="security-note">
                <i class="fas fa-exclamation-triangle"></i> 
                <strong>安全提示:</strong> 密码记录仅保存在当前浏览器中，清除浏览器数据将丢失所有记录。请勿在公共设备上保存敏感密码。
            </div>
        </div>

        <div class="notification" id="notification">密码已复制到剪贴板</div>
    </div>

    <script>
        // 密码生成器功能 - 使用闭包避免全局变量污染
        (function() {
            const passwordInput = document.getElementById('password');
            const copyButton = document.getElementById('copy-btn');
            const generateButton = document.getElementById('generate-btn');
            const lengthSlider = document.getElementById('length');
            const lengthValue = document.getElementById('length-value');
            const uppercaseCheckbox = document.getElementById('uppercase');
            const lowercaseCheckbox = document.getElementById('lowercase');
            const numbersCheckbox = document.getElementById('numbers');
            const symbolsCheckbox = document.getElementById('symbols');
            const strengthFill = document.getElementById('strength-fill');
            const strengthLabel = document.getElementById('strength-label');
            const notification = document.getElementById('notification');
            const historyList = document.getElementById('history-list');
            const clearHistoryButton = document.getElementById('clear-history');

            // 字符集
            const uppercaseChars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
            const lowercaseChars = 'abcdefghijklmnopqrstuvwxyz';
            const numberChars = '0123456789';
            const symbolChars = '!@#$%^&*()_+-=[]{}|;:,.<>?';

            // 初始化历史记录
            let passwordHistory = JSON.parse(localStorage.getItem('passwordHistory')) || [];
            renderHistory();

            // 更新密码长度显示
            lengthSlider.addEventListener('input', function() {
                lengthValue.textContent = this.value;
            });

            // 生成密码
            function generatePassword() {
                let charset = '';
                let password = '';

                // 根据选择的字符类型构建字符集
                if (uppercaseCheckbox.checked) charset += uppercaseChars;
                if (lowercaseCheckbox.checked) charset += lowercaseChars;
                if (numbersCheckbox.checked) charset += numberChars;
                if (symbolsCheckbox.checked) charset += symbolChars;

                // 如果没有选择任何字符类型，默认使用小写字母
                if (charset === '') {
                    charset = lowercaseChars;
                    lowercaseCheckbox.checked = true;
                }

                // 生成密码
                const length = parseInt(lengthSlider.value);
                for (let i = 0; i < length; i++) {
                    const randomIndex = Math.floor(Math.random() * charset.length);
                    password += charset[randomIndex];
                }

                passwordInput.value = password;
                updatePasswordStrength(password);

                // 保存到历史记录
                addToHistory(password);
            }

            // 更新密码强度指示器
            function updatePasswordStrength(password) {
                let strength = 0;

                // 长度评分
                if (password.length >= 8) strength += 1;
                if (password.length >= 12) strength += 1;
                if (password.length >= 16) strength += 1;

                // 字符类型评分
                if (/[a-z]/.test(password)) strength += 1;
                if (/[A-Z]/.test(password)) strength += 1;
                if (/[0-9]/.test(password)) strength += 1;
                if (/[^a-zA-Z0-9]/.test(password)) strength += 1;

                // 更新UI
                let strengthText = '';
                let strengthColor = '';

                if (strength <= 2) {
                    strengthText = '弱';
                    strengthColor = '#e74c3c';
                    strengthFill.style.width = '25%';
                } else if (strength <= 4) {
                    strengthText = '中等';
                    strengthColor = '#f39c12';
                    strengthFill.style.width = '50%';
                } else if (strength <= 6) {
                    strengthText = '强';
                    strengthColor = '#3498db';
                    strengthFill.style.width = '75%';
                } else {
                    strengthText = '非常强';
                    strengthColor = '#2ecc71';
                    strengthFill.style.width = '100%';
                }

                strengthFill.style.backgroundColor = strengthColor;
                strengthLabel.textContent = `密码强度: ${strengthText}`;
                strengthLabel.style.color = strengthColor;
            }

            // 复制密码到剪贴板
            function copyToClipboard() {
                if (!passwordInput.value) {
                    showNotification('请先生成密码', false);
                    return;
                }

                passwordInput.select();
                passwordInput.setSelectionRange(0, 99999); // 移动设备支持

                try {
                    const successful = document.execCommand('copy');
                    if (successful) {
                        showNotification('密码已复制到剪贴板', true);
                    }
                } catch (err) {
                    console.error('复制失败: ', err);
                    showNotification('复制失败，请手动复制', false);
                }
            }

            // 显示通知
            function showNotification(message, isSuccess) {
                notification.textContent = message;
                notification.style.backgroundColor = isSuccess ? '#4CAF50' : '#e74c3c';
                notification.classList.add('show');
                setTimeout(() => {
                    notification.classList.remove('show');
                }, 2000);
            }

            // 添加到历史记录
            function addToHistory(password) {
                const timestamp = new Date().toLocaleString();
                const historyItem = {
                    password: password,
                    timestamp: timestamp
                };

                // 添加到数组开头
                passwordHistory.unshift(historyItem);

                // 限制历史记录数量
                if (passwordHistory.length > 10) {
                    passwordHistory = passwordHistory.slice(0, 10);
                }

                // 保存到本地存储
                localStorage.setItem('passwordHistory', JSON.stringify(passwordHistory));

                // 更新显示
                renderHistory();
            }

            // 渲染历史记录
            function renderHistory() {
                if (passwordHistory.length === 0) {
                    historyList.innerHTML = '<div style="text-align: center; color: #999; padding: 20px;">暂无生成记录</div>';
                    return;
                }

                historyList.innerHTML = '';
                passwordHistory.forEach((item, index) => {
                    const historyItem = document.createElement('div');
                    historyItem.className = 'history-item';

                    const passwordText = document.createElement('div');
                    passwordText.textContent = item.password;

                    const historyActions = document.createElement('div');
                    historyActions.className = 'history-actions';

                    const copyButton = document.createElement('button');
                    copyButton.className = 'history-copy';
                    copyButton.innerHTML = '<i class="far fa-copy"></i>';
                    copyButton.title = '复制密码';
                    copyButton.addEventListener('click', () => {
                        copyHistoryPassword(item.password);
                    });

                    const deleteButton = document.createElement('button');
                    deleteButton.className = 'history-delete';
                    deleteButton.innerHTML = '<i class="far fa-trash-alt"></i>';
                    deleteButton.title = '删除记录';
                    deleteButton.addEventListener('click', () => {
                        deleteHistoryItem(index);
                    });

                    historyActions.appendChild(copyButton);
                    historyActions.appendChild(deleteButton);

                    historyItem.appendChild(passwordText);
                    historyItem.appendChild(historyActions);

                    historyList.appendChild(historyItem);
                });
            }

            // 复制历史记录中的密码
            function copyHistoryPassword(password) {
                const tempInput = document.createElement('input');
                tempInput.value = password;
                document.body.appendChild(tempInput);
                tempInput.select();
                document.execCommand('copy');
                document.body.removeChild(tempInput);
                showNotification('密码已复制到剪贴板', true);
            }

            // 删除历史记录项
            function deleteHistoryItem(index) {
                passwordHistory.splice(index, 1);
                localStorage.setItem('passwordHistory', JSON.stringify(passwordHistory));
                renderHistory();
            }

            // 清除所有历史记录
            function clearHistory() {
                if (passwordHistory.length === 0) {
                    showNotification('没有可清除的记录', false);
                    return;
                }

                if (confirm('确定要清除所有密码生成记录吗？此操作不可撤销。')) {
                    passwordHistory = [];
                    localStorage.removeItem('passwordHistory');
                    renderHistory();
                    showNotification('所有记录已清除', true);
                }
            }

            // 事件监听
            copyButton.addEventListener('click', copyToClipboard);
            generateButton.addEventListener('click', generatePassword);
            clearHistoryButton.addEventListener('click', clearHistory);

            // 初始状态
            strengthLabel.textContent = '密码强度: 未生成';
            strengthFill.style.width = '0%';
        })();
    </script>
</body>
</html>]]></description>
    <pubDate>Sun, 19 Oct 2025 00:12:54 +0800</pubDate>
    <dc:creator>emer</dc:creator>
    <guid>https://tool.douxieai.com/json/3.html</guid>
</item>
<item>
    <title>欢迎使用emlog</title>
    <link>https://tool.douxieai.com/1.html</link>
    <description><![CDATA[<p>这是系统生成的演示文章。编辑或者删除它，然后开始您的创作吧！</p>]]></description>
    <pubDate>Sat, 18 Oct 2025 23:54:43 +0800</pubDate>
    <dc:creator>emer</dc:creator>
    <guid>https://tool.douxieai.com/1.html</guid>
</item>
</channel>
</rss>