Compare commits

..

No commits in common. "2713083a8212dfc3a999096015627ed4b0bcc4d3" and "7f87f59670a29364752f02b6bdcba47be9479ed0" have entirely different histories.

4 changed files with 1 additions and 12 deletions

View file

@ -6,8 +6,6 @@ Dates are given in YYYY-MM-DD format.
- Added Apple iWork document formats to documents extension set - Added Apple iWork document formats to documents extension set
- Cleaned up and properly documented tests - Cleaned up and properly documented tests
- Renamed `Script` (in `formats.rs`) to `Shell`, in line with renaming in `paramaters.rs` - Renamed `Script` (in `formats.rs`) to `Shell`, in line with renaming in `paramaters.rs`
- Added .rpa (renpy archive) support
- Added system extension set
### v0.2.12 (2021-04-14) ### v0.2.12 (2021-04-14)
#### Features #### Features

2
Cargo.lock generated
View file

@ -340,7 +340,7 @@ checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d"
[[package]] [[package]]
name = "mime_guess" name = "mime_guess"
version = "2.0.4" version = "2.0.4"
source = "git+https://github.com/Lynnesbian/mime_guess#5432b3c1991372291a5e67457cc9307c85f77bd9" source = "git+https://github.com/Lynnesbian/mime_guess#28633a9936a9c3eb29cf85e99899e35ddd63d9c1"
dependencies = [ dependencies = [
"mime", "mime",
"unicase", "unicase",

View file

@ -18,8 +18,6 @@ pub enum ExtensionSet {
Text, Text,
/// Extensions used for archive file formats, such as `zip`, `zst`, `gz`, etc. /// Extensions used for archive file formats, such as `zip`, `zst`, `gz`, etc.
Archives, Archives,
/// Extensions used for system file formats, such as `mbr`, `crash`, `dll`, etc.
System,
} }
impl ExtensionSet { impl ExtensionSet {
@ -42,9 +40,6 @@ impl ExtensionSet {
Self::Text => mime_guess::get_mime_extensions_str("text/*").unwrap().to_vec(), Self::Text => mime_guess::get_mime_extensions_str("text/*").unwrap().to_vec(),
// many compressed file types follow the name scheme "application/x.+compressed.*" - maybe this can be used // many compressed file types follow the name scheme "application/x.+compressed.*" - maybe this can be used
// somehow to extract extensions for compressed files from mime_guess? // somehow to extract extensions for compressed files from mime_guess?
Self::Archives => vec!["zip", "tar", "gz", "zst", "xz", "rar", "7z", "bz", "bz2", "tgz", "rpa"],
Self::System => vec!["com", "dll", "exe", "sys", "reg", "nt", "cpl", "msi", "efi", "bio", "rcv", "mbr", "sbf", "grub", "ko", "dylib", "pdb", "hdmp", "crash",
],
Self::Archives => vec!["zip", "tar", "gz", "zst", "xz", "rar", "7z", "bz", "bz2", "tgz"], Self::Archives => vec!["zip", "tar", "gz", "zst", "xz", "rar", "7z", "bz", "bz2", "tgz"],
} }
} }

View file

@ -39,10 +39,6 @@ cfg_if! {
open_document_check(buf, "presentation") open_document_check(buf, "presentation")
}); });
info.add("application/x-rpa", "rpa", |buf| {
buf.len() >= 34 && buf.starts_with(b"RPA-") && buf[7] == b' ' && buf[24] ==b' '
});
info.add("image/svg+xml", "svg", |buf| { info.add("image/svg+xml", "svg", |buf| {
// before doing the moderately expensive SVG check, we should make sure that the input is actually SGML-ish // before doing the moderately expensive SVG check, we should make sure that the input is actually SGML-ish
// by "SGML-ish", i mean starts with anywhere from zero to ∞-1 whitespace characters, and then a less than sign, // by "SGML-ish", i mean starts with anywhere from zero to ∞-1 whitespace characters, and then a less than sign,