mirror of
https://git.srhtnin.garden/sarah/SaraSuite.git
synced 2026-10-14 18:28:11 +02:00
70 lines
1.7 KiB
TOML
70 lines
1.7 KiB
TOML
Name = "SaraSortd"
|
|
Description = "Sorts files from input folders into output folders by the rules in its configs. Runs in the background."
|
|
Platforms = ["Linux", "Windows"]
|
|
|
|
[Version]
|
|
File = "SaraSortd.py"
|
|
Pattern = '# Version = "([^"]+)"'
|
|
|
|
[Source]
|
|
Git = "{GitHost}/SaraSortd"
|
|
Include = ["SaraSortd.py", "LICENSE", "README.md"]
|
|
|
|
[Python]
|
|
Requirements = ["toml"]
|
|
|
|
[[Questions]]
|
|
Id = "RootDir"
|
|
Prompt = "Folder SaraSortd sorts in (RootDir)"
|
|
Default = "~/Sorting"
|
|
Kind = "Path"
|
|
|
|
[[Options]]
|
|
Id = "Autostart"
|
|
Label = "Start SaraSortd now and on every login"
|
|
Default = true
|
|
|
|
# SaraSortd reads ./GlobalConf.toml and copies ./InputDirConf.toml and
|
|
# ./OutputDirConf.toml into its folders, so all three live together in
|
|
# ConfigDir and the service runs from there.
|
|
[[Configs]]
|
|
Source = "GlobalConf.toml"
|
|
Target = "{ConfigDir}/GlobalConf.toml"
|
|
Set = { "DirectoryPaths.RootDir" = "{RootDir}" }
|
|
|
|
[[Configs]]
|
|
Source = "InputDirConf.toml"
|
|
Target = "{ConfigDir}/InputDirConf.toml"
|
|
|
|
[[Configs]]
|
|
Source = "OutputDirConf.toml"
|
|
Target = "{ConfigDir}/OutputDirConf.toml"
|
|
|
|
# Linux: a systemd user service.
|
|
[[Templates]]
|
|
Platform = "Linux"
|
|
Source = "SaraSortd.service"
|
|
Target = "{SystemdUserDir}/SaraSortd.service"
|
|
|
|
[[Services]]
|
|
Platform = "Linux"
|
|
Unit = "SaraSortd.service"
|
|
Option = "Autostart"
|
|
|
|
# Windows: run windowless from ConfigDir by ServiceRun.py, at login through a
|
|
# shortcut in the Startup folder (see SaraSuite's WindowsSupport.py).
|
|
[[Templates]]
|
|
Platform = "Windows"
|
|
Source = "../../ServiceRun.py"
|
|
Target = "{ProgramDir}/ServiceRun.py"
|
|
|
|
[[Services]]
|
|
Platform = "Windows"
|
|
Name = "SaraSortd"
|
|
Script = "SaraSortd.py"
|
|
WorkingDir = "{ConfigDir}"
|
|
Option = "Autostart"
|
|
|
|
# Everything SaraSortd makes inside the sorting folders is worked out from
|
|
# GlobalConf.toml by Hooks.py.
|