Re: [fossil-users] Webpage for multiple fossil repositories - configuration options?

2017-06-06 Thread John Pateman
Yes, this was my usercase. Specifically I would like to configure the page 
generated by the `—repolist` option in `fossil server`. Whilst the `—files 
GLOBPATTERN` is helpful in so far as generating an alternative html page, I 
really wanted to be able to use a config option in `fossil server` to generate 
an HTML page which included the repolist (as well as some external 
files/images).

As a server option it does not need to be versionable or distributable - i.e. I 
am happy for it to reference a configuration file of .html, images etc in a 
configuration directory that sits alongside all the fossil repos.


JP


> On 6 Jun 2017, at 06:07, Ross Berteig  wrote:
> 
> 
> 
> On 6/5/2017 8:37 PM, Andreas Kupries wrote:
>> 
>> 
>> I am not sure that this would help him.
>> My reading of his request is that he wants to customize the page
>> generated by fossil itself [1].
> 
> That was my read too. The $64K question then is where such customization 
> would be stored. Skins are per repository, and this is running outside of all 
> repositories. There is the global settings location, of course, but that is 
> per user and you might (sensibly) be running that server as a daemon-like 
> user with no actual login, and possibly even no real home directory.
> 
> I suppose more command line options to fossil server is the easiest answer. 
> Extending the very vanilla HTML emitted to optionally name a style sheet if 
> named in a -CSS option, and to provide class documented and id attributes as 
> appropriate, would get you most of the way. Of course, the file named as the 
> style sheet must be automatically treated as named in the --files GLOBLIST so 
> it can be fetched or none of this works.
> 
> I'd suggest allowing a file full of TH1 code as the scripting escape to 
> provide hooks to compute additional details per repository listed, but I'm 
> not sure how safe that would be. Perhaps offering an option that names a 
> collection of well-known fields to include named with single letters would be 
> sufficient for most cases. Something like --details Lnd to also include the 
> Logo image, the project name, and the description. There are a bunch of 
> things in the /stat page that would sound tempting to include, but unless the 
> stats items are cached somewhere, that could have a huge cost at the server 
> for page fetch in a folder with a lot of repositories. Logo, name and 
> description are all easy, and likely have a fair bit of value. Project ID is 
> easy, but likely only interesting to us internals geeks. Age, number of 
> commits, number of open leaves, comment of latest commit, names of open 
> branches, owners first pet's name, are probably harder.
> 
> If the --details option is used, the page could be a table and use the same 
> sorting trick available to the ticket reports, which appears to work on any 
> number of table columns without any coding changes.
> 
> 
>> 
>> 
> 
> I like the idea in general. It could completely eliminate the need for cron 
> jobs to generate an index file, without a huge amount of configuration work.
> 
> --
> Ross Berteig   r...@cheshireeng.com
> Cheshire Engineering Corp.   http://www.CheshireEng.com/
> +1 626 303 1602
> 
> ___
> fossil-users mailing list
> fossil-users@lists.fossil-scm.org
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users



signature.asc
Description: Message signed with OpenPGP
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Webpage for multiple fossil repositories - configuration options?

2017-06-05 Thread Ross Berteig



On 6/5/2017 8:37 PM, Andreas Kupries wrote:



I am not sure that this would help him.
My reading of his request is that he wants to customize the page
generated by fossil itself [1].


That was my read too. The $64K question then is where such customization 
would be stored. Skins are per repository, and this is running outside 
of all repositories. There is the global settings location, of course, 
but that is per user and you might (sensibly) be running that server as 
a daemon-like user with no actual login, and possibly even no real home 
directory.


I suppose more command line options to fossil server is the easiest 
answer. Extending the very vanilla HTML emitted to optionally name a 
style sheet if named in a -CSS option, and to provide class documented 
and id attributes as appropriate, would get you most of the way. Of 
course, the file named as the style sheet must be automatically treated 
as named in the --files GLOBLIST so it can be fetched or none of this 
works.


I'd suggest allowing a file full of TH1 code as the scripting escape to 
provide hooks to compute additional details per repository listed, but 
I'm not sure how safe that would be. Perhaps offering an option that 
names a collection of well-known fields to include named with single 
letters would be sufficient for most cases. Something like --details Lnd 
to also include the Logo image, the project name, and the description. 
There are a bunch of things in the /stat page that would sound tempting 
to include, but unless the stats items are cached somewhere, that could 
have a huge cost at the server for page fetch in a folder with a lot of 
repositories. Logo, name and description are all easy, and likely have a 
fair bit of value. Project ID is easy, but likely only interesting to us 
internals geeks. Age, number of commits, number of open leaves, comment 
of latest commit, names of open branches, owners first pet's name, are 
probably harder.


If the --details option is used, the page could be a table and use the 
same sorting trick available to the ticket reports, which appears to 
work on any number of table columns without any coding changes.








I like the idea in general. It could completely eliminate the need for 
cron jobs to generate an index file, without a huge amount of 
configuration work.


