Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added shebang, license, README

  • Loading branch information...
commit 3f8bfe7c003cab37f2d932555d9bf4d64f4d33a8 1 parent 72b999e
@dnet authored
Showing with 147 additions and 0 deletions.
  1. +35 −0 README.md
  2. +28 −0 config.py
  3. +28 −0 dashboard.py
  4. +28 −0 orgmode.py
  5. +28 −0 redmine.py
View
35 README.md
@@ -0,0 +1,35 @@
+Personal dashboard
+==================
+
+Usage
+-----
+
+The core `dashboard.py` reads the configuration and writes an HTML (or any other text-based format) file with a configured name. It doesn't take any command line arguments and if everything goes well, doesn't write anything to the standard error and output. This makes it perfect to run it from cron on UNIX-like systems or Task Scheduler on Windows.
+
+Setup and install
+-----------------
+
+1. Install the dependencies if necessary (see below).
+2. Create a new directory / folder and check out the repository into it.
+3. Copy the `dashboard.sample.conf` to `~/.config/dnet/dashboard.conf` and modify it to your needs.
+4. You can now test it by running `python dashboard.py`.
+
+License
+-------
+
+The whole project (including the Orgnode module by Charles Cave) is licensed under MIT license.
+
+Module interface
+----------------
+
+A module named `foobar` should be in a file named `foobar.py`. There should be at least one class named `Foobar` with a constructor that takes no parameters. An instance of this class must have a `getTodo()` method which also takes no parameters and returns the list of todos in the following format. Todos are stored as a list of dictionaries, each of these should contain at least a `title`, a `subtitle` and a `link` item.
+
+For persistence, the `Config` class in the `config` module should be used, which extends the `QSettings` class with a constructor that takes no parameters. This way, configuration is stored in a standard way, commonplace `QSettings` methods can and should be used, most frequently `setValue("group/key", value)` and `value("group/key")`. It stores configuration using a native method of the platform, such as `~/.config/dnet/dashboard.conf` on UNIX-like systems, and registry on Windows. Further information and reference can be found at http://doc.qt.nokia.com/qsettings.html.
+
+Dependencies
+------------
+
+ - Python 2.x (tested on 2.5)
+ - PyQt4 (Debian/Ubuntu package: `python-qt4`)
+ - Universal Feed Parser (for Redmine module only, Debian/Ubuntu package: `python-feedparser`)
+ - Django (Debian/Ubuntu package: `python-django`)
View
28 config.py
@@ -1,3 +1,31 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# config.py - extends QSettings to set up a consistent location
+#
+# Copyright (c) 2011 András Veres-Szentkirályi
+#
+# 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.
+
from PyQt4 import QtCore
class Config(QtCore.QSettings):
View
28 dashboard.py 100644 → 100755
@@ -1,3 +1,31 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# dashboard.py - generates an HTML file from modules using django
+#
+# Copyright (c) 2011 András Veres-Szentkirályi
+#
+# 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.
+
from __future__ import with_statement
from django.template import Template, Context
from django.conf import settings
View
28 orgmode.py
@@ -1,3 +1,31 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# orgmode.py - extracts TODOs from Org-mode files
+#
+# Copyright (c) 2011 András Veres-Szentkirályi
+#
+# 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.
+
import Orgnode
import os
from config import Config
View
28 redmine.py
@@ -1,3 +1,31 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# redmine.py - extracts open tickets from Redmine (Atom feed)
+#
+# Copyright (c) 2011 András Veres-Szentkirályi
+#
+# 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.
+
from config import Config
import feedparser
import urlparse
Please sign in to comment.
Something went wrong with that request. Please try again.