pacstall / libpacstall

Backend API library for Pacstall
GNU General Public License v3.0
5 stars 0 forks source link

Implement `sources` table in the config parser #19

Closed wizard-28 closed 2 years ago

wizard-28 commented 2 years ago

Here's the last agreed upon template of the table:

[sources.official]
url = "https://github.com/pacstall/pacstall-programs"
aliases = ["main", "etc"]
preference = 1

[sources.custom1]
url = "customUrl1"
aliases = ["hydra", "custom alias 2"]
preference = 2

Here's how the raw parsed dictionary looks like:

{
│   'sources': {
│   │   'official': {'url': 'https://github.com/pacstall/pacstall-programs', 'aliases': ['main', 'etc'], 'preference': 1},
│   │   'custom1': {'url': 'customUrl1', 'aliases': ['hydra', 'custom alias 2'], 'preference': 2}
│   }
}
wizard-28 commented 2 years ago
[settings]
jobs = 10
editor = "emacs"

[[repositories]]
name = "official"
url = "https://github.com/pacstall/pacstall-programs"
preference = 1

[[repositories]]
name = "third_party"
url = "https://github.com/user/third-party"
preference = 2

This is the format we settled on.