{"id":27949075,"url":"https://github.com/drmarwaan/mdmyscripts","last_synced_at":"2025-07-04T19:04:59.350Z","repository":{"id":291652022,"uuid":"978322646","full_name":"drmarwaan/MDmyScripts","owner":"drmarwaan","description":"makes .MD file with tree of files and contents in the current directory, to easily upload many scripts to AI (ignores .vs and .git folders)","archived":false,"fork":false,"pushed_at":"2025-05-05T21:16:35.000Z","size":7893,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T15:19:51.570Z","etag":null,"topics":["ai","llm","markdown","md","vibe","vibe-coding"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drmarwaan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-05T20:05:32.000Z","updated_at":"2025-05-05T21:16:38.000Z","dependencies_parsed_at":"2025-05-07T15:19:51.437Z","dependency_job_id":null,"html_url":"https://github.com/drmarwaan/MDmyScripts","commit_stats":null,"previous_names":["drmarwaan/mdmyscripts"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/drmarwaan/MDmyScripts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drmarwaan%2FMDmyScripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drmarwaan%2FMDmyScripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drmarwaan%2FMDmyScripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drmarwaan%2FMDmyScripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drmarwaan","download_url":"https://codeload.github.com/drmarwaan/MDmyScripts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drmarwaan%2FMDmyScripts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263603137,"owners_count":23487211,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","llm","markdown","md","vibe","vibe-coding"],"created_at":"2025-05-07T15:19:48.779Z","updated_at":"2025-07-04T19:04:59.343Z","avatar_url":"https://github.com/drmarwaan.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# MDmyScripts\n### Generate a Markdown file with folder tree + contents (ideal for uploading multiple scripts to LLMs)\n\n## Features\n- Skips `.vs` and `.git` folders. \n- Outputs contents of `[FolderName].md` with directory tree and full file contents.\n- No installs (standalone - portable).\n- Structured for clarity for AI\n\n## Usage\nDownload MDmyScripts.exe → Run in any folder → get a clean, ready-to-upload-to-ai file of all your scripts.\n\n## Usage for sick ppl (better options for fellows)\nsave as `.py` in any folder \u003e\u003e edit file extentions and folders to skip \u003e\u003e run \u003e\u003e upload output file to ai for related questions\n```\nimport os\n\n# Configuration: Modify these to customize what to skip\nSKIP_DIRS = {\".git\", \".vs\", \".vscode\"}  # Directories to skip\nSKIP_FILE_EXTS = [\".meta\", \".gitattributes\", \".gitignore\"]  # File extensions to skip\nSCRIPT_NAME = os.path.basename(__file__)  # Script's own filename\n\ndef generate_tree_structure(start_path):\n    tree_lines = []\n\n    def walk(path, prefix=\"\"):\n        entries = sorted(os.listdir(path))\n        for i, entry in enumerate(entries):\n            full_path = os.path.join(path, entry)\n\n            # Skip directories in SKIP_DIRS\n            if os.path.isdir(full_path) and entry in SKIP_DIRS:\n                continue\n\n            # Skip files with extensions in SKIP_FILE_EXTS or the script itself\n            if not os.path.isdir(full_path):\n                if any(entry.endswith(ext) for ext in SKIP_FILE_EXTS) or entry == SCRIPT_NAME:\n                    continue\n\n            is_last = i == len(entries) - 1\n            tree_lines.append(f\"{prefix}{'└──' if is_last else '├──'} {entry}\")\n\n            if os.path.isdir(full_path):\n                new_prefix = prefix + (\"    \" if is_last else \"│   \")\n                walk(full_path, new_prefix)\n\n    walk(start_path)\n    tree_lines = [\"# files\", \"```\"] + tree_lines + [\"```\"]\n    return \"\\n\".join(tree_lines)\n\ndef write_file_content(path, relative_path):\n    try:\n        with open(path, \"r\", encoding=\"utf-8\") as f:\n            content = f.read()\n        return f\"\\n# {relative_path}\\n```\\n{content}\\n```\\n\"\n    except Exception as e:\n        print(f\"Error reading {path}: {e}\")\n        return \"\"\n\ndef main():\n    current_dir = os.getcwd()\n    current_dir_name = os.path.basename(current_dir)\n    output_file = f\"contents of {current_dir_name}.md\"\n    output_path = os.path.join(current_dir, output_file)\n\n    # Remove existing output file if it exists\n    if os.path.exists(output_path):\n        os.remove(output_path)\n\n    # Generate and write the directory tree\n    tree_output = generate_tree_structure(current_dir)\n    with open(output_path, \"w\", encoding=\"utf-8\") as out:\n        out.write(tree_output)\n\n    # Append file contents (excluding skipped directories and file extensions)\n    for root, dirs, files in os.walk(current_dir):\n        # Skip directories in SKIP_DIRS\n        dirs[:] = [d for d in dirs if d not in SKIP_DIRS]\n\n        for file in files:\n            if file == output_file or file == SCRIPT_NAME or any(file.endswith(ext) for ext in SKIP_FILE_EXTS):\n                continue\n            file_path = os.path.join(root, file)\n            rel_path = os.path.relpath(file_path, current_dir)\n            content = write_file_content(file_path, rel_path)\n            if content:\n                with open(output_path, \"a\", encoding=\"utf-8\") as out:\n                    out.write(content)\n\nif __name__ == \"__main__\":\n    main()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrmarwaan%2Fmdmyscripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrmarwaan%2Fmdmyscripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrmarwaan%2Fmdmyscripts/lists"}