plugin:snap
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
plugin:snap [2010-03-03 11:37] – 145.242.11.3 | plugin:snap [2010-03-03 20:06] – 74.93.99.97 | ||
---|---|---|---|
Line 13: | Line 13: | ||
tags : media, images, links | tags : media, images, links | ||
- | ^downloadurl: | + | downloadurl: |
bugtracker : | bugtracker : | ||
sourcerepo : | sourcerepo : | ||
Line 33: | Line 33: | ||
* This may not be possible if your DokuWiki is hosted... | * This may not be possible if your DokuWiki is hosted... | ||
- | * Softwares | + | * Software |
* '' | * '' | ||
* See http:// | * See http:// | ||
Line 62: | Line 62: | ||
* Why is it so complicated? | * Why is it so complicated? | ||
- | * Because when you try to call '' | + | * Because when you try to call '' |
- | * After the snapshot, the snap image is available as a '' | + | * After the snapshot, the snap image is available as a '' |
- | * The name of this file keeps track of the url that was "snaped" and the snap size (ex: '' | + | * The name of this file keeps track of the URL that was "snapped" and the snap size (ex: '' |
* A snap cache mechanism is used to avoid generating a snapshot over and over. If the snap is found on the drive, having the same dimensions and not too old (regarding '' | * A snap cache mechanism is used to avoid generating a snapshot over and over. If the snap is found on the drive, having the same dimensions and not too old (regarding '' | ||
Line 71: | Line 71: | ||
===== Important ===== | ===== Important ===== | ||
* Be aware that people can read snap of pages they may not have right to access (this is due to snap caching). However, the snap is normally small enough to prevent a comfortable reading ;-) | * Be aware that people can read snap of pages they may not have right to access (this is due to snap caching). However, the snap is normally small enough to prevent a comfortable reading ;-) | ||
- | * If your DokuWiki is not open for reading to everyone (use of authentication), | + | * If your DokuWiki is not open for reading to everyone (use of authentication), |
- | * It is recommended to use [[: | + | * It is recommended to use [[: |
* By now, the snap server and the DokuWiki server have to be on the same computer. | * By now, the snap server and the DokuWiki server have to be on the same computer. | ||
* A next version will try to make it possible to have separate computers. | * A next version will try to make it possible to have separate computers. | ||
Line 79: | Line 79: | ||
===== Installation ===== | ===== Installation ===== | ||
- | * Given examples are valid for a linux Debian v4.0 distribution. | + | * Given examples are valid for a Linux Debian v4.0 distribution. |
==== html2image ==== | ==== html2image ==== | ||
Line 156: | Line 156: | ||
* The getSnap() function is used to do the snapshot of a site. | * The getSnap() function is used to do the snapshot of a site. | ||
* Parameters: | * Parameters: | ||
- | * Url to snap or DokuWiki page ID (required) | + | * URL to snap or DokuWiki page ID (required) |
* Snap width (optional) | * Snap width (optional) | ||
* Snap height (optional) | * Snap height (optional) | ||
Line 164: | Line 164: | ||
* Returns an array with: | * Returns an array with: | ||
* The path and name of the snapshot. | * The path and name of the snapshot. | ||
- | * The page title (if a DokuWiki page id was submited). | + | * The page title (if a DokuWiki page id was submitted). |
- | * The target frame for the link to the "snaped" site. | + | * The target frame for the link to the "snapped" site. |
* All the snap object properties are also available (see below). | * All the snap object properties are also available (see below). | ||
Line 198: | Line 198: | ||
[snapPorts] => 8888 8889 8890 8891 8892 //Snap server port(s). | [snapPorts] => 8888 8889 8890 8891 8892 //Snap server port(s). | ||
[snapTimeout] => 5 //Max duration for a snap (seconds). | [snapTimeout] => 5 //Max duration for a snap (seconds). | ||
- | [tryTimeout] => 3 //Max retries to connect snap serveur. | + | [tryTimeout] => 3 //Max retries to connect snap server. |
[checkCache] => 1 //Use snap cache (true/ | [checkCache] => 1 //Use snap cache (true/ | ||
[width] => 200 // | [width] => 200 // | ||
Line 220: | Line 220: | ||
Output image :/ | Output image :/ | ||
content size: | content size: | ||
- | Convert | + | Convert |
Resize 200 | Resize 200 | ||
Crop 200x150+0+0 | Crop 200x150+0+0 | ||
Line 228: | Line 228: | ||
//Can be greater than the snap duration itself if more than one retry was done to connect the snap server. | //Can be greater than the snap duration itself if more than one retry was done to connect the snap server. | ||
[tries] => 1 // | [tries] => 1 // | ||
- | [url] => http:// | + | [url] => http:// |
//Inherited properties ------------------------------------------------------------------------------------------ | //Inherited properties ------------------------------------------------------------------------------------------ |
plugin/snap.txt · Last modified: 2017-11-25 21:09 by Aleksandr