Tag based file system [closed] - operating-system

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
All OSs that exist right now work in files and folders. I was thinking that there are may other ways of storing files. Would it be a better way to store files by tags, for example:
A file called "music1" can have a tag "2013", if the music was made in 2013. The same file can have another tag called "Music", to say that the file is music, another file called "video1" could have the "2013" tag, but also have the "Video" tag instead of the "Music" one. This would be useful, because you could search for tags and generate nice-looking maps of all the files you have.
Here is an example:
In this example, files are in green. Each file has some tags(blue),and some special tags(red). Special tags contain things like the user(only the user in the tag can see files tagged USER:Username) and File type(instead of file extension). Tags in yellow are system filetypes that do not require a program to run them(like .exe in windows)
Black lines link tags to files
Red lines link special tags to files
Blue lines link what the file type(or file) is opened by. For example, the music is an ogg file. It is opened by OggViewer, which is a jar file opened by java. Java is opened by the system.

As far as I know, there is a nice file system level solution to your need called NHFS or nonhierarchical file system. Also available a FUSE based mountable file system called TMSU that may satisfy you.

It could have merit, for example I'm utterly disinterested in the file names/paths of my tens of thousands of music files; I only really care about the artist,title,album,year,etc of them, which is the way my music player (quodlibet) displays them. Choosing a set of music to put on another device or to send to someone could then be as easily as selecting an album (instead of browing to /home/me/music/who/knows/what/someartist - somealbum).

There is TagsForAll for windows. It is a file manager based on tags. Tags can have hierarchical structure. User interface is very simple but nice. Free version fully functional and save tags in database, Pro version save tags also within NTFS stream to a file.

Microsoft tried to do something like that with WinFS
but gave up on it. It would be great if they could get it to work.

There are some other (old, archived) projects implement this idea:
http://nascent.freeshell.org/programming/TagFS/
https://code.google.com/p/dhtfs/
https://code.google.com/p/tagfilesystem/
http://www.tagsistant.net/
Only the last seems to be releasing recent versions.

I think the idea has a future. I've pondered this same idea before. And tags fundamentally work better for most content than folders do; however, I wonder if the hierarchical structure of folders isn't actually better suited for files. In other words, though I like the idea of using tags on many levels I wonder if it would actually increase the overall complexity. For example, consider how tags could be used successfully to manage versioned software libraries. I'm afraid we won't know the answer until someone starts using the concept instead of folders for an entire OS. It'll be interesting to see/try.

Related

Is It Possible To Set An Ics/iCal File So That The File Name Can't Be Modified? Or Even to Read Only?

This may be a foolish question but I would appreciate any pointers: I'm generating year-long .Ics files that contain unique information people are actually purchasing - Moon phases, tides, etc.
The files work fine but I would like to try and 'lock' them so that the usual suspects cannot simply, download,rename and distribute the unique content to their advantage.
Does anyone know if anything like this exists? I've tried locking the file as text and but it doesn't stick once it's resaved as ics.

Table stuck in header - Word 2010 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
Somehow, I got some tables inside the header and some inside the footers in the document Im working on. They are not supposed to be there, and this destroys the formatting.
How do I move a table out of the header/footer in Word 2010? They seem to be locked in there no matter what I do. I've tried copy/paste, dragging it, copy it to another document and back. Is there some settings on the table it self? Google has not found anything for me.
I had this happen to me just a second ago and was able to figure it out - hopefully the same thing is causing the problem for you.
I clicked on the table - then "table tools/layout" in the ribbon - then "properties" - alternatively you can right click on the table and select "table properties"
Once the "table properties" box opens - click on the "table" tab (it should be automatically selected by default) - make sure "text wrapping" is set to "none"
That should solve the problem - it did for me at least.
I'm not an expert in Word but I know how Word Document are structured.
We're going to open the content of the header in a text Editor.
Steps:
Be sure to make a copy of your document before this operations, because the resulting document could be corrupted
Rename your file in a .zip file
Extract the zip in a folder named document
Go inside that folder, than in the word folder.
You should see a file named header.xml (or header1.xml)
Open it in a textEditor
Try to find out where the table is and remove it
Ensure your xml is still valid: XML Validator
Save and close your file, and zip all folders and files inside the document (if you zip the whole document folder, the file will be corrupted)
Rename the zipped file to .docx
Open the file in Word
If this doesn't work, you could post your Header.xml file, they should'nt be some confidential in there (or you could replace it by whatever you want)
I had the same problem. I just changed the orientation of the page to landscape:
Go to page layout
Go to orientation
Select landscape
The table was still on a header, but word created a page 2 and page 1 was blank. From page 2, I just dragged the table onto page 1 and it was no longer in the header!
Then, change the orientation back to portrait (follow 2 steps above and select portrait in final step).
Hope this helps!
Thanks for the answers! This is how I solved the problem:
I fixed it "manually". I just made a new document and started copying over, there was more than one table bugging. Thanks for the help anyway!
Since this question is from July 2013, and I solved it then, I'm not testing your replies. But, they might be great for other people with the same problem! They are probably better solutions than just starting over.

Xcode Project Size problem- 72 text files

I am new to iphone sdk and creating my first application so please be nice when answering my questions.
I have following questions
Q-1. I have created a simple iphone application (not a game app, no OPenGL). My program is running fine but total xcode project size is 9 mb. I found that my xcode project size is less than 2 mb without "class" and "build" folder.
Do we upload files of "build" and "class" folder when we submit our application?
I have checked that most of iphone applications are less than 2 mb in size so I think build folder is just for me to test the application.
Can someone give me the list of all files or folders (just extension) that we need to upload in order to submit an iphone application.
Q-2. there are around 72 text files (each is 2 KB in size) in my program. Program open a text file according the selected criteria. I have all 72 text files in resource folder. I am not using SQLite as I think it is not too much data and text files are small in size.
Can apple reject my application just because there 72 text files? Is it a common approach to use multiple text files instead of SQLite?
Q-3. Do I need to add zip and unzip my text files instead of opening them directly?
Q-4. some of my text files has following five words
"sex" "sexy" "kinky" "filthy" "dirty"
For example "You are so kinky" , "I love sex" etc.
Do I need to remove these words from my files? Will they be considered vulgar? Will my application be rejected because of these five words?
I have seen some iphone applications on apple's website which shows sex positions and use words like sex,sexy,kinky so I think it should not be a problem.
Do I need to add something like "mature content. Must be 18 years old" just because I am using these five words. I think these are pretty common words that are frequently used by young people.
Many of these questions can be answered more completely by Apple's help docs in the iOS developer center and iOS Provisioning Portal (https://developer.apple.com/devcenter/ios/index.action and https://developer.apple.com/ios/manage/distribution/index.action - you need to be logged in to view these links)
However, here are some quick answers:
1) The build and classes folder hold files during development. The build folder holds the binaries that are created every time you click 'Build' in Xcode, if you build for different targets, there will be multiple copies of your binary in this folder. It also contains various debugging and symbol files used by Xcode.
The classes folder contains all of the implementation (.m) and header files (.h) that you have in your project. This folder corresponds to the 'Classes' group in the file organizer when you open your project in Xcode.
When you submit an application to Apple, all you submit is the compiled binary (found in the appropriate folder in your 'build' folder). It is normal for your project folder to be many times bigger than the final binary you submit. For more info on the submission process, refer to the second link I posted above.
2) If you're persisting a lot of data, I would recommend using the built in SQLite database. It's very easy to use (Google will help you with this), and quite fast. Apple probably won't reject your app for storing a lot of data in flat text files, but you have no reason to. SQLite databases are much cleaner and easier to maintain than 72 flat files.
3) No. But you should still use SQLite, especially if you're saving enough data to these text files that they need to be compressed. Reading and parsing large text files can be much slower and more cumbersome than reading the same data from a database (databases are made to handle data storage like this).
4) Again, Apple probably won't reject you for this (of course, nobody actually knows why they reject apps, so it's always a bit of a crap shoot). When you submit your app, you can choose the rating level for it (sort of like game ratings, or movie ratings) so when people download it they are aware of the level of maturity of the content. One of the ratings is 17+, which you can use if you need. I believe Apple has a document outlining it's rating system in one of the links I posted above (or it's somewhere, it does exist).
First of all you don't need to upload build folder to upload but classes will be uploaded. you have to follow a process for uploading.
No problem at all you can upload even 1000 files, 72 is very small amount. but be careful that if you project is very heavy then it app will be crashed.
No need to zip the files.
you may use all of these words you may even use pornographic contents but they should not be copy righted of any body else. You don't need to remove them, when you will be uploading your application there will be an option "Application include adult contents" you just have to check that option.

