Skip to content
This repository has been archived by the owner on Feb 28, 2023. It is now read-only.

Commit

Permalink
Merge branch 'release/0312'
Browse files Browse the repository at this point in the history
  • Loading branch information
rm-code committed Apr 20, 2015
2 parents 8f6c8d9 + 7b8025a commit 1dabcf6
Show file tree
Hide file tree
Showing 32 changed files with 2,446 additions and 411 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
39 changes: 26 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,39 @@
LoGiVi is a git-repository visualisation tool inspired by [Gource](https://code.google.com/p/gource/) and __currently in development__. It was written from scratch using [Lua](http://www.lua.org/) and the [LÖVE](https://love2d.org/) framework.

# Instructions
LoGiVi can't read from a .git repository directly ([yet](https://github.com/rm-code/logivi/issues/3)). Instead you will have to create a git-log which needs to have a specific format. Please use this command to create the file:
When you run LoGiVi for the first time it will set up all necessary folders, an example git log and a config file in the save directory on your harddrive. A dialog will pop up which allows you to view the save directory.

```bash
git log --reverse --numstat --pretty=format:"author: %an|%ae%ndate: %ct%n" --name-status --no-merges > log.txt
## Generating git logs automatically
LoGiVi can generate git logs automatically when you specify a path to a git repository on your harddrive. Open the _settings.cfg_ file in the LoGiVi save directory and look for the _[repositories]_ section. Add the absolute path to the folder containing the git repository like this:

```
[repositories]
logivi = /Users/Robert/Coding/Lua/LÖVE/LoGiVi/
```
The name on the left side of the equals sign will be used as the project name to identify this repository so make sure you use unique names here.

This will create a log file in the same directory as the .git repository (If you want to write the log to a different location add its path after the '>' in the command above).
LoGiVi can also handle Windows paths:

When you run LoGiVi for the first time it will automatically open the folder in which you need to place the log. Depending on your operating system this can be one of the following locations:
```
[repositories]
logivi = C:\Users\rmcode\Documents\Coding Projects\LoGiVi\
```
After you have added the paths of your project to the config file, the log and info files will be created the next time you run LoGiVi (this may take a few seconds depending on how large the repositories are).

- Windows XP: C:\Documents and Settings\user\Application Data\LOVE\rmcode_logivi
- Windows Vista and 7: C:\Users\user\AppData\Roaming\LOVE\rmcode_logivi
- Linux: $XDG_DATA_HOME/love/ or ~/.local/share/love/rmcode_logivi
- Mac: /Users/user/Library/Application Support/LOVE/rmcode_logivi
## Generating git logs manually
If you don't want the logs to be generated automatically, or if you don't have git in your PATH, you can also generate the git logs manually.

For more information about the filesystem check the [LÖVE wiki](https://love2d.org/wiki/love.filesystem).
Open your terminal and type in the following command (replace the path with your own path leading to a git repository):

As soon as the file is in the correct folder you can start LoGiVi and watch as it creates a visual representation of your git repository.
```bash
git -C "Path/To/Your/Repository" log --reverse --numstat --pretty=format:"info: %an|%ae|%ct" --name-status --no-merges > log.txt
```
This will create the file _log.txt_ in the folder you are currently in. Take this newly created file and drop it into a folder in the _logs_ subfolder in the LoGiVi save directory:

Check the [wiki](https://github.com/rm-code/logivi/wiki) for instructions and further information.
```
/Users/Robert/Library/Application Support/LOVE/rmcode_LoGiVi/logs/yourProject/log.txt
```
LoGiVi will use the folder's name to identify the log so make it informative.

# License

Expand All @@ -46,4 +59,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
8 changes: 2 additions & 6 deletions conf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,15 @@

local PROJECT_TITLE = "LoGiVi";

local PROJECT_VERSION = "0204";
local PROJECT_VERSION = "0312";

local PROJECT_IDENTITY = "rmcode_LoGiVi";

local LOVE_VERSION = "0.9.2";

-- ------------------------------------------------
-- Global Functions
-- ------------------------------------------------

---
-- Initialise löve's config file.
-- @param _conf
-- @param t
--
function love.conf(t)
t.identity = PROJECT_IDENTITY;
Expand Down
10 changes: 5 additions & 5 deletions lib/screenmanager/ScreenManager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
--===============================================================================--

local ScreenManager = {
_VERSION = '1.3.1',
_VERSION = '1.4.1',
_DESCRIPTION = 'Screen/State Management for the LÖVE framework',
_URL = 'https://github.com/rm-code/screenmanager/',
};
Expand Down Expand Up @@ -69,9 +69,9 @@ end
--
-- @param nscreen
--
function ScreenManager.switch(screen)
function ScreenManager.switch(screen, ...)
clear();
ScreenManager.push(screen);
ScreenManager.push(screen, ...);
end

---
Expand All @@ -81,7 +81,7 @@ end
--
-- @param screen - The name of the screen to push on the stack.
--
function ScreenManager.push(screen)
function ScreenManager.push(screen, ...)
-- Deactivate the previous screen if there is one.
if ScreenManager.peek() then
ScreenManager.peek():setActive(false);
Expand All @@ -100,7 +100,7 @@ function ScreenManager.push(screen)
end

-- Create the new screen and initialise it.
stack[#stack]:init();
stack[#stack]:init(...);
end

---
Expand Down
18 changes: 16 additions & 2 deletions main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ local function checkSupport()
print("\n---- RENDERER ---- ");
local name, version, vendor, device = love.graphics.getRendererInfo()
print(string.format("Name: %s \nVersion: %s \nVendor: %s \nDevice: %s", name, version, vendor, device));

print("\n---- SYSTEM ---- ");
print(love.system.getOS());
end

local function drawStats()
Expand Down Expand Up @@ -88,10 +91,11 @@ function love.load()
print("===================")

local screens = {
selection = require('src.screens.SelectionScreen');
main = require('src.screens.MainScreen');
};

ScreenManager.init(screens, 'main');
ScreenManager.init(screens, 'selection');
end

function love.draw()
Expand All @@ -110,7 +114,17 @@ function love.quit(q)
ScreenManager.quit(q);
end

function love.resize(x, y)
ScreenManager.resize(x, y);
end

function love.keypressed(key)
if key == ' ' then
key = 'space';
elseif tonumber(key) then
key = tonumber(key);
end

if key == 'f1' then
showDebug = not showDebug;
end
Expand All @@ -128,4 +142,4 @@ end

function love.mousemoved(x, y, dx, dy)
ScreenManager.mousemoved(x, y, dx, dy);
end
end
Binary file added res/fonts/SourceCodePro-Bold.otf
Binary file not shown.
Binary file added res/img/avatar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/img/file.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed res/img/user.png
Binary file not shown.
Loading

0 comments on commit 1dabcf6

Please sign in to comment.