List for cgit developers and users
 help / color / mirror / Atom feed
* Fwd: JSON interface
@ 2015-02-24 18:18 xuu
  2015-03-03 22:59 ` Jason
  0 siblings, 1 reply; 4+ messages in thread
From: xuu @ 2015-02-24 18:18 UTC (permalink / raw)


Hi, 

I was wondering if anything ever happened with this request? I would love to 
be able to call into cgit for json data.

thanks!

> On Sun, Oct 05, 2014 at 02:13:35PM +0300, Wilhelm Matilainen wrote:
> > Instead of acting as a server providing html and css files, could there
> be
> > a only-json option?
>
> You can already configure the URL for CGit's CSS and logo files to point
> at a separate machine if you want to do that.
>
> > I could then provide all the static files minified and cached from a
> proper
> > http server already in use and request only the data from cgit.
> >
> > Using jquery:
> > -----------------------------------------------
> > $.getJSON('/git/repository/<repo>', function(data) {
> >     showRepo(data);
> > });
> > -----------------------------------------------
> >
> > By loading https://
> > <server>/git/<what-I-need>/<parameter-1>/<parameter-2>/<etc.>
> > CGit would output something like:
> > -----------------------------------------------
> > {
> > "repository": "test",
> > "property1": "value1",
> > "property2": "value2"
> > }
> > -----------------------------------------------
>
> I don't think it would be particularly difficult to add a new "json" URL
> in cmd.c and handle all of the necessary sub-options, but you would then
> need to write an entire UI in JavaScript.
>
> At that point, I'm not sure it would be CGit any more since you would be
> using essentially none of the code that exists now.
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20150224/747ffbe1/attachment.asc>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* JSON interface
  2015-02-24 18:18 Fwd: JSON interface xuu
@ 2015-03-03 22:59 ` Jason
  2015-03-04 16:10   ` chris.burroughs
  0 siblings, 1 reply; 4+ messages in thread
From: Jason @ 2015-03-03 22:59 UTC (permalink / raw)


This would indeed be quite nice. I'll look into it for 0.12.

Currently I'm just running a python web app on top of it to do the trick.
Not great, but it gets the job done.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20150303/80b75dbd/attachment.html>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* JSON interface
  2015-03-03 22:59 ` Jason
@ 2015-03-04 16:10   ` chris.burroughs
  2015-03-04 16:12     ` Jason
  0 siblings, 1 reply; 4+ messages in thread
From: chris.burroughs @ 2015-03-04 16:10 UTC (permalink / raw)


What python web app?  I've been looking into running an application 
(chef-guard) that only works with the github api and trying to figure 
out a reasonable workaround.

On 03/03/2015 05:59 PM, Jason A. Donenfeld wrote:
> This would indeed be quite nice. I'll look into it for 0.12.
>
> Currently I'm just running a python web app on top of it to do the trick.
> Not great, but it gets the job done.
>
>
>
> _______________________________________________
> CGit mailing list
> CGit at lists.zx2c4.com
> http://lists.zx2c4.com/mailman/listinfo/cgit
>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* JSON interface
  2015-03-04 16:10   ` chris.burroughs
@ 2015-03-04 16:12     ` Jason
  0 siblings, 0 replies; 4+ messages in thread
From: Jason @ 2015-03-04 16:12 UTC (permalink / raw)


The one behind this:
http://git.zx2c4.com/json/projects
and
http://git.zx2c4.com/json/random-code

It's like 20 lines long and sort of trivial, not worth cleaning up for release.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-04 16:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-24 18:18 Fwd: JSON interface xuu
2015-03-03 22:59 ` Jason
2015-03-04 16:10   ` chris.burroughs
2015-03-04 16:12     ` Jason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).