You are not logged in.

#26 2014-05-27 06:53:28

darkfeline
Member
Registered: 2012-02-14
Posts: 94

Re: dantalian — Transparent tag-based file organization system

maikelus wrote:

(First of all, sorry for my English)

My first question, about intersection tag search with command "dantalian find tag1 tag2" is solved. It should be used with double slash at the beginning:

$ dantalian find //images/large //images/color        # Correct

Maybe this should be fixed in the documentation.

It's still a little confusing to me, as to tag files you can use both forms without or with double slash, but not with only one at the beginning:

$ dantalian tag images/large ../files/photo1.jpg      # Correct
$ dantalian tag //images/large ../files/photo1.jpg      # Correct
$ dantalian tag /images/large ../files/photo1.jpg      # Not correct

But this is probably something I miss.

$ dantalian tag images/large ../files/photo1.jpg      # relative path
$ dantalian tag //images/large ../files/photo1.jpg      # unique tag path relative to library root
$ dantalian tag /full/path/to/library/images/large ../files/photo1.jpg      # absolute path

Hopefully that makes sense.  Double slashes refer to tags relative to the library root.  Otherwise, you are giving the path to the directory, either absolute or relative.


The second question is about "virtual tag groups" when mounting a file system with FUSE.

References to ./dantalian/mount are still in the documentation (in dantalian User Reference), so it should probable be removed.

I have documentation written, but not pushed out to the repository yet, sorry.

After mounting a library ...

$ dantalian mount ~/my_library &

... I try to make a virtual tag group

$ dantalian mknode ~/my_library/large-color //images/large //images/color

but error message appears:
"Socket command can only be used with fuse"

Is the syntax correct?

Thanks again.

Yes, but you need to refer to the mounted virtual library.

$ cd ~/my_library
$ dantalian mknode ~/my_library/large-color //images/large //images/color

or

$ dantalian --root=~/my_library mknode ~/my_library/large-color //images/large //images/color

Offline

#27 2014-06-19 17:01:43

ids1024
Member
From: California
Registered: 2013-08-16
Posts: 243
Website

Re: dantalian — Transparent tag-based file organization system

I am using dantalian to manage my pictures and music. I find it useful to have tags at the filesystem level.

I thought it could be useful to have dantalian find create a tag with results.

I created a script in $PATH named dantalian-search:

import dantalian.library
import dantalian.path
import os.path
import sys

lib = dantalian.library.open_library()

resulttag = "//.results"
resultpath = dantalian.path.pathfromtag(resulttag, lib.root)
if os.path.exists(resultpath):
    lib.rmtag(resulttag)
lib.mktag(resulttag)

for i in lib.find(sys.argv[1:]):
    if os.path.isfile(i):
        lib.tag(i, resulttag)

print(resultpath)

And added a function to my .zshrc:

function ds {
	cd "$(dantalian-search $@)"
}

Now I run ds TAG1 TAG2 and see all the results as files in the current directory.

This could also be implemented with fuse, but I am not using that at the moment.


"Only wimps use tape backup: _real_ men just upload their important stuff on ftp, and let the rest of the world mirror it."—Linus Torvalds
s/ftp/git/

https://iandouglasscott.com | https://github.org/ids1024 | https://keybase.io/ids1024

Offline

#28 2014-06-25 09:13:01

darkfeline
Member
Registered: 2012-02-14
Posts: 94

Re: dantalian — Transparent tag-based file organization system

@ids1024
I added a preliminary implementation of this, in the form of the -t flag to the find command.  It's currently available on the master branch, if you want to try it out (https://github.com/darkfeline/dantalian).  The man page for it is here: https://github.com/darkfeline/dantalian … ind.1.ronn  It will likely be kept for the 0.6 barring any serious reasons for the contrary.

You use it like so:

$ dantalian find -t //results //foo //bar

or

$ dantalian find -t /can/be/anywhere/almost //foo //bar

Note that this doesn't exactly match your workflow, but I won't cater dantalian to you personally, but rather adopt a more fair Unix philosophy approach.  You can see this in the original design, as what you wanted to do could've been done in a short shell script, something like:

$ rm -r results
$ mkdir results
$ dantalian find //foo //bar | parallel -I% ln % results  # you can also use xargs here instead of parallel

I actually considered doing something like this for the FUSE for a while now, but never finalized the design (something like storing the last find command in a results virtual directory).

Offline

#29 2014-06-25 16:36:18

ids1024
Member
From: California
Registered: 2013-08-16
Posts: 243
Website

Re: dantalian — Transparent tag-based file organization system

Thanks, I have updated my zsh function to use this feature.  I haven't heard of parallel (nor xargs for that matter) but it looks like it might come in handy.


"Only wimps use tape backup: _real_ men just upload their important stuff on ftp, and let the rest of the world mirror it."—Linus Torvalds
s/ftp/git/

https://iandouglasscott.com | https://github.org/ids1024 | https://keybase.io/ids1024

Offline

#30 2014-07-05 18:58:30

CoolestArchBro
Member
Registered: 2014-04-13
Posts: 4

