Jump to content




Github repository cloner

api utility networking

7 replies to this topic

#1 Eric

  • Members
  • 92 posts
  • LocationUK

Posted 10 January 2013 - 09:15 AM

I've thrown together a program to download a complete snapshot of a github repository - any git repository.

You can download it here, using my new tool... Oh, wait. Seriously though, go there, download the three files, and you're good to go.

Instructions are at the link above, but I'll duplicate the usage section here:

> github clone eric-wieser/computercraft-github ccgit
Discovering files...
Downloading:
  readme.md
  apis/dkjson
  apis/github
  programs/github
[============================================] 100%
> ls ccgit
apis      programs
readme.md

Word of warning - github puts a limit on API requests (60 per hour, I think) - you may have problems cloning repositories with a large number of files and folders, particularly if github treats all users on a server as the same client.


This program also comes with an (skeleton) API to expose github information to other programs.

#2 NeverCast

  • Members
  • 400 posts
  • LocationChristchurch, New Zealand

Posted 14 January 2013 - 03:37 PM

Very nice program Eric! Thanks!

#3 CoolisTheName007

  • Members
  • 304 posts

Posted 17 March 2013 - 06:42 AM

View PostEric, on 10 January 2013 - 09:15 AM, said:

Word of warning - github puts a limit on API requests (60 per hour, I think) - you may have problems cloning repositories with a large number of files and folders, particularly if github treats all users on a server as the same client.

Ah. That's useful to know. Wished I hadn't spent one hour looking for an answer....
Guess I'll have to write something to package everything in one file, and then un-package itself. Or see if dropbox behaves the same way.

#4 elexx

  • Members
  • 9 posts
  • Location/home/elexx

Posted 19 March 2013 - 12:02 AM

Great work! :clap:

#5 Tiin57

    Java Lunatic

  • Members
  • 1,412 posts
  • LocationIndiana, United States

Posted 22 March 2013 - 04:56 AM

Now port the Git utility to Lua. :3

#6 Sammich Lord

    IRC Addict

  • Members
  • 1,212 posts
  • LocationThe Sammich Kingdom

Posted 22 March 2013 - 05:01 AM

View PostCoolisTheName007, on 17 March 2013 - 06:42 AM, said:

View PostEric, on 10 January 2013 - 09:15 AM, said:

Word of warning - github puts a limit on API requests (60 per hour, I think) - you may have problems cloning repositories with a large number of files and folders, particularly if github treats all users on a server as the same client.

Ah. That's useful to know. Wished I hadn't spent one hour looking for an answer....
Guess I'll have to write something to package everything in one file, and then un-package itself. Or see if dropbox behaves the same way.
If the script just grabs it from raw.github.com then it doesn't make a request for the API, it just requests the URL. I haven't checked to see how it works though.

#7 PixelToast

  • Signature Abuser
  • 2,265 posts
  • Location3232235883

Posted 22 March 2013 - 05:02 AM

and git clone :3
though interfacing with the api will be hard
you might need a php file

#8 CoolisTheName007

  • Members
  • 304 posts

Posted 22 March 2013 - 12:54 PM

View PostSammich Lord, on 22 March 2013 - 05:01 AM, said:

If the script just grabs it from raw.github.com then it doesn't make a request for the API, it just requests the URL. I haven't checked to see how it works though.
I've checked the code I had for getting github stuff and it made a request for the repository contents for each directory path, and then it queried /raw.
I suppose a safe way to do things is to somehow avoid rechecking each repository path.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users