Red Queen is an automation manager that uses the Package Manager
-
In the package.swift you can define manager dependencies as in the examples:
dependencies: [ .package( url: "https://github.com/Luizerz/PassGen.git", from: "1.0.2" ), .package( url: "https://github.com/otavioalbucosta/FolderOrganizer.git", branch: "main" ), ],
-
Don't forget target dependencies:
targets: [ .target( name: "RedQueen", dependencies: [ .product( name: "PassGen", package: "PassGen" ), .product( name: "FolderOrganizerLib", package: "FolderOrganizer" ), ] ),
-
-
In the automations folder you should create a new file and call it as the your automation name.
-
You should use the protocol to create your automation class
- See the PassGen implementation example:
import Foundation import PassGenLibrary class PassGen : AutomationType{ func openAutomation() { print(""" OPTIONS: -s, --size <size> Size of password -p, --pass_name <pass_name> Name to be assigned to password -h, --help Show help information. digite o comando: """) let arg = readLine() let argList = arg!.components(separatedBy: " ") passwordSt.main(argList) } }
- As you saw, inside
openAutomation()
you will create your execution code to call your automation
- See the PassGen implementation example:
-
In the AutomationDictionary.swift you should insert the key and the value as you can see:
import Foundation var chosenAutomation : [Int : AutomationType] = [ 1: FolderOrganizer(), 2: PassGen() ]
-
Clone the repository at the work terminal:
git clone https://github.com/Robsonmxms/RedQueen.git