Formatting
This commit is contained in:
		
							
								
								
									
										14
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								README.md
									
									
									
									
									
								
							@@ -4,8 +4,16 @@ A small tool to deploy blocklist updates to a mastodon server using its API.
 | 
			
		||||
 | 
			
		||||
## Concept
 | 
			
		||||
 | 
			
		||||
The idea is to maintain a blocklist in a simple structured file in this repository. All changes need to be deployed to the mastodon server, this is supposed to be automated with Drone CI.
 | 
			
		||||
The idea is to maintain a blocklist in a simple structured file in this repository. All changes need to be deployed to
 | 
			
		||||
the mastodon server, this is supposed to be automated with Drone CI.
 | 
			
		||||
 | 
			
		||||
In order to compare the list entries, we can read the whole blocklist using [the get endpoint](https://docs.joinmastodon.org/methods/admin/domain_blocks/#get). At the same time we read the whole file in the repository, make a comparision and [remove](https://docs.joinmastodon.org/methods/admin/domain_blocks/#delete) unblocked domains from the blocklist and [add](https://docs.joinmastodon.org/methods/admin/domain_blocks/#create) newly added.
 | 
			
		||||
In order to compare the list entries, we can read the whole blocklist
 | 
			
		||||
using [the get endpoint](https://docs.joinmastodon.org/methods/admin/domain_blocks/#get). At the same time we read the
 | 
			
		||||
whole file in the repository, make a comparision
 | 
			
		||||
and [remove](https://docs.joinmastodon.org/methods/admin/domain_blocks/#delete) unblocked domains from the blocklist
 | 
			
		||||
and [add](https://docs.joinmastodon.org/methods/admin/domain_blocks/#create) newly added.
 | 
			
		||||
 | 
			
		||||
Since we have several attributes for a domain blog, a simple `.txt` file might not be sufficient. We probably want to set the severity, reject_media, reject_reports and comments. This means we need a human readable, easily python-readable and structured file format. Since Python 3.11 got native support for [toml](https://toml.io/) and it supports [Array of Tables](https://toml.io/en/v1.0.0#array-of-tables), I'd prefer to use this.
 | 
			
		||||
Since we have several attributes for a domain blog, a simple `.txt` file might not be sufficient. We probably want to
 | 
			
		||||
set the severity, reject_media, reject_reports and comments. This means we need a human readable, easily python-readable
 | 
			
		||||
and structured file format. Since Python 3.11 got native support for [toml](https://toml.io/) and it
 | 
			
		||||
supports [Array of Tables](https://toml.io/en/v1.0.0#array-of-tables), I'd prefer to use this.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user