--
Ross Berteig   r...@cheshireeng.com
Cheshire Engineering Corp.   http://www.CheshireEng.com/
+1 626 303 1602

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Webpage for multiple fossil repositories - configuration options?

2017-06-05 Thread Andreas Kupries
> On 6/5/17, John Pateman  wrote:
> > I have a number of repositories named (for example) x.fossil, y.fossil &
> > z.fossil, all stored in a single directory `/Users/Shared/FOSSIL/`.
> >
> > I can now serve a page listing all of these by running;
> >
> > `fossil server --repolist /Users/Shared/FOSSIL/ -port  &`
> >
> > Is it possible to customise the appearance of this  webpage without having
> > to set it up a full web server?
> 
> When you say "set up a full web server", I assume you mean
> Apache/Nginx/etc, right?
> 
> Did you know that the "fossil server" command itself is able to act as
> a reasonably complete webserver for static content?  Just use the
> --files GLOBLIST option to tell it want kinds of files you want to
> serve (ex: --files '*.html,*.gif') and put those files in the same
> directory as your Fossil repositories.

I am not sure that this would help him.

My reading of his request is that he wants to customize the page
generated by fossil itself [1].

It is very basic HTML [1] and my guess is that he wants something
which allows him to have that generated page include a custom CSS at
the least, and/or a system to include files which provide custom
header/footer segments (where CSS could come in from a header). In the
extreme something to run a script/command per found repository, for
example to extract a description and put that into the index beside
the repo link. And if we have that a natural extension would be a more
global script/command to perform custom sorting (on description, last
modified, creation date, size, etc).

The result would be a customizable index dynamically generated by
fossil (and the helper scripts).

With the static content you are advising he still has to update that
content by himself whenever a repository is added to or removed from
a repository directory.

~~~
[1] As an example, running it on my own local fossil directory I get



http://localhost:/; />
Repository List


Available Repositories:

atom.fossil
blob.fossil
[...]




   Usable, of basic. Integration with a surounding website requires
   some customization for style and links, etc.

-- 
See you,
Andreas Kupries 

Developer @ SUSE (MicroFocus Canada LLC)


Tcl'2017, Oct 16-20, Houston, TX, USA. http://www.tcl.tk/community/tcl2017/
EuroTcl 2017, Jul 8-9, Berlin/DE, http://www.eurotcl.tcl3d.org/
---




___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Webpage for multiple fossil repositories - configuration options?

2017-06-05 Thread Warren Young
On Jun 5, 2017, at 3:08 PM, John Pateman  wrote:
> 
> Is it possible to customise the appearance of this  webpage without having to 
> set it up a full web server?

Say

$ fossil ui

Then in the browser that pops up, go to Admin > Skins, and edit the files 
presented, or select one of the built-in skins.

Once you save the changes, “fossil server” will show those changes to the world 
via HTTP.

That is, by using the local Fossil UI, you can modify the skin before exposing 
it to anyone who can connect to your machine over the network.

Beware that skin changes don’t normally sync between existing repositories.  
The current skin configuration is copied once only during the initial clone, so 
if you have other clones of this repo already, they’ll continue to show the 
prior skin until you say something like

$ fossil conf pull skin

from a checkout of the affected remote repository.  (Or, give -R if you don’t 
want to do this from a checkout directory.)
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Webpage for multiple fossil repositories - configuration options?

2017-06-05 Thread Richard Hipp
On 6/5/17, John Pateman  wrote:
> I have a number of repositories named (for example) x.fossil, y.fossil &
> z.fossil, all stored in a single directory `/Users/Shared/FOSSIL/`.
>
> I can now serve a page listing all of these by running;
>
> `fossil server --repolist /Users/Shared/FOSSIL/ -port  &`
>
> Is it possible to customise the appearance of this  webpage without having
> to set it up a full web server?

When you say "set up a full web server", I assume you mean
Apache/Nginx/etc, right?

Did you know that the "fossil server" command itself is able to act as
a reasonably complete webserver for static content?  Just use the
--files GLOBLIST option to tell it want kinds of files you want to
serve (ex: --files '*.html,*.gif') and put those files in the same
directory as your Fossil repositories.

-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] Webpage for multiple fossil repositories - configuration options?

2017-06-05 Thread John Pateman
I have a number of repositories named (for example) x.fossil, y.fossil & 
z.fossil, all stored in a single directory `/Users/Shared/FOSSIL/`.

I can now serve a page listing all of these by running;

`fossil server --repolist /Users/Shared/FOSSIL/ -port  &`

Is it possible to customise the appearance of this  webpage without having to 
set it up a full web server?

I have tried adding the `header.txt/footer.txt/details.txt/css.txt` files to a 
SKINDIR directory and passing that with a `—skin /Users/Shared/FOSSIL/SKINDIR` 
argument to `fossil server` with no luck.

JP


signature.asc
Description: Message signed with OpenPGP
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users