This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
LNETeam's profile picture

Git for ComputerCraft

Started by LNETeam, 05 July 2013 - 02:26 PM
LNETeam #1
Posted 05 July 2013 - 04:26 PM
Hello ComputerCraft Forums!


Today I have something very cool and useful for you! We all have used pastebin and it works great, but what about working out of pastebin with the lack of versioning and organization? Well that's what Github excels at! I have created projects on Github and wished I didn't have to go into my browser, download the file, put it in my computer files and then get back into Minecraft. I felt that this was a very large waste of time and decided to act on this feeling and make a useful tool for those who have the same problem. Introducing… Git for ComputerCraft!

Developed by LNETeam, we have made a very simple program to help expedite your programming and time crunches. The package includes the shell program which can be executed by:

git get [author] [repo] [branch] [path] {file-name}
- This command gets the file from the desired location then saves it as 'file-name'



[indent=1]You can also simply view the file for quick access by executing:[/indent]
[indent=1]
git view 
[author] [repo] [branch] [path] - This loads the file into the modified 'edit' program to view or print. It does not save the file so you don't have to deal with files everywhere![/indent]

The other part of this program is the API capability. You can simply run 'git.get()' or 'git.view()' with the same arguments from the shell. Ex.
git.get('LNETeam','CCGit','dev','files/Shell/git','demo')

This will save the file 'git' to 'demo' on your machine! Don't even have to go to your browser! The same is done with 'git.view()'

Installation:
[indent=1]You can download the source code from: https://github.com/L...t/releases/v1.1, or you can download the already formatted ('lua/rom/etc…') so you don't have to![/indent]

[indent=1]You can also use my apt-get package manager to install: "apt-get install ccgit"[/indent]

[indent=1]If you download from Github, simply create a folder on your desktop, name it lua. Next in that folder, create rom and within that create help, apis,and programs. Now open the source files **Please read the README.md**, and navigate to files. Copy the appropriate file from API, Shell, and Help to their corresponding folder within 'lua/rom' folder you made. Now reload minecraft and your done![/indent]

[indent=1]If you don't want to modify your core files, then just drag them to a computer folder and use them there. Don't mix them up![/indent]

Demo:
Spoiler


Edited on 28 August 2014 - 02:15 PM
CaptainSly #2
Posted 05 July 2013 - 11:27 PM
This works i'm glad thanks man!
PirateKitty #3
Posted 06 July 2013 - 10:29 AM
Sweet. I might start using git for some programs that use multiple files. Easier to keep track.
theoriginalbit #4
Posted 06 July 2013 - 11:30 AM
Sweet. I might start using git for some programs that use multiple files. Easier to keep track.
Not to mention using a git/svn/whatever makes it very nice for version control!
LNETeam #5
Posted 06 July 2013 - 11:38 AM
I am currently working on another aspect that will enable you to delete, upload, and make new branches all from computercraft.
theoriginalbit #6
Posted 06 July 2013 - 11:41 AM
I am currently working on another aspect that will enable you to delete, upload, and make new branches all from computercraft.
Out of curiosity, how? because CC can't do custom HTTP headers. that is what stopped me from finishing my GitHub suite.
Hoodai #7
Posted 11 September 2013 - 01:30 PM
I am very excited to see this LNETeam!!! I personally believe this should be a CC default functionality, so again, THANK YOU! Continue the good work and I will make sure to send you any errors to help you revise/improve/make this project error free.
Mitchfizz05 #8
Posted 12 September 2013 - 03:19 AM
I am currently working on another aspect that will enable you to delete, upload, and make new branches all from computercraft.
Out of curiosity, how? because CC can't do custom HTTP headers. that is what stopped me from finishing my GitHub suite.
You could possibly make a "proxy" PHP script.