Skip to content
This repository has been archived by the owner on Sep 27, 2020. It is now read-only.

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sveetch committed Aug 23, 2015
0 parents commit 39a4c3d
Show file tree
Hide file tree
Showing 67 changed files with 15,138 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
*.pyc

# Various directory index, temp file and editor's config
*.DS_Store
*.idea
.*.swp

# virtualenv
/bin
/include
/lib
/lib64
/build
/local

# buildout
*.egg-info
.installed.cfg
/develop-eggs
/django-apps-src
/eggs
/parts
/etc

# Various
node_modules
foundation5

*.sqlite3
22 changes: 22 additions & 0 deletions LICENCE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Copyright (c) 2015 David Thenon.

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 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.
7 changes: 7 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
include MANIFEST.in
include LICENCE.txt
include README.rst
include requirements.txt
recursive-include project/templates *
recursive-include project/locale *
recursive-include project/static *
41 changes: 41 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
.PHONY: help install install-dev clean delpyc syncf5

help:
@echo "Please use \`make <target>' where <target> is one of"
@echo
@echo " clean -- to clean your local repository from all builded stuff and caches"
@echo " delpyc -- to remove all *.pyc files, this is recursive from the current directory"
@echo
@echo " install -- to build the project"
@echo " install-dev -- to build the project for development"
@echo
@echo " syncf5 -- to synchronize needed Javascript files from foundation5 sources dir to the project static files"

delpyc:
find . -name "*\.pyc"|xargs rm -f

clean: delpyc
rm -Rf bin include lib local node_modules compass/.sass-cache

install:
virtualenv --no-site-packages .
bin/pip install -r requirements.txt

install-dev: install
npm install
foundation new foundation5 --version=5.5.2

syncf5:
rm -f foundation5/bower_components/foundation/js/vendor/jquery.js
cp foundation5/bower_components/jquery/dist/jquery.js foundation5/bower_components/foundation/js/vendor/jquery.js
rm -Rf project/webapp_statics/js/foundation5
cp -r foundation5/bower_components/foundation/js project/webapp_statics/js/foundation5
# Cleaning vendor libs
rm -Rf project/webapp_statics/js/foundation5/vendor
mkdir -p project/webapp_statics/js/foundation5/vendor
# Getting the real sources for updated vendor libs
cp foundation5/bower_components/fastclick/lib/fastclick.js project/webapp_statics/js/foundation5/vendor/
cp foundation5/bower_components/foundation/js/vendor/jquery.js project/webapp_statics/js/foundation5/vendor/
cp foundation5/bower_components/jquery-placeholder/jquery.placeholder.js project/webapp_statics/js/foundation5/vendor/
cp foundation5/bower_components/jquery.cookie/jquery.cookie.js project/webapp_statics/js/foundation5/vendor/
cp foundation5/bower_components/modernizr/modernizr.js project/webapp_statics/js/foundation5/vendor/
68 changes: 68 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
.. _Recalbox: http://recalbox.com
.. _recalbox-webconfig: https://github.com/MikaXII/recalbox-webconfig
.. _Django: https://www.djangoproject.com
.. _Foundation: http://foundation.zurb.com
.. _autobreadcrumbs: https://github.com/sveetch/autobreadcrumbs

Recalbox manager Web interface
==============================

Like `recalbox-webconfig`_ this project aims to serve a web interface to manage some common `Recalbox`_ configurations but with `Django`_ instead of *Node.js*.

This is a full Django webapp project, meaning it's ready to launch when correctly installed.

Features
********

* Try to be the lightweight as possible;
* Web integration on top of `Foundation`_;
* Read the Recalbox logs;
* Edit the Recalbox configuration file;
* Manage (upload, delete) your roms by systems;
* Manage your bios files;
* Hardly repose on Recalbox Manifest file to valid uploads;

Install
*******

*To do, actually this is just some notes not complete yet*

Before doing anything, ensure the rpi can access to the internet else configure your network interface and if needed dns resolving.

Get the project repository, enter in its directory then type the following commands: ::

python -m ensurepip
pip install virtualenv
virtualenv --no-site-packages .
bin/pip install -r requirements.txt

The first two lines would be needed only the first time.

Finally, because Git is not available on Recalbox, you should get the repository on your PC before, transfer it to your recalbox and then continue on it with the commands.

Usage
*****

::

source bin/activate
python manage.py runserver 0.0.0.0:8001
Development notes
*****************

#. CSS are compiled from Compass sources, you will need to install the right Compass (use the shipped ``Gemfile`` file) and Foundation 5 (use the dedicated Makefile action) versions;

#. Python 2.7.9 is installed on Recalbox 3.2.11, so *pip* is near to be ready to use;

#. UTC Timezone does not seems available, have to set settings.TIME_ZONE to None and set settings.USE_TZ to False and so it start with a dummy project freshly created from startproject Django command;

#. Python devel lib is not installed but will be may be needed to install some packages from eggs (actually not needed);

PIP
---

Python 2.7.9 is installed on Recalbox 3.2.11, so *pip* is near to be ready to use, just have to install it the first time.


This will results to install ``pip==1.5.6``.
1 change: 1 addition & 0 deletions compass/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.sass-cache
5 changes: 5 additions & 0 deletions compass/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source "https://rubygems.org"

gem "sass", "~> 3.4.0"
gem "compass", "~> 1.0"
gem "foundation", "~> 1.0.4"
3 changes: 3 additions & 0 deletions compass/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This is the Compass SaSS sources directory for your app.

It requires Ruby>=2.1.1 and some gems listed in the 'Gemfile' file.
26 changes: 26 additions & 0 deletions compass/config.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Load the Foundation5 lib
add_import_path "../foundation5/bower_components/foundation/scss"

# Set this to the root of your project when deployed:
http_path = "/static/"
sass_dir = "scss"
css_dir = "../project/webapp_statics/css"
images_dir = "../project/webapp_statics/images"
javascripts_dir = "../project/webapp_statics/js"
fonts_dir = "../project/webapp_statics/fonts"

# You can select your preferred output style here (can be overridden via the command line):
# output_style = :expanded or :nested or :compact or :compressed
output_style = :expanded

# To enable relative paths to assets via compass helper functions. Uncomment:
relative_assets = true

# To disable debugging comments that display the original location of your selectors. Uncomment:
# line_comments = false

# If you prefer the indented syntax, you might want to regenerate this
# project again passing --syntax sass, or you can uncomment this:
# preferred_syntax = :sass
# and then run:
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
35 changes: 35 additions & 0 deletions compass/scss/_settings.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@import "foundation/functions";

//
// FOUNDATION SETTINGS
// See utils/_sample_settings.scss for a full list of available settings
//

//
// Settings overrides goes below
//

// Consistant colors names facility
$white: #ffffff;
$black: #000000;
$DarkPastelBlue: #34495e;

// c. Global
$base-font-size: 14px;
$rem-base: $base-font-size;

// WARNING: Lucida Grande is probably not available on non linux systems
$body-font-family: "Lucida Grande", Helvetica, Arial, sans-serif;

// 04. Breadcrumbs
$crumb-bg: $white;
$crumb-border-size: 0;

// 34. Top Bar
$topbar-height: rem-calc(70px);
$topbar-bg-color: $DarkPastelBlue;
$topbar-bg: $topbar-bg-color;
$topbar-link-bg-active-hover: scale-color($DarkPastelBlue, $lightness: -14%);

// Available sizes class names on flexbox inline list
$flex-inline-list-sizes: 14.6666 16.6666 18 20 23 25 31.3333 33.3333 48 50 98 100;
89 changes: 89 additions & 0 deletions compass/scss/app.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
@charset "UTF-8";

@import "settings";
@import "compass";

/*
* Full Foundation components import for development process
*
* WARNING: Do not use this full import when passing to production,
* instead select all needed component one by one
*/
@import "foundation";

/*
* All foundation components, one by one
*/
/*
@import
"foundation/components/accordion",
"foundation/components/alert-boxes",
"foundation/components/block-grid",
"foundation/components/breadcrumbs",
"foundation/components/button-groups",
"foundation/components/buttons",
"foundation/components/clearing",
"foundation/components/dropdown",
"foundation/components/dropdown-buttons",
"foundation/components/flex-video",
"foundation/components/forms",
"foundation/components/grid",
"foundation/components/inline-lists",
"foundation/components/joyride",
"foundation/components/keystrokes",
"foundation/components/labels",
"foundation/components/magellan",
"foundation/components/orbit",
"foundation/components/pagination",
"foundation/components/panels",
"foundation/components/pricing-tables",
"foundation/components/progress-bars",
"foundation/components/reveal",
"foundation/components/side-nav",
"foundation/components/split-buttons",
"foundation/components/sub-nav",
"foundation/components/switches",
"foundation/components/tables",
"foundation/components/tabs",
"foundation/components/thumbs",
"foundation/components/tooltips",
"foundation/components/top-bar",
"foundation/components/type",
"foundation/components/offcanvas",
"foundation/components/visibility";
*/

/*
* Used components
*
* Load only what is needed, not all components
*/
@import "utils/patchs";
@import "components/icomoon";
@import "utils/addons";
@import "vendor/dropzone";

@import "components/header";
//@import "components/footer";
#body_content{
@import "components/contents";
}


/* Foundation icons sizes */
.size-12 { font-size: 12px; }
.size-14 { font-size: 14px; }
.size-16 { font-size: 16px; }
.size-18 { font-size: 18px; }
.size-21 { font-size: 21px; }
.size-24 { font-size: 24px; }
.size-36 { font-size: 36px; }
.size-48 { font-size: 48px; }
.size-60 { font-size: 60px; }
.size-72 { font-size: 72px; }

/*
* Sometime, you need fallback hacks for some specific browsers, it should allways be
* at the end to be able to override every others components
*/
@import "utils/browser_fallbacks";
Loading

0 comments on commit 39a4c3d

Please sign in to comment.