Thread: [Relfs-devel] RelFS usage.
Status: Pre-Alpha
Brought to you by:
applejack
|
From: Michael R. <fb0...@ra...> - 2007-01-02 18:46:50
|
Hello. After creating one more set of scripts for RelFS, I decided to post it here, as it gives easy interface (too simplistic, but yet more than a standard search in file managers would give) to create search directory, where will be found all files which satisfy condition (I count symbolic links as files). I do not know if there will be any interest, and everything is in obvious shell language, so I'd rather answer questions after they are asked than before. PS. On the site it is stated that I learned OCaml for this project. That is not entirely true - I didn't learn it well, and I knew some basics before. But I think that I more than doubled my skill in OCaml. Good bye, good luck, happy New Year. Raskin Michael |
|
From: Michael R. <fb0...@ra...> - 2007-01-02 19:05:20
|
Sorry, forgot to attach files first time. -------------- Hello. After creating one more set of scripts for RelFS, I decided to post it here, as it gives easy interface (too simplistic, but yet more than a standard search in file managers would give) to create search directory, where will be found all files which satisfy condition (I count symbolic links as files). I do not know if there will be any interest, and everything is in obvious shell language, so I'd rather answer questions after they are asked than before. PS. On the site it is stated that I learned OCaml for this project. That is not entirely true - I didn't learn it well, and I knew some basics before. But I think that I more than doubled my skill in OCaml. Good bye, good luck, happy New Year. Raskin Michael |
|
From: Vincenzo C. <ci...@di...> - 2007-01-14 16:21:21
|
> After creating one more set of scripts for RelFS, I decided to post it > here Ok I am almost back. Will be completely back after a couple of deadlines. You are welcome posting scripts, I will soon create an "utils" directory with shell scripts to do ordinary stuff, even though I think we should write some simple GUI, after stabilizing about the kind of common relfs usage. > , as it gives easy interface (too simplistic, but yet more than a > standard search in file managers would give) to create search directory, > where will be found all files which satisfy condition (I count symbolic > links as files). I still haven't been able to study your scripts in detail, but I have some preliminary comments and many questions: 1. I don't like the "_create_" scripts that add things to a schema, would rather prefer to have a state in relfs where it scans for new addons, and when it finds them, it runs initialization code. This state should be entered at least on startup, or better when a certain directory containing plugins is changed. Your tags table can be at right considered a plugin for relfs, even though there is no indexing. This can be a good addition for a next snapshot of relfs. 2. Can you explain the schema of "tags"? Why are there (path,filename) pairs? Didn't the id suffice to find the file name? Why did you prefer to introduce a "tag_value"? I always think of tags as boolean attributes, not quantities, even if the second idea is more general and can be useful to implement classification directories, it seems harder to use for navigation. In your case, you list all the values as subdirectories of a tag, aren't them tags in their own right then? In fact a tag name already can contain slashes, so the two namespaces "tag/value" and "tag" already overlap, don't them? Finally, what's the meaning of tag_id? Could "id, tag" be used as a primary key for the table? 3. What's the _uniquedata_ stuff for? 4. What's the symlinkize_dir script? Maybe we already talked about that in the past. 5. How should relfs_search_text be used? > PS. On the site it is stated that I learned OCaml for this project. That > is not entirely true - I didn't learn it well, and I knew some basics > before. But I think that I more than doubled my skill in OCaml. > Oops, fixed :) Thank you for your help with the project, I will surely add an "util" directory with your scripts. We should agree a schema for tags and the rest, and then also create some simple GUI to perform the same operations as the scripts, dunno if in ocaml+gtk or in python. Vincenzo |
|
From: Michael R. <fb0...@ra...> - 2007-01-14 18:45:52
|
Vincenzo Ciancia wrote: >> After creating one more set of scripts for RelFS, I decided to post it >> here > > Ok I am almost back. Will be completely back after a couple of > deadlines. You are welcome posting scripts, I will soon create an > "utils" directory with shell scripts to do ordinary stuff, even though I Good idea. > think we should write some simple GUI, after stabilizing about the kind > of common relfs usage. Scripts are good because of being quick-and-not-too-dirty. I agree that after deciding what we do need and what was a bad idea we can try to write some usable GUI (to give people something to tease disappointed former WinFS believers?). >> , as it gives easy interface (too simplistic, but yet more than a >> standard search in file managers would give) to create search directory, >> where will be found all files which satisfy condition (I count symbolic >> links as files). > > I still haven't been able to study your scripts in detail, but I have > some preliminary comments and many questions: I expected this. > 1. I don't like the "_create_" scripts that add things to a schema, > would rather prefer to have a state in relfs where it scans for new > addons, and when it finds them, it runs initialization code. This state For this some negotiation is needed about plugin interface. With *create scripts someone passing by (we should act as if there are some, and I hope there are - I will be glad if some of them replies with ideas of possible bleeding-edge user) can say why I did everything wrong without any effort right now. > should be entered at least on startup, or better when a certain > directory containing plugins is changed. Your tags table can be at right > considered a plugin for relfs, even though there is no indexing. This > can be a good addition for a next snapshot of relfs. Well, a good idea. My script show 2 things: how something like tags can work, and how something can be easily added by user to RelFS - even without OCaml knowledge. > 2. Can you explain the schema of "tags"? Why are there (path,filename) > pairs? Didn't the id suffice to find the file name? Why did you prefer Well, I want to simplify possible searches in this database. I leave using lookup on each occasion to my enemies. > to introduce a "tag_value"? I always think of tags as boolean > attributes, not quantities, even if the second idea is more general and > can be useful to implement classification directories, it seems harder I thought "What do I want?". I wanted to have some different classifications all easily accessible. I want to automatically have list of all programming languages I mentioned in tags. With special virtual folder for each. I also want to have list by functionality program provides. This way command-line completion works better... And I have to choose two times - both times between similar notions in bearable quantity (not between "OCaml" and "file system", but between "language" and "purpose" and later between "OCaml" and "Shell"). > to use for navigation. In your case, you list all the values as > subdirectories of a tag, aren't them tags in their own right then? In They are, but they are grouped by category. > fact a tag name already can contain slashes, so the two namespaces Er.. I don't filter it, by I don't think it works. > "tag/value" and "tag" already overlap, don't them? Finally, what's the > meaning of tag_id? Could "id, tag" be used as a primary key for the > table? Well, it can. But this is polishing. I didn't want to restrict myself before I complete anything. I didn't want to design well - I wanted to test features. > 3. What's the _uniquedata_ stuff for? I understood that file cannot have 2 real sizes (for symbolic link, as I store mainly symbolic links here - RelFS is good at categorization, but right now I am just not ready to store all data on it - just like I do not store /home on funionfs), and if I want to tag project tarballs that bear my contributions also, this tag can be assigned only once. But it can be reasonable to make 2 programming language tags - like when Mozilla applications are written in C++ + JavaScript. So I made a table as an alternative to tags when there is one main tag_value and rarely ever second. It makes some search queries simpler and it allows to get a quick summary of multiple files at once. > 4. What's the symlinkize_dir script? Maybe we already talked about that > in the past. It is easy to work with symbolic links in RelFS (I have right to say so, I guess). There are many technical problems with directories (I see some in processing something like name/#select/name/#select path). So an easy workaround is to make directory that you want to appear in search technically symbolic link, and hide content somewhere near it. > 5. How should relfs_search_text be used? It is used in relfs_create_search only. It was used when I wanted to debug the scripts. You can also just feed its output to SQL pipe to see listing one time, without creating directories. I agree that it is exposing implementation, but for proof of concept it is not fatal. >> PS. On the site it is stated that I learned OCaml for this project. That >> is not entirely true - I didn't learn it well, and I knew some basics >> before. But I think that I more than doubled my skill in OCaml. > > Oops, fixed :) Thank you for your help with the project, I will surely Funny design solution for fix. > add an "util" directory with your scripts. We should agree a schema for > tags and the rest, and then also create some simple GUI to perform the > same operations as the scripts, dunno if in ocaml+gtk or in python. I agree with that. Maybe then it will be possible also to promote project a bit, say by discussion of possible improvements (together with finding volunteers) on LinuxQuestions.org or somewhere. |