On Fri, May 9, 2014 at 1:21 AM, Stephan Beal <sgb...@googlemail.com> wrote:
>
> On Fri, May 9, 2014 at 9:15 AM, Scott Robison <sc...@casaderobison.com>
wrote:
>>
>> links to each fossil. I have a two line fossil cgi script that gives me
access to those repos. I've even created a little page to allow me to
change a password for a single user across all repos at one time.
>
>
> Would you mind sharing that one with us?

The fossil cgi script is just based on the one documented elsewhere, so I
assume you mean the password change script. You can see it at
http://tny.cz/2376d7fa (tinypaste, tny.cz). When the page is accessed via
http GET it just displays the page and any optional message that might have
been passed as a url parameter. When the info is filled in and the form is
POSTed, it does basic validation of the username and passwords. If all is
okay, it uses a foreach loop to enumerate all the fossil files in the hard
coded directory, runs the fossil command to change the password for the
given user on each, and redirects back to the main index with a message. If
it detects errors with the username or password, it redirects back to
itself with simple messages to give the user a chance to do it again.

As I said in my original message, I'm not a web guy, so this is definitely
not "professional grade". It lives behind a protected directory so I'm the
only one with access to it, so robustness and aesthetically pleasing were
not my primary considerations. Just something to help automate some things
that I continually have to look up whenever I need to do them. If I were
looking for a place to host something open source, I'd just go to chiselapp
(or expose a repository via a specific unprotected url). In my case:

http://www.webducky.com/dev/ -> run a front end index script to provide a
menu of all the fossils
.../dev/project -> bash script to set the home environment variable and
then...
.../dev/fossil-cgi -> fossil cgi script. It could be named project
directly, but the settings don't work unless the home directory is set
first, and this was the "easiest" way for me to figure out how to do it.
.../dev/password.php -> the below script linked to from /dev/
.../dev/blah.php -> other scripts to be written / finished to create,
rename, delete repos.

Note there are no copyrights or licenses claimed in the code itself, as I
didn't really intend to share it, though I don't mind sharing it. In any
case, it is simple enough and non-strategic enough that consider I it
public domain, so do with it what you will and realize there is no warranty
(not that you could easily prove I was the one who provided it anyway,
maybe I just found the link and am claiming it as my own creation). ;) Not
nearly as useful or complex as SQLite, but hey, I'm not nearly as bright as
DRH either.

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

Reply via email to