Auto pretty printing from Apache

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Auto pretty printing from Apache

Mahlon E. Smith

... part deux.

I've refactored a bunch of the Apache::OTL parser to produce XHTML
compliant source, and break away from the apache 1.3 environment.  The
handler now supports the Apache 2.x / mod_perl2, and with its default
'ul/li' output, should be much easier (and predictable) to customize
with css/javascript.

A live sample can be found here:

    http://www.martini.nu/sample.otl

Enjoy!

--
Mahlon E. Smith  
http://www.martini.nu/contact.html

_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner

attachment0 (161 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Auto pretty printing from Apache

Noel Henson
Now that's cool!

Noel

On Tuesday 06 February 2007 00:07, Mahlon E. Smith wrote:

> ... part deux.
>
> I've refactored a bunch of the Apache::OTL parser to produce XHTML
> compliant source, and break away from the apache 1.3 environment.  The
> handler now supports the Apache 2.x / mod_perl2, and with its default
> 'ul/li' output, should be much easier (and predictable) to customize
> with css/javascript.
>
> A live sample can be found here:
>
>     http://www.martini.nu/sample.otl
>
> Enjoy!
>
> --
> Mahlon E. Smith
> http://www.martini.nu/contact.html

--

------------------------------------------------------------------
  Noel Henson
  www.noels-lab.com Chips, firmware and embedded systems
  www.vimoutliner.org Work fast. Think well.

_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Auto pretty printing from Apache

Mahlon E. Smith
In reply to this post by Mahlon E. Smith
 
I knew I forgot something.  How about a download link?  :)

http://www.martini.nu/misc/otl_handler.tgz

--
Mahlon E. Smith  
http://www.martini.nu/contact.html



On Tue, Feb 06, 2007, Mahlon E. Smith wrote:

>
> ... part deux.
>
> I've refactored a bunch of the Apache::OTL parser to produce XHTML
> compliant source, and break away from the apache 1.3 environment.  The
> handler now supports the Apache 2.x / mod_perl2, and with its default
> 'ul/li' output, should be much easier (and predictable) to customize
> with css/javascript.
>
> A live sample can be found here:
>
>     http://www.martini.nu/sample.otl
>
> Enjoy!
>
> --
> Mahlon E. Smith  
> http://www.martini.nu/contact.html


> _______________________________________________
> VimOutliner mailing list
> [hidden email]
> http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner


_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner

attachment0 (161 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Auto pretty printing from Apache

Steve Litt
In reply to this post by Mahlon E. Smith
On Tuesday 06 February 2007 03:07, Mahlon E. Smith wrote:

> ... part deux.
>
> I've refactored a bunch of the Apache::OTL parser to produce XHTML
> compliant source, and break away from the apache 1.3 environment.  The
> handler now supports the Apache 2.x / mod_perl2, and with its default
> 'ul/li' output, should be much easier (and predictable) to customize
> with css/javascript.
>
> A live sample can be found here:
>
>     http://www.martini.nu/sample.otl
>
> Enjoy!
>
> --
> Mahlon E. Smith
> http://www.martini.nu/contact.html

Mahlon,

       *     *
        \ o /
         \|/              O U T -
          |           S T A N D I N G
         / \  _  
        /   \/
       /
      -

I'm going to spread the word about *this*.

By the way, for some reason this page doesn't work with my Konqueror 3.5.4.
But it works perfectly with my Firefox.

SteveT


--
Steve Litt
Author: Universal Troubleshooting Process books and courseware
http://www.troubleshooters.com/

(Legal Disclaimer) Follow these suggestions at your own risk.
_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Auto pretty printing from Apache

David J Patrick
In reply to this post by Mahlon E. Smith
On 06/02/07, Mahlon E. Smith <[hidden email]> wrote:
>
> ... part deux.
>
> I've refactored a bunch of the Apache::OTL parser to produce XHTML
> compliant source, and break away from the apache 1.3 environment.  The
> handler now supports the Apache 2.x / mod_perl2, and with its default
> 'ul/li' output, should be much easier (and predictable) to customize
> with css/javascript.

SWEET !
will this come as default behaviour, in future builds ?
I just LOVE it !
djp

--
[hidden email]
www.linuxcaffe.ca
geek chic and caffe cachet
326 Harbord Street,
Toronto, M6G 3A5,
(416) 534-2116
_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Auto pretty printing from Apache

Rado1
In reply to this post by Mahlon E. Smith
Great!!!

I waited for such tool a long time.

What about small suggestion?
To add somewhere on top the small buttons to provide expansion to
folding levels 1,2,3,4,...
Or at least "expand all", "collapse all".

Thanks...
--
Radovan Turan
rado (at) rado1.cz

On Tue, Feb 06, 2007 at 12:07:59AM -0800, Mahlon E. Smith wrote:
#>
#> ... part deux.
#>
#> I've refactored a bunch of the Apache::OTL parser to produce XHTML
#> compliant source, and break away from the apache 1.3 environment.  The
#> handler now supports the Apache 2.x / mod_perl2, and with its default
#> 'ul/li' output, should be much easier (and predictable) to customize
#> with css/javascript.
#>
#> A live sample can be found here:
#>
#>     http://www.martini.nu/sample.otl
#>
#> Enjoy!
#>
#> --
#> Mahlon E. Smith  
#> http://www.martini.nu/contact.html



#> _______________________________________________
#> VimOutliner mailing list
#> [hidden email]
#> http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner

_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Auto pretty printing from Apache

Peter Princz
In reply to this post by Mahlon E. Smith
Hello Mahlon,

On 06/02/07, Mahlon E. Smith <[hidden email]> wrote:

>
> I knew I forgot something.  How about a download link?  :)
>
> http://www.martini.nu/misc/otl_handler.tgz
>
> --
> Mahlon E. Smith
> http://www.martini.nu/contact.html
>
>
>
> On Tue, Feb 06, 2007, Mahlon E. Smith wrote:
> >
> > ... part deux.
> >
> > I've refactored a bunch of the Apache::OTL parser to produce XHTML
> > compliant source, and break away from the apache 1.3 environment.  The
> > handler now supports the Apache 2.x / mod_perl2, and with its default
> > 'ul/li' output, should be much easier (and predictable) to customize
> > with css/javascript.
> >
> > A live sample can be found here:
> >
> >     http://www.martini.nu/sample.otl
> >
> > Enjoy!
> >
> > --
> > Mahlon E. Smith
> > http://www.martini.nu/contact.html
>
>
>

the parser is wonderful, but I have a usability problem, please give a hint.

I use vimoutliner daily, run projects in parallel, and have to report
to various managers weekly.
I was advised to use ms project, however it turned out the target
audience does not have it on their computers (yes, the managers :o),
so I'm printing my reports into pdf weekly and send them out as email
attachments. This is a pain for everyone: I'm much less productive in
ms project than in vimoutliner, they get human-unreadable format even
in pdf. (No project server, no publish/subscribe for progress reports,
only a solitaire ms project on my PC and email clients at the
managers.)

As an employee I also must obey to some corporate standards, i.e. use
windows xp and do not maintain internal web server. OK, I can
workaround this by compiling Apache and otl_handler under win32.
(Easier said than done, I'm still struggling with libapreq2 to get it
work under win32.) And then to use this Apache for a parser only, and
send out the generated html files as email attachments.

And here the problem begins: as with most pages containing css and js,
saving even your live sample results not only in a plain html, but
with a populated "_files" directory as well with the css and the two
js files, one of them containing only comments. This is normal, I just
want to point out this tiny detail almost disqualifies the otherwise
elegant and brilliant solution for my purposes: I have to zip the
thing into one file, and hope the mgr at the other end will be able to
unzip it. This is sometimes a too high expectation. I really cannot
decide between otl2html and otl_handler: the former produces one file
and is easy to distribute, the latter responds to expand/collapse thus
easier to navigate.

What do you think? Can this all css/js thing be folded into the html
file? That would be great and decisive.
Sorry if the question is obvious, I'm not an html developer. I realise
this is not the intended use of your parser, I'm just asking if it
could be used as an off-line parser.

