PDA

View Full Version : Just the source code



Dragonbite
September 30th, 2010, 06:02 PM
There are some open source programs out there I would like to just look through the code for learning purposes.

A number of them, though, are using Git and I just want to download the source code. I don't know much about Git, but I just want to look through the code, not necessarily get involved with development at this time.

For example, I have been wanting to look at the code for F-Spot and I haven't found any non-Git methods of doing that (short of emailing the developer which is my next step if nobody knows of any other way).

Eventually I am going to be looking into Git, and it's possibility of being used at work to make things easier, but not yet.

Anybody have any ideas or suggestions, or do I need to suck it up and figure out how to use Git?

Thanks

sharathcshekhar
September 30th, 2010, 06:05 PM
Is apt-get source fspot
what you are looking at?

Bachstelze
September 30th, 2010, 06:09 PM
As sharathcshekhar said, if the package is in Ubuntu, apt-get source <package name> will give you the source from which the Ubuntu package was compiled.

If you want the latest source, you can use git clone or svn checkout to get it, depending on the VCS the project use. They will probably have instructions about how to get it on their website, and maybe even snapshot tarballs.

Dragonbite
September 30th, 2010, 06:53 PM
I thought apt-get source <program> would install it from source, not give me the source code! (sorry.. guess that's a flashback from my Gentoo days ;)).

Where does it put the code, or does it ask?

schauerlich
September 30th, 2010, 06:56 PM
I thought apt-get source <program> would install it from source, not give me the source code! (sorry.. guess that's a flashback from my Gentoo days ;)).

Where does it put the code, or does it ask?

from "man apt-get":


source causes apt-get to fetch source packages. APT will examine the available packages to decide which source package to fetch. It will then find and download into the current directory the newest available version of that source package.

Dragonbite
September 30th, 2010, 07:31 PM
Thanks!

I'll take a look at it tonight when I'm sitting in front of (one of) my Ubuntu boxes.

This could get dangerous too, since I'm toying between focusing on C# (Mono), Java, Python and PHP!
:guitar:

eeperson
September 30th, 2010, 07:31 PM
There are some open source programs out there I would like to just look through the code for learning purposes.

A number of them, though, are using Git and I just want to download the source code. I don't know much about Git, but I just want to look through the code, not necessarily get involved with development at this time.

For example, I have been wanting to look at the code for F-Spot and I haven't found any non-Git methods of doing that (short of emailing the developer which is my next step if nobody knows of any other way).

Eventually I am going to be looking into Git, and it's possibility of being used at work to make things easier, but not yet.

Anybody have any ideas or suggestions, or do I need to suck it up and figure out how to use Git?

Thanks

You only need one git command to get a copy of the repository:



git clone <put-repository-url-here>


Also projects using git generally have a gitweb interface that lets you browse code without checking anything out.

Edit: The gitweb interface for F-Spot is here: http://git.gnome.org/browse/f-spot/

Dragonbite
September 30th, 2010, 08:01 PM
You only need one git command to get a copy of the repository:



git clone <put-repository-url-here>


Also projects using git generally have a gitweb interface that lets you browse code without checking anything out.

Edit: The gitweb interface for F-Spot is here: http://git.gnome.org/browse/f-spot/

I'm kinda thick.. I did run into this page but don't know how to use it. I'm looking for .cs files!

eeperson
September 30th, 2010, 08:40 PM
I'm kinda thick.. I did run into this page but don't know how to use it. I'm looking for .cs files!
If you click the 'tree' link in the upper left you can look at the source code. That link will take you root directory of the source code.