Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/carlos-a-g-h/judgement-day
Small service that deletes files and directories after a certain amount of hours
https://github.com/carlos-a-g-h/judgement-day
control cron deletion expiration filesystem localhost regulation service webserver
Last synced: about 1 month ago
JSON representation
Small service that deletes files and directories after a certain amount of hours
- Host: GitHub
- URL: https://github.com/carlos-a-g-h/judgement-day
- Owner: carlos-a-g-h
- Created: 2023-06-06T21:03:06.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-05T23:24:57.000Z (about 2 months ago)
- Last Synced: 2024-11-06T00:20:26.258Z (about 2 months ago)
- Topics: control, cron, deletion, expiration, filesystem, localhost, regulation, service, webserver
- Language: Python
- Homepage:
- Size: 43 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Judgement Day
## What is this ???
Judgement Day is a scheduler service that deletes files and directories after a certain period of time passes
Although the program is a web server, it is meant to run locally
## Usage
```
# jday [Port or Socket] [BaseDir]
````Port` → The port to use
`Socket` → A socket file to use
`BaseDir` → The base directory that this program is allowed to work on
About binding with `Port` or `Socket`:
- You can either bind to a port or a socket file
- An integer is directly assumed to be a port, anything else is a socket fileAbout the `BaseDir` argument:
- The base directory path cannot be the same as the program's directory
- The program's directory cannot be one of the base directory's childrenAll the arguments are mandatory: there are no default values
In case of running without arguments, a quick help text with the usage will be shown## API
|Name and Description|Method|Route|Data required|Ok Response (200)|Err Response (4xx)|
|-|-|-|-|-|-|
|**Status**
Always returns 200|`GET`|`/`||`JSON: {"status":200}`||
|**Brand**
Adds a path and a TTL (hours) to the cell|`POST`|`/brand`|`JSON: {"path":(String:Target path),"ttl":(Integer:Hours to live)}`|`JSON: {"status":200}`|`JSON: {"status":4xx,"msg":"Error message"}`|
|**Cell**
Shows a list of all the 'branded' paths and the quantity|`GET`|`/cell`||`JSON: {"status":200,"qtty":(Integer:Length of the cell),"list":List(List:Paths and expiration dates)}`|`JSON: {"status":4xx,"msg":"Error message"}`|
|**Absolve**
Removes a branded path from the cell|`DELETE`|`/absolve`|`JSON: {"path":(String:Branded path)}`|`JSON: {"status":200}`|`JSON: {"status":4xx,"msg":"Error message"}`|
|**Amnesty**
Removes all the branded paths from the cell|`DELETE`|`/amnesty`||`{"status":200}`|`JSON: {"status":4xx,"msg":"Error message"}`|NOTE about branding (adding): All target paths must be relative to the base directory
## Changelog
### 2024-11-05
- Added unix socket support
### 2023-08-30
- Wiped out directories will no longer leave behind an empty directory
### 2023-06-08
- Attempting to set TTLs smaller than 1 will throw an error
### 2023-06-07
- First Release