TXT转Sitemap生成器(支持大文件分割)

查看 7|回复 0
作者:罗伯特   
[ol]
  •    
  •    
  •     TXT转Sitemap生成器(支持大文件分割)
  •    
  •    
  •         * {
  •             margin: 0;
  •             padding: 0;
  •             box-sizing: border-box;
  •             font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  •         }
  •         
  •         body {
  •             background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  •             color: #333;
  •             min-height: 100vh;
  •             padding: 20px;
  •         }
  •         
  •         .container {
  •             max-width: 1200px;
  •             margin: 0 auto;
  •             background-color: rgba(255, 255, 255, 0.95);
  •             border-radius: 15px;
  •             box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  •             overflow: hidden;
  •         }
  •         
  •         header {
  •             background: linear-gradient(to right, #2c3e50, #4a6491);
  •             color: white;
  •             padding: 25px 30px;
  •             text-align: center;
  •         }
  •         
  •         h1 {
  •             font-size: 2.5rem;
  •             margin-bottom: 10px;
  •         }
  •         
  •         .subtitle {
  •             font-size: 1.1rem;
  •             opacity: 0.9;
  •             margin-bottom: 5px;
  •         }
  •         
  •         .content {
  •             padding: 30px;
  •             display: flex;
  •             flex-direction: column;
  •             gap: 25px;
  •         }
  •         
  •         .input-section, .output-section {
  •             background-color: #f8f9fa;
  •             border-radius: 10px;
  •             padding: 25px;
  •             box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  •         }
  •         
  •         .section-title {
  •             display: flex;
  •             align-items: center;
  •             gap: 10px;
  •             font-size: 1.5rem;
  •             color: #2c3e50;
  •             margin-bottom: 20px;
  •             padding-bottom: 10px;
  •             border-bottom: 2px solid #eaeaea;
  •         }
  •         
  •         .section-title i {
  •             color: #3498db;
  •         }
  •         
  •         .input-methods {
  •             display: flex;
  •             flex-wrap: wrap;
  •             gap: 20px;
  •             margin-bottom: 20px;
  •         }
  •         
  •         .method {
  •             flex: 1;
  •             min-width: 300px;
  •         }
  •         
  •         .method h3 {
  •             margin-bottom: 15px;
  •             color: #2c3e50;
  •             font-size: 1.2rem;
  •         }
  •         
  •         .input-group {
  •             display: flex;
  •             flex-direction: column;
  •             gap: 10px;
  •         }
  •         
  •         input[type="url"], input[type="file"] {
  •             padding: 12px 15px;
  •             border: 2px solid #ddd;
  •             border-radius: 8px;
  •             font-size: 1rem;
  •             transition: all 0.3s;
  •         }
  •         
  •         input[type="url"]:focus, input[type="file"]:focus {
  •             border-color: #3498db;
  •             outline: none;
  •         }
  •         
  •         .btn {
  •             padding: 12px 25px;
  •             background: linear-gradient(to right, #3498db, #2980b9);
  •             color: white;
  •             border: none;
  •             border-radius: 8px;
  •             font-size: 1rem;
  •             cursor: pointer;
  •             transition: all 0.3s;
  •             display: inline-flex;
  •             align-items: center;
  •             justify-content: center;
  •             gap: 8px;
  •             font-weight: 600;
  •         }
  •         
  •         .btn:hover {
  •             background: linear-gradient(to right, #2980b9, #2575fc);
  •             transform: translateY(-2px);
  •             box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  •         }
  •         
  •         .btn:active {
  •             transform: translateY(0);
  •         }
  •         
  •         .btn-secondary {
  •             background: linear-gradient(to right, #2ecc71, #27ae60);
  •         }
  •         
  •         .btn-secondary:hover {
  •             background: linear-gradient(to right, #27ae60, #219653);
  •         }
  •         
  •         .btn-warning {
  •             background: linear-gradient(to right, #f39c12, #e67e22);
  •         }
  •         
  •         .btn-warning:hover {
  •             background: linear-gradient(to right, #e67e22, #d35400);
  •         }
  •         
  •         .btn-danger {
  •             background: linear-gradient(to right, #e74c3c, #c0392b);
  •         }
  •         
  •         .btn-danger:hover {
  •             background: linear-gradient(to right, #c0392b, #a93226);
  •         }
  •         
  •         .actions {
  •             display: flex;
  •             flex-wrap: wrap;
  •             gap: 15px;
  •             margin-top: 20px;
  •         }
  •         
  •         .url-list {
  •             margin-top: 20px;
  •             max-height: 200px;
  •             overflow-y: auto;
  •             border: 1px solid #ddd;
  •             border-radius: 8px;
  •             padding: 10px;
  •             background-color: white;
  •         }
  •         
  •         .url-item {
  •             padding: 8px 12px;
  •             border-bottom: 1px solid #eee;
  •             font-family: monospace;
  •             font-size: 0.9rem;
  •             word-break: break-all;
  •         }
  •         
  •         .url-item:last-child {
  •             border-bottom: none;
  •         }
  •         
  •         .url-count {
  •             font-weight: bold;
  •             color: #3498db;
  •             margin-left: 5px;
  •         }
  •         
  •         .sitemap-list {
  •             margin-top: 20px;
  •             display: grid;
  •             grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  •             gap: 15px;
  •         }
  •         
  •         .sitemap-card {
  •             background-color: white;
  •             border-radius: 8px;
  •             border: 1px solid #ddd;
  •             overflow: hidden;
  •             transition: all 0.3s;
  •         }
  •         
  •         .sitemap-card:hover {
  •             transform: translateY(-3px);
  •             box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  •         }
  •         
  •         .sitemap-header {
  •             background-color: #2c3e50;
  •             color: white;
  •             padding: 12px 15px;
  •             display: flex;
  •             justify-content: space-between;
  •             align-items: center;
  •         }
  •         
  •         .sitemap-content {
  •             padding: 15px;
  •         }
  •         
  •         .sitemap-info {
  •             margin-bottom: 10px;
  •         }
  •         
  •         .sitemap-info span {
  •             display: block;
  •             margin-bottom: 5px;
  •         }
  •         
  •         .sitemap-actions {
  •             display: flex;
  •             flex-wrap: wrap;
  •             gap: 8px;
  •         }
  •         
  •         .sitemap-btn {
  •             padding: 8px 12px;
  •             background-color: #3498db;
  •             color: white;
  •             border: none;
  •             border-radius: 5px;
  •             font-size: 0.85rem;
  •             cursor: pointer;
  •             transition: background-color 0.3s;
  •             display: flex;
  •             align-items: center;
  •             gap: 5px;
  •         }
  •         
  •         .sitemap-btn:hover {
  •             background-color: #2980b9;
  •         }
  •         
  •         .sitemap-btn-secondary {
  •             background-color: #2ecc71;
  •         }
  •         
  •         .sitemap-btn-secondary:hover {
  •             background-color: #27ae60;
  •         }
  •         
  •         .sitemap-preview {
  •             margin-top: 20px;
  •             border: 1px solid #ddd;
  •             border-radius: 8px;
  •             overflow: hidden;
  •         }
  •         
  •         .preview-header {
  •             background-color: #2c3e50;
  •             color: white;
  •             padding: 10px 15px;
  •             display: flex;
  •             justify-content: space-between;
  •             align-items: center;
  •         }
  •         
  •         .preview-content {
  •             max-height: 300px;
  •             overflow-y: auto;
  •             padding: 15px;
  •             background-color: #f4f6f8;
  •         }
  •         
  •         pre {
  •             white-space: pre-wrap;
  •             word-wrap: break-word;
  •             font-family: monospace;
  •             font-size: 0.9rem;
  •             line-height: 1.5;
  •         }
  •         
  •         .empty-state {
  •             text-align: center;
  •             padding: 40px 20px;
  •             color: #7f8c8d;
  •         }
  •         
  •         .empty-state i {
  •             font-size: 3rem;
  •             margin-bottom: 15px;
  •             color: #bdc3c7;
  •         }
  •         
  •         .instructions {
  •             background-color: #e8f4fc;
  •             border-left: 4px solid #3498db;
  •             padding: 15px;
  •             border-radius: 0 8px 8px 0;
  •             margin-top: 20px;
  •         }
  •         
  •         .instructions h3 {
  •             margin-bottom: 10px;
  •             color: #2c3e50;
  •         }
  •         
  •         .instructions ul {
  •             padding-left: 20px;
  •         }
  •         
  •         .instructions li {
  •             margin-bottom: 8px;
  •         }
  •         
  •         .status-bar {
  •             display: flex;
  •             justify-content: space-between;
  •             align-items: center;
  •             padding: 10px 15px;
  •             background-color: #f0f7ff;
  •             border-radius: 8px;
  •             margin-bottom: 15px;
  •             border-left: 4px solid #3498db;
  •         }
  •         
  •         .progress-bar {
  •             height: 8px;
  •             background-color: #e0e0e0;
  •             border-radius: 4px;
  •             overflow: hidden;
  •             margin-top: 5px;
  •             flex-grow: 1;
  •             margin-right: 15px;
  •         }
  •         
  •         .progress-fill {
  •             height: 100%;
  •             background: linear-gradient(to right, #2ecc71, #27ae60);
  •             width: 0%;
  •             transition: width 0.5s ease;
  •         }
  •         
  •         footer {
  •             text-align: center;
  •             padding: 20px;
  •             color: #7f8c8d;
  •             font-size: 0.9rem;
  •             border-top: 1px solid #eee;
  •         }
  •         
  •         @media (max-width: 768px) {
  •             .container {
  •                 border-radius: 10px;
  •             }
  •             
  •             .content {
  •                 padding: 20px;
  •             }
  •             
  •             .input-methods {
  •                 flex-direction: column;
  •             }
  •             
  •             .method {
  •                 min-width: 100%;
  •             }
  •             
  •             h1 {
  •                 font-size: 2rem;
  •             }
  •             
  •             .sitemap-list {
  •                 grid-template-columns: 1fr;
  •             }
  •             
  •             .preview-header {
  •                 flex-direction: column;
  •                 gap: 10px;
  •                 align-items: flex-start;
  •             }
  •         }
  •    
  •    
  •         
  •              TXT转Sitemap生成器(大文件分割版)
  •             将TXT文件中的URL列表转换为标准XML站点地图,自动分割超过5万条URL的大文件
  •             支持生成sitemap索引文件和批量下载
  •         
  •         
  •         
  •             
  •                
  •                     
  •                     输入URL列表
  •                
  •                
  •                
  •                     
  •                         通过TXT文件URL
  •                         
  •                            
  •                            
  •                                  获取并解析URL
  •                            
  •                         
  •                     
  •                     
  •                     
  •                         上传TXT文件
  •                         
  •                            
  •                            
  •                                  上传并解析文件
  •                            
  •                         
  •                     
  •                
  •                
  •                
  •                     
  •                         处理进度: 0%
  •                         
  •                            
  •                         
  •                     
  •                     正在解析文件...
  •                
  •                
  •                
  •                      使用说明
  •                     
  •                         
  • TXT文件应每行包含一个完整URL(例如:https://example.com/page1)
  •                         
  • 支持HTTP和HTTPS协议的URL
  •                         
  • 系统将自动验证URL格式并排除无效链接
  •                         
  • 如果URL数量超过5万条,将自动分割为多个sitemap文件
  •                         
  • 分割时会自动生成sitemap索引文件,便于搜索引擎抓取
  •                         
  • 支持批量下载所有sitemap文件
  •                     
  •                
  •             
  •             
  •             
  •                
  •                     
  •                     生成的Sitemap
  •                     0 个URL
  •                
  •                
  •                
  •                     解析结果: 共找到 0 个有效URL,已分割为 0 个sitemap文件。
  •                     
  •                
  •                
  •                
  •                     已解析的URL列表(前100条):
  •                     
  •                
  •                
  •                
  •                
  •                
  •                     
  •                          批量下载所有Sitemap文件
  •                     
  •                     
  •                          下载Sitemap索引文件
  •                     
  •                     
  •                          清除全部
  •                     
  •                
  •                
  •                
  •                     
  •                         XML Sitemap 预览
  •                         
  •                            
  •                                  复制XML
  •                            
  •                            
  •                                  关闭预览
  •                            
  •                         
  •                     
  •                     
  •                         
  •                     
  •                
  •                
  •                
  •                     
  •                     等待生成Sitemap
  •                     输入TXT文件的URL或上传文件以开始生成XML站点地图
  •                
  •             
  •         
  •         
  •         
  •             TXT转Sitemap生成器(大文件分割版) © 2023 | 本工具完全在浏览器中运行,不会上传任何数据到服务器
  •         
  •    
  •    
  • [/ol]复制代码

    文件, 索引

  • 您需要登录后才可以回帖 登录 | 立即注册