Re: dantalian — Transparent tag-based file organization system

dantalian-0.5-1 on Python 3.4.1 gives me this. It's the latest AUR version now.

ben@arch ~> dantalian init library
Traceback (most recent call last):
  File "/usr/bin/dantalian", line 37, in <module>
    getattr(commands, args.command)(*args.args)
  File "/usr/lib/python3.4/site-packages/dantalian/commands.py", line 328, in init
    library.init_library(args.root)
NameError: name 'library' is not defined

dantalian-git doesn't have this issue

Offline

#31 2014-07-20 08:56:48

darkfeline
Member
Registered: 2012-02-14
Posts: 94

Re: dantalian — Transparent tag-based file organization system

CoolestArchBro wrote:

dantalian-0.5-1 on Python 3.4.1 gives me this. It's the latest AUR version now.

ben@arch ~> dantalian init library
Traceback (most recent call last):
  File "/usr/bin/dantalian", line 37, in <module>
    getattr(commands, args.command)(*args.args)
  File "/usr/lib/python3.4/site-packages/dantalian/commands.py", line 328, in init
    library.init_library(args.root)
NameError: name 'library' is not defined

dantalian-git doesn't have this issue

Use the git one for now, it's more or less 0.6 ready, I just need to write the docs.

Offline

#32 2014-07-30 05:39:55

darkfeline
Member
Registered: 2012-02-14
Posts: 94

Re: dantalian — Transparent tag-based file organization system

0.6 is released with many changes and optimizations, including some API changes (tag and untag commands have changed radically).  Check the changelog.

Offline

#33 2014-12-04 00:37:02

sharethewisdom
Member
Registered: 2014-09-22
Posts: 60

Re: dantalian — Transparent tag-based file organization system

It 'd be great to learn more about the tagging ideas you've been developing over the years. Do you store additional organizational tags as metadata for your music or photo's? Also, what's the line of thought about a ranger implementation? Do you have a python script or some key binding ideas as a start?

I myself have been using Windows all this time building a large music collection (about eight years) manually and semi-automatically organised. I simply sorted everything chronologically and if possible, per composer down the tree. Databases never appealed to me and I knew only one truly portable program for my external HD capable of searching and indexing the filesystem rapidly. Limitations became often prevalent when the Windows copy handler (whatever the **** it's called) returned some scarce feedback about filenames (which ones?) being too long for example... using Teracopy did help though. But anyway.

For the pdf's in my Zotero library, retaining the original file structure is necessary, though the base attachment directory can be set, which is where I want the Dantalian to initialize, and maybe perform an automated hard link organization of files as //author/year/title.pdf for filenames match the "author - year - title.pdf" scheme as if renamed from within Zotero.

Last edited by sharethewisdom (2014-12-04 10:38:31)

Offline

#34 2014-12-11 08:20:08

darkfeline
Member
Registered: 2012-02-14
Posts: 94

Re: dantalian — Transparent tag-based file organization system

sharethewisdom wrote:

It 'd be great to learn more about the tagging ideas
you've been developing over the years. Do you store additional organizational
tags as metadata for your music or photo's? Also, what's the line of thought
about a ranger implementation? Do you have a python script or some key binding
ideas as a start?

ranger: I have not found a ranger implementation necessary.  Many things you can
already do with ranger just with regular file system operations; this is
a feature of Dantalian.  The rest I tend to do on the command line anyway.

I myself have been using Windows all this time building a large music
collection (about eight years) manually and semi-automatically organised.
I simply sorted everything chronologically and if possible, per composer down
the tree. Databases never appealed to me and I knew only one truly portable
program for my external HD capable of searching and indexing the filesystem
rapidly. Limitations became often prevalent when the Windows copy handler
(whatever the **** it's called) returned some scarce feedback about filenames
(which ones?) being too long for example... using Teracopy did help though. But
anyway.

For music MusicBrainz Picard is irreplaceable.  Windows file system (NTFS) sucks
in general.  IIRC you get such pleasant things as case-insensitive file names
and a lot of arbitrary symbols can't be used in file names.

For the pdf's in my Zotero library, retaining the original file structure is
necessary, though the base attachment directory can be set, which is where
I want the Dantalian to initialize, and maybe perform an automated hard link
organization of files as //author/year/title.pdf for filenames match the
"author - year - title.pdf" scheme as if renamed from within Zotero.

Dantalian will not provide this feature, but it would be really easy to write
a Python script to do this.

File organization is tricky, and I don't have a clear answer even after the time
spent designing Dantalian and research other solutions.  I can't really type
a full reply to your first question, but basically, for file organization both
traditional hierarchical systems and tagging systems are useful in different
situations.  For tagging you can use a Dantalian-like hard link system, or
a database, or metadata.  Each has its own pros and cons, you'll have to balance
your own needs.  Or you can use all three at the same time, in which case
a helper tool is required.  I have plans for adding database caching and
metadata to Dantalian eventually, but there are some changes that I'm working on
at the moment.

Offline

Board footer

Powered by FluxBB