Commit Graph

194 Commits

Author SHA1 Message Date
Lynne Megido 774e72423f
test powershell output too 2021-04-30 19:11:24 +10:00
Lynne Megido beebbbbb3b
replace fastrand dep with rand, rustfmt 2021-04-29 17:08:56 +10:00
Lynne Megido a60a19191a
reject lowercase exts bc they don't worky 2021-04-29 17:03:26 +10:00
Lynne Megido 090e4adafe
release v0.3.0!! \0u0/
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2021-04-28 23:21:27 +10:00
Lynne Megido 4acbcaaa9b
added quietness flag, set default log level to `info` 2021-04-28 22:20:10 +10:00
Lynne Megido 8cca5097d4
writablesln! 2021-04-28 21:39:56 +10:00
Lynne Megido a05af12352
fif now outputs the dir it was run from
- refactor Format function signatures to be more uniform
- add Shell and Bash aliases for Sh
2021-04-28 21:27:06 +10:00
Lynne Megido cb6e111f16
more comprehensive ext sets, link text/xml and application/xml, remove silly Powershell/PowerShell hack 2021-04-28 19:33:42 +10:00
Lynne Megido 4f5914ed75
-E and -X can now take multiple sets 2021-04-28 18:10:34 +10:00
Lynne Megido d5d58e1830
-e and -E can now be used together!
also changelog rewording

-e and -E can now be used together!
2021-04-28 17:17:38 +10:00
Lynne Megido af3d51fcda
cleaned up excluded_extensions 2021-04-28 17:12:34 +10:00
Lynne Megido d578efa7a4
rename videos set to video, multiple exts can be specified with multiple `-e` flags 2021-04-28 16:44:29 +10:00
Lynne Megido 22f1f280d7
added `-X` for excluding sets of extensions. `-X` is to `-E` as `-x` is to `-e`. 2021-04-28 16:16:32 +10:00
Lynne Megido b12c42adbb
publish my fork of mime_guess so it can be used w/ crates.io
crates.io doesn't allow you to use path or git dependencies - you can only depend on published crates. i didn't really want to publish my mime_guess fork, since i don't really see anyone besides myself using it (and i don't really want my fork to "dethrone" the original or whatever), but unless i want `cargo install fif` to give you a version of fif that tells you XML files should have the extension ".asa", i kind of have to do this :c
2021-04-28 15:17:40 +10:00
Lynne Megido fc51f8128a
rustfmt 2021-04-27 20:26:01 +10:00
Lynne Megido 7e3efbed5c
added exclude flag for excluding extensions
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-27 20:25:41 +10:00
Lynne Megido 40bdac274f
minor cleanup 2021-04-26 22:32:43 +10:00
Lynne Megido 889b2e2316
move ExtensionSet stuff into parameters.rs 2021-04-26 22:17:57 +10:00
Lynne Megido 2ceafb7acf
added -v/--verbose 2021-04-26 22:15:14 +10:00
Lynne Megido d6974b4959
writables!, windows newlines, sorted changelog, always quote paths
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-26 20:19:58 +10:00
Lynne Megido 4d553587aa
fixed powershell output
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-20 19:00:56 +10:00
Lynne Megido 255665cae0
output is now sorted 0u0
sort order: files that couldn't be read, then files with no known mimetype, then files with no known extensions, then files with the wrong extension
2021-04-20 18:52:49 +10:00
Lynne Megido b877d7d65e
xdg-mime no longer uses git version 0u0 2021-04-20 17:26:31 +10:00
Lynne Megido dc2ac7b002
reformatting/reordering 2021-04-20 15:20:10 +10:00
Lynne Megido 83091c754d
removed duplicate Archives pattern in extension_set.rs 2021-04-14 19:17:41 +10:00
petra-fied 48632a471a Merge branch 'master' of https://git.bune.city/lynnesbian/fif
 Conflicts:
	Cargo.lock
2021-04-14 19:08:52 +10:00
petra-fied 59a3042ebc added .rpa format support, new system extension set 2021-04-14 19:08:18 +10:00
Lynne Megido e7637013eb
documented and cleaned up tests, renamed "Script" to "Shell", etc
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-14 18:25:46 +10:00
Lynne Megido 9c8be183d9
new release! 0u0
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
also i increased BUF_SIZE to 8192 bytes
2021-04-14 17:27:44 +10:00
Lynne Megido 383f6a30f2
improved pre-OOXML office mime detection
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-14 16:49:14 +10:00
Lynne Megido 21dfe93a05
better DLL/EXE support, fixed weird symlink semidemihemibug
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-14 16:29:38 +10:00
Lynne Megido d54cc8d6da
added text extension set, more test coverage, cargo update
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-08 23:33:33 +10:00
Lynne Megido be37b24705
better documentation for parameters, renamed Script to Sh 2021-04-07 01:47:40 +10:00
Lynne Megido fb67c11eb6
add option for following symlinks, make extensions optional, new version!!
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2021-04-04 23:52:16 +10:00
Lynne Megido 12d9001bb8
better mime type detection
- consider some/x-thing and some/thing to be identical
- use a patched version of mime_guess with many more extension/type mappings
2021-04-04 22:44:48 +10:00
Lynne Megido 25c9efa2f1
fixed compilation on some obscurish architectures (e.g. powerpc), more clippy lints 2021-04-03 03:52:28 +10:00
Lynne Megido 7115692f9d
fixed tests
All checks were successful
continuous-integration/drone/push Build is passing
2021-03-26 05:11:21 +10:00
Lynne Megido 129aa83ade
lots of stuff! and a version bump!! 0u0
All checks were successful
continuous-integration/drone/tag Build is passing
- extension_from_path now returns Option<&OsStr>
- two new tests
- Findings uses a Path instead of a PathBuf, reducing allocations
- some unnecessary stuff removed, thanks clippy
- that is all
2021-03-26 04:46:07 +10:00
Lynne Megido 40a90308a5
initial (and somewhat bonked) powershell support, cargo update 2021-03-26 00:28:03 +10:00
Lynne Megido 87dab7284f
test on alpine, clippy & rustfmt
Some checks failed
continuous-integration/drone/push Build is failing
2021-03-12 03:44:31 +10:00
Lynne Megido e3af10cf5b
replaced some pathbufs with paths, made it actually compile and work 0uo
All checks were successful
continuous-integration/drone/push Build is passing
2021-03-12 03:26:35 +10:00
Lynne Megido 6d55b3c309
removed an unecessary allocation
Some checks failed
continuous-integration/drone/push Build is failing
you know what they say, premature optimisation is the best optimisation
2021-03-12 02:55:40 +10:00
Lynne Megido 8a152d4118
new option for scanning extensionless files, nicer #[cfg]s, -s no longer skips hidden root dir...
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2021-03-03 01:12:29 +10:00
Lynne Megido 4412161193 nicer output for --help
All checks were successful
continuous-integration/drone/push Build is passing
2021-03-01 20:20:46 +10:00
Lynne Megido 5907309689 renamed modules in accordance with https://rust-lang.github.io/api-guidelines/naming.html 2021-03-01 19:21:00 +10:00
Lynne Megido 32da919f81 replace (ScanError, PathBuf) with just ScanError (which now contains a PathBuf) 2021-03-01 19:18:20 +10:00
Lynne Megido 1aa355e753
version bump - wrote docs, logging by default, and more 2021-03-01 01:23:52 +10:00
Lynne Megido ecee74eb29
oops 0uo 2021-03-01 00:52:37 +10:00
Lynne Megido 31aaa80701
documentation!!! ≥50% coverage!!! wow!!!!! 2021-03-01 00:06:05 +10:00
Lynne Megido e294f56ecf
move main() to the top of main.rs because wynaut 2021-02-28 22:20:15 +10:00
Lynne Megido 67fb03821d
integration test for arg parsing, minor shuffling around of things
All checks were successful
continuous-integration/drone/push Build is passing
2021-02-28 22:17:26 +10:00
Lynne Megido 601481130f
default to WARN logging if RUST_LOG is unspecified 2021-02-28 21:01:22 +10:00
Lynne Megido b89e71a6ab
turns out infer already has jpeg2000 support and i somehow didn't notice 0uo 2021-02-28 20:20:27 +10:00
Lynne Megido d76ed2585d
tests and more!
- added unit tests
- replaced `target_os="linux"` with `unix`
- updated Cargo.toml to patch xdg-mime properly
2021-02-28 19:47:18 +10:00
Lynne Megido 52a0709097
it does indeed work on windows 2021-02-27 12:24:51 +10:00
Lynne Megido ebc2bcfb41
use cfg_if to make the code more readable 2021-02-27 12:13:57 +10:00
Lynne Megido b141b85ea7
use xdg-mime by default on linux, infer elsewhere 2021-02-27 12:02:49 +10:00
Lynne Megido db94465bb7
better document support, print version properly, display version 2021-02-22 08:46:17 +10:00
Lynne Megido 9a0113d1dc
quick hack to work around non-existent document support ;3 2021-02-22 02:32:38 +10:00
Lynne Megido aedfd6d57f
retrieve extensions from mime_guess, minor code changes, added a readme and such 2021-02-22 01:55:27 +10:00
Lynne Megido b95c8ec85c
cleaned up formats.rs 2021-02-22 00:46:51 +10:00
Lynne Megido 9091850ec5
thanks rustfmt 2021-02-22 00:15:09 +10:00
Lynne Megido 7a2f009622
thanks clippy 2021-02-22 00:09:53 +10:00
Lynne Megido 986717a6ae
nicer error handling, exit codes 2021-02-22 00:07:50 +10:00
Lynne Megido 426e09fb05
SVG support, better and more comments, minor code cleanup 2021-02-21 21:30:58 +10:00
Lynne Megido 7fdc75c9e9
windows support! and other stuff 2021-02-20 03:57:36 +10:00
Lynne Megido 2eccd1bbb2
thx clippy 2021-02-18 22:11:13 +10:00
Lynne Megido df2f924b2f
added some extension sets, replaced 'echo' with 'printf' in shell output 2021-02-18 21:43:24 +10:00
Lynne Megido fc7af85ba1
silly clion 2021-02-18 19:55:19 +10:00
Lynne Megido b6d340d45c
added rustfmt.toml, ran rustfmt 2021-02-18 19:48:55 +10:00
Lynne Megido 31acd76c73
tiny brained 2021-02-18 19:15:59 +10:00
Lynne Megido 40292fe334
removed unused mini-buffer feature, optimised imports/features 2021-02-15 05:20:04 +10:00
Lynne Megido ce721c20f6
fixed broken singlethreaded support (whoops) 2021-02-15 05:13:16 +10:00
Lynne Megido 2431e3493a
support using either infer or xdg_mime for mime detection
i guess we can build for windows now
2021-02-15 04:58:57 +10:00
Lynne Megido bc4edecd21
now we don't have to pass &db through three different functions, hooray
this also makes it easier to replace xdg_mime with something else in future
2021-02-15 03:33:24 +10:00
Lynne Megido d7eb0de299
nicer formatting, moved Findings into its own file 2021-02-15 03:12:27 +10:00
Lynne Megido 3642f0112a
version bump, minor cleanup, cli parse fix
previously, `fif -e rs src` would be interpreted as "scan for files with extensions 'rs' and 'src' in the default directory" instead of "scan for files with extension 'rs' in 'src'" - this has been fixed
2021-02-15 02:20:48 +10:00
Lynne Megido 3ae4ec53d8
begone, proc_macro! removes a bunch of dependencies that came through darling. 2021-02-15 00:30:12 +10:00
Lynne Megido 3963910e1e
write header/footer with fif version, sh shebang, etc. 2021-02-15 00:25:32 +10:00
Lynne Megido 00de841fda
handle invalid utf-8 filenames properly... i think 2021-02-14 23:58:46 +10:00
Lynne Megido 32ba0176b2
cargo update, minor cleanup 2021-02-12 19:19:08 +10:00
Lynne Megido 578f2f6be5
fixed indentation, removed some unneeded clap features 2021-02-12 01:46:24 +10:00
Lynne Megido 82bdbebec5
rudimentary script output, lots of small stuff, performance improvements 2021-02-10 19:20:22 +10:00
Lynne Megido 9be33cd90f
0uo 2021-02-06 21:53:44 +10:00
Lynne Megido e3466a8912
chunked multithreading! 0u0 also conditional compilation of some stuff 2021-02-06 21:51:20 +10:00
Lynne Megido 8fc3f18466
first read a smol chunk, if we can't ID the file, read BUF_SIZE 2021-02-06 21:48:31 +10:00
Lynne Megido 6d49336e6b
more gooder output 2021-02-06 13:24:13 +10:00
Lynne Megido b92ceabfe2
much nicer output 2021-02-05 23:49:36 +10:00
Lynne Megido 5f36f663fc
maybe don't depend on regex 0u0; 2021-02-05 23:34:02 +10:00
Lynne Megido 2c4a8f6a3b
implemented parallel functionality! 0u0 2021-02-05 22:45:51 +10:00
Lynne Megido 775fb306ad
switched from structopt to clap 3 2021-02-05 19:24:08 +10:00
Lynne Megido ed54ae2452
work toward parallelisation 2021-02-05 19:15:12 +10:00
Lynne Megido 84e0b0fd0e
better error handling and pattern matching, added license 2021-02-05 15:57:21 +10:00
Lynne Megido 1a32c6c2f0
initial commit 2021-02-04 21:22:19 +10:00