amoffat / supertag Goto Github PK
View Code? Open in Web Editor NEWA tag-based filesystem
Home Page: https://amoffat.github.io/supertag/
License: GNU Affero General Public License v3.0
A tag-based filesystem
Home Page: https://amoffat.github.io/supertag/
License: GNU Affero General Public License v3.0
Unless I'm mistaken, the code doesn't seem to create SQL indexes, and a quick look at the queries leaves me under the impression that they would benefit from indexes.
Any thoughts ?
This would make it slightly easier to edit tags on secondary collections. I keep accidentally tagging things into my primary collection!
I think it would be a really useful feature to import existing directory hierarchies as tag groups. By that I mean the following:
I have an existing collection of art images, e.g. Wallpapers/art/escher
, Wallpapers/art/munch
, etc. and I want to import them into my tag collection as tag groups like so:
$ cd Wallpapers
$ tag ln import .
This should result in subdirs of art/ being grouped as art+ and files of escher and munch being tagged with their respectives parent dir names. I hope it is clear what I mean, if not I am available for further discussion.
I can try helping out implementing this as well, though I have little experience with Rust as of now (I code more in Python and TypeScript) but would like to learn more Rust anyway.
I have manually installed MacFUSE 4.0.5; homebrew casks only have 3.11.2.
Running brew install amoffat/rnd/supertag
as directed in the docs produced this error:
Warning: Calling depends_on :osxfuse is deprecated! There is no replacement.
Please report this issue to the amoffat/rnd tap (not Homebrew/brew or Homebrew/core):
/usr/local/Homebrew/Library/Taps/amoffat/homebrew-rnd/supertag.rb:8
I've opened https://github.com/amoffat/homebrew-rnd/issues/1 for that.
Next, I tried to install supertag using cargo, but there was a compilation error:
thread 'main' panicked at 'Invalid version of osxfuse: Failure { command: "\"pkg-config\" \"--libs\" \"--cflags\" \"osxfuse\" \"osxfuse >= 2.6.0\"", output: Output { status: ExitStatus(ExitStatus(256)), stdout: "", stderr: "Package osxfuse was not found in the pkg-config search path.\nPerhaps you should add the directory containing `osxfuse.pc\'\nto the PKG_CONFIG_PATH environment variable\nNo package \'osxfuse\' found\nPackage osxfuse was not found in the pkg-config search path.\nPerhaps you should add the directory containing `osxfuse.pc\'\nto the PKG_CONFIG_PATH environment variable\nNo package \'osxfuse\' found\n" } }', fuse-sys/build.rs:36:10
According to the MacFUSE release notes, the library is now simply named fuse
, rather than osxfuse
. So I edited fuse-sys/build.rs
to change osxfuse
to fuse
on line 27 and then I got a new build error and decided this was beyond my current knowledge.
Like the title says. A program should not presume that it knows where a user wants to mount something.
Also, please use something other than GitHub.
Hi @amoffat, thanks for this cool project!
I noticed you enabled the whole restriction
category of Clippy. Lints in that group are not meant to be all enabled, as they are thought for very specific codebases, and some of them are even against idiomatic Rust. You should pick them one by one, if you find any of them useful.
Clippy should warn you against that, but you may be using an older version. Just wanted to make sure you are aware of that!
https://amoffat.github.io/supertag/tips_and_tricks.html states:
However, "stat transparency" means that although
person-1
isn't the immediate child ofphotos
, we can treat it as if it was. This means that you can dols people/person-1/⋂
to list the intersection of those two tags, without needing to go through thepeople
tag group.
Should this be: ls photos/person-1/⋂
?
I just installed the latest release package of tag, and started tagging my files. However when encountering a file with spaces in the filename, I get the error:
Error: IO error: Os { code: 2, kind: NotFound, message: "No such file or directory" }
$ tag ln SJ3.EXE oldies/sj3
$ mv SJ3.EXE S\ J3.EXE
$ tag ln S\ J3.EXE oldies/sj3
Error: IO error: Os { code: 2, kind: NotFound, message: "No such file or directory" }
Same result if I enclose the filename in double quotes instead of quoting the space with \
Apparently that's needed for cargo package
to work. Ran into that while trying to package Supertag for Guix.
And again, I am not thrilled to have to through GitHub to report issues.
$ ./tag -vvv mount -f tmptest
Mounting to "/mnt/tmptest"
Error: ExitStatus { cmd: "xdg-open (internal)", status: ExitStatus(ExitStatus(768)), stderr: "XPCOMGlueLoad error for file /usr/lib/firefox/libmozgtk.so:\nlibselinux.so.1: cannot open shared object file: No such file or directory\nCouldn\'t load XPCOM.\nXPCOMGlueLoad error for file /usr/lib/firefox/libmozgtk.so:\nlibselinux.so.1: cannot open shared object file: No such file or directory\nCouldn\'t load XPCOM.\nxdg-open: no method available for opening \'/mnt/tmptest\'\n" }
$ uname -a
Linux ws 5.9.3-arch1-1 #1 SMP PREEMPT Sun, 01 Nov 2020 12:58:59 +0000 x86_64 GNU/Linux
selinux is required? Should that not be bundled with the appimage?
Thank you @amoffat for this great thing!
Are there any reasons to avoid spaces in tag names? As far as I can tell so far, no problems arise. (Of course, tags with spaces in them have to be quoted on the command line.)
https://github.com/cberner/fuser
if it wasn't midnight right now, I'd take a look at this myself. as is, I'm likely to forget, so here's an issue so that someone can later discover the need to switch to fuser.
I think it would be very useful to provide a comparison with TMSU.
It is similar in scope, written in Go, and in active development.
I understood from the Reddit thread that you weren't familiar with it, and IMHO it is an additional reason for this comparison. I'm pretty sure that it would be beneficial for you to get to know about TMSU's design choices and feature set.
Furthermore, TMSU's author (@oniony) started to program in Rust, so there could be an opportunity for you guys to join your forces and work together, which would be amazing.
For example, ~math
matches everything that does not have the tag math
. So you can go to pdf/~math
to get all pdfs which are not about math.
The documentation -- which is great btw -- doesn't seem to address how to import a large number of files into a Supertag collection, and I couldn't find any script of program in the repo tree that would help.
Do you have any best practices to share ?
Could we imagine a helper tool for this ?
I guess what I'm thinking of, is a program (or a subcommand) that would take as arguments:
<path>
to the directory to importinbox
)--strip-components=2
)and that would
<path>
(possibly ignoring .git
dirs using the ignore crate)inbox
).What do you think ?
The actual intersection should contain pdfs which are neither plt
nor math
.
My personal programming projects folder is a disaster, and this seems just about perfect for sorting it. How could I do that?
eg. given this setup:
# install current release version as of this issue
curl -Ls https://github.com/amoffat/supertag/releases/download/v0.1.4/supertag-x86_64.AppImage > /tmp/tag-0.1.4
chmod +x /tmp/tag-0.1.4
function tag() { /tmp/tag-0.1.4 "$@"; }
# make a debug collection
cd /mnt # change to your base (mine is ~)
sudo mkdir -p supertagdebug
sudo chown $USER:$USER supertagdebug
tag mount supertagdebug
cd supertagdebug
this test case fails:
touch /tmp/{a1,a2,ab,b1,b2,c1}
tag ln /tmp/{a1,a2,ab,b1,b2,c} $PWD/basetag/
tag ln /tmp/{a1,a2,ab} $PWD/basetag/a
tag ln /tmp/{ab,b1,b2} $PWD/basetag/b
tag ln /tmp/c1 $PWD/basetag/c
echo "actual:"
ls basetag/-a/-b/_/
echo "actual vs expected:"
diff <(ls basetag/-a/-b/_/) - << EXPECTED
c1
EXPECTED
echo "actual vs no filtering:"
diff <(ls basetag/-a/-b/_/) <(ls basetag/_/)
I get the output:
actual:
a1
a2
b1
b2
c1
actual vs expected:
1,4d0
< a1
< a2
< b1
< b2
actual vs no filtering:
2a3
> ab
it seems to be excluding the intersection of the intersected tags, rather than individually excluding each separate exclude tag.
Hey,
very cool project! I have been looking for a performant file tag organizer and this looks promising. I just have some UX issues I hope can be resolved without too much hassle.
Tagging multiple files at once
My first issue is me wanting to tag multiple files in the same directory using a wildcard. I tried:
tag ln * escher/art
Expecting all files in my directory to be added to escher & art tags but instead I got an error:
Error: IO error: Os { code: 2, kind: NotFound, message: "No such file or directory" }
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.