you can also get quickly loading kittens! |
Well, if the code has been developed but not yet released, you can have it. If you're willing to put in a little work and take a bit of risk!
Let me show how it works.
What we want
Say, 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 Oparoz has developed code which gives the
occ
command 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...(edit: some years later, this has become the super cool Preview Generator app you can just install from here.)
How we get it
How to get this code? Github has this cool trick where you can add.patch
behind a pull request URL, like this: https://github.com/owncloud/gallery/pull/387.patch
.Patch your ownCloud with it! This is how:
- log in to your server
- navigate to the Gallery app folder
- grab the patch:
wget https://github.com/owncloud/gallery/pull/387.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
NOTES:
- of course - everything's Nextcloud now - where most the development on former ownCloud code base is happening.
- be careful running random code from github in your Nextcloud, 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 evening before publishing - we still do monthly meetups in Berlin and other cities for Nextcloud ;-)
No comments:
Post a Comment
Say something smart and be polite please!