Skip to content

Commit

Permalink
[v0.1.3] - Play tracks from artist node
Browse files Browse the repository at this point in the history
  - look and feel of the nodes updated
  - on double click a node in the graph, top tracks of the artist are played

Merge branch 'dev'
  • Loading branch information
Zé Bateira committed Apr 9, 2014
2 parents a85659a + b646078 commit 3df6d68
Show file tree
Hide file tree
Showing 32 changed files with 694 additions and 511 deletions.
6 changes: 3 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = function(grunt) {
all: ['Gruntfile.js', 'js/**/*.js', 'test/*.js']
},
jasmine: {
src: ['js/*.js'],
src: ['js/**/*.js'],
options: {
vendor: [
'bower_components/jquery/dist/jquery.js',
Expand All @@ -28,7 +28,7 @@ module.exports = function(grunt) {
}
},
watch: {
files: ['Gruntfile.js', 'js/*.js', 'sass/*.scss', 'test/*.js'],
files: ['Gruntfile.js', 'js/**/*.js', 'sass/*.scss', 'test/*.js'],
tasks: ['jshint', 'compass', 'jasmine']
},
useminPrepare: {
Expand Down Expand Up @@ -56,7 +56,7 @@ module.exports = function(grunt) {
'css/main.css',
'img/*',
'views/*.html',
'js/*',
'js/**/*',
'manifest.json'
]
}]
Expand Down
20 changes: 17 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
The MIT License (MIT)

Copyright © 2014 José Bateira, http://carsy.github.io

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 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.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
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.
36 changes: 29 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,46 @@ RAMA is a Spotify Application for visualizing and interacting with networks of m

For now, I do not intend to make this application available on the Spotify App Store, so to run it you need to set it up first.

To open a downloaded app you need to **Activate Spotify Developer account** here: https://devaccount.spotify.com/my-account (no premium account needed).
Tested on mac for now only.

Installation
--------------
Tested on mac for now only.

#### Automagic installer

Execute the installer script.

```sh
$ wget --no-check-certificate https://raw.githubusercontent.com/carsy/rama-spotify/master/install.sh -O - | sh
```
or with curl
```sh
$ curl -L https://raw.githubusercontent.com/carsy/rama-spotify/master/install.sh | sh
```

You should now be in the app and seeing a graph thingy.

#### Manual installer

These are the contents of the script:

Run the following commands from the command prompt (for mac):
```sh
$ mkdir ~/Spotify ; cd ~/Spotify
$ wget https://github.com/carsy/rama-spotify/releases/download/v0.1.2/rama-spotify_v0.1.2.tar.gz
$ tar -xvf rama-spotify_v0.1.2.tar.gz
$ rm -rf rama-spotify
$ wget https://github.com/carsy/rama-spotify/releases/download/v0.1.3/rama-spotify_v0.1.3.tar.gz
$ tar -xvf rama-spotify_v0.1.3.tar.gz
$ open spotify:app:rama-spotify
```
You should now be in the app and seeing a graph thingy.

Alternatively, If you happen to have commandlinephobia (I get that every other month... might be a thing):

1. download the latest version of the app from [here]
2. extract the folder
3. create the Spotify folder if it doesn't exist already: "~/Spotify" (Mac OS X and Linux) or "My Documents\Spotify" (Windows).
3. create the Spotify folder if it doesn't exist already: "~/Spotify" (Mac OS X) or "My Documents\Spotify" (Windows).
4. copy the extracted folder to the Spotify folder.

Now **Activate Spotify Developer account** here: https://devaccount.spotify.com/my-account (no premium account needed).

Now open Spotify and type in the search bar:
```sh
spotify:app:rama-spotify
Expand All @@ -42,6 +59,10 @@ With no official release for the Spotify Desktop Client, there's nothing I can d
[Releases]
----

[v0.1.3] - Play tracks from artist node
- look and feel of the nodes updated
- on double click a node in the graph, top tracks of the artist are played

[v0.1.2] - Settings Menu added
- settings menu added: depth, branching and treemode settings available
- title attributes on the options' labels give information as to what do the options do.
Expand Down Expand Up @@ -70,6 +91,7 @@ José Bateira
[@\_carsy\_]:http://twitter.com/_carsy_
[here]:https://github.com/carsy/rama-spotify/releases/latest
[Releases]:https://github.com/carsy/rama-spotify/releases/latest
[v0.1.2]:https://github.com/carsy/rama-spotify/releases/tag/v0.1.3
[v0.1.2]:https://github.com/carsy/rama-spotify/releases/tag/v0.1.2
[v0.1.1]:https://github.com/carsy/rama-spotify/releases/tag/v0.1.1
[v0.1.0]:https://github.com/carsy/rama-spotify/releases/tag/v0.1.0
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rama",
"version": "0.1.2",
"version": "0.1.3",
"homepage": "https://github.com/carsy/master-thesis",
"authors": [
"Zé Bateira <jlageb+git@gmail.com>"
Expand Down Expand Up @@ -29,4 +29,4 @@
"devDependencies": {
"jasmine-jquery": "~2.0.3"
}
}
}
38 changes: 22 additions & 16 deletions css/main.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Main Elements */
@import url(http://fonts.googleapis.com/css?family=Ruda);
@import url("http://fonts.googleapis.com/css?family=Ruda");
/* line 2, ../sass/_spotify.scss */
body {
font-family: 'Lucida Grande',Tahoma,Calibri,Arial,sans-serif;
Expand Down Expand Up @@ -353,11 +353,17 @@ html, body {
/* line 28, ../sass/_now_playing.scss */
.settings .settings-btn:hover {
cursor: pointer;
background: url(../img/settings-light.png) no-repeat;
background-size: cover;
}
/* line 32, ../sass/_now_playing.scss */
.settings .settings-btn.opened {
opacity: 0.8;
}
/* line 36, ../sass/_now_playing.scss */
.settings .settings-tooltip {
.settings .settings-btn:active {
-webkit-transform: scale(0.9, 0.9);
}
/* line 41, ../sass/_now_playing.scss */
.settings .settings-form {
display: none;
position: relative;
float: right;
Expand All @@ -368,8 +374,8 @@ html, body {
border-color: #bbb;
border-style: solid;
}
/* line 49, ../sass/_now_playing.scss */
.settings .settings-tooltip .tri {
/* line 54, ../sass/_now_playing.scss */
.settings .settings-form .tri {
position: absolute;
top: -5px;
right: 8px;
Expand All @@ -382,27 +388,27 @@ html, body {
border-style: solid;
-webkit-transform: rotate(45deg);
}
/* line 66, ../sass/_now_playing.scss */
.settings .settings-tooltip .option {
/* line 71, ../sass/_now_playing.scss */
.settings .settings-form .option {
overflow: auto;
}
/* line 69, ../sass/_now_playing.scss */
.settings .settings-tooltip .option:not(.first-child) {
/* line 74, ../sass/_now_playing.scss */
.settings .settings-form .option:not(.first-child) {
margin-top: 5px;
}
/* line 73, ../sass/_now_playing.scss */
.settings .settings-tooltip .option label {
/* line 78, ../sass/_now_playing.scss */
.settings .settings-form .option label {
float: left;
margin-right: 5px;
}
/* line 77, ../sass/_now_playing.scss */
.settings .settings-tooltip .option input {
/* line 82, ../sass/_now_playing.scss */
.settings .settings-form .option input {
padding: 2px;
width: 30px;
float: right;
}
/* line 82, ../sass/_now_playing.scss */
.settings .settings-tooltip .option input[name=treemode] {
/* line 87, ../sass/_now_playing.scss */
.settings .settings-form .option input[name=treemode] {
margin-top: 5px;
margin-left: 5px;
}
1 change: 0 additions & 1 deletion deliverables/report1/chapters/chapter1.tex
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ \section{Contexto e Enquadramento} \label{sec:context}
Este é o conceito que o RAMA\footnote{http://rama.inescporto.pt}, projeto desenvolvido no INESC Porto\footnote{http://inescporto.pt}, usa. \cite{Costa2008} \cite{Sarmento2009} \cite{Costa2009} \cite{Gouyon2011}



\section{Motivação e Objetivos} \label{sec:goals}


Expand Down
Binary file modified deliverables/report1/mieic.pdf
Binary file not shown.
32 changes: 5 additions & 27 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,41 +18,19 @@
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<div id="view_container">
<div id="now" class="view">
<div class="settings">
<div title="Settings: Tweak them to your content" class="settings-btn">
</div>
<br>
<div class="settings-tooltip">
<div title="just a triangle mate... move along" class="tri"></div>

<div class="option first-child">
<label title="Maximum distance between the root node and any other node in the whole graph, given the shortest path between them. TLDR: the bigger the number the bigger the graph.">
depth
</label>
<input title="depth value" name="depth" min="2" max="8" value="2" type="number">
</div>
<div id="view_container">

<div class="option">
<label title="Maximum number of connections (edges) that a node can have. In practice, some nodes might have one more edge than this specified value, but you get the point. TLDR: the bigger the number the bigger the graph.">branching</label>
<input title="branching value" name="branching" min="2" max="8" value="4" type="number">
</div>
<div class="option">
<label title="Whether the tree mode is activated or not. If it's off, all the existent edges between the nodes will be drawn. Otherwise, if it's on, some edges might not be drawn, causing the graph to take the shape of a tree (or a flower or something. If you do start seeing trees or flowers please go to the nearest hospital). TLDR: graph gets cleaner and easier to read (when it's very clutered with nodes and edges)">tree mode</label>
<input title="treemode" name="treemode" type="checkbox" checked>
</div>
</div>
</div>
<div class="graph"></div>
<div id="nowplaying" class="view">

</div>


<div id="top" class="view">
<div id="toplist" class="view">
</div>

<div id="search" class="view">
</div>

</div>

<!-- build:js js/vendor.js -->
Expand Down
6 changes: 6 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

mkdir ~/Spotify ; cd ~/Spotify
wget https://github.com/carsy/rama-spotify/releases/download/v0.1.2/rama-spotify_v0.1.2.tar.gz
tar -xvf rama-spotify_v0.1.2.tar.gz
open spotify:app:rama-spotify
80 changes: 80 additions & 0 deletions js/components/components.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/**
Components module
Handles the views for the header, tabs bar, tabs content, etc...
*/

// imported modules
var UI;
var Header;
var TabBar;

var Components = {
DEFAULT_PATH: '../views/',

initConfig: function(config) {
Header.init(config.header, Components.DEFAULT_PATH);
TabBar.init(config.tabs, Components.DEFAULT_PATH);
},
loadViews: function(config) {
Components.spUI = UI.init({
header: true,
views: TabBar.tabs,
tabs: TabBar.tabs
});
Header.loadView();
TabBar.loadView();

Components.bindEvents(config.events);
},
updateViews: function(tab) {
var tabID = tab.id || Components.spUI.activeView;

Header.updateView();
TabBar.updateView(tabID);
},
reset: function() {
Header.reset();
TabBar.reset();
},



// events

bindEvents: function(events) {
for (var event in events) {
Components.on(event, events[event]);
}
},
events: {
windowresize: {
bind: function(eventHandler) {
window.onresize = eventHandler;
}
},
viewchange: {
bind: function(eventHandler) {
Components.spUI.addEventListener('viewchange', eventHandler);
}
}
},
on: function(event, eventHandler) {
Components.events[event].bind(eventHandler);
}
};

// exporting module

require([
'$views/ui#UI',
'js/components/header#header',
'js/components/tabbar#tabbar'
], function(_ui, _header, _tabbar) {
UI = _ui;

Header = _header;
TabBar = _tabbar;

exports.Components = Components;
});
Loading

0 comments on commit 3df6d68

Please sign in to comment.