[naviserver-devel] ns_return* documentation and ns_register_* "default" method
I have noticed that some of the documentation files are being updated. By accident, I noticed that the ns_returnerror documentation is out of date, e.g., listing "ns_returnmoved" which is not available as a Tcl command: https://bitbucket.org/naviserver/naviserver/src/fbfcaea8808cc79534e81f61cdd50a1d9714/doc/src/naviserver/ns_returnerror.man?at=default#cl-46 I haven't checked the others ... (leaving aside that documenting a command "ns_returnok" under "ns_returnerror" is not necessarily obvious). I'd also appreciate a heads-up on a previous thread: http://www.mail-archive.com/naviserver-devel@lists.sourceforge.net/msg01811.html Was the idea of a "default" method ("*" or the like) for the ns_register_* cmd family ever implemented? (I briefly skimmed over the code base, I could not find a hint) thx //stefan -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct ___ naviserver-devel mailing list naviserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/naviserver-devel
Re: [naviserver-devel] ns_return* documentation and ns_register_* "default" method
On 31.10.12 13:54, Stefan Sobernig wrote: > I have noticed that some of the documentation files are being updated. > By accident, I noticed that the ns_returnerror documentation is out of > date, e.g., listing "ns_returnmoved" which is not available as a Tcl > command: i've added ns_returnmoved > > I haven't checked the others ... (leaving aside that documenting a > command "ns_returnok" under "ns_returnerror" is not necessarily obvious). the table of contents lists the sections, not commands. For most commands, there is one section per command, so it looks like a command reference. One might have noticed as well, that the sections are sorted by their titles, which is as well somewhat wierd. The documentation is built with dtplite, which is in turn built on top of tcl's doctools. The latter seem to support command references, but not via dtplite. One can use cross reverences ("see_also") and index entries ("keywords"). One could add all commands as index entries, but this has the bad effect, that if one clicks on the command in the synopsis, the browser does not jump to the command definition in the documentation page, but to the index. The current markup is not consistent, what to put into keywords or see_also, it requires more work. i think, that adding a command reference would be a nice addition, and is most likely possible with reasonable amount of work. The other alternative would be to split up the documentation pages with multiple commands into single pages... any input/help is welcome -gustaf neumann -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct ___ naviserver-devel mailing list naviserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/naviserver-devel
Re: [naviserver-devel] ns_return* documentation and ns_register_* "default" method
On Wed, Oct 31, 2012 at 12:54 PM, Stefan Sobernig wrote: > > I'd also appreciate a heads-up on a previous thread: > > http://www.mail-archive.com/naviserver-devel@lists.sourceforge.net/msg01811.html > > Was the idea of a "default" method ("*" or the like) for the > ns_register_* cmd family ever implemented? No. Looks like some surgery to nsd/urlspace.c might be required to alter the current order of lookup from: method, path, path for the url GET /foo/bar to: path, path, method, so that if the path matches and the method does not, a default method handler can be returned. -- LogMeIn Central: Instant, anywhere, Remote PC access and management. Stay in control, update software, and manage PCs from one command center Diagnose problems and improve visibility into emerging IT issues Automate, monitor and manage. Do more in less time with Central http://p.sf.net/sfu/logmein12331_d2d ___ naviserver-devel mailing list naviserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/naviserver-devel
Re: [naviserver-devel] ns_return* documentation and ns_register_* "default" method
On Thu, Nov 1, 2012 at 12:13 PM, Gustaf Neumann wrote: > > i think, that adding a command reference would be a nice > addition, and is most likely possible with reasonable amount > of work. The other alternative would be to split up the > documentation pages with multiple commands into single pages... The idea was to head in the other direction: consolidate similar commands into one page. For example for the ns_return page there's a couple of paragraphs of explanation at the top that applies to all the commands, and by collecting them together it's easy to see how they're similar and how they differ. (maybe the 3 redirect commands should be split into their own page?) On the other hand, some times you just want a big list of all commands... Hopefully dtplite can be coaxed into generating it. -- LogMeIn Central: Instant, anywhere, Remote PC access and management. Stay in control, update software, and manage PCs from one command center Diagnose problems and improve visibility into emerging IT issues Automate, monitor and manage. Do more in less time with Central http://p.sf.net/sfu/logmein12331_d2d ___ naviserver-devel mailing list naviserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/naviserver-devel
Re: [naviserver-devel] ns_return* documentation and ns_register_* "default" method
On 02.11.12 12:43, Stephen Deasey wrote: > On Thu, Nov 1, 2012 at 12:13 PM, Gustaf Neumann wrote: >> i think, that adding a command reference would be a nice >> addition, and is most likely possible with reasonable amount >> of work. The other alternative would be to split up the >> documentation pages with multiple commands into single pages... > The idea was to head in the other direction: consolidate similar > commands into one page. i fully agree that a contextual display of related commands is better. > For example for the ns_return page there's a couple of paragraphs of > explanation at the top that applies to all the commands, and by > collecting them together it's easy to see how they're similar and how > they differ. (maybe the 3 redirect commands should be split into their > own page?) > > On the other hand, some times you just want a big list of all > commands... Hopefully dtplite can be coaxed into generating it. dtplite is a tcl script that packages common behavior of the tcl doctool packages. One can certainly try to extend dtplte or we can roll our own doc generator using these packages, but this requires some deeper diving into the doctool universe. In recent tcllibraries there are besides the doctool oacages the doctools v2 package, which does not make the best path more obvious, since dtplite does not use v2 (to my shallow understanding). -gustaf neumann -- LogMeIn Central: Instant, anywhere, Remote PC access and management. Stay in control, update software, and manage PCs from one command center Diagnose problems and improve visibility into emerging IT issues Automate, monitor and manage. Do more in less time with Central http://p.sf.net/sfu/logmein12331_d2d ___ naviserver-devel mailing list naviserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/naviserver-devel