Review Request 125797: protocoltojson application

Christoph Cullmann cullmann at kde.org
Mon Oct 26 11:12:32 UTC 2015



> On Oct. 25, 2015, 9:32 p.m., Christoph Cullmann wrote:
> > I think one needs to add a outer scope with some "KIO-Protocol-Info" or so key to be able to check if we have valid data inside a lib.
> > But I am not sure how to name that.
> 
> Alex Merry wrote:
>     How about "KDE-KIO-Protocols"? I think having a KDE prefix in keys for KDE software is good practice.
>     
>     I'd have thought the "exec" key is unnecessary if you're embedding it into the exec.
>     
>     I have to say that the "Class", "Icon" and "X-DocPath" entries look a little out of place; I don't know if we'd maybe want to take the opportunity to adjust those (to "class", "icon" and "docpath", I guess).
> 
> Christoph Cullmann wrote:
>     > How about "KDE-KIO-Protocols"? I think having a KDE prefix in keys for KDE software is good practice.
>     Sound good too me.
>     
>     > I'd have thought the "exec" key is unnecessary if you're embedding it into the exec.
>     > I have to say that the "Class", "Icon" and "X-DocPath" entries look a little out of place; I don't know if we'd maybe want to take the opportunity to adjust those (to "class", "icon" and "docpath", I guess).
>     Actually I would like to keep all keys "as is" to have some easy 1:1 mapping to the .protocol files that still will be kept like they are.
>     Thought I can add that renaming, if wanted by David, too.
>     
>     Btw., if this approach would be OK, would you help me to create a cmake macro for that in kio like the one for desktoptojson?
>     My CMake Foo is very limited (beside copy'n'paste and adjust) ;=)
> 
> Alex Merry wrote:
>     I can definitely see the advantage of keeping the keys the same, it just struck me that if we *do* want to change the keys, this is the perfect opportunity.
>     
>     Sure, I can help with the CMake stuff.

I was confused by the names during typing in the copy list, too ;)
Let's see what David thinks about the helper, if he is OK, I will come back to that help offer.


- Christoph


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125797/#review87382
-----------------------------------------------------------


On Oct. 25, 2015, 9:20 p.m., Christoph Cullmann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125797/
> -----------------------------------------------------------
> 
> (Updated Oct. 25, 2015, 9:20 p.m.)
> 
> 
> Review request for KDE Frameworks and David Faure.
> 
> 
> Repository: kio
> 
> 
> Description
> -------
> 
> Application to convert multiple .protocol files into on json map.
> If this is acceptable my next steps would be:
> 
> 1) use this, to generate json files and embedded them in io slaves
> 2) extend the protocol factory to search in the embedded files
> 
> That would make the protocol factory parts of: https://git.reviewboard.kde.org/r/125778/ not needed.
> 
> 
> Diffs
> -----
> 
>   src/CMakeLists.txt f65ad8e 
>   src/protocoltojson/CMakeLists.txt PRE-CREATION 
>   src/protocoltojson/main.cpp PRE-CREATION 
> 
> Diff: https://git.reviewboard.kde.org/r/125797/diff/
> 
> 
> Testing
> -------
> 
> Feed in http slave files: 
> 
> ./protocoltojson -o http.json /local/cullmann/kf5/src/frameworks/kio/src/ioslaves/http/*.protocol
> 
> We get mapping:
> 
> {
>     "http": {
>         "Class": ":internet",
>         "Icon": "text-html",
>         "X-DocPath": "kioslave5/http/index.html",
>         "defaultMimetype": "application/octet-stream",
>         "deleting": true,
>         "determineMimetypeFromExtension": false,
>         "exec": "kf5/kio/http",
>         "input": "none",
>         "maxInstances": 20,
>         "maxInstancesPerHost": 5,
>         "output": "filesystem",
>         "protocol": "http",
>         "reading": true,
>         "writing": true
>     },
>     "https": {
>         "Class": ":internet",
>         "Icon": "text-html",
>         "X-DocPath": "kioslave5/http/index.html",
>         "config": "http",
>         "defaultMimetype": "application/octet-stream",
>         "deleting": true,
>         "determineMimetypeFromExtension": false,
>         "exec": "kf5/kio/http",
>         "input": "none",
>         "maxInstances": 20,
>         "maxInstancesPerHost": 5,
>         "output": "filesystem",
>         "protocol": "https",
>         "reading": true,
>         "writing": true
>     },
>     "webdav": {
>         "Class": ":internet",
>         "Icon": "folder-remote",
>         "X-DocPath": "kioslave5/webdav/index.html",
>         "defaultMimetype": "application/octet-stream",
>         "deleteRecursive": true,
>         "deleting": true,
>         "determineMimetypeFromExtension": false,
>         "exec": "kf5/kio/http",
>         "input": "none",
>         "listing": [
>             "Name",
>             "Type",
>             "Size",
>             "Date",
>             "AccessDate",
>             "Access"
>         ],
>         "makedir": true,
>         "maxInstances": 20,
>         "maxInstancesPerHost": 5,
>         "moving": true,
>         "output": "filesystem",
>         "protocol": "webdav",
>         "reading": true,
>         "writing": true
>     },
>     "webdavs": {
>         "Class": ":internet",
>         "Icon": "folder-remote",
>         "X-DocPath": "kioslave5/webdav/index.html",
>         "config": "webdav",
>         "defaultMimetype": "application/octet-stream",
>         "deleteRecursive": true,
>         "deleting": true,
>         "determineMimetypeFromExtension": false,
>         "exec": "kf5/kio/http",
>         "input": "none",
>         "listing": [
>             "Name",
>             "Type",
>             "Size",
>             "Date",
>             "AccessDate",
>             "Access"
>         ],
>         "makedir": true,
>         "maxInstances": 20,
>         "maxInstancesPerHost": 5,
>         "moving": true,
>         "output": "filesystem",
>         "protocol": "webdavs",
>         "reading": true,
>         "writing": true
>     }
> }
> 
> 
> Thanks,
> 
> Christoph Cullmann
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20151026/3a67bd9b/attachment.html>


More information about the Kde-frameworks-devel mailing list