importing a folder should automatically offer to add the folder name(s) as tag(s)

Bug #194158 reported by Timmie
2
Affects Status Importance Assigned to Milestone
Referencer
Triaged
Wishlist
António Lima

Bug Description

let's suppose your documents are organised on your physical Hard disk as follows:

docs/
docs/python
docs/ubuntu
docs/presentations
docs/my_articles
docs/politics
....

When improting the direcory tree docs/ it would be very nice if Reference could offer to add the names of all subfolders to the tags list and assign the folder names to the documents that have been found in the respective folder.
This is just an idea that would prevent the user to replicate the subfolders as tags by hand.

Thanks.

John S (jcspray)
Changed in referencer:
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Pat_Primate (patprimate) wrote :

+1 - Would be a good idea :D

Revision history for this message
António Lima (amrlima) wrote :

I'm staring to do some work on this.

I made referencer create a tag for the sub-folder we are importing but I'm not sure if we should assign the tags right away to the documents we add or if we should let the user decide if he wants to do so. If the folder name is very general (something like "papers" or "books" maybe the user prefers not to assign these tags to the docs.

Any thoughts on this?

Changed in referencer:
assignee: nobody → António Lima (amrlima)
Revision history for this message
António Lima (amrlima) wrote :

While working on this I found that one interesting approach is:

1- Add the documents to the library as we do now;
2- Map documents to tags (only strings at this point) created from the folder names where the documents are;
3- Ask the user if he wants add the tags to the documents.

I have some doubts on #3 since this behaviour could be set in referencer preferences.

Revision history for this message
Mads Chr. Olesen (shiyee) wrote :

Actually, there is quite a nice dialog for tagging documents if you use "Add Document" and select multiple files.
It is defined in RefWindow::addDocFiles.

I think this could maybe be extended to handling this case, as it could allow the user to selectively add the suggested tags.

Revision history for this message
António Lima (amrlima) wrote :

Thanks Mads for the tips.

I have now a working version (needs more testing) of this feature. The current behaviour is the following:

When a user adds a folder containing documents with the structure the bug reported exemplified
docs/
docs/python
docs/ubuntu
docs/presentations
docs/my_articles
docs/politics

for each of the folders a new tag is created. This information is given to the user in the addDocFiles() dialog and then the user can select each of the files and associate the corresponding tags to it. Here goes a screenshot of the relevant dialogs.
https://dl.dropbox.com/u/281158/blogfiles/referencer_add_folder_tags1.png

I'm still working out some crashes with some folder structure.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.