repo2txt / local.html
multimodalart's picture
Update local.html
55dd23d verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Local Directory to Plain Text Converter | Convert Local Directories to Text</title>
<meta name="description" content="Convert local directories to plain text files easily. Our tool helps you transform local files into a single formatted text file for better readability and analysis.">
<meta name="keywords" content="local directory, code converter, plain text, file analysis">
<meta name="author" content="abinthomasonline">
<link rel="canonical" href="https://repo2txt.simplebasedomain.com/local.html">
<meta property="og:title" content="Local Directory to Plain Text Converter">
<meta property="og:description" content="Convert local directories to plain text files easily. Transform files into a single formatted text file.">
<meta property="og:url" content="https://repo2txt.simplebasedomain.com/local.html">
<meta property="og:type" content="website">
<link rel="icon" href="/favicon.ico" type="image/x-icon">
<script src="https://cdn.tailwindcss.com"></script>
<script src="js/lucide.min.js"></script>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-CYF86LN5WM"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-CYF86LN5WM');
</script>
<script src="js/jszip.min.js"></script>
<script async src="https://unpkg.com/gpt-tokenizer"></script>
<style>
input[type=file]::file-selector-button {
font-weight: 500;
font-size: 14px;
background-color: rgb(59, 130, 246);
color: rgb(255, 255, 255);
border: none;
border-radius: 4px;
cursor: pointer;
}
input[type=file]::file-selector-button:hover {
background-color: rgb(37, 99, 235);
}
</style>
</head>
<body class="bg-gray-100 min-h-screen p-4 md:p-8 text-gray-600">
<div class="max-w-4xl mx-auto bg-white rounded-lg shadow-md p-6 relative">
<div class="flex justify-center mb-6">
<div class="rounded-md bg-gray-100 p-1 flex space-x-1">
<a href="/" class="px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-200 rounded-md">Remote Repo (GitHub/HF)</a>
<a href="#" class="px-4 py-2 text-sm font-medium text-white bg-blue-500 rounded-md shadow-sm">Local Directory/Zip</a>
</div>
</div>
<a href="https://huggingface.co/spaces/multimodalart/repo2txt" target="_blank" class="absolute top-2 right-2">
<svg class="w-8 h-8 text-gray-600 hover:text-gray-800" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<title>HuggingFace</title>
<path d="M2.25 11.535c0-3.407 1.847-6.554 4.844-8.258a9.822 9.822 0 019.687 0c2.997 1.704 4.844 4.851 4.844 8.258 0 5.266-4.337 9.535-9.687 9.535S2.25 16.8 2.25 11.535z" fill="#FF9D0B"></path>
<path d="M11.938 20.086c4.797 0 8.687-3.829 8.687-8.551 0-4.722-3.89-8.55-8.687-8.55-4.798 0-8.688 3.828-8.688 8.55 0 4.722 3.89 8.55 8.688 8.55z" fill="#FFD21E"></path>
<path d="M11.875 15.113c2.457 0 3.25-2.156 3.25-3.263 0-.576-.393-.394-1.023-.089-.582.283-1.365.675-2.224.675-1.798 0-3.25-1.693-3.25-.586 0 1.107.79 3.263 3.25 3.263h-.003z" fill="#FF323D"></path>
<path d="M14.76 9.21c.32.108.445.753.767.585.447-.233.707-.708.659-1.204a1.235 1.235 0 00-.879-1.059 1.262 1.262 0 00-1.33.394c-.322.384-.377.92-.14 1.36.153.283.638-.177.925-.079l-.002.003zm-5.887 0c-.32.108-.448.753-.768.585a1.226 1.226 0 01-.658-1.204c.048-.495.395-.913.878-1.059a1.262 1.262 0 011.33.394c.322.384.377.92.14 1.36-.152.283-.64-.177-.925-.079l.003.003zm1.12 5.34a2.166 2.166 0 011.325-1.106c.07-.02.144.06.219.171l.192.306c.069.1.139.175.209.175.074 0 .15-.074.223-.172l.205-.302c.08-.11.157-.188.234-.165.537.168.986.536 1.25 1.026.932-.724 1.275-1.905 1.275-2.633 0-.508-.306-.426-.81-.19l-.616.296c-.52.24-1.148.48-1.824.48-.676 0-1.302-.24-1.823-.48l-.589-.283c-.52-.248-.838-.342-.838.177 0 .703.32 1.831 1.187 2.56l.18.14z" fill="#3A3B45"></path>
<path d="M17.812 10.366a.806.806 0 00.813-.8c0-.441-.364-.8-.813-.8a.806.806 0 00-.812.8c0 .442.364.8.812.8zm-11.624 0a.806.806 0 00.812-.8c0-.441-.364-.8-.812-.8a.806.806 0 00-.813.8c0 .442.364.8.813.8zM4.515 13.073c-.405 0-.765.162-1.017.46a1.455 1.455 0 00-.333.925 1.801 1.801 0 00-.485-.074c-.387 0-.737.146-.985.409a1.41 1.41 0 00-.2 1.722 1.302 1.302 0 00-.447.694c-.06.222-.12.69.2 1.166a1.267 1.267 0 00-.093 1.236c.238.533.81.958 1.89 1.405l.24.096c.768.3 1.473.492 1.478.494.89.243 1.808.375 2.732.394 1.465 0 2.513-.443 3.115-1.314.93-1.342.842-2.575-.274-3.763l-.151-.154c-.692-.684-1.155-1.69-1.25-1.912-.195-.655-.71-1.383-1.562-1.383-.46.007-.889.233-1.15.605-.25-.31-.495-.553-.715-.694a1.87 1.87 0 00-.993-.312zm14.97 0c.405 0 .767.162 1.017.46.216.262.333.588.333.925.158-.047.322-.071.487-.074.388 0 .738.146.985.409a1.41 1.41 0 01.2 1.722c.22.178.377.422.445.694.06.222.12.69-.2 1.166.244.37.279.836.093 1.236-.238.533-.81.958-1.889 1.405l-.239.096c-.77.3-1.475.492-1.48.494-.89.243-1.808.375-2.732.394-1.465 0-2.513-.443-3.115-1.314-.93-1.342-.842-2.575.274-3.763l.151-.154c.695-.684 1.157-1.69 1.252-1.912.195-.655.708-1.383 1.56-1.383.46.007.889.233 1.15.605.25-.31.495-.553.718-.694.244-.162.523-.265.814-.3l.176-.012z" fill="#FF9D0B"></path>
<path d="M9.785 20.132c.688-.994.638-1.74-.305-2.667-.945-.928-1.495-2.288-1.495-2.288s-.205-.788-.672-.714c-.468.074-.81 1.25.17 1.971.977.721-.195 1.21-.573.534-.375-.677-1.405-2.416-1.94-2.751-.532-.332-.907-.148-.782.541.125.687 2.357 2.35 2.14 2.707-.218.362-.983-.42-.983-.42S2.953 14.9 2.43 15.46c-.52.558.398 1.026 1.7 1.803 1.308.778 1.41.985 1.225 1.28-.187.295-3.07-2.1-3.34-1.083-.27 1.011 2.943 1.304 2.745 2.006-.2.7-2.265-1.324-2.685-.537-.425.79 2.913 1.718 2.94 1.725 1.075.276 3.813.859 4.77-.522zm4.432 0c-.687-.994-.64-1.74.305-2.667.943-.928 1.493-2.288 1.493-2.288s.205-.788.675-.714c.465.074.807 1.25-.17 1.971-.98.721.195 1.21.57.534.377-.677 1.407-2.416 1.94-2.751.532-.332.91-.148.782.541-.125.687-2.355 2.35-2.137 2.707.215.362.98-.42.98-.42S21.05 14.9 21.57 15.46c.52.558-.395 1.026-1.7 1.803-1.308.778-1.408.985-1.225 1.28.187.295 3.07-2.1 3.34-1.083.27 1.011-2.94 1.304-2.743 2.006.2.7 2.263-1.324 2.685-.537.423.79-2.912 1.718-2.94 1.725-1.077.276-3.815.859-4.77-.522z" fill="#FFD21E"></path>
</svg>
</a>
<h1 class="text-3xl font-bold mb-2 text-center text-gray-600">Local Directory to Plain Text</h1>
<p class="text-lg text-center text-gray-500 mb-6">Convert Local Directory or Zip File to a Single Formatted Text File</p>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
<div>
<label for="directoryPicker" class="block text-sm font-medium text-gray-600">Select Directory:</label>
<input type="file" id="directoryPicker" webkitdirectory directory multiple class="mt-1 block w-full">
</div>
<div>
<label for="zipPicker" class="block text-sm font-medium text-gray-600">Or Upload Zip File:</label>
<input type="file" id="zipPicker" accept=".zip,.rar,.7z" class="mt-1 block w-full">
<p class="text-xs text-gray-500 mt-1">Supported formats: .zip, .rar, .7z</p>
</div>
</div>
<div id="extentionCheckboxes" class="mt-4"></div>
<div id="directoryStructure" class="mt-6"></div>
<button id="generateTextButton" class="bg-green-500 hover:bg-green-600 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline hidden flex items-center justify-center">
<i data-lucide="file-text" class="w-5 h-5 mr-2"></i>
Generate Text File
</button>
<div id="tokenCount" class="mt-4 text-sm text-gray-500"></div>
<textarea id="outputText" rows="20" class="mt-4 w-full p-2 border rounded-md font-mono" readonly></textarea>
<div class="mt-4 flex space-x-4">
<button id="copyButton" class="flex-1 bg-indigo-500 hover:bg-indigo-600 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline hidden flex items-center justify-center">
<i data-lucide="copy" class="w-5 h-5 mr-2"></i>
Copy to Clipboard
</button>
<button id="downloadButton" class="flex-1 bg-purple-500 hover:bg-purple-600 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline hidden flex items-center justify-center">
<i data-lucide="download" class="w-5 h-5 mr-2"></i>
Download Text File
</button>
</div>
</div>
<footer class="mt-8 text-center text-sm text-gray-500">
<p>This is a fork of <a href="https://github.com/itsitgroup/repo2txt" target="_blank" class="text-blue-500 hover:text-blue-700">https://github.com/itsitgroup/repo2txt</a> to add Hugging Face repos support. This Space itself is a Git repo! Everything runs locally on your browser!</p>
</footer>
<script type="module" src="js/local.js"></script>
</body>
</html>