Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time-based rules #12

Open
ignoramous opened this issue Jul 27, 2021 · 0 comments
Open

Time-based rules #12

ignoramous opened this issue Jul 27, 2021 · 0 comments

Comments

@ignoramous
Copy link
Contributor

Allow users to set time ranges in increments of 30m against each blocklist.

Example:

Blocklist BL1 form 10:30 11:00
Blocklist BL2 from 12:00 23:00
Blocklist BL3 from 22:00 06:00
Blocklist BL7 from 10:30 11:00
and so on...

The stamp generated would be :stamp(map-of-time-ranges-to-blocklists) where map is {time-range -> set-of-blocklists}. For the example above, this would be:

(10:30-11:00) -> [BL1, BL7]
(12:00-23:00) -> [BL2]
(22:00-06:00) -> [BL3]

stamp(map) => stamp(time-slice) + stamp(blocklists)
stamp(blocklists) => existing implementation


stamp(time-slice) => base64(dictionary-encoding(time-slice))
dictionary-encoding(time-slice) => {(0, 00:00), (1, 00:30), (2, 01:00), (3, 01: 30), (4, 02:00), (5, 02:30), (6, 03:00),...}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant