PluralSync is a small CLI application written in rust to syncronize and centralize the control over the front on SimplyPlural and PluralKit. It's my first project in rust, so the code is +probably+ a mess and I'm most likely not making use of some rust features that would benefit the project.
Suggestions on how to improve the code are very welcome. After all, the objective with this project was learning more about the language.
* Usage
** Configuration
On the first run, if it does not exist, PluralSync will create a configuration directory and populate with a json file with the following structure:
- *Sync* - Once the configuration is ready, you can start by calling the =sync= command, which will get the list of members of the system and place their data in a =system.json= file inside the configuration folder. Running commands like =set= or =add= without a present =system.json= will automatically fetch the data for you.
- *Get* - Displays the current front. The result is displayed in console but also stored in a plain text file named =.front= in the configuration directory, for use with other applications (Polybar, OBS...).
Will get a profile picture from a folder based on the currently fronting members and will copy it to the desired location. I recommend something it's easy to have at hand like =~/face=.
The pictures in the path should be named according to the front. For example, if Bob and Alice are fronting, the module will copy ={PATH}/bobalice.png= to the location, or if it's only Bob it'll be =bob.png=.
Notice this will cover all combinations, if the main front is Alice the combination =alicebob.png= instead. I recommend the use of a python script to generate the possible combinations.