diff --git a/.github/linters/.jscpd.json b/.github/linters/.jscpd.json new file mode 100644 index 000000000..8677d9823 --- /dev/null +++ b/.github/linters/.jscpd.json @@ -0,0 +1,11 @@ +{ + "ignore": [ + "**/.idea/**", + "**/.git/**", + "**/Website/app/Releases.js", + "**/pom.xml", + "**/src/main/java/Backend/ProgressBarThread.java", + "**/src/main/java/CLI/Main.java", + "**/src/main/java/GUI/Forms/DownloadFile.java" + ] +} \ No newline at end of file diff --git a/.github/linters/.markdown-lint.yml b/.github/linters/.markdown-lint.yml index 2967d8af3..ad6ff0433 100644 --- a/.github/linters/.markdown-lint.yml +++ b/.github/linters/.markdown-lint.yml @@ -1,4 +1,3 @@ -default: true MD001: true # Header levels should only increment by one level at a time MD003: style: consistent # Header style diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 1aa7118e3..2b63b97f9 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -5,7 +5,8 @@ Fixes # ## Changes proposed -## Check List (Check all the applicable boxes) +## Check List (Check all the applicable boxes) + - [ ] My code follows the code style of this project. - [ ] My change requires changes to the documentation. - [ ] I have updated the documentation accordingly. diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 2af007cee..f09143d43 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -31,4 +31,6 @@ jobs: VALIDATE_GOOGLE_JAVA_FORMAT: false VALIDATE_JAVASCRIPT_STANDARD: false VALIDATE_CLANG_FORMAT: false - VALIDATE_CSHARP: false \ No newline at end of file + VALIDATE_CSHARP: false + VALIDATE_NATURAL_LANGUAGE: false + VALIDATE_YAML: false \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 18c914718..c35d47bd5 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -52,7 +52,7 @@ decisions when appropriate. This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. -Examples of representing our community include using an official e-mail address, +Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event. @@ -116,7 +116,7 @@ the community. This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at -https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. +. Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). @@ -124,5 +124,5 @@ enforcement ladder](https://github.com/mozilla/diversity). [homepage]: https://www.contributor-covenant.org For answers to common questions about this code of conduct, see the FAQ at -https://www.contributor-covenant.org/faq. Translations are available at -https://www.contributor-covenant.org/translations. +. Translations are available at +. diff --git a/Docker/MacOS Docker Build Instructions.md b/Docker/macOS Docker Build Instructions.md similarity index 100% rename from Docker/MacOS Docker Build Instructions.md rename to Docker/macOS Docker Build Instructions.md diff --git a/Privacy Policy.txt b/Privacy Policy.txt index 5312eae72..7f69c5c72 100644 --- a/Privacy Policy.txt +++ b/Privacy Policy.txt @@ -85,7 +85,7 @@ Usage Data Usage Data is collected automatically when using the Service. -Usage Data may include information such as Your Device's Internet Protocol +Usage Data may include information such as Your Device's internet Protocol address (e.g. IP address), browser type, browser version, the pages of our Service that You visit, the time and date of Your visit, the time spent on those pages, unique device identifiers and other diagnostic data. @@ -93,7 +93,7 @@ those pages, unique device identifiers and other diagnostic data. When You access the Service by or through a mobile device, We may collect certain information automatically, including, but not limited to, the type of mobile device You use, Your mobile device unique ID, the IP address of Your -mobile device, Your mobile operating system, the type of mobile Internet +mobile device, Your mobile operating system, the type of mobile internet browser You use, unique device identifiers and other diagnostic data. We may also collect information that Your browser sends whenever You visit our @@ -250,7 +250,7 @@ Security of Your Personal Data ------------------------------ The security of Your Personal Data is important to Us, but remember that no -method of transmission over the Internet, or method of electronic storage is +method of transmission over the internet, or method of electronic storage is 100% secure. While We strive to use commercially acceptable means to protect Your Personal Data, We cannot guarantee its absolute security. @@ -269,10 +269,10 @@ If We need to rely on consent as a legal basis for processing Your information and Your country requires consent from a parent, We may require Your parent's consent before We collect and use that information. -Links to Other Websites +Links to Other sites ======================= -Our Service may contain links to other websites that are not operated by Us. +Our Service may contain links to other sites that are not operated by Us. If You click on a third party link, You will be directed to that third party's site. We strongly advise You to review the Privacy Policy of every site You visit. diff --git a/README.md b/README.md index ec85793dc..e7d3403e4 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,6 @@

-

Release Version License @@ -25,9 +24,10 @@ ## About πŸ”₯ - [**Drifty**](https://github.com/SaptarshiSarkar12/Drifty/) is an **open-source** interactive **File Downloader system** built using _Java_. -- It is both available in **Command Line Interface** (_CLI_) and **Graphical User Interface** (_GUI_) mode. +- It is both available in **Command-line Interface** (_CLI_) and **Graphical User Interface** (_GUI_) mode. ## Demo + See the video below to know how to use the application. For any help, you can open an [`issue`](https://github.com/SaptarshiSarkar12/Drifty/issues/new/choose/). For **Batch Downloading** via **Drifty CLI**, the path to a YAML file has to be provided to it. @@ -58,13 +58,14 @@ The [_Website_](https://saptarshisarkar12.github.io/Drifty/) of **Drifty** is bu - [Tailwind CSS](https://tailwindcss.com/) - A utility-first CSS framework. ## Quickstart πŸš€πŸš€ + For **Users** : ### Using Drifty Application executable 1. Open the [`website of Drifty`](https://saptarshisarkar12.github.io/Drifty/)

![Homepage of Drifty Website](https://github.com/SaptarshiSarkar12/Drifty/assets/105960032/b3a63e16-7cb7-4ad9-b00e-ed4d4d690bd3) 2. Click on [`Download`](https://saptarshisarkar12.github.io/Drifty/#download)

![Download Button in Drifty Website pointed out](https://github.com/SaptarshiSarkar12/Drifty/assets/105960032/7b850e1c-a034-4085-ae25-9e5090891faa) -4. At first, select the **Application Type** from the Dropdown menu (_By default, it is GUI_). For downloading _Drifty CLI_, select **CLI** and for _Drifty GUI_, select **GUI** from the dropdown menu. Click on the **Download Now** button based on your Operating System (_Windows, Linux, MacOS_). For **_Windows_** user, a MSI file is available for **Drifty GUI**. You can click on the **_Prefer the msi?_** text and it will download the latest MSI file for you πŸŽ‰!.

+4. At first, select the **Application Type** from the Dropdown menu (_By default, it is GUI_). For downloading _Drifty CLI_, select **CLI** and for _Drifty GUI_, select **GUI** from the dropdown menu. Click on the **Download Now** button based on your Operating System (_Windows, Linux, macOS_). For **_Windows_** user, a MSI file is available for **Drifty GUI**. You can click on the **_Prefer the msi?_** text and it will download the latest MSI file for you πŸŽ‰!.

![Download Webpage of Drifty](https://github.com/SaptarshiSarkar12/Drifty/assets/105960032/f8eb6151-ac6c-4383-a5d7-d03718f64cab) 5. Go to your Downloads folder and run the file you downloaded. > [!NOTE] @@ -101,7 +102,7 @@ For **Users** : ``` > [!IMPORTANT] > For **Linux and Windows**, please run `xhost +local:docker` before running the GUI docker image. - > For **macOS**, please follow [these instructions](Docker/MacOS%20Docker%20Build%20Instructions.md) to run Drifty GUI docker image. + > For **macOS**, please follow [these instructions](Docker/macOS%20Docker%20Build%20Instructions.md) to run Drifty GUI docker image. 3. Drifty will open, and you can now use it πŸŽ‰! For **Contributors** : @@ -117,10 +118,11 @@ For **Contributors** : 6. You may join our [`Discord Server`](https://discord.gg/DeT4jXPfkG) to discuss on the changes that you want to bring. ### Using Docker πŸ‹ for Development + 1. Run `docker compose run gui` to start **Drifty GUI** and `docker compose run cli` to start **Drifty CLI**. The CLI and GUI will be built using your changed source code. > [!IMPORTANT] > For **Linux and Windows**, please run `xhost +local:docker` before running the GUI docker image. - > For **macOS**, please follow [these instructions](Docker/MacOS%20Docker%20Build%20Instructions.md) to run Drifty GUI docker image. + > For **macOS**, please follow [these instructions](Docker/macOS%20Docker%20Build%20Instructions.md) to run Drifty GUI docker image. 2. Drifty app will appear on the screen, and you can test it πŸŽ‰! ## Safety warning ⚠️ while Downloading ⬇️ @@ -138,11 +140,11 @@ It is because Microsoft Defender could not verify it is safe as it is not common ![image](https://user-images.githubusercontent.com/58129377/193471671-e047003c-95e7-43ed-8d37-d3f401b36164.png) -- Now its downloaded, you can proceed.πŸŽ‰ +- Now it is downloaded, you can proceed.πŸŽ‰ ### Report the file as safe βœ”οΈ -You can also provide your feedback to Microsoft Defender by reporting it to be Safe, by following following steps: +You can also provide your feedback to Microsoft Defender by reporting it to be Safe, by following the below steps: - Click on three dots. - Click on **`Report this file as safe`** instead of clicking on **`Keep`**. @@ -151,15 +153,17 @@ You can also provide your feedback to Microsoft Defender by reporting it to be S - It will take you to **`Report a download`** page. You can provide your feedback there.πŸ˜„ ## Safety warning ⚠️ while Installing -- For Windows, click on **More Info** and then **Run Anyway** as present in the screen below : + +- For Windows, click on **More Info** and then **Run Anyway** as present in the screen below: ||| |--|--| | ![](https://github.com/SaptarshiSarkar12/Drifty/assets/105960032/0470c61c-63b1-49bd-8662-2f9eac0e120b) | ![](https://github.com/SaptarshiSarkar12/Drifty/assets/105960032/d07dc9b6-cdc3-48e1-8111-7062341b662d) | -- For macOS, click on **Ok** and run `sudo spctl --master-disable` in your terminal to allow running unsigned apps. Try running Drifty again.
+- For macOS, click on **OK** and run `sudo spctl --master-disable` in your terminal to allow running unsigned apps. Try running Drifty again.
gatekeeper ## Contributing to the project + - Please feel free to contribute to this open-source project. - See [**`Contribuing Guidelines`**](https://github.com/SaptarshiSarkar12/Drifty/blob/master/CONTRIBUTING.md) and [**`Projects`**](https://github.com/users/SaptarshiSarkar12/projects/3) for ways to contribute. - **Feel free to open an [`issue`](https://github.com/SaptarshiSarkar12/Drifty/issues/new/choose)**. @@ -168,9 +172,11 @@ You can also provide your feedback to Microsoft Defender by reporting it to be S - Join our [**`Discord Server`**](https://discord.gg/DeT4jXPfkG) to get updates on this project and discuss verbosely on the changes that you want to make. ## Stats πŸ“Š + ![Repo analysis](https://repobeats.axiom.co/api/embed/9b39d68e1ca7e9523e4454b352930d61109915a1.svg) ## Support πŸ™ + Please **leave a star ⭐** on this project to _support us_. ## Thanks to all the contributors ❀️ diff --git a/SECURITY.md b/SECURITY.md index 50612c7e0..30e6a970a 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,4 +1,5 @@ # Security Policy + ## Reporting a Vulnerability❗ If you have found a vulnerability in **Drifty application**, feel free to comment in [**GitHub Discussion**](https://github.com/SaptarshiSarkar12/Drifty/discussions/79) or you may report the vulnerability in [**security advisory page**](https://github.com/SaptarshiSarkar12/Drifty/security/advisories/new) or in our [**Discord Server**](https://discord.gg/DeT4jXPfkG). diff --git a/src/main/java/Backend/FileDownloader.java b/src/main/java/Backend/FileDownloader.java index 11d3ee6ed..617fa4e9b 100644 --- a/src/main/java/Backend/FileDownloader.java +++ b/src/main/java/Backend/FileDownloader.java @@ -183,15 +183,6 @@ public boolean mergeDownloadedFileParts(List fileOutputStreams @Override public void run() { - link = link.replace('\\', '/'); - if (!(link.startsWith("http://") || link.startsWith("https://"))) { - link = "https://" + link; - } - if (link.startsWith("https://github.com/") || (link.startsWith("http://github.com/"))) { - if (!(link.endsWith("?raw=true"))) { - link = link + "?raw=true"; - } - } boolean isYouTubeLink = isYoutube(link); boolean isInstagramLink = isInstagram(link); boolean isSpotifyLink = isSpotify(link);