The CDN Downloader Bot is a Python-based tool designed to simplify the process of downloading CSS and JavaScript assets from CDN links and generating their corresponding local <link>
and <script>
declarations. With its user-friendly GUI, you can easily configure folder paths, input CDN links, and manage assets for your projects.
- Automatically downloads CSS and JavaScript files to local folders.
- Generates local declarations for use in projects (e.g., Laravel's
asset()
helper). - Skips downloading files that already exist.
- User-friendly GUI with input fields, processing buttons, and output display.
-
Clone the repository:
git clone https://github.com/yourusername/cdn-downloader-bot.git cd cdn-downloader-bot
-
Install required dependencies:
pip install requests
-
Run the tool:
python cdns.py
- Launch the application using
python cdns.py
. - Configure folder paths for JavaScript and CSS assets if necessary.
- Paste CDN links (e.g.,
<link>
and<script>
tags) into the input box. - Click Process CDNs to download files and generate local declarations.
- Copy the output declarations and use them in your project.
<link href="https://example.com/styles.css" rel="stylesheet" />
<script src="https://example.com/script.js"></script>
CSS Declarations:
<link rel="stylesheet" href="{{ asset('css/plugins/styles.css') }}" />
JavaScript Declarations:
<script src="{{ asset('js/plugins/script.js') }}"></script>
- Python 3.6+
- Libraries:
requests
,tkinter
(built-in)
Contributions are welcome! Please fork the repository, create a new branch for your feature or bug fix, and submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.