How to contribute to sieving?
It is really easy to contribute to this tool. First, you need to have Rust installed. Then, you need to understand how do Regular Expressions work (particularly in Rust). You can read this page. Finally, download the lastest version of the Sieving's code on our Github page.
Open src/regex_functions.rs
. You should see this:
Create your own function below the other ones: line 27 on the picture. For example, if you want to add Japanese driving license's number
to the list of data to hide:
Please respect the syntax we use.
Then you have to write a test to your function. Put the following code next to the other tests (at the bottom of the code, before the last token):
Obviously, you will have to change the value in the assert!(re.is_match(""))
method depending on what data are you adding to the scanner.
Once you have done this, you only need to go at te beginning of the main.rs
code:
line 36
: add the name of the function you just created at the end of the vector: regex_functions::name_of_your_function
.
line 37
: add the name of the data you just added to the scanner at the end of the vector.
With our example of Japanese driving license number
:
Finished! You can then make a pull request of your code on Github.
If you need any help, you can easily contact us on Discord.