• דף הבית
    • אינדקס קישורים
    • פוסטים אחרונים
    • משתמשים
    • חיפוש בהגדרות המתקדמות
    • חיפוש גוגל בפורום
    • ניהול המערכת
    • ניהול המערכת - שרת private
    • הרשמה
    • התחברות

    תקיות לשלוחות לפי מסכת פרק ומשנה

    מתוזמן נעוץ נעול הועבר שאלות ועזרה הדדית
    6 פוסטים 2 כותבים 44 צפיות 2 עוקבים
    טוען פוסטים נוספים
    • מהישן לחדש
    • מהחדש לישן
    • הכי הרבה הצבעות
    תגובה
    • תגובה כנושא
    התחברו כדי לפרסם תגובה
    נושא זה נמחק. רק משתמשים עם הרשאות מתאימות יוכלו לצפות בו.
    • ב מנותק
      בעזרת השם
      נערך לאחרונה על ידי

      אני מעוניין לעשות בקו שלוחה של משניות שמחולקת בצורה מסודרת לפי מסכת פרק ומשנה, האם יש למישהו במקרה תיוקיות ושלוחות מסודרות לפי הסדר המתאים, או האם יש דרך מהירה לבנות את כל זה,
      וכן איך ניתן לעשות שלוחה למשנה יומית שתעלה בשלוחה זו כל יום המשנה שלה?
      אשמח לעזרה לזיכוי הרבים ואפילו בתשלום למעוניין
      תודה רבה

      L תגובה 1 תגובה אחרונה תגובה ציטוט 0
      • L מנותק
        lavitoren הטי"ל @בעזרת השם
        נערך לאחרונה על ידי

        @בעזרת-השם יש משהו בערך שבניתי כאן (לחץ על המילה כאן)

        ב 2 תגובות תגובה אחרונה תגובה ציטוט 0
        • ב מנותק
          בעזרת השם @lavitoren הטי"ל
          נערך לאחרונה על ידי

          @lavitoren-הטי-ל וואו תודה רבה נראה באמת כמו יצירה מושקעת! אני אעבור על זה כדי לא לטעות הבוראות אבל זה נראה פתרון מושלם להרבה צרכים
          תזכה למצוות

          נ.ב. אשמח אם יש למישהו פתרון גם לקבצים לפי תאריך

          תגובה 1 תגובה אחרונה תגובה ציטוט 0
          • ב מנותק
            בעזרת השם @lavitoren הטי"ל
            נערך לאחרונה על ידי

            @lavitoren-הטי-ל
            ישבתי על זה היום, דבר ראשון שוב פעם תודה רבה.
            דבר שני, ניסיתי בעזרת בינה מלאכותית לקחת את הקוד שבנית ולהוסיף את האופציה לחלוקה גם לפי סדר ומשנה, אני חושב שזה יצא טוב, אם תרצה אולי לעבור על זה ולהעלות אותו מחדש
            תודה רבה עזרת לי ממש זה פשוט כלי מטורף

            L תגובה 1 תגובה אחרונה תגובה ציטוט 1
            • L מנותק
              lavitoren הטי"ל @בעזרת השם
              נערך לאחרונה על ידי

              @בעזרת-השם אדרבה ואדרבה אשמח אם תוכל להעלות לכאן ו...אשריך

              L תגובה 1 תגובה אחרונה תגובה ציטוט 1
              • L מנותק
                lavitoren הטי"ל @lavitoren הטי"ל
                נערך לאחרונה על ידי lavitoren הטי"ל

                תראה שידרגתי אותו חוץ מחלוקת סדרי המשניות לעוד כמה ספרים רק ניסתי להכניס שיעשה TTS אבל לא הלך אולי תצליח אתה לסדר זה הקוד הכי טוב שיצא לי אני חושב עד היום

                <!DOCTYPE html>
                <html lang="he" dir="rtl">
                <head>
                    <meta charset="UTF-8">
                    <title>הטי"ל - הכלי הטלפוני ליצירת ספריות v1.5.1</title>
                    <style>
                        :root {
                            --bg-dark: #121212;
                            --surface: #1e1e1e;
                            --surface-light: #2d2d2d;
                            --primary: #3b82f6;
                            --primary-hover: #2563eb;
                            --accent: #f59e0b;
                            --danger: #ef4444;
                            --text-main: #e2e8f0;
                            --text-dim: #94a3b8;
                            --border: #334155;
                            --success: #10b981;
                        }
                
                        body { 
                            font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; 
                            background: radial-gradient(circle at center, #1a1a1a 0%, var(--bg-dark) 100%); 
                            color: var(--text-main); 
                            margin: 0; 
                            padding: 20px; 
                            line-height: 1.5;
                            text-align: right;
                        }
                
                        .wrapper { max-width: 1200px; margin: 0 auto; }
                
                        header { 
                            border-bottom: 2px solid var(--border); 
                            padding-bottom: 20px; 
                            margin-bottom: 30px; 
                            display: flex; 
                            justify-content: space-between; 
                            align-items: center; 
                            background: rgba(30, 30, 30, 0.6);
                            padding: 20px;
                            border-radius: 12px;
                            box-shadow: 0 8px 32px rgba(0,0,0,0.3);
                        }
                
                        h1 { 
                            margin: 0; 
                            font-size: 24px; 
                            font-weight: 800; 
                            color: var(--accent); 
                            letter-spacing: -0.5px;
                            text-shadow: 0 0 12px rgba(245, 158, 11, 0.5), 0 0 25px rgba(245, 158, 11, 0.3);
                        }
                
                        .version { font-size: 14px; background: var(--border); padding: 4px 10px; border-radius: 4px; color: #fff; margin-right: 10px; }
                
                        .dashboard { display: grid; grid-template-columns: 350px 1fr; gap: 20px; }
                
                        .card { 
                            background: var(--surface); 
                            border: 1px solid var(--border); 
                            border-radius: 12px; 
                            padding: 20px; 
                            box-shadow: 0 8px 24px rgba(0,0,0,0.6);
                            transition: transform 0.2s;
                        }
                
                        .lib-selector { 
                            display: grid; 
                            grid-template-columns: 1fr; 
                            gap: 10px; 
                            margin-bottom: 20px; 
                        }
                
                        .lib-btn { 
                            background: var(--surface-light); 
                            border: 1px solid var(--border); 
                            color: var(--text-main); 
                            padding: 10px 12px; 
                            border-radius: 8px; 
                            cursor: pointer; 
                            text-align: right; 
                            font-weight: 600; 
                            transition: all 0.25s ease;
                            display: flex;
                            align-items: center;
                            gap: 10px;
                            font-size: 14px;
                        }
                
                        .lib-btn:hover { border-color: var(--primary); background: #252525; transform: translateX(-4px); }
                        .lib-btn.active { background: var(--primary); border-color: var(--primary); color: white; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4); }
                
                        .form-group { margin-bottom: 15px; }
                        label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; font-weight: 600; }
                        
                        input, select { 
                            width: 100%; 
                            background: var(--bg-dark); 
                            border: 1px solid var(--border); 
                            border-radius: 6px; 
                            padding: 10px; 
                            color: white; 
                            box-sizing: border-box;
                            outline: none;
                            font-family: inherit;
                            transition: border-color 0.2s;
                        }
                
                        input:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2); }
                
                        .options-panel { 
                            background: #1a202c; 
                            border-right: 4px solid var(--accent); 
                            padding: 15px; 
                            border-radius: 6px; 
                            margin-bottom: 20px; 
                            box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
                        }
                
                        .scroll-area { 
                            height: 400px; 
                            overflow-y: auto; 
                            border: 1px solid var(--border); 
                            background: var(--bg-dark); 
                            padding: 10px; 
                            border-radius: 8px; 
                            display: grid; 
                            grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); 
                            gap: 8px; 
                        }
                
                        .masechet-item { 
                            background: var(--surface-light); 
                            padding: 8px; 
                            border-radius: 4px; 
                            display: flex; 
                            align-items: center; 
                            gap: 8px; 
                            font-size: 13px;
                            border: 1px solid transparent;
                            transition: border-color 0.2s;
                        }
                        .masechet-item:hover { border-color: var(--border); }
                        .masechet-item input { width: auto; cursor: pointer; }
                
                        .seder-title { 
                            grid-column: 1 / -1; 
                            background: var(--border); 
                            padding: 6px 10px; 
                            font-size: 12px; 
                            font-weight: 800; 
                            color: var(--accent); 
                            margin-top: 10px;
                            border-radius: 4px;
                            display: flex;
                            justify-content: space-between;
                            align-items: center;
                        }
                
                        .seder-checkbox {
                            width: auto !important;
                            margin: 0;
                            cursor: pointer;
                        }
                
                        .btn-run { 
                            background: linear-gradient(135deg, var(--primary), var(--primary-hover)); 
                            color: white; 
                            border: none; 
                            padding: 15px; 
                            border-radius: 8px; 
                            font-weight: 800; 
                            cursor: pointer; 
                            width: 100%; 
                            font-size: 17px; 
                            box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
                            transition: opacity 0.2s, transform 0.1s;
                        }
                        .btn-run:hover { opacity: 0.9; }
                        .btn-run:active { transform: scale(0.98); }
                
                        .btn-stop { 
                            background: linear-gradient(135deg, var(--danger), #dc2626); 
                            color: white; 
                            border: none; 
                            padding: 15px; 
                            border-radius: 8px; 
                            font-weight: 800; 
                            cursor: pointer; 
                            width: 100%; 
                            display: none; 
                            font-size: 17px; 
                            box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
                        }
                
                        .progress-wrapper { margin-top: 20px; }
                        .progress-bar-bg { background: var(--surface-light); height: 14px; border-radius: 7px; overflow: hidden; border: 1px solid var(--border); }
                        .progress-bar-fill { background: linear-gradient(90deg, var(--success), #34d399); height: 100%; width: 0%; transition: width 0.3s; }
                        .progress-status { font-size: 12px; color: var(--text-dim); margin-top: 8px; display: flex; justify-content: space-between; }
                        
                        .time-est { 
                            font-family: 'Consolas', monospace;
                            font-size: 14px; 
                            color: var(--accent); 
                            text-align: center; 
                            margin-top: 8px; 
                            background: var(--bg-dark);
                            padding: 6px;
                            border-radius: 6px;
                            border: 1px dashed var(--accent);
                            text-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
                        }
                
                        .log-container { 
                            margin-top: 20px; background: #000; color: #00ff00; font-family: 'Consolas', monospace; 
                            font-size: 12px; padding: 15px; border-radius: 8px; height: 150px; overflow-y: auto; border: 1px solid var(--border);
                            direction: ltr; text-align: left;
                            box-shadow: inset 0 0 10px rgba(0,255,0,0.1);
                        }
                        
                        .log-header {
                            display: flex;
                            justify-content: space-between;
                            align-items: center;
                            margin-bottom: 5px;
                        }
                
                        ::-webkit-scrollbar { width: 8px; }
                        ::-webkit-scrollbar-track { background: var(--bg-dark); }
                        ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
                    </style>
                </head>
                <body>
                
                <div class="wrapper">
                    <header>
                        <h1>פתיחת ספריה תורנית מטורפת עצומת מימדים לקו שלכם <span class="version">הטי"ל V1.5.1</span></h1>
                        <div id="connectionStatus" style="color: var(--success); font-size: 13px; font-weight: 600;">● מוכן לביצוע</div>
                    </header>
                
                    <div class="dashboard">
                        <div class="card">
                            <label>סוג תוכן להקמה</label>
                            <div class="lib-selector">
                                <button class="lib-btn active" onclick="loadLibrary('bavli', this)">📖 ש"ס בבלי</button>
                                <button class="lib-btn" onclick="loadLibrary('yerushalmi', this)">🕍 ש"ס ירושלמי</button>
                                <button class="lib-btn" onclick="loadLibrary('torah', this)">📜 תורה (חומשים ופרשיות)</button>
                                <button class="lib-btn" onclick="loadLibrary('tanakh', this)">📚 תנ"ך (כ"ד ספרים)</button>
                                <button class="lib-btn" onclick="loadLibrary('mishnah', this)">🗳️ משניות</button>
                                <button class="lib-btn" onclick="loadLibrary('rambam', this)">⚖️ רמב"ם (היד החזקה)</button>
                                <button class="lib-btn" onclick="loadLibrary('shulchan', this)">🖋️ שולחן ערוך</button>
                                <button class="lib-btn" onclick="loadLibrary('chassidut', this)">🔥 ספר התניא (חב"ד)</button>
                                <button class="lib-btn" onclick="loadLibrary('halacha_books', this)">📜 משנה ברורה וחפץ חיים</button>
                                <button class="lib-btn" onclick="loadLibrary('taharas_hakodesh', this)">💧 ספר טהרת הקודש</button>
                                <button class="lib-btn" onclick="loadLibrary('chagim', this)">🎉 חגים ומועדים</button>
                            </div>
                
                            <div class="form-group">
                                <label>סוג שלוחת הקצה (היחידה הקטנה ביותר)</label>
                                <select id="endFolderType">
                                    <option value="playfile">השמעת קבצים (playfile)</option>
                                    <option value="record">הקלטת הודעות (record)</option>
                                </select>
                            </div>
                
                            <div class="form-group" id="groupHierarchical">
                                <input type="checkbox" id="hierarchicalSedarim" checked style="width:auto; margin-left:10px;"> 
                                <label style="display:inline; color: white;" for="hierarchicalSedarim">הקם לפי סדרים (יוצר תת-תיקיות לפי סדרים)</label>
                            </div>
                
                            <div class="form-group">
                                <label>מספר מערכת (לדוגמה: 0770000000)</label>
                                <input type="text" id="sysNum" placeholder="0770000000">
                            </div>
                
                            <div class="form-group">
                                <label>סיסמה למערכת</label>
                                <input type="password" id="sysPass" placeholder="1234">
                            </div>
                
                            <div class="form-group">
                                <label>נתיב יעד (תיקייה בקו)</label>
                                <input type="text" id="targetPath" placeholder="למשל: 1/5">
                            </div>
                
                            <div class="form-group">
                                <label>מספר שלוחה להתחלה</label>
                                <input type="number" id="startNum" value="1">
                            </div>
                
                            <button class="btn-run" id="startBtn" onclick="process()">🚀 התחל הקמה</button>
                            <button class="btn-stop" id="cancelBtn" onclick="abort()">🛑 עצור פעולה</button>
                
                            <div class="progress-wrapper" id="progWrapper" style="display:none;">
                                <div class="progress-bar-bg"><div class="progress-bar-fill" id="progBar"></div></div>
                                <div class="progress-status"><span id="progText">0%</span><span id="progCounts">0 / 0</span></div>
                                <div class="time-est" id="timeEst">00:00:00 - מעריך זמן סיום...</div>
                            </div>
                        </div>
                
                        <div class="card">
                            <div id="optionsPanel" class="options-panel">
                                <div id="shasOptions">
                                    <input type="checkbox" id="splitAmudim" style="width:auto; margin-left:10px;"> 
                                    <label style="display:inline; color: white;" for="splitAmudim">פצל דפים לעמוד א' וב'</label>
                                </div>
                                <div id="torahOptions" style="display:none;">
                                    <input type="checkbox" id="noAliyot" style="width:auto; margin-left:10px;"> 
                                    <label style="display:inline; color: white;" for="noAliyot">ללא עליות לתורה (פרשה היא השמעת קבצים ישירה)</label>
                                </div>
                                <div id="mishnahOptions" style="display:none;">
                                    <label style="color: white;">כמות תתי-שלוחות (משניות/הלכות/פסוקים):</label>
                                    <input type="number" id="mishCount" value="0" style="width:100px;">
                                </div>
                                <div id="shulchanOptions" style="display:none;">
                                    <label style="color: white;">כמות סעיפים בכל סימן (0 לסימנים בלבד):</label>
                                    <input type="number" id="seifimCount" value="0" style="width:100px;">
                                </div>
                            </div>
                
                            <div style="display:flex; justify-content: space-between; margin-bottom: 15px;">
                                <label>בחירת ספרים / מסכתות</label>
                                <div>
                                    <button onclick="selectAll(true)" style="background:none; border:1px solid var(--border); color:var(--text-dim); cursor:pointer; padding:2px 10px; border-radius:4px; font-size:11px;">בחר הכל</button>
                                    <button onclick="selectAll(false)" style="background:none; border:1px solid var(--border); color:var(--text-dim); cursor:pointer; padding:2px 10px; border-radius:4px; font-size:11px; margin-right:5px;">נקה הכל</button>
                                </div>
                            </div>
                
                            <div class="scroll-area" id="masechtotList"></div>
                            
                            <div class="log-header" style="margin-top: 15px;">
                                <label style="margin:0;">לוג פעילות</label>
                                <div>
                                    <input type="checkbox" id="hideLog" style="width:auto; margin-left:5px;" onchange="toggleLogVisibility()">
                                    <label style="display:inline; font-size:12px; color:var(--text-dim);" for="hideLog">הסתר לוג פעילות</label>
                                </div>
                            </div>
                            <div class="log-container" id="logBox">ממתין לפקודה...</div>
                        </div>
                    </div>
                </div>
                
                <script>
                    let isAborted = false;
                    let currentLib = 'bavli';
                
                    const fullDb = {
                        torah: [{ seder: "חמישה חומשי תורה", items: [
                            { n: "בראשית", p: ["בראשית", "נח", "לך לך", "וירא", "חיי שרה", "תולדות", "ויצא", "וישלח", "וישב", "מקץ", "ויגש", "ויחי"] },
                            { n: "שמות", p: ["שמות", "וארא", "בא", "בשלח", "יתרו", "משפטים", "תרומה", "תצוה", "כי תשא", "ויקהל", "פקודי"] },
                            { n: "ויקרא", p: ["ויקרא", "צו", "שמיני", "תזריע", "מצורע", "אחרי מות", "קדושים", "אמור", "בהר", "בחקותי"] },
                            { n: "במדבר", p: ["במדבר", "נשא", "בהעלותך", "שלח", "קרח", "חקת", "בלק", "פינחס", "מטות", "מסעי"] },
                            { n: "דברים", p: ["דברים", "ואתחנן", "עקב", "ראה", "שופטים", "כי תצא", "כי תבוא", "נצבים", "וילך", "האזינו", "וזאת הברכה"] }
                        ]}],
                        chassidut: [{ seder: "ספר התניא (ליקוטי אמרים)", items: [
                            { n: "ליקוטי אמרים - חלק א (ספר של בינונים)", c: 53 },
                            { n: "שער היחוד והאמונה - חלק ב", c: 12 },
                            { n: "אגרת הקודש - חלק ג", c: 32 },
                            { n: "אגרת התשובה - חלק ד", c: 12 },
                            { n: "קונטרס אחרון - חלק ה", c: 1 }
                        ]}],
                        halacha_books: [
                            { seder: "משנה ברורה (חלקים אורח חיים)", items: [
                                { n: "חלק א - סימנים א - צז", c: 97 },
                                { n: "חלק ב - סימנים צח - רטז", c: 119 },
                                { n: "חלק ג - סימנים ריז - ת", c: 184 },
                                { n: "חלק ד - סימנים תא - תקל", c: 130 },
                                { n: "חלק ה - סימנים תקלא - תרצז", c: 167 }
                            ]},
                            { seder: "חפץ חיים ושמירת הלשון", items: [
                                { n: "חפץ חיים - הלכות לשון הרע", c: 10 },
                                { n: "שמירת הלשון - שערים", c: 4 }
                            ]}
                        ],
                        taharas_hakodesh: [
                            { seder: "ספר טהרת הקודש", items: [
                                { n: "מבוא", c: 7 },
                                { n: "פתיחה והקדמה", c: 2 },
                                { n: "מעלת נוטרי היסוד", c: 80 },
                                { n: "חומרת פגם היסוד", c: 72 },
                                { n: "פגם עיניים", c: 4 },
                                { n: "שמירת העיניים", c: 11 },
                                { n: "מאמר קדושת עיניים", c: 6 },
                                { n: "פגם המחשבה", c: 5 },
                                { n: "טהרת המחשבה", c: 15 },
                                { n: "פתח התשובה", c: 5 },
                                { n: "שורש התשובה", c: 8 },
                                { n: "הרהור תשובה", c: 5 },
                                { n: "כניסה לתשובה", c: 7 },
                                { n: "תשובה בהתבוננות", c: 3 },
                                { n: "תשובה פרטית", c: 3 },
                                { n: "תשובת המשקל", c: 19 },
                                { n: "חלק ב - תשובות סגוליות", c: 23 },
                                { n: "תשובה בתפילה", c: 5 },
                                { n: "הצדקה", c: 12 },
                                { n: "מארי דחושבנא", c: 11 },
                                { n: "תשובה עילאה", c: 9 },
                                { n: "כללי הפגמים", c: 4 },
                                { n: "תיקון היסוד", c: 6 },
                                { n: "שער קריאת שמע", c: 13 },
                                { n: "תיקון היום", c: 4 },
                                { n: "שמירת הברית", c: 17 },
                                { n: "מקוה ישראל", c: 9 },
                                { n: "שער התפילות חלק ג ותפילות נלוות", c: 15 }
                            ]}
                        ],
                        chagim: [
                            { seder: "1. ימים נוראים וחגי תשרי", items: [
                                { n: "ראש השנה", p: ["ערב ראש השנה", "תפילות ראש השנה", "תקיעת שופר", "סימני ראש השנה"] },
                                { n: "עשרת ימי תשובה", p: ["סליחות", "שבת תשובה", "כפרות"] },
                                { n: "יום הכיפורים", p: ["ערב יום הכיפורים", "תפילת כל נדרי", "נעילה", "מוצאי יום הכיפורים"] },
                                { n: "סוכות", p: ["בניית סוכה", "ארבעת המינים", "הושענא רבא", "שמיני עצרת ושמחת תורה"] }
                            ]},
                            { seder: "2. חגים מדרבנן", items: [
                                { n: "חנוכה", p: ["הדלקת נרות", "מעוז צור", "ענייני חנוכה", "סביבון"] },
                                { n: "פורים", p: ["תענית אסתר", "קריאת המגילה", "משלוח מנות ומתנות לאביונים", "סעודת פורים"] }
                            ]},
                            { seder: "3. חגי ניסן וספירת העומר", items: [
                                { n: "פסח", p: ["בדיקת חמץ וביעורו", "הערב הסדר", "הגדה של פסח", "שביעי של פסח ואיסרו חג"] },
                                { n: "ספירת העומר ול\"ג בעומר", p: ["דיני ספירת העומר", "ימי העומר", "ל\"ג בעומר ומנהגיו"] },
                                { n: "שבועות", p: ["ערב שבועות", "תיקון ליל שבועות", "מגילת רות"] }
                            ]},
                            { seder: "4. בין המצרים ותעניות השנה", items: [
                                { n: "תעניות השנה", p: ["צום גדליה", "עשרה בטבת", "תענית אסתר", "שבעה עשר בתמוז"] },
                                { n: "בין המצרים ותשעה באב", p: ["שלושת השבועות", "תשעה באב ותיקון חצות", "קינות ומגילת איכה"] }
                            ]}
                        ],
                        tanakh: [{ seder: "תורה", items: [{ n: "בראשית", c: 50 }, { n: "שמות", c: 40 }, { n: "ויקרא", c: 27 }, { n: "במדבר", c: 36 }, { n: "דברים", c: 34 }]}, { seder: "נביאים", items: [{ n: "יהושע", c: 24 }, { n: "שופטים", c: 21 }, { n: "שמואל א", c: 31 }, { n: "שמואל ב", c: 24 }, { n: "מלכים א", c: 22 }, { n: "מלכים ב", c: 25 }, { n: "ישעיהו", c: 66 }, { n: "ירמיהו", c: 52 }, { n: "יחזקאל", c: 48 }, { n: "תרי עשר", c: 67 }]}, { seder: "כתובים", items: [{ n: "תהילים", c: 150 }, { n: "משלי", c: 31 }, { n: "איוב", c: 42 }, { n: "שיר השירים", c: 8 }, { n: "רות", c: 4 }, { n: "איכה", c: 5 }, { n: "קהלת", c: 12 }, { n: "אסתר", c: 10 }, { n: "דניאל", c: 12 }, { n: "עזרא", c: 10 }, { n: "נחמיה", c: 13 }, { n: "דברי הימים א", c: 29 }, { n: "דברי הימים ב", c: 36 }]}],
                        mishnah: [{ seder: "סדר זרעים", items: [{ n: "ברכות", c: 9 }, { n: "פאה", c: 8 }, { n: "דמאי", c: 7 }, { n: "כלאיים", c: 9 }, { n: "שביעית", c: 10 }, { n: "תרומות", c: 11 }, { n: "מעשרות", c: 5 }, { n: "מעשר שני", c: 5 }, { n: "חלה", c: 4 }, { n: "ערלה", c: 3 }, { n: "ביכורים", c: 3 }]}, { seder: "סדר מועד", items: [{ n: "שבת", c: 24 }, { n: "עירובין", c: 10 }, { n: "פסחים", c: 10 }, { n: "שקלים", c: 8 }, { n: "יומא", c: 8 }, { n: "סוכה", c: 5 }, { n: "ביצה", c: 5 }, { n: "ראש השנה", c: 4 }, { n: "תענית", c: 4 }, { n: "מגילה", c: 4 }, { n: "מועד קטן", c: 3 }, { n: "חגיגה", c: 3 }]}, { seder: "סדר נשים", items: [{ n: "יבמות", c: 16 }, { n: "כתובות", c: 13 }, { n: "נדרים", c: 11 }, { n: "נזיר", c: 9 }, { n: "סוטה", c: 9 }, { n: "גיטין", c: 9 }, { n: "קידושין", c: 4 }]}, { seder: "סדר נזיקין", items: [{ n: "בבא קמא", c: 10 }, { n: "בבא מציעא", c: 10 }, { n: "בבא בתרא", c: 10 }, { n: "סנהדרין", c: 11 }, { n: "מכות", c: 3 }, { n: "שבועות", c: 8 }, { n: "עדיות", c: 8 }, { n: "עבודה זרה", c: 5 }, { n: "אבות", c: 6 }, { n: "הוריות", c: 3 }]}, { seder: "סדר קדשים", items: [{ n: "זבחים", c: 14 }, { n: "מנחות", c: 13 }, { n: "חולין", c: 12 }, { n: "בכורות", c: 9 }, { n: "ערכין", c: 9 }, { n: "תמורה", c: 7 }, { n: "כריתות", c: 6 }, { n: "מעילה", c: 6 }, { n: "תמיד", c: 7 }, { n: "מידות", c: 5 }, { n: "קינים", c: 3 }]}, { seder: "סדר טהרות", items: [{ n: "כלים", c: 30 }, { n: "אהלות", c: 18 }, { n: "נגעים", c: 14 }, { n: "פרה", c: 12 }, { n: "טהרות", c: 10 }, { n: "מקואות", c: 10 }, { n: "נידה", c: 10 }, { n: "מכשירין", c: 6 }, { n: "זבים", c: 5 }, { n: "טבול יום", c: 4 }, { n: "ידיים", c: 4 }, { n: "עוקצין", c: 3 }]}],
                        bavli: [
                            { seder: "סדר זרעים", items: [{ n: "ברכות", c: 64 }] },
                            { seder: "סדר מועד", items: [{ n: "שבת", c: 157 }, { n: "עירובין", c: 105 }, { n: "פסחים", c: 121 }, { n: "שקלים", c: 22 }, { n: "יומא", c: 88 }, { n: "סוכה", c: 56 }, { n: "ביצה", c: 40 }, { n: "ראש השנה", c: 35 }, { n: "תענית", c: 31 }, { n: "מגילה", c: 32 }, { n: "מועד קטן", c: 29 }, { n: "חגיגה", c: 27 }] },
                            { seder: "סדר נשים", items: [{ n: "יבמות", c: 122 }, { n: "כתובות", c: 112 }, { n: "נדרים", c: 91 }, { n: "נזיר", c: 66 }, { n: "סוטה", c: 49 }, { n: "גיטין", c: 90 }, { n: "קידושין", c: 82 }] },
                            { seder: "סדר נזיקין", items: [{ n: "בבא קמא", c: 119 }, { n: "בבא מציעא", c: 119 }, { n: "בבא בתרא", c: 176 }, { n: "סנהדרין", c: 113 }, { n: "מכות", c: 24 }, { n: "שבועות", c: 49 }, { n: "עבודה זרה", c: 76 }, { n: "הוריות", c: 14 }] },
                            { seder: "סדר קדשים", items: [{ n: "זבחים", c: 120 }, { n: "מנחות", c: 110 }, { n: "חולין", c: 142 }, { n: "בכורות", c: 61 }, { n: "ערכין", c: 34 }, { n: "תמורה", c: 34 }, { n: "כריתות", c: 28 }, { n: "מעילה", c: 22 }, { n: "תמיד", c: 33, s: 25 }, { n: "מידות", c: 37, s: 34 }, { n: "קינים", c: 25, s: 22 }] },
                            { seder: "סדר טהרות", items: [{ n: "נידה", c: 73 }] }
                        ],
                        yerushalmi: [
                            { seder: "סדר זרעים", items: [{ n: "ברכות", c: 68 }, { n: "פאה", c: 37 }, { n: "דמאי", c: 34 }, { n: "כלאיים", c: 44 }, { n: "שביעית", c: 31 }, { n: "תרומות", c: 59 }, { n: "מעשרות", c: 26 }, { n: "מעשר שני", c: 33 }, { n: "חלה", c: 28 }, { n: "ערלה", c: 20 }, { n: "ביכורים", c: 13 }] },
                            { seder: "סדר מועד", items: [{ n: "שבת", c: 92 }, { n: "עירובין", c: 65 }, { n: "פסחים", c: 71 }, { n: "יומא", c: 42 }, { n: "שקלים", c: 33 }, { n: "סוכה", c: 26 }, { n: "ראש השנה", c: 22 }, { n: "ביצה", c: 22 }, { n: "תענית", c: 26 }, { n: "מגילה", c: 34 }, { n: "חגיגה", c: 22 }, { n: "מועד קטן", c: 19 }] },
                            { seder: "סדר נשים", items: [{ n: "יבמות", c: 85 }, { n: "סוטה", c: 47 }, { n: "כתובות", c: 72 }, { n: "נדרים", c: 40 }, { n: "גיטין", c: 54 }, { n: "נזיר", c: 44 }, { n: "קידושין", c: 48 }] },
                            { seder: "סדר נזיקין", items: [{ n: "בבא קמא", c: 44 }, { n: "בבא מציעא", c: 37 }, { n: "בבא בתרא", c: 34 }, { n: "סנהדרין", c: 68 }, { n: "מכות", c: 9 }, { n: "שבועות", c: 44 }, { n: "עבודה זרה", c: 37 }, { n: "הוריות", c: 19 }] },
                            { seder: "סדר טהרות", items: [{ n: "נידה", c: 13 }] }
                        ],
                        rambam: [{ seder: "רמב\"ם", items: [{ n: "מדע", c: 46 }, { n: "אהבה", c: 46 }, { n: "זמנים", c: 97 }, { n: "נשים", c: 51 }, { n: "קדושה", c: 54 }, { n: "הפלאה", c: 43 }, { n: "זרעים", c: 84 }, { n: "עבודה", c: 97 }, { n: "קרבנות", c: 45 }, { n: "טהרה", c: 172 }, { n: "נזיקין", c: 61 }, { n: "קניין", c: 74 }, { n: "משפטים", c: 75 }, { n: "שופטים", c: 81 }]}],
                        shulchan: [{ seder: "שולחן ערוך", items: [{ n: "אורח חיים", c: 697 }, { n: "יורה דעה", c: 403 }, { n: "אבן העזר", c: 178 }, { n: "חושן משפט", c: 427 }]}]
                    };
                
                    function toHebrew(num) {
                        if (num <= 0) return "";
                        let str = "";
                        const hundreds = ["", "ק", "ר", "ש", "ת"];
                        const tens = ["", "י", "כ", "ל", "מ", "נ", "ס", "ע", "פ", "צ"];
                        const realOnes = ["", "א", "ב", "ג", "ד", "ה", "ו", "ז", "ח", "ט"];
                        if (num >= 100) { str += hundreds[Math.floor(num / 100)]; num %= 100; }
                        if (num === 15) return str + "טו";
                        if (num === 16) return str + "טז";
                        str += tens[Math.floor(num / 10)];
                        str += realOnes[num % 10];
                        return str;
                    }
                
                    function selectAll(val) { document.querySelectorAll('#masechtotList input[type="checkbox"]').forEach(i => i.checked = val); }
                
                    function toggleSeder(sourceCheckbox, sederName) {
                        const checkboxes = document.querySelectorAll(`.masechet-item[data-seder="${sederName}"] input[type="checkbox"]`);
                        checkboxes.forEach(cb => cb.checked = sourceCheckbox.checked);
                    }
                
                    function toggleLogVisibility() {
                        const isHidden = document.getElementById('hideLog').checked;
                        document.getElementById('logBox').style.display = isHidden ? 'none' : 'block';
                    }
                
                    function loadLibrary(libKey, btn) {
                        currentLib = libKey;
                        document.querySelectorAll('.lib-btn').forEach(b => b.classList.remove('active'));
                        if(btn) btn.classList.add('active');
                        
                        document.getElementById('shasOptions').style.display = (libKey.includes('shas') || libKey.includes('bavli') || libKey.includes('yerushalmi')) ? 'block' : 'none';
                        document.getElementById('torahOptions').style.display = (libKey === 'torah') ? 'block' : 'none';
                        document.getElementById('mishnahOptions').style.display = (libKey === 'mishnah' || libKey === 'rambam' || libKey === 'tanakh') ? 'block' : 'none';
                        document.getElementById('shulchanOptions').style.display = (libKey === 'shulchan') ? 'block' : 'none';
                
                        const listDiv = document.getElementById('masechtotList');
                        listDiv.innerHTML = "";
                        let unitLabel = libKey.includes('shas') || libKey.includes('bavli') || libKey.includes('yerushalmi') ? "דפים" : (libKey === 'shulchan' ? "סימנים" : (libKey === 'torah' ? "פרשיות" : (libKey === 'chagim' ? "נושאים" : "פרקים")));
                
                        fullDb[libKey].forEach(s => {
                            const title = document.createElement('div');
                            title.className = 'seder-title';
                            title.innerHTML = `<span>${s.seder}</span> <input type="checkbox" class="seder-checkbox" title="בחר הכל בסדר זה" onclick="toggleSeder(this, '${s.seder}')">`;
                            listDiv.appendChild(title);
                            
                            s.items.forEach(m => {
                                const item = document.createElement('div');
                                item.className = 'masechet-item';
                                item.setAttribute('data-seder', s.seder);
                                let countLabel = m.p ? m.p.length : m.c;
                                item.innerHTML = `<input type="checkbox" value="${m.n}" data-seder-name="${s.seder}" data-c="${m.c||0}" data-p='${JSON.stringify(m.p||[])}' data-s="${m.s||(libKey.includes('shas')?2:1)}"> <span>${m.n} (${countLabel} ${unitLabel})</span>`;
                                listDiv.appendChild(item);
                            });
                        });
                    }
                
                    function abort() { isAborted = true; }
                
                    async function process() {
                        isAborted = false;
                        const sysNum = document.getElementById('sysNum').value.trim();
                        const sysPass = document.getElementById('sysPass').value.trim();
                        const token = sysNum + ":" + sysPass;
                
                        const startFolder = parseInt(document.getElementById('startNum').value);
                        const endType = document.getElementById('endFolderType').value;
                        const targetPath = document.getElementById('targetPath').value.trim().replace(/^\/|\/$/g, "");
                        const hierarchical = document.getElementById('hierarchicalSedarim').checked;
                        const selected = Array.from(document.querySelectorAll('#masechtotList .masechet-item input[type="checkbox"]:checked'));
                
                        if(!sysNum || !sysPass || selected.length === 0) return alert("הזן מספר מערכת, סיסמה ובחר פריטים!");
                
                        document.getElementById('startBtn').style.display = "none";
                        document.getElementById('cancelBtn').style.display = "block";
                        document.getElementById('progWrapper').style.display = "block";
                        const log = document.getElementById('logBox');
                        log.innerHTML = "🏁 מתחיל בתהליך...\n";
                
                        let tasks = [];
                        
                        if (hierarchical) {
                            let sedarimMap = {};
                            selected.forEach(input => {
                                const sederName = input.dataset.sederName;
                                if (!sedarimMap[sederName]) sedarimMap[sederName] = [];
                                sedarimMap[sederName].push(input);
                            });
                
                            let sederKeys = Object.keys(sedarimMap);
                            let sederCounter = startFolder;
                
                            sederKeys.forEach((sederName, si) => {
                                const sederItems = sedarimMap[sederName];
                                const autoSederDigits = sederKeys.length >= 10 ? 2 : 1;
                                const sederFolderNum = String(sederCounter).padStart(autoSederDigits, '0');
                                const sederPath = targetPath ? `${targetPath}/${sederFolderNum}` : sederFolderNum;
                
                                let prefixWord = currentLib === 'torah' ? 'לפרשת' : (currentLib === 'shulchan' ? 'לסימן' : (currentLib === 'chagim' ? 'לנושא' : 'למסכת'));
                                let voiceMenuLines = sederItems.map((inp, idx) => `${prefixWord} ${inp.value} הקש ${idx + 1}`).join(', ');
                
                                tasks.push({ p: sederPath, t: sederName, b: `type=menu\ntitle=${sederName}\ndigits=${sederItems.length >= 10 ? 2 : 1}` });
                                tasks.push({ p: sederPath, isTts: true, text: `${sederName}. ${voiceMenuLines}` });
                
                                let itemCounter = 1;
                                sederItems.forEach(input => {
                                    const name = input.value;
                                    const subItems = JSON.parse(input.dataset.p);
                                    const count = parseInt(input.dataset.c);
                                    const start = parseInt(input.dataset.s);
                                    
                                    const totalSubCount = subItems.length > 0 ? subItems.length : (count - start + 1);
                                    const autoDigits = totalSubCount >= 10 ? 2 : 1;
                
                                    const rootF = String(itemCounter).padStart(sederItems.length >= 10 ? 2 : 1, '0');
                                    const rootP = `${sederPath}/${rootF}`;
                
                                    tasks.push({ p: rootP, t: name, b: `type=menu\ntitle=${name}\ndigits=${autoDigits}` });
                                    tasks.push({ p: rootP, isTts: true, text: name });
                
                                    for (let i = start; i <= count; i++) {
                                        const sf = String(i).padStart(autoDigits, '0');
                                        const sp = `${rootP}/${sf}`;
                                        const heb = toHebrew(i);
                                        let title = (currentLib.includes('shas') || currentLib.includes('bavli') || currentLib.includes('yerushalmi')) ? `דף ${heb}` : `פרק ${heb}`;
                                        let ttsText = (currentLib.includes('shas') || currentLib.includes('bavli') || currentLib.includes('yerushalmi')) ? `דף ${heb}` : `פרק ${heb}`;
                                        
                                        const splitS = document.getElementById('splitAmudim').checked && (currentLib.includes('shas') || currentLib.includes('bavli') || currentLib.includes('yerushalmi'));
                                        const mishCount = parseInt(document.getElementById('mishCount').value);
                                        let hasSub = splitS || (currentLib === 'mishnah' && mishCount > 0);
                                        
                                        tasks.push({ p: sp, t: title, b: `type=${hasSub?'menu':endType}\ntitle=${title}${hasSub ? '\ndigits='+(splitS ? 1 : 2) : ''}` });
                                        tasks.push({ p: sp, isTts: true, text: ttsText });
                
                                        if(splitS) {
                                            tasks.push({ p: `${sp}/1`, t: "עמוד א", b: `type=${endType}\ntitle=עמוד א` });
                                            tasks.push({ p: `${sp}/1`, isTts: true, text: "עמוד א" });
                                            tasks.push({ p: `${sp}/2`, t: "עמוד ב", b: `type=${endType}\ntitle=עמוד ב` });
                                            tasks.push({ p: `${sp}/2`, isTts: true, text: "עמוד ב" });
                                        }
                                    }
                                    itemCounter++;
                                });
                                sederCounter++;
                            });
                
                        } else {
                            let counter = startFolder;
                            selected.forEach(input => {
                                const name = input.value;
                                const subItems = JSON.parse(input.dataset.p);
                                const count = parseInt(input.dataset.c);
                                const start = parseInt(input.dataset.s);
                                
                                const totalSubCount = subItems.length > 0 ? subItems.length : (count - start + 1);
                                const autoDigits = totalSubCount >= 10 ? 2 : 1;
                
                                const rootF = String(counter).padStart(selected.length > 9 ? 2 : 1, '0');
                                const rootP = targetPath ? `${targetPath}/${rootF}` : rootF;
                
                                tasks.push({ p: rootP, t: name, b: `type=menu\ntitle=${name}\ndigits=${autoDigits}` });
                                tasks.push({ p: rootP, isTts: true, text: name });
                
                                for (let i = start; i <= count; i++) {
                                    const sf = String(i).padStart(autoDigits, '0');
                                    const sp = `${rootP}/${sf}`;
                                    const heb = toHebrew(i);
                                    let title = `פרק ${heb}`;
                                    
                                    tasks.push({ p: sp, t: title, b: `type=${endType}\ntitle=${title}` });
                                    tasks.push({ p: sp, isTts: true, text: title });
                                }
                                counter++;
                            });
                        }
                
                        const startTime = Date.now();
                
                        for (let i = 0; i < tasks.length; i++) {
                            if (isAborted) break;
                            
                            let ok = false;
                            if (tasks[i].isTts) {
                                ok = await uploadTts(token, tasks[i].p, tasks[i].text);
                            } else {
                                ok = await uploadIni(token, tasks[i].p, tasks[i].b);
                            }
                
                            if(ok) log.innerHTML += `<div>✓ SUCCESS: ${tasks[i].p} ${tasks[i].isTts ? '(TTS)' : ''}</div>`;
                            else log.innerHTML += `<div style="color:red">✗ FAILED: ${tasks[i].p} ${tasks[i].isTts ? '(TTS)' : ''}</div>`;
                            
                            let pct = Math.round(((i + 1) / tasks.length) * 100);
                            document.getElementById('progBar').style.width = pct + "%";
                            document.getElementById('progText').innerText = pct + "%";
                            document.getElementById('progCounts').innerText = `${i+1} / ${tasks.length}`;
                
                            let elapsed = (Date.now() - startTime) / 1000;
                            let rate = (i + 1) / elapsed;
                            let remainingTasks = tasks.length - (i + 1);
                            let estSeconds = rate > 0 ? Math.round(remainingTasks / rate) : 0;
                            
                            let hrs = String(Math.floor(estSeconds / 3600)).padStart(2, '0');
                            let mins = String(Math.floor((estSeconds % 3600) / 60)).padStart(2, '0');
                            let secs = String(estSeconds % 60).padStart(2, '0');
                            
                            document.getElementById('timeEst').innerText = `⏱️ ${hrs}:${mins}:${secs} - זמן משוער לסיום`;
                
                            log.scrollTop = log.scrollHeight;
                        }
                
                        document.getElementById('startBtn').style.display = "block";
                        document.getElementById('cancelBtn').style.display = "none";
                    }
                
                    async function uploadIni(token, path, body) {
                        const fd = new FormData();
                        fd.append('token', token);
                        fd.append('path', `ivr2:${path}/ext.ini`);
                        fd.append('qqfile', new Blob([body], { type: 'text/plain;charset=utf-8' }), 'ext.ini');
                        try {
                            const r = await fetch(`https://www.call2all.co.il/ym/api/UploadFile`, { method: 'POST', body: fd });
                            const d = await r.json();
                            return d && (d.responseStatus === "OK" || d.status === "OK");
                        } catch(e) { return false; }
                    }
                
                    async function uploadTts(token, path, text) {
                        const fd = new FormData();
                        fd.append('token', token);
                        fd.append('path', `ivr2:${path}/M1000.tts`);
                        fd.append('text', text);
                        try {
                            const r = await fetch(`https://www.call2all.co.il/ym/api/TextToSpeech`, { method: 'POST', body: fd });
                            const d = await r.json();
                            return d && (d.responseStatus === "OK" || d.status === "OK");
                        } catch(e) { return false; }
                    }
                
                    loadLibrary('bavli');
                </script>
                
                </body>
                </html>
                

                692 שורות קוד

                תגובה 1 תגובה אחרונה תגובה ציטוט 0

                שלום! נראה שהשיחה הזו מעניינת אותך, אבל עדיין אין לך חשבון.

                נמאס לכם לגלול בין אותם הפוסטים בכל ביקור? כשנרשמים לחשבון, תמיד תחזרו בדיוק למקום שבו הייתם קודם, ותוכלו לבחור לקבל התראות על תגובות חדשות (בין אם במייל, ובין אם בהתראת פוש). תוכלו גם לשמור סימניות ולפרגן ב-upvote לפוסטים כדי להביע הערכה לחברי קהילה אחרים.

                בעזרת התרומה שלך, הפוסט הזה יכול להיות אפילו טוב יותר 💗

                הרשמה התחברות
                • פוסט ראשון
                  פוסט אחרון