|you can also get quickly loading kittens!|
Well, you can have it, if you're willing to put in a little work!
Let me show how it works.
What we wantSay, you just added 3000 holiday pictures to ownCloud. When you load the folder with the images in the web UI, it is very slow as all thumbnails have to be generated and provided to your browser! What if ownCloud could simply generate all of them during, say, tonight?
Awesome ownCloud developer Oparoz has developed code which gives the
occcommand the ability to run through your ownCloud, either in its entirety or per user account, and generate all thumbnails. But this code hasn't been merged: Oparoz wants to create code tests first before he merges this, to ensure the quality of the code base. Sadly, he hasn't had time to create tests and nobody else has stepped in yet...
How we get itHow to get this code? Github has this cool trick where you can add
.patchbehind a pull request URL, like this:
Patch your ownCloud with it! This is how:
- log in to your server
- navigate to the Gallery app folder
- grab the patch:
- test patching:
patch -p1 --dry-run < 387.patch
- If you get only a
checking [filename]you're all good!
- If you have errors check if you are on the right ownCloud release (the patch might be for the latest master and not work on the release you have) and see if you are in the right sub folder.
- Now run
patch -p1 < 387.patch
- Go and enjoy your feature...
- If you want to undo the change run:
patch -p1 -R < 387.patch
- be careful running random code from github in your ownCloud, just like experimental apps - this is untested by definition.
- Also, if you go and add all kinds of patches which end up burning down your house and killing your kittens you have only yourself to blame. I gave you a knife, YOU decided to stick it in your eye.
- Last but not least, if it works (or doesn't) report back, this is called 'testing' and very valuable to us!!! It will help get the code merged sooner.
- Idea to blog about it came from the ownCloud meetup tonight ;-)