Product idea/approach : Folder based disk organization

Sweet..I bought myself a 1TB portable harddrives this week. Don't you just love how much data you could store on one of these disks? The fact that I could store my bluray rips on to my portable harddisk and that my lg lcd tv can do HD rips right from the drive - that's amazing practicality right there! However, life it seems, is never so simple. I have 100s of movies unorganized in one huge folder, which is exactly what I needed to annoy myself while browsing the same on my tv to play a single movie. That got me thinking...
What if I had an automated way to organize movies into folders such that my folder-browsing-on-a-lcd-tv-or-a-comp would make my life a little easy?
I started thinking about this... I browsed a little in this context and I realized that if only I could "tag my movies somehow and create folders on-the-fly based on tags using hardlinks", I would have addressed my problem. I googled a bit to find software that works in the above fashion, only to find none.
A few more days of serious thought (as you know by now.. I think a lot.. and I guess this question is starting to sound like a blog rant/post of sorts...), in the interest of humanity, I thought I should come up with a generic way to address this: What if someone wanted to organize photos... organize music.. organize software?!
Turned my grey cells off for a while and here is an approach I came up with to solving my what-if scenario.
Tag / Group tag individual files (rely on a slick GUI to do it fast and do it good) - Adobe Flex/Eclipse RCP to do this?
Create hardlinks to each of the tagged files.
The first point is self-explanatory. The second (coz I am talking windows here), refers to making use of mklink.exe.
Consider a scenario where I have 2 movie files: I have a movie file "Transformers.avi" tagged as "english, action, bluray, sci-fi, imdb-top-50, must-watch-with-kids" and another movie file "The Specialist.avi" tagged as "english, bluray, thriller, adult". Here are a few of the possible locations I want to see my Transformers to be found:
[root directory]->all-tags->english
[root directory]->all-tags->bluray
[root directory]->all-tags->english->all-tags->bluray
[root directory]->all-tags->bluray->all-tags->action
[root direcotry]->all-tags->english->all-tags->action->bluray->all-tags->imdb-top-50
Given that windows has a limit of 1024 hardlinks to a single file, I probably would be allowed 7 unique tags per file. Each sub-folder will have an "all-tags" folder. Having it named "all-tags" makes it more accessible when order by name.
I believe this approach when automated to let you configure tags you want and where the hardlinks are created for you, helps you organize stuff effectively.
I don't know if there are better things out there. I would like your inputs on this approach and other possible ideas. I would like to gather inputs here and release something to sourceforge for everyone to use in a couple of weeks. I am sure, I can count on your positive response as always.
I believe hardlinks are not a good approach. Reason? A standalone player won't play them, and I wouldn't like a program who's made for tagging to tell me to stop making so many tags because of a Windows limitation on hardlinks (remembering each tag will increment the number of links exponentially).
Plus, "help" is not a good tag.
And I've had an idea once that I'm still planning to make some day to sort my own files - put the files in a big storage each below a GUID foldername (filename untouched) and store metadata in a sqlite database to be used by a smart file browser.
I was considering doing something similar to this with music for detecting duplicate songs and auto-organize funcationality.
For your application, I wouldn't recommend using any shell programs through Java. Exception handling becomes difficult, and your application becomes bound by the shell interface and implementation (i.e. windows versions or installations affect your application behavior).
I would use a database with a few tables: Files, Tags, and an association table.
The Files table would list the physical location of each file, the filename, and a unique identifier. This way, you can maintain information about each file without having to modify it for every tag association.
The Tags table would list each tag, and any metadata you want to store for each tag.
A third table, maybe 'FileTags' would store the assocation between tags and files. When adding tags to the stack, you would add a statement to the WHERE clause, and the list of files with all of the tags would be returned. This structure would also allow open your codebase up to other designs, such as include/exclude (autocomplete with X buttons), or possibly search.
If implemented in Java, your app would be platform independent, and would allow a very large number of tags and files. You can then use the system default application for opening the media file, and the user can make the selection in their native OS.
Reiser4?
...
(I mean nevermind Hans, but the tech...)
[disclaimer: Not a hacker. I know nothing of programming/coding, never mind filesystems & databases. I can barely code decent HTML even, if at all. Hey y'all! :D]
[footnote: does plain HTML5 work here? Too lazy to close my tags hehe :p]

Own data format for the iPhone

I would like to create my own data format for an iPhone app. The files should be similar structured as e.g. Apple's iWork files (.pages). That means, I have a folder with some files in it:
The file 'Juicy.fruit' contains:
Fruits
---> Apple.xml
---> Banana.xml
---> Pear.xml
---> PreviewPicture.png
This folder "Fruits" should be packed in a handy file 'Juicy.fruit'. Compression isn't necessary. How could I achieve this? I've discovered some open source ZIP-libraries. However, I would like to to build my own data format with the iPhones built-in libs (if possible).
Best regards,
Stefan
Okay, so there are three ways I am reading your question, here's my best guess on each one:
You want your .fruit files to be associated with your app via Safari/SMS/some network connection (aka when someone wants to download files made for your app or made by your app).
In this case, you can register a protocol for your app, as discussed here:
iPhone file extension app association
You want the iPhone to globally associate .fruit files with your app, in which case you want to look into Uniform Type Identifiers. Basically, you set up this association in your installer's info.plst file.
You want to know how you can go from having a folder with files in it to that folder being a single file (package) with your .fruit extension.
If that's the case, there are many options out there and I don't see a purpose in rolling your own. Both Microsoft and Adobe simply use a standard zip compression method and use their own extension (instead of .zip). If you drop any office 2007 document, such as docx or Adobe's experimental .pdfxml file into an archive utility (I like 7z, but any descent one will do), you will get a folder with several xml files, just like you're describing for your situation. (This is also how Java's jar file type works, fyi). So unless you have a great reason to avoid standard compression methods (I vote gzip), I would follow the industry lead on this one.
I can definitly appreciate the urge to go DIY at every level possible, but you're basically asking (if it's #3) how you can create your own packaging algorithm, and after reading how some of the most basic compression methods work, I would leave that one alone. Plus I really doubt that Apple has built in libraries for doing something that most people will just use standard methods for.
One last note:
If you are really gunning to do it from scratch (still suggest not), since your files are all XML, you could just create a new XML file that will act as a wrapper of sorts, and have each file go into that wrapper file. But this would be really redundant when it came time to unwrap, as it would have to load the whole file every time. But it would be something like:
Juicy.fruit --
<fruit-wrapper>
<fruit>
<apple>
... content from apple.xml
</apple>
</fruit>
<fruit>
<banana>
... content from banana.xml
</banana>
</fruit>
<fruit>
<pear>
... content from pear.xml
</pear>
</fruit>
<picture>
...URL-encoded binary of preview picture
</picture>
</fruit-wrapper>
But with this idea, you either have to choose to unpack it, and thus risk losing track of the files, overwriting some but not all, etc etc, or you always treat it like one big file, in which case, unlike with archives, you have to load all of the data each time to pull anything out, instead of just pulling the file you want from the archive.
But it could work, if you're determined.
Also, if you are interested, there is a transfer protocol intended specifically for XML over mobile called WBXML (Wap Binary XML). Not sure if it is still taken seriously, but if there is an iPhone library for it, you should research it.