{"id":16132761,"url":"https://github.com/sammatzko/sorterylib","last_synced_at":"2025-06-23T19:39:44.845Z","repository":{"id":57667998,"uuid":"443124045","full_name":"SamMatzko/SorteryLib","owner":"SamMatzko","description":"A fast, basic, cross-platform file-sorting library based on the Sortery command-line file sorter.","archived":false,"fork":false,"pushed_at":"2022-01-23T18:59:26.000Z","size":43,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T01:39:00.038Z","etag":null,"topics":["cross-platform","file-sorting","files","rust","rust-crate","rust-library","sorting"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SamMatzko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-30T16:11:38.000Z","updated_at":"2022-01-23T15:55:29.000Z","dependencies_parsed_at":"2022-09-07T15:50:20.077Z","dependency_job_id":null,"html_url":"https://github.com/SamMatzko/SorteryLib","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamMatzko%2FSorteryLib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamMatzko%2FSorteryLib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamMatzko%2FSorteryLib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamMatzko%2FSorteryLib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SamMatzko","download_url":"https://codeload.github.com/SamMatzko/SorteryLib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247500454,"owners_count":20948877,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cross-platform","file-sorting","files","rust","rust-crate","rust-library","sorting"],"created_at":"2024-10-09T22:33:48.039Z","updated_at":"2025-04-06T14:45:15.808Z","avatar_url":"https://github.com/SamMatzko.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SorteryLib\nA fast, cross-platform file-sorting library based on the Sortery command-line file sorter. Along with fast sorting, SorteryLib comes with an easy-to-use `File` type, which is compatible with many other types, such as `String`, `str`, `std::path::Path`, `std::path::PathBuf`, and of course the `File` type itself.\n\n# Basic Usage\n\nFor more in-depth usage information, see the [SorteryLib Docs](https://docs.rs/sorterylib/latest/sorterylib/).\nHere is a basic usage example:\n\n```rust\nuse sorterylib::prelude::*; // Import all the stuff needed for basic operation\n\nfn main() {\n    // The fields for initializing the Sorter struct\n    let source = File::new(\"/path/to/source/dir/\");\n    let target = File::new(\"/path/to/target/dir/\");\n    let date_format = String::from(\"%Y\");\n    let date_type = String::from(\"m\");\n    let preserve_name = true;\n    let exclude_type = vec![String::from(\"txt\")];\n    let only_type = Vec::new();\n\n    // Create the Sorter instance\n    let sorter = Sorter {\n        source: source.copy(), // The directory from which to get all the files to sort\n        target: target.copy(), // The directory to sort all the files into\n        date_format: date_format, // The date format to rename the files using.\n        date_type: date_type, // The date type to sort the files by\n        preserve_name: preserve_name, // Whether to include the old file name in the new name\n        exclude_type: exclude_type, // File type(s) to exclude\n        only_type: only_type // File type(s) to exclusively sort. Overrides `exclude_type`\n    };\n\n    // Run the sorting algorithm\n    sorter.sort(false);\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsammatzko%2Fsorterylib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsammatzko%2Fsorterylib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsammatzko%2Fsorterylib/lists"}