Have a nice day,
  Peter

---
hundred-and-one symptoms of being an internet addict:
219. Your spouse has his or her lawyer deliver the divorce papers...
     via e-mail.
_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner
Reply | Threaded
Open this post in threaded view
|

Re: Auto pretty printing from Apache

Mahlon E. Smith
On Thu, Feb 22, 2007, Peter Princz wrote:

> As an employee I also must obey to some corporate standards, i.e.
> use windows xp and do not maintain internal web server. OK, I can
> workaround this by compiling Apache and otl_handler under win32.
> (Easier said than done, I'm still struggling with libapreq2 to get it
> work under win32.) And then to use this Apache for a parser only, and
> send out the generated html files as email attachments.

Oh man!  This sounds like a lot of work for just a pretty-parser.

> [...]
> I really cannot decide between otl2html and otl_handler: the former
> produces one file and is easy to distribute, the latter responds to
> expand/collapse thus easier to navigate.
>
> What do you think? Can this all css/js thing be folded into the html
> file?

If expand/collapse is a requirement, you can of course edit the OTL.pm
file to include hard coded javascript and css in the <head> area of the
output - then leave out the style/js keys in the .otl file itself.

If expand/collapse is NOT a requirement, I'd just use otl2html - save
yourself some headache with the win32 environment! :)

-Mahlon

--
Mahlon E. Smith  
http://www.martini.nu/contact.html

_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner

attachment0 (161 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Auto pretty printing from Apache

Noel Henson
In reply to this post by Mahlon E. Smith
Mahlon,

Long time, no talk. I really do like what you have done with your apache
add-on. Can you spare some time to help me? I'm trying to modify otl2html
to include in-line javascript as well as the already-included in-line css.  
Can you assist in adding a + and - icon to each outline heading to show its
expanded/expandable state? In this case, it would be much like a file or
list browser. A '+' icon would indicate that an item can be expanded.  
A '-' icon would indicate that it is already expanded. A '-' icon or no
icon would represent that the heading is a leaf and not a branch.

My final goal is to be able to export VO files to single html documents
with embedded css, javascript and icons. This would make it trivial to send
interactive (fold/collapse) outlines via email to anyone. Another feature
I would like to see is a list or bar across the top that would:
All: expand all
1 : show only level-1 items
2 : show only level-1-through-2 items
3 : show only level-1-through-3 items
4 : show only level-1-through-4 items
5 : show only level-1-through-5 items
6 : show only level-1-through-6 items
7 : show only level-1-through-7 items
8 : show only level-1-through-8 items
9 : show only level-1-through-9 items
None: collapse all

Any help would be appreciated.

Thanks and I look forward to collaborating with you.

Noel
Primary Programmer for Vim Outliner

On Tuesday 06 February 2007, Mahlon E. Smith wrote:

> I knew I forgot something.  How about a download link?  :)
>
> http://www.martini.nu/misc/otl_handler.tgz
>
> --
> Mahlon E. Smith
> http://www.martini.nu/contact.html
>
> On Tue, Feb 06, 2007, Mahlon E. Smith wrote:
> > ... part deux.
> >
> > I've refactored a bunch of the Apache::OTL parser to produce XHTML
> > compliant source, and break away from the apache 1.3 environment.  The
> > handler now supports the Apache 2.x / mod_perl2, and with its default
> > 'ul/li' output, should be much easier (and predictable) to customize
> > with css/javascript.
> >
> > A live sample can be found here:
> >
> >     http://www.martini.nu/sample.otl
> >
> > Enjoy!
> >
> > --
> > Mahlon E. Smith
> > http://www.martini.nu/contact.html
> >
> >
> >
> > _______________________________________________
> > VimOutliner mailing list
> > [hidden email]
> > http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner



--

------------------------------------------------------------------
  Noel Henson
  www.noels-lab.com Chips, firmware and embedded systems
  www.vimoutliner.org Work fast. Think well.

_______________________________________________
VimOutliner mailing list
[hidden email]
http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner