-
Notifications
You must be signed in to change notification settings - Fork 17
Home
IMPORTANT NOTE: Despite I used this project also for my own purposes and I have positive feedbacks from other users, all precautions should be taken to avoid data loss; remember that regular and well done backup of your cloud can save you from data loss and consequent headaches. Nor the author nor any other thirty party can be responsible for any damage or data loss.
Notes for migrations: Please carefully read the chapter "Migration notes" if you are upgrading from the previous version of the app or from OwnCloud 6 to OwnCloud 7.
#About this document This document has been written by Francesco Piraneo G. the author of oclife referring to the version committed on October 23 2014. Contained informations may not apply to different releases of oclife. I’m an Italian mother tongue so I’m very sorry for any mistake made editing this document: Please feel free to submit improvements.
#About
oclife allow an ownCloud user to manage and add hierarchical tags to his document. One or more tag can be added to the document to better identify his property; I personally plan to use it extensively to add tags to the thousands of pictures I took since I buy my first digicam: Since Y2K (year where I bought my Nikon Coolpix 995) I took pictures that I collected into a directory structure of my PC first and then on my server and NAS. I was satisfied of this arrangement since I realized that storing then successive looking for a particular picture was not so trivial; for a picture taken in Russia and depicting one person for example: Should I store that picture under /NAS/Russia
or under /NAS/PersonName
? And what are pictures I took in Canada? I’d like to see like on a light board all the pictures taken in Canada to look for a particular one!
Extending this concept for other kind of document like MP3 is automatic: What are all my stored audio files containing all birds sound I collected in 2008?
A similar concept has been implemented in phTagr
(http://www.phtagr.org/), a product that I love but it cannot actually be extended to other kind of document than pictures and I’ve found it hard to expand it to support other kind of picture format (like digicam’s RAW and old Kodak PhotoCD).
##What is it
oclife allows to declare all the tags under the main menu entrance Tags
, allowing basic editing like “Rename”, “Delete” and with a simple drag and drop putting them in a hierarchical tree. On the main tags editing page, simply selecting one or more tag(s) the app shows all the documents with that tag(s). Clicking on a document’s thumbnail a preview of that document is shown.
An enlarged preview is shown when you click over a thumbnail
Tags can be assigned to the document using the Info
window that can be recalled on the main file page, browsing through all the file: Simply hover with the mouse on a document to show the related operations allowed on that document. The information window also produces an enlarged thumbnail supporting other file formats than the standard ownCloud libraries (only with ImageMagick enabled).
###The concept of hierarchical
Few words on the concept of hierarchy: As above I plan to use this product with pictures but the concept can be extensively used on other kind of documents. Consider pictures taken in Great Britain’s region like Wales
, England
and Scotland
; each of them has been taken in London
, Manchester
, Wrexham
and Edinburgh
. We have the choice - for example - for a picture taken in London
to assign the London
tag but for a successive search for all the pictures taken in United Kingdom, the picture taken in London
doesn’t appears, compelling us to insert three tags: London
, England
and United Kingdom
... may be also ... Europe
?
Simply declaring a tag structure like the following can solve the issue:
Europe
+-United Kingdom
+-England
+-London
+-Scotland
+-Edinburgh
+-Wales
+-Wrexham
On tag window I can choose the United Kingdom
tag to let all the pictures taken in London
, Wrexham
and Edinburgh
appears.
##What is it not
oclife actually incorporate a basic file viewer; it has been tested successfully on shared documents. Some limitations apply if files are encrypted. Clicking on a thumbnail on the main Tags
window a popup appears showing the preview of the document.
#Prerequisites ##ownCloud oclife has been developed for and tested under ownCloud 7.0; oclife can be used also on ownCloud 6.x; use of oclife under different version of ownCloud may lead to unpredictable results. Despite ownCloud support different RDBMs, oclife has been tested only under MySQL and SQLite. Feel free to test it with other RDBMs and share your experience.
ownCloud doesn’t support MacOS as host OS due to unicode issues.
oclife has been tested also on servers running debian Linux and ubuntu. Some limitations apply on debian where ImageMagic libraries are not up to date.
##Thirty party oclife uses thirty party modules and library to perform his job; standard modules delivered with ownCloud (like jQuery) will not be listed here.
- FancyTree - Creates a nice tree view of all the tags and allow extra features like context menu and drag and drop;
- bootstrap-tokenfield - Allows a nice tags show on the info popup with insert of new tag feature.
Both modules can be downloaded on the developer’s page at GitHub; for sake of simplicity they will be distributed with oclife leaving untouched the original license and credits.
##ImageMagick vs. GD
oclife can be used with standard GD graphic library integrated in PHP; GD can handle a certain number of graphical image format; ImageMagic allows more flexibility but it must be installed manually. Once ImageMagic is installed, it will be sensed automatically by oclife and the usage should be activated manually on the admin
page by an administrator.
#Installation
oclife can be downloaded from github (hitting "Download ZIP" pushbutton) then installed under your ownCloud installation directory then the apps
subdirectory.
Note: The .../appinfo/info.xml
contains some behaviour of oclife under ownCloud. The shipped
property of oclife has been set to TRUE
; this allows the oclife directory to don't be removed when the app is disabled on the Administrator's app page; I think is more practical to leave the inhibited app on the app directory also if they are not enabled.
After unzipping the downloaded archive under the apps
directory of ownCloud, be sure the directory name of the app is oclife
and can be freely accessed by webserver (on debian / ubuntu linux flavours set owner to www-data:www-data
), the app has to be activated; login on ownCloud as administrator
(note: the actual administrator's username can be different following your installation), in the upper left corner of the page you can find the menu, click on it and an apps
menu icon should appears; recall it then browse the app listing to look for oclife
; select and enable it.
Enabling the app
#How to use
##Simple tagging
On the main page a new Tags
icon on the left menu bar should appears; select it; a single item called root
is displayed: That is the root tag, parent of all the tags you will create.
Showing where "Tag" menu item will appears
This is the very first tag: "Root"
On the upper side of the page you'll find also the toolbar with all the operations that can be performed on the tag.
Note: Of course you cannot rename or delete the root
tag!
Some notes about the icon of each tag: the globe
. This icon means that the tag is global
: A global tag (as the name implies) is visible to all the users of that installation of ownCloud! In a near future I'll implements also personal tags (with different icon of course!).
Each tag has it's own owner and priviledges; this properties defines how the behaviour of the tags. The icon near the tag will indicate the type of the tag: a globe tag represents a global tag, group tags are represented by three peoples and private tags are represented by a single person. Red icon means "read only" and green icon means "read and write" tag. Operation that can be performed on read / write tags are rename and delete. The groups can be defined on the standard ownCloud admin page. Note that only an administrator can change the owner of a tag!
Differents icons means differents priviledges on the tag
There is also an alternative way to create tags.
Browsing the files listing and hoovering over a file, the actions icons will appears; you note a new icon called Informations
; clicking on it opens a popup with basic informations on that file and a tagbox on the bottom; insert there the tag you like to create and hit enter; a popup asking for confirmation appears: confirm and the tag will be created.
The new "Informations" item
What the informations window looks like; note that from the previous version an "EXIF" section has been added! With this section was quite easy to discover that Frank Karlitshenk own one of the best digicam on the market!
With this section was quite easy to discover that Frank Karlitschek own one of the best digicam on the market!
Tag creation while tagging a document
##Massive tagging Maybe you have to assign the same tag to several files; you have two options:
- Edit each file at once;
- Select all the files you want to assing the tag(s) and tag them! I prefers the second of course!
When you select several files...
When you select several files (in the same directory of course) the files action headers appears on top of the file table; you'll note that the Tag group
item; pushing on it a new popup appears.
Tag multiple file popup
The popup above has three sections:
-
General information and preview - Allows to see the preview of selected file and some informations about; you can choose with the menu which file to see and work on;
All selected files
allows to work on all the selected files; -
Tags common to all files - The tags that are commons to all the files; active only when
All selected files
menu item is choosen; insert here the tags you want to assign to all the files; -
Tags for the selected file - Here the tags that belongs to the choosen file; disabled when
All selected files
is choosen; obviously here also the tags that are common to all the choosen files;
Choosing a single file
Above what you see when you select a single file; you get also the preview of the file that is not available when you choose All selected files
from the menu.
#Migration notes Bakcup your data!
Backup your data, the data base and the whole filesystem.
Backup your data and store the backup on a different location than your master server! Do you know Amazon Glacier? Well this may be a nice backup solution!
Proceed to following points AFTER you backed up your stuffs, really!
-- Take your time to backup now --
##From oclife 0.0.1 to 0.1.0 in OwnCloud 6 In this case the migration from the old app to the new should works fine; I detected no issues on the data base nor on the filesystem; just disable the old app, remove the old app from the "app" directory on the owncloud installation path and install the new version; once enabled the data base will be upgraded to the new structure.
##From oclife 0.0.1 to 0.1.0 and from OwnCloud 6 to OwnCloud 7 On the installation manual of OwnCloud 7 you can read: "Disable all external applications first then replace OC6 to OC7 then re-enable"; well following this procedure will not work with oclife because OwnCloud compells that the data base tables are already presents! I don't know if it's normal or not but here is the solution.
NOTE: to perform this you should know about database and filesystem... ;-)
-
Be sure the app is disabled and remove the
app/oclife/
directory; -
On the OwnCloud data base backup all the tables beginning with oc_oclife_* with your favorite utiliy; you can use
mysqldump
orphpmyadmin
; I don't provide more details because you have to know what you are doing. IMPORTANT NOTE: Don't backup the structure, just backup data!! If on the backup generated restore SQL script you find some instructions like "DROP TABLE" or "CREATE TABLE" just remove them because the new structure has to be generated; -
Store a copy of the generated scripts on a safe place: USB keys, dropbox, CD roms are ok;
-
Manually remove all the oc_oclife_* tables from the DB; use
mysql -u user -p
if you like orphpmyadmin
; -
On your filesystem, pointing at your OwnCloud data directory remove on
all users
the directory namedoclife
: Don't worry they just contains thumbnails; -
Start OwnCloud 7 and enable the new oclife app; after a while the app icon should appears on the main OwnCloud menu;
-
Close your browser and proceed to restore the backed up data from the point 2;
-
If everything worked you should find all your tags and tagged documents as you left.
This procedure worked for me. I don't know it's not possible a direct migration and OwnCloud complains about the data base table already present... maybe somebody will answer.
##From oclife 0.1.0 to 0.2.0 and from OwnCloud 6 or OwnCloud 7 or OwnCloud 8 I upgraded a test system (and I'll go to do the same on my production server) from OC6 to OC8 passing through OC7 (direct upgrade from OC6 to OC8 is not allowed) without any issue.
My recipe was:
- Some tags created with oclife 0.1.0 and tagged some documents;
- Back-up everything (files, configuration, data base);
- Completely erase ownCloud 6 directory and replaced with ownCloud 7; NOTE: Keep safe your documents folder; maybe in the ownCloud folder too? Be careful! NOTE: Keep the config.php file in a safe place, otherwise you won't be able to recovers your passwords and so on!!
- Put back the config.php file in the ownCloud 7 directory;
- On your browser recall the main page; it should start the update;
- Repeat from point 2 to point 5 replacing ownCloud 7 with ownCloud 8;
- Download from github.com the last version of oclife and unzip it on ownCloud's apps directory; be sure to adjust directory name (must be oclife) and permissions!
- As ownCloud administrator enable oclife; an update should start in seconds.
- Done.
Note: The ownCloud update wizard doesn't worked for me and messed up everything, so please stay clear from witches and wizards... ;-)
##Final notes about the backup I was so hard on the backup because last month I lost all my data bases; since last year I shut down definitively my in house server and I rented a virtual server from a German company; one day I received an email where they stated that "They will proceed for special maintenance in the next 24 hours to the machines involving my services".
After this terms my server was no longer reachable!!
I opened a VNC session to watch the issue and I discovered that the system volumes appeared corrupted; asking for info they stated that "the maintenance could have left the virtual disks of the virtual servers (with my REAL data) in a REAL inconsistent state"! After this my only option was to rebuild the corrupted volumes with the recovery utilities; I recovered 95% of my data, not the data base unfortunately: data base contained all the data to generate the websites pages, last but not least my personal wikis and my balances (about seven years of data)!!
My BIG fault was to consider the virtual server on a server farm with temperature, humidity, power and access controlled, SAFE; the reality is that a machine wherever it is, virtual or real, is never safe, and a regular backup is always a must.
#Future developments Again, this is just the first release of the app and features can be added or improved.
##Localizations Actually following translations are available:
- Italian;
- French;
- German (thanks to Roland Wegmann);
- Spanish (thanks to Ivan Hoffmann);
- Finnish (thanks to Tomas Nybondas).
Please feel free to send me your translations / improvements!
##Multiple languages tags I'm a Swiss resident; in Switzerland we currently use four languages plus English; the localization not only of the application but also of the data is a must. The infrastructure to add a single tag with multiple language is present; it need to be handled by the logic.
##Direct access to a file
On the main tag window, clicking on a thumbnail, a popup with a preview of the file appears. The recall of the File
app standard functionality (like download or show PDF for PDF file) should be nice; unfortunately I can't understand how I can integrate this feature in the ownCloud infrastructure. HELP WANTED!!! :-)
##Sharing by tags Allows the user to share a link with a token indicating a slideshow or an album with files with such tags. To be evaluated.
##Multiple hierarchy
Tags with multiple parents; consider the files related to Blaise Pascal
that can be a child of Scientists
and of French personalities
; both are corrects and on large archives can be a great added value.
##Use of embedded search engine Use the embedded search engine to search tags and presents results.
##Known issues ###Encrypted files Not all functionality works with encrypted files, i.e. image rotations, EXIF data readings and so on. We suggest to keep the data unencrypted.
###Rename a file After renaming a file the work in progress is shown forever; my suspect is trouble in the ownCloud infrastructures to handle the file rename hook.
###Limitations under Debian 7 "weezy" I just discovered some throubles handling RAW images on installations under Debian 7; the thumbnails don't renders at all and appears completely black, despite the RAW file is correctly read and interpreted. I tried some workaround without any success. Under Ubuntu 13.10 and derivates this problem don't appears. This may be caused by interfacing between ufraw-batch and php5-imagick: I think this because interpreting the same RAW directly without passing with ImageMagick and PHP works fine. Under Debian 7 I recompiled ImageMagick from the sources of latest release and it worked fine.
#Special thanks to This app has been written in my spare time and on a train between Bellinzona and Mezzovico, on the path between my house and the company where I work. My first thank is for my wife - Thank you very much for her patience! It's not an easy task to live with a software engineer.
Special thanks to the people that wrote ownCloud: The code is clear, well commented and easy to understand; try to read the MediaWiki code and you'll understand me! ;-)
Last but not least thanks to ragulka, the author of bootstrap-tokenfield
; his help was precious while debugging!