#filename #file #name

srfng

A library for generating semi-random file names

3 releases (stable)

1.0.1 Jul 19, 2023
1.0.0 Jul 13, 2022
0.1.0 Jan 20, 2022

#494 in Filesystem

38 downloads per month
Used in srfngout

MIT/Apache

8KB
90 lines

srfng

Semi-Random Filename Generator

[crates.io] [github.com]

This library makes it convenient to generate file names consisting of a date and random characters.

Example usage:

let mut gen = srfng::Generator::new();

println!("{}", gen.generate().as_str());

Which prints out something like:

13072022_5m88i663tw17265F

Which you can use to name a file.

A commandline tool using this crate can be found here.

Coding Style

This project uses a coding style the emphasises the use of white space over keeping the line and column counts as low as possible.

So this:

fn foo()
{

    bar();

}

Not this:

fn foo()
{
    bar();
}


License

Licensed under either of:

at your discretion


Contributing

Please clone the repository and create an issue explaining what feature or features you'd like to add or bug or bugs you'd like to fix and perhaps how you intend to implement these additions or fixes. Try to include details though it doesn't need to be exhaustive and we'll take it from there (dependant on availability).


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~1.5MB
~23K SLoC