Maybe I'm comming on to strong with unacceptable. I think it is  a lot
of work to support javascript. There are so many libraries each with good and bad. Which would you choose (jquary, yul, google). And you create a dependency.

And what really is a lot of work to maintain the html pages in c-src.
 adding javascript complicates that even more. One src file can contain
C-preprocessor, C language, HTML, TH1 and javascript

Backward compatability (not breaking any code) is high on the list.
I could see that going wrong with javascript.


I do think that namming your classes unique is a sensible thing. I have been mucking around with documentation and have generated documentation with docbook and lyx. for an docbook example see http://chiselapp.com/user/renez/repository/cvs2scm/doc/tip/doc/wiki/index.wiki

You stand a risk that docbook generated class names confilct with fossil classnames. So generating a name space by prefixing classnames with fsl_ or fossil_ seems prudent.

I also think that generating good class names for every output type
e.g. fsl_wiki fsl_wikiedit fsl_artifact fsl_artifact_content fsl_artifact_type,
 is a good thing.


I have been mucking around and came up with the attached prove of concept.

Rene

On Tue, 3 May 2011 10:22:15 -0400, Tomek Kott wrote:
Rene,

Thanks, I think I might take a look at your last suggestion. Not
because I like doing things the hard way (far from it) but then I
don't have to manage my own Fossil code --- I don't like doing that!

I guess I was also just curious why the line number facility is half
included (i.e., it will highlight if placed in the url, but no
facility exists to put append the correct url parameters).

off course this would require fossil to have a javascript function
highlightline which is unacceptable

I'm new here, so forgive my ignorance: is this a decision to not
include any javascript period? I understand the decision (HTML + CSS
is simple, works on all browsers), but just wanted a clarification.

If HTML + CSS is ok, would there be much opposition if I were to
(eventually) go through and add some classes to every html output I
could find? What I'm shooting towards is something like WordPress,
which puts a class for every imaginable parameter in the source code.
For example, these are the classes for one of my blog posts:

"hentry post publish post-1 odd author-tkott category-tutorials
post_tag-bugs post_tag-dvcs post_tag-fossil-2 post_tag-fossil-scm
post_tag-git post_tag-svn post_tag-tickets post_tag-wiki"

Not that there would be that many classes for a fossil archive, but
especially for the html we can't change (i.e., not the main menu) it
would be nice to have more descriptors (say timeline, tickets, etc.).

Anyways, sounds like nobody's done this, so I'll poke around. If I
come up with a solution which changes fossil code to say, display a
table, with a row having a column for the line number, and a column
for the line of code, what is the best way of submitting the changes?

Thanks,

Tomek

On Tue, May 3, 2011 at 4:31 AM, Rene  wrote:

 On Mon, 2 May 2011 13:42:46 -0400, Tomek Kott wrote:
> Hi folks,
>
> It seems that there is a capability to put in line numbers in
file
> view (using "&ln" as part of the query string), and have them be
> highlighted if specified in the url params ("&ln=10") or even a
range
> (&ln=10-11). (see src/info.c [1])
>
> Additionally, there [2] are [3] various [4] libraries [5] that
can
> highlight code, and there is even a helpful tutorial  [6]on the

fossil
> wiki to get those working. Great!
>
> I want to put those two together so that if you click on the
line
> number, you automatically highlight that line, either using the
> imported library or fossil. Has anyone attempted or succeeded at
> this?
>
> Tomek
>
>
> Links:
> ------
> [1]
>
>


http://fossil-scm.org/index.html/artifact?name=acda9c4b5b73eecddd8b14607f9d0a58d3793c68
[1]
> [2] http://code.google.com/p/google-code-prettify/ [2]
> [3] http://softwaremaniacs.org/soft/highlight/en/ [3]
> [4] http://balupton.com/sandbox/jquery-syntaxhighlighter/demo/
[4]
> [5] http://alexgorbatchev.com/SyntaxHighlighter/ [5]
> [6]
>
>


http://www.fossil-scm.org/fossil/info/bde8ce985d52d3d76efafa37d8670a32fe16f79c#source-hilight
[6]
 most simple is to adjust src/info.c to generate
 
     1  /*
     2 ** This C
 program exists to do the job that AWK would do for the unix

 

 Ttitle would help you to identify the file (but could be
inferred by
 get the contents of win/version.c)
 Alt would hint a the type of file (but could be inferred by get
the
 contents of win/version.c)
 class fossilcat to do CSS styling

 off course this would require fossil to have a javascript
function
 highlightline which is unacceptable

 but if this was changed to
                    1  /*
 you could do some dom magic and add the function to every
span.line
 element when the page loads.

 if on page artiface then
 for every span in blockquote.pre.span do
   span.onclick=highlight(this)

 However you could go the hard way :-)
 if page is artifact
  var el = document.getElementsByTagName('pre')
  s = el.innerHTML
  n = ''
  for every line in s do
    n += ''+line+''

  el.innerHTML = n
--
 Rene

_______________________________________________
fossil-users mailing list
[email protected] [7]



http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
[8]



Links:
------
[1]

http://fossil-scm.org/index.html/artifact?name=acda9c4b5b73eecddd8b14607f9d0a58d3793c68
[2] http://code.google.com/p/google-code-prettify/
[3] http://softwaremaniacs.org/soft/highlight/en/
[4] http://balupton.com/sandbox/jquery-syntaxhighlighter/demo/
[5] http://alexgorbatchev.com/SyntaxHighlighter/
[6]

http://www.fossil-scm.org/fossil/info/bde8ce985d52d3d76efafa37d8670a32fe16f79c#source-hilight
[7] mailto:[email protected]
[8] http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
[9] mailto:[email protected]
rene de zwart
is gek
op blonde biertjes
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to