#archive #links #tags #files

app archivio

Based on the content of the Files directory creates a Tags directory with symbolic links to original content. Files should follow the naming convention AAAA-MM-DD[_Tags]+

6 releases (breaking)

new 0.6.0 Nov 20, 2020
0.5.0 Nov 20, 2020
0.4.0 Nov 19, 2020
0.3.0 Nov 19, 2020
0.1.0 Nov 19, 2020

#53 in Compression

26 downloads per month

MIT license

10KB
156 lines

Archivio

crates.io

When launched in a directory, it search contents of the Files sub-directory and creates a Tags directory with symbolic links to original content.

Files should follow the naming convention AAAA-MM-DD[_Tags]+

Install

cargo install archivio

Example

Files
├── 2019-10-13_Invoice_YCorp.pdf
└── 2020-11-12_Invoice_XCorp.pdf

launching archivio will create a directory cambrian explosion

Tags/
├── 2019
│   └── 2019-10-13_Invoice_YCorp.pdf -> Files/2019-10-13_Invoice_YCorp.pdf
├── 2020
│   └── 2020-11-12_Invoice_XCorp.pdf -> Files/2020-11-12_Invoice_XCorp.pdf
├── Invoice
│   ├── 2019
│   │   └── 2019-10-13_Invoice_YCorp.pdf -> Files/2019-10-13_Invoice_YCorp.pdf
│   ├── 2019-10-13_Invoice_YCorp.pdf -> Files/2019-10-13_Invoice_YCorp.pdf
│   ├── 2020
│   │   └── 2020-11-12_Invoice_XCorp.pdf -> Files/2020-11-12_Invoice_XCorp.pdf
│   ├── 2020-11-12_Invoice_XCorp.pdf -> Files/2020-11-12_Invoice_XCorp.pdf
│   ├── XCorp
│   │   └── 2020-11-12_Invoice_XCorp.pdf -> Files/2020-11-12_Invoice_XCorp.pdf
│   └── YCorp
│       └── 2019-10-13_Invoice_YCorp.pdf -> Files/2019-10-13_Invoice_YCorp.pdf
├── XCorp
│   └── 2020-11-12_Invoice_XCorp.pdf -> Files/2020-11-12_Invoice_XCorp.pdf
└── YCorp
    └── 2019-10-13_Invoice_YCorp.pdf -> Files/2019-10-13_Invoice_YCorp.pdf

Rules

Maximum depth of created directories is 3.

If a child directory will not filter more than current, it will not be created.

Tags/ root directory will not contain symbolic link (would be all).

Updates

When adding files you can safely run archivio again to update Tags dir. In case of name changes or deletion old tags will not be updated, but you can simply delete the Tags directory and recreate it by relaunching archivio.

Dependencies

~1–1.4MB
~40K SLoC