Files
SaraSuite/Programs/SaraSortd/Manifest.toml
T
2026-10-13 17:51:30 +02:00

74 lines
1.9 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 with systemd: a systemd user service.
[[Templates]]
Platform = "Linux"
Source = "SaraSortd.service"
Target = "{SystemdUserDir}/SaraSortd.service"
# Windows, and Linux without systemd (runit, OpenRC, s6, ...): run from
# ConfigDir by ServiceRun.py, which restarts it if it fails, at login through
# a shortcut in the Startup folder / an XDG autostart entry (SaraSuite's
# Services.py). On Linux the same service has a Unit for systemd too.
[[Templates]]
Source = "../../ServiceRun.py"
Target = "{ProgramDir}/ServiceRun.py"
[[Services]]
Platform = "Linux"
Unit = "SaraSortd.service"
Name = "SaraSortd"
Script = "SaraSortd.py"
WorkingDir = "{ConfigDir}"
Option = "Autostart"
[[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.