diff --git a/Catbox Downloader.psproj b/Catbox Downloader.psproj
new file mode 100644
index 0000000..941fa55
--- /dev/null
+++ b/Catbox Downloader.psproj
@@ -0,0 +1,13 @@
+
+ 2.1
+ 4b427747-6996-4cf3-bcf3-82b77f05a70b
+ 0
+ True
+ Local Machine - PowerShell V7 (64 Bit)
+
+
+ Startup.pss
+ downloaderx.ps1
+ downloader.ps1
+
+
\ No newline at end of file
diff --git a/Catbox Downloader.psprojs b/Catbox Downloader.psprojs
new file mode 100644
index 0000000..9d25784
--- /dev/null
+++ b/Catbox Downloader.psprojs
@@ -0,0 +1,9 @@
+
+ 1.0
+ 4b427747-6996-4cf3-bcf3-82b77f05a70b
+
+
+ downloader.ps1
+ Startup.pss
+
+
\ No newline at end of file
diff --git a/Startup.pss b/Startup.pss
new file mode 100644
index 0000000..2064e53
--- /dev/null
+++ b/Startup.pss
@@ -0,0 +1,39 @@
+
+
+
+ Param ([String]$Commandline)
+
+ #--------------------------------------------------------------------------
+ #TODO: Add initialization script here (Load modules and check requirements)
+
+ Add-Type -AssemblyName "System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
+ [void][System.Windows.Forms.MessageBox]::Show('TODO: Add script to the Main function of Startup.pss', 'TODO')
+
+ #--------------------------------------------------------------------------
+
+
+
+ $script:ExitCode = 0 #Set the exit code for the Packager
+}
+
+
+
+]]>
+
\ No newline at end of file
diff --git a/downloader.ps1 b/downloader.ps1
index 26c08c4..7fa4fa2 100644
--- a/downloader.ps1
+++ b/downloader.ps1
@@ -1,38 +1,64 @@
-# Catbox Downloader Script by Yuuki
-# © https://raiza.dev/ - 2024-20XX
+#Requires -Version 7
+<#
+ .NOTES
+ ===========================================================================
+ Created with: SAPIEN Technologies, Inc., PowerShell Studio 2023 v5.8.227
+ Created on: 2024/01/08 12:09:49 AM
+ Created by: yuuki
+ Organization:
+ Filename: downloader.ps1
+ ===========================================================================
+ .DESCRIPTION
+ Downloader for my Catbox game uploads.
+#>
-Get-ChildItem "./" -Filter "y2k12-*.txt" |
-Foreach-Object {
- $index = 0
- $fileNames = @()
- $content = Get-Content $_.FullName
- $links = ""
- ForEach ($line in $($content -split "`r`n"))
+class Catbox {
+ Catbox()
{
- If ($line.StartsWith("mv ")) {
- $f = $line.Substring($line.IndexOf('y2k12-'))
-
- $fileNames += $f
+ }
+
+ [void]Download()
+ {
+ Get-ChildItem -Path "./" -Filter "y2k12-*.txt" |
+ Foreach-Object {
+ $index = 0
+ $fileNames = @()
+ $content = Get-Content $_.FullName
+ $links = ""
+
+ ForEach ($line in $($content -Split "`r`n"))
+ {
+ If ($line.StartsWith("mv "))
+ {
+ $f = $line.Substring($line.IndexOf('y2k12-'))
+
+ $fileNames += $f
+ }
+ }
+
+ ForEach ($line in $($content -Split "`r`n"))
+ {
+ If ($line.StartsWith("https://files.catbox.moe/"))
+ {
+ $f = $line.Substring($line.IndexOf(".moe/") + 5)
+
+ If ([System.IO.File]::Exists($fileNames[$index]))
+ {
+ Write-Host "File already downloaded."
+ }
+ Else
+ {
+ Write-Host "Downloading" $fileNames[$index] "(" $line ")"
+ Invoke-WebRequest -Uri $line -OutFile $fileNames[$index]
+ }
+
+ $index += 1
+ }
+ }
}
}
+}
- ForEach ($line in $($content -split "`r`n"))
- {
- If ($line.StartsWith("https://files.catbox.moe/"))
- {
- $f = $line.Substring($line.IndexOf(".moe/") + 5)
-
- If ([System.IO.File]::Exists($fileNames[$index]))
- {
- Write-Host "File already downloaded."
- }
- Else
- {
- Write-Host "Downloading" $fileNames[$index] "(" $line ")"
- Invoke-WebRequest -Uri $line -OutFile $fileNames[$index]
- }
- $index += 1
- }
- }
-}
\ No newline at end of file
+$catbox = [Catbox]::new()
+$catbox.Download()