Skip to content

Commit

Permalink
rename project; prepare gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
hgoebl committed Nov 9, 2013
1 parent 3c64ba4 commit 316cd9c
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 24 deletions.
30 changes: 16 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Mobile-Usage
# mobile-usage

Analyze HTTP access logs and visualize statistics w/ focus on mobile usage.

Expand All @@ -16,8 +16,9 @@ You get information about

## Example Output

See an example output at <http://hgoebl.github.io/Mobile-Usage/>. Do not believe the numbers - the statistic
is generated using the test-data of `mobile-detect.js`, so it is only reflecting User-Agents covered by the test.
See an example output at <http://hgoebl.github.io/mobile-usage/>. Do not believe the numbers - the statistic
is generated using the test-data of [mobile-detect.js](https://github.com/hgoebl/mobile-detect.js/), so it is
only reflecting User-Agents covered by the test. It has absolutely nothing to do with reality.

<img src="mobile-usage-preview.png">

Expand All @@ -26,7 +27,7 @@ is generated using the test-data of `mobile-detect.js`, so it is only reflecting
There are many very good HTTP-log analyzers like <a href="http://awstats.sourceforge.net">AWstats</a>,
<a href="http://www.webalizer.org/">The Webalizer</a> or <a href="http://www.analog.cx/">Analog</a>,
just to name a few.<br>
<a href="http://hgoebl.github.io/Mobile-Usage/">Mobile-Usage</a> is not a full-blown log analyzer, just
<a href="https://github.com/hgoebl/mobile-usage/">mobile-usage</a> is not a full-blown log analyzer, just
a supplement to existing ones with a special focus on mobile devices.
It should give you answers to questions like:
<ul>
Expand All @@ -46,7 +47,7 @@ HTTP-Header 'User-Agent'.

# Installation

$ npm install [-g] Mobile-Usage
$ npm install [-g] mobile-usage

# Usage

Expand All @@ -72,10 +73,10 @@ Options:

## Configuration

You can provide a configuration object containing your implementations of `analyze, filterRaw, transform,
filterCooked, map, reduce`. Most often one will only provide a custom `analyze` function (if log-file is not in Apache
httpd combined format), probably a `filterRaw` function for eliminating unwanted request types and sometimes
a `filterCooked` method to drop hits of irrelevant device types, e.g. Bots.
You can provide a configuration object containing your implementations of `analyze`, `filterRaw`, `transform`,
`filterCooked`, `map`, `reduce`. Most often one will only provide a custom `analyze` function (if log-file is
not in Apache httpd combined format), probably a `filterRaw` function for eliminating unwanted request types
and sometimes a `filterCooked` method to drop hits of irrelevant device types, e.g. Bots.

Have a look at the example at `./config-example.js`.

Expand Down Expand Up @@ -136,8 +137,8 @@ summary by returning a truthy value.

## Map

In this step the cooked objects from `transform` are prepared to better suite as statistical input. You can this
of this aggregated object as tiny summaries.
In this step the cooked objects from `transform` are prepared to better suite as statistical input. You can think
of this aggregated object as "tiny summaries".

## Reduce

Expand Down Expand Up @@ -169,7 +170,7 @@ Special thanks to the guys who created and open-sourced this awesome work! This

Your contribution is welcome.

* fork hgoebl/Mobile-Usage
* fork hgoebl/mobile-usage
* run `npm install`
* create branch
* make changes and run `npm test` (**TODO** not available yet)
Expand All @@ -182,7 +183,8 @@ Your contribution is welcome.

# TODO

* documentation
* generate gh-pages
* improve documentation
* generate gh-pages (better than `cp -r web/* ../mobile-usage@gh-pages/`
* add Gruntfile (jshint, gh-pages, uglify)
* CLI for static server (web)
* add tests, at least for summary-generation
2 changes: 1 addition & 1 deletion Mobile-Usage.iml → mobile-usage.iml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<content url="file://$USER_HOME$/work/github/mobile-usage" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "Mobile-Usage",
"name": "mobile-usage",
"version": "0.1.0",
"description": "Analyze HTTP access logs and visualize statistics w/ focus on mobile usage",
"main": "index.js",
"repository": {
"type": "git",
"url": "github.com/hgoebl/Mobile-Usage"
"url": "github.com/hgoebl/mobile-usage"
},
"homepage": "https://github.com/hgoebl/Mobile-Usage/",
"homepage": "https://github.com/hgoebl/mobile-usage/",
"keywords": [
"logfile",
"analyse",
Expand Down
Binary file added web/favicon.ico
Binary file not shown.
Binary file added web/img/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions web/img/favicon.svg.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" class="mypiechart" height="500" width="500">
<g class="nvd3 nv-wrap nv-pieChart" transform="translate(20,30)">
<g>
<g class="nv-pieWrap">
<g class="nvd3 nv-wrap nv-pie nv-chart-9750" transform="translate(0,0)">
<g>
<g class="nv-pie" transform="translate(230,225)">
<g class="nv-slice" fill="#1f77b4" stroke="#1f77b4">
<path d="M1.1021457184401395e-14,-180A180,180 0 1,1 -161.19023722983067,-80.11059494093716L0,0Z"></path>
</g>
<g class="nv-slice" fill="#ff7f0e" stroke="#ff7f0e">
<path d="M-161.19023722983067,-80.11059494093716A180,180 0 0,1 -32.33607906785644,-177.07167472669744L0,0Z"></path>
</g>
<g class="nv-slice" fill="#2ca02c" stroke="#2ca02c">
<path d="M-32.33607906785644,-177.07167472669744A180,180 0 0,1 -1.9293648709922673e-13,-180L0,0Z"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>
Binary file added web/img/favicon.xcf
Binary file not shown.
11 changes: 6 additions & 5 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8"/>
<title>Mobile-Usage</title>
<title>mobile-usage</title>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="HandheldFriendly" content="True">
Expand All @@ -17,6 +17,7 @@
}
</script>

<link rel="icon" type="image/png" href="img/favicon.png">
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="css/useragent-analyze.css"/>
Expand All @@ -28,7 +29,7 @@
<div class="container">

<div class="page-header">
<h1>Mobile-Usage <small id="header"></small></h1>
<h1>mobile-usage <small id="header"></small></h1>
</div>

<noscript>
Expand Down Expand Up @@ -59,7 +60,7 @@ <h2>About</h2>
There are many very good HTTP-log analyzers like <a href="http://awstats.sourceforge.net">AWstats</a>,
<a href="http://www.webalizer.org/">The Webalizer</a> or <a href="http://www.analog.cx/">Analog</a>,
just to name a few.<br>
<a href="http://hgoebl.github.io/Mobile-Usage/">Mobile-Usage</a> (the tool which generated this
<a href="https://github.com/hgoebl/mobile-usage/">mobile-usage</a> (the tool which generated this
statistic) is not a full-blown log analyzer, just a supplement to existing ones with a special focus
on mobile devices. It should give you answers to questions like:
<ul>
Expand All @@ -73,8 +74,8 @@ <h2>About</h2>
are detected by the User-Agent header.
</p>
<div class="alert alert-info">
You can view Mobile-Usage statistics by drag &amp; drop the generated summary JSON file to
this page!
You can view <strong>mobile-usage</strong> statistics by drag &amp; drop the generated summary JSON
file to this page!
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion web/js/useragent-analyze.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@
totalHits;

$('#header').text(summary.header);
document.title = summary.header ? summary.header + ' (Mobile-Usage)' : 'Mobile-Usage';
document.title = summary.header ? summary.header + ' (mobile-usage)' : 'mobile-usage';
totalHits = totalHitsCount(summary);

Object.keys(metadata).forEach(function createHtml(categoryKey) {
Expand Down

0 comments on commit 316cd9c

Please sign in to comment.