Skip to content

Commit 0a1310f

Browse files
committed
Added pip and PyInstaller support.
1 parent 1e355f5 commit 0a1310f

File tree

5 files changed

+166
-7
lines changed

5 files changed

+166
-7
lines changed

LICENSE.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License
2+
3+
Copyright (C) 2015 by Erki Suurjaak
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
The software is provided "as is", without warranty of any kind, express or
16+
implied, including but not limited to the warranties of merchantability,
17+
fitness for a particular purpose and noninfringement. In no event shall the
18+
authors or copyright holders be liable for any claim, damages or other
19+
liability, whether in an action of contract, tort or otherwise, arising from,
20+
out of or in connection with the software or the use or other dealings in
21+
the software.

README.md

+37-7
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,40 @@
1-
InputOut
2-
========
1+
InputScope
2+
==========
33

4-
Mouse and keyboard input visualizer.
4+
Mouse and keyboard input heatmap visualizer, and input statistics.
55

66
Three components:
77
* main - wxPython desktop tray program, runs listener and webui
8-
* listener - listens and logs mouse and keyboard input
8+
* listener - logs mouse and keyboard input
99
* webui - web frontend for statistics and heatmaps
1010

1111
Listener and web-UI components can be run separately, or launched from main.
1212

13-
[screenshot @todo mouse]
14-
[screenshot @todo keyboard]
13+
Data is kept in an SQLite database.
14+
15+
[![Mouse heatmap](https://raw.github.com/suurjaak/InputScope/media/img/th_mouse.png)](https://raw.github.com/suurjaak/InputScope/media/img/mouse.png)
16+
[![Keyboard heatmap](https://raw.github.com/suurjaak/InputScope/media/img/th_keyboard.png)](https://raw.github.com/suurjaak/InputScope/media/img/keyboard.png)
17+
18+
19+
Installation
20+
------------
21+
22+
Works best on Windows, tested on Linux, might work on Mac.
23+
24+
Windows: download and launch the latest release from
25+
http://github.com/suurjaak/InputScope/releases.
26+
27+
Or:
28+
`pip install inputscope`
29+
30+
The pip installation will add commands `inputscope`, `inputscope-listener`
31+
and `inputscope-webui` command to path.
1532

1633

1734
Dependencies
1835
------------
1936

20-
* Python 2.7
37+
* Python 2.6 or 2.7
2138
* bottle
2239
* PyUserInput
2340
* wxPython (optional)
@@ -27,8 +44,21 @@ Attribution
2744
-----------
2845

2946
Heatmaps are drawn with heatmap.js,
47+
released under the MIT License,
3048
(c) 2014 Patrick Wied, http://www.patrick-wied.at/static/heatmapjs/.
3149

3250
Icon from Paomedia small-n-flat iconset,
3351
released under Creative Commons (Attribution 3.0 Unported),
3452
https://www.iconfinder.com/icons/285642/monitor_icon.
53+
54+
Keyboard image modified from Wikipedia File:ISO keyboard (105) QWERTY UK.svg,
55+
released under the GNU Free Documentation License,
56+
http://en.wikipedia.org/wiki/File:ISO_keyboard_(105)_QWERTY_UK.svg
57+
58+
59+
License
60+
-------
61+
62+
Copyright (C) 2015 by Erki Suurjaak.
63+
Released as free open source software under the MIT License,
64+
see [LICENSE.md](LICENSE.md).

inputscope.spec

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# -*- mode: python -*-
2+
"""
3+
Pyinstaller spec file for InputScope, produces a Windows executable.
4+
5+
@created 13.04.2015
6+
@modified 22.04.2015
7+
"""
8+
import os
9+
import sys
10+
11+
APPPATH = os.path.join(os.path.dirname(os.path.abspath(SPEC)), "inputscope")
12+
sys.path.append(APPPATH)
13+
import conf
14+
15+
a = Analysis([(os.path.join(APPPATH, "main.py"))],)
16+
# Workaround for PyInstaller 2.1 buggy warning about existing pyconfig.h
17+
for d in a.datas:
18+
if "pyconfig" in d[0]:
19+
a.datas.remove(d)
20+
break
21+
a.datas += [(os.path.join(*x), os.path.join(APPPATH, *x), "DATA") for x in
22+
(["static", "icon.ico"], ["static", "site.css"],
23+
["static", "heatmap.min.js"], ["static", "keyboard.svg"],
24+
["views", "base.tpl"], ["views", "index.tpl"],
25+
["views", "input.tpl"], ["views", "keyboard.tpl"],
26+
["views", "mouse.tpl"])]
27+
pyz = PYZ(a.pure)
28+
29+
exename = "%s_%s.exe" % (conf.Title, conf.Version)
30+
exe = EXE(
31+
pyz,
32+
a.scripts,
33+
a.binaries,
34+
a.zipfiles,
35+
a.datas,
36+
name=exename,
37+
debug=False, # Verbose or non-verbose
38+
strip=False, # EXE and all shared libraries run through cygwin's strip, tends to render Win32 DLLs unusable
39+
upx=True, # Using Ultimate Packer for eXecutables
40+
icon=os.path.join(APPPATH, "static", "icon.ico"),
41+
console=False # Use the Windows subsystem executable instead of the console one
42+
)

requirements.txt

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
bottle
2+
PyUserInput
3+
4+
# wxPython is not available via pip

setup.py

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# -*- coding: utf-8 -*-
2+
"""
3+
Setup.py for InputScope.
4+
5+
@author Erki Suurjaak
6+
@created 29.04.2015
7+
@modified 29.04.2015
8+
------------------------------------------------------------------------------
9+
"""
10+
import glob
11+
import os
12+
import setuptools
13+
14+
from inputscope import conf
15+
16+
setuptools.setup(
17+
name=conf.Title,
18+
version=conf.Version,
19+
description="Mouse and keyboard input heatmap visualizer, and input statistics",
20+
url="https://github.com/suurjaak/InputScope",
21+
22+
author="Erki Suurjaak",
23+
author_email="erki@lap.ee",
24+
license="MIT",
25+
platforms=["any"],
26+
keywords="mouse keyboard logging heatmap",
27+
28+
install_requires=["bottle", "PyUserInput"],
29+
entry_points={"gui_scripts": ["inputscope = inputscope.main:run"]},
30+
entry_points={"console_scripts": ["inputscope-listener = listener.main:run"],
31+
["inputscope-webui = webui.main:run"]},
32+
33+
packages=setuptools.find_packages(),
34+
include_package_data=True, # Use MANIFEST.in for data files
35+
classifiers=[
36+
"Development Status :: 4 - Beta",
37+
"Intended Audience :: End Users/Desktop",
38+
"Operating System :: Microsoft :: Windows",
39+
"Operating System :: Unix",
40+
"Operating System :: MacOS",
41+
"Topic :: Desktop Environment",
42+
"Topic :: System :: Monitoring",
43+
"Topic :: Utilities",
44+
"License :: OSI Approved :: MIT License",
45+
"Programming Language :: Python :: 2",
46+
"Programming Language :: Python :: 2.6",
47+
"Programming Language :: Python :: 2.7",
48+
],
49+
50+
long_description=
51+
"""Mouse and keyboard input heatmap visualizer, and input statistics.
52+
53+
Three components:
54+
- main - wxPython desktop tray program, runs listener and webui
55+
- listener - logs mouse and keyboard input
56+
- webui - web frontend for statistics and heatmaps
57+
58+
Listener and web-UI components can be run separately, or launched from main.
59+
60+
Data is kept in an SQLite database.
61+
""",
62+
)

0 commit comments

Comments
 (0)