From ac32c07d7fe71c162c6c796827468377169ea043 Mon Sep 17 00:00:00 2001 From: modeco80 Date: Tue, 22 Oct 2024 03:00:07 -0400 Subject: [PATCH] add license and README --- LICENSE | 7 +++++++ README.md | 24 ++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 LICENSE create mode 100644 README.md diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..7a2e40b --- /dev/null +++ b/LICENSE @@ -0,0 +1,7 @@ +Copyright 2023-2024 Lily Tsuru + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..b2284bb --- /dev/null +++ b/README.md @@ -0,0 +1,24 @@ +# vxorg + +vxheaven organizer (converts it from a flat hierarchy of ~270k+ files to a neat tree). Originally written in python, I rewrote it in C++ for performance reasons. + +# History + +- 2018: I wrote a really shoddy attempt at doing organization in Bash. It sucked because I wasn't taking care of many idosyncracies about sample naming. + - It also was very primitive and slow, since it would continually spawn `mv` processes just to move files. (same for `mkdir` too, but that is less of a concern since it's done less) +- 2023: I wrote a new script in Python. It was "better" but still didn't work + - I actually made the same mistake and tried to write in Bash again, but even Python was worlds faster, so I rewrote it in python +- October 21, 2024: I decided to start rewriting the Python script I wrote to parse into a N-ary tree for memory savings while still allowing memoization. (and be modular instead of one blob) + - Later in the day, as an experiment, I rewrote the parsing algorithm (fixing a bug in the process) in C++. It was 100x faster, so I committed to a rewrite in C++ + +# Building + +`make` + +# Usage + +- Generate a list of samples. + - `tar tf xxx/viruses-2010-05-18.tar.bz2 | sed 's/\.\///g' | awk NF | sort > list` is one option. Not the best but it's (basically) what I did +- Run with `./vxorg list src/ dest/` + - `dest/` will be created if it does not exist. + - It will show a progress bar as it completes. \ No newline at end of file