Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into daniel_mbox for dan…
Browse files Browse the repository at this point in the history
…iel :D

Conflicts:
	memacs/lib/reader.py

Signed-off-by: Armin Wieser <armin.wieser@gmail.com>
  • Loading branch information
awieser committed Oct 25, 2012
2 parents 923338c + a4bdd96 commit 6be2e59
Show file tree
Hide file tree
Showing 46 changed files with 946 additions and 315 deletions.
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ rss/vktmp
rss/error.org_archive
filenametimestamps/vktmp/
benchmarking
Makefile
core
core
vktmp
dist/
MANIFEST
30 changes: 30 additions & 0 deletions INSTALL.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## Time-stamp: <2012-07-12 11:38:22 vk>
## This file is best viewed with GNU Emacs Org-mode: http://orgmode.org/

* How to install and set up Memacs

** *Obtain Memacs*

- using one of github download mechanisms OR
- use ~pip install memacs~ which handles dependencies
- you might as well want to use [[http://pypi.python.org/pypi/virtualenv][virtualenv]] before
- make sure that you have *Python v2.7* installed

** *Choose* the *modules* you want to use

- read the files in the ~docs~ folder

** *Set up one module* after another

- please do read ~docs/FAQs_and_Best_Practices.org~
- it contains many tips and tricks on how to meet your
requirements and on how to choose a reasonable setup
- start the module of your choice with the argument ~--help~
- modules are located in the ~bin~ sub-folder
- for example: ~/memacs/bin % ./memacs_svn.py --help~
- each module has some general arguments and module-specific arguments
- you probably want to *develop and test a module invocation* in the
command line and when it works:
- set up a periodical invocation
- read the ~Invocation~ section of ~docs/FAQs_and_Best_Practices.org~

53 changes: 53 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# note: This file is just for development purposes


all: clean quiettest whitespace todo pep8

whitespace:
@echo "removing trailing whitespaces"
@find . -name "*.py" -exec remove-trailing-whitespace.py {} \;

test:
@nosetests

quiettest:
@nosetests >/dev/null 2>&1 || echo "!!!!!!!!!!!! \n nosetests has errors\n!!!!!!!!!!!!\n"

todo:
@echo "TODO:"
@grep -Hnr TODO * | grep -v Makefile | grep -v ".pyc" | grep -v ".py~" | grep ".py" | grep -v "tmp" || echo

pep8:
@echo "pep8:"
@find . -name "*.py" -exec pep8 {} \; | grep -v "tmp" || echo

pylint:
@echo "pylint:"
@find . -name "*.py" -exec pylint {} \; | grep -v "tmp" || echo


exec:
@echo "executing all crontab entries"
@crontab -l | grep . | grep -v "#" | cut -d '*' -f6- | /bin/sh

clean:
@find -name "*.pyc" -exec rm {} \;
@find -name "*~" -exec rm {} \;
@find -name "#*" -exec rm {} \;
@find -name ".#*" -exec rm {} \;
@rm -rf core
@rm -rf MANIFEST build/ dist

countorgmodeentries:
@echo "number of orgmode-entries in ~/orgmode/memacs/*.org_archive:"
@grep -Hnr "\*\*" ~/orgmode/memacs/*.org_archive | wc

upload:
python setup.py sdist upload

pipcheckouttest:
mkdir -p /tmp/memacs-test
virtualenv /tmp/memacs-test --no-site-packages
source /tmp/memacs-test/bin/activate
pip install memacs
deactivate
73 changes: 40 additions & 33 deletions README.org
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Time-stamp: <2012-01-05 20:30:54 armin>
## Time-stamp: <2012-07-12 11:45:02 vk>
## This file is best viewed with GNU Emacs Org-mode: http://orgmode.org/

*What were you doing* on February 14th of 2007? On *which tasks* were
Expand All @@ -11,7 +11,7 @@ Most people can not answer such questions. *With Memacs you can!*
Memacs extracts metadata (subjects, timestamps, contact information,
...) from many different existing data sources (file names, emails,
tweets, bookmarks, ...) on your computer and generates files which are
readable by [[http://en.wikipedia.org/wiki/Emacs][GNU Emacs]] with [[http://orgmode.org][Org-mode]].
readable by [[http://en.wikipedia.org/wiki/Emacs][GNU Emacs]] with [[http://orgmode.org/][Org-mode]].

Example:
: emails -> memacs-maildir.org \
Expand All @@ -29,50 +29,55 @@ connectors that add data from individual data sources. Those connectors
are called «Memacs modules» or short «module».

For usage, best practices, frequently asked questions and their answers
*please refer to the file FAQs_and_Best_Practices.org*
*please refer to the file docs/FAQs_and_Best_Practices.org*. If you
want to use Memacs modules, please refer to the ~INSTALL.org~ file.


* Memacs Modules

*Existing modules*:

- *file name timestamps*: see filenametimestamps/works-for-me-hack/memacs-filenametimestamps.org
- emails:
- *[[http://en.wikipedia.org/wiki/Mbox][mbox]]-format*: see emails/mbox/works-for-me-hack/memacs-mbox.org
- [[http://en.wikipedia.org/wiki/Maildir][Maildir]]: see emails/maildir/memacs-maildir.org
- RSS: see rss/memacs-rss.org
- [[http://Twitter.com][twitter]]: see rss/memacs-rss.org
- [[http://delicious.com][delicious]]: see rss/memacs-rss.org
- newsgroups:
- *[[http://en.wikipedia.org/wiki/Slrn][slrn]]*: see emails/mbox/works-for-me-hack/memacs-mbox.org
- versioning systems:
- [[http://en.wikipedia.org/wiki/Git_(software)][git]]: see versioning_systems/git/memacs-git.org
- Subversion: see versioning_systems/svn/memacs-svn.org
- calendar:
- ics - calendar (i.e. Google Calendar): see calendar/memacs-calendar.org
- *file name timestamps*: see docs/memacs_filenametimestamps.org
- *emails*:
- [[http://en.wikipedia.org/wiki/Internet_Message_Access_Protocol][IMAP]] : see docs/memacs_imap.org
- *RSS*: see docs/memacs_rss.org i.e. for twitter,delicious,...
- *versioning systems*:
- [[http://en.wikipedia.org/wiki/Git_(software)][git]]: see docs/memacs_git.org
- [[http://en.wikipedia.org/wiki/Subversion][Subversion]]: see docs/svn/memacs_svn.org
- *calendar*:
- [[http://en.wikipedia.org/wiki/ICalendar][iCalendar]] (i.e. Google Calendar): see docs/memacs_calendar.org
- [[http://en.wikipedia.org/wiki/Comma_seperated_values][CSV]] Files: see docs/memacs_csv.org
- *SMS*: see docs/memacs_sms.org
- *Phonecalls*: see docs/memacs_phonecalls.org
- *Photos* (date from [[http://en.wikipedia.org/wiki/Exif][EXIF]]): see docs/memacs_photos.org
- *example*: see docs/memacs_csv.org
This module is just for developing purposes.

Those modules are *not* adopted to the new framework:

- *mails*:
- *[[http://en.wikipedia.org/wiki/Mbox][mbox]]-format*: see emails/mbox/works-for-me-hack/memacs_mbox.org
- [[http://en.wikipedia.org/wiki/Maildir][Maildir]]: see emails/maildir/memacs_maildir.org

- *bank account*:
- [[http://www.easybank.at][easybank.at]]: see bank_statements/easybank.at/memacs-easybank.org
- [[http://www.easybank.at][easybank.at]]: see tmp/bank_statements/easybank.at/memacs_easybank.org

- *newsgroups*
- *[[http://en.wikipedia.org/wiki/Slrn][slrn]]*: see emails/mbox/works-for-me-hack/memacs_mbox.org

Those modules will be developed in the *next weeks or months*:

- bookmarks:
- [[http://delicious.com][delicious]]: see bookmarks/delicious/memacs-delicious.org
- [[http://Twitter.com][twitter]]:
- [[http://grabeeter.tugraz.at/][grabeeter]]: see twitter/memacs-grabeeter.org
- [[http://tagstore.org][tagstore]]: see tagstore/memacs-tagstore.org
- short message system (SMS): see sms/memacs-sms.org
- calls:
- mobile phone: see phone-calls/memacs-mobilecalls.org
- *[[http://tagstore.org][tagstore]]*: see tmp/tagstore/memacs_tagstore.org

Following modules exist as a rough idea only and might get implemented
some day (by you?):

- calendar:
- [[http://www.jpilot.org/][JPilot]]-datebook: see calendar/memacs-jpilot-datebook.org
- tasks:
- [[http://www.jpilot.org/][JPilot]]-todos: see tasklists/jpilot-todos/memacs-jpilot-todos.org
- blog_systems:
- [[http://en.wikipedia.org/wiki/Serendipity_(weblog_software)][Serendipity]]: see blog_systems/serendipity/memacs-serendipity.org
- *calendar*:
- [[http://www.jpilot.org/][JPilot]]-datebook: see calendar/memacs_jpilot-datebook.org
- *tasks*:
- [[http://www.jpilot.org/][JPilot]]-todos: see tasklists/jpilot-todos/memacs_jpilot-todos.org
- *blog_systems*:
- [[http://en.wikipedia.org/wiki/Serendipity_(weblog_software)][Serendipity]]: see blog_systems/serendipity/memacs_serendipity.org


* Example Story
Expand Down Expand Up @@ -150,7 +155,7 @@ using a [[http://en.wikipedia.org/wiki/Boolean_algebra_(logic)][boolean combinat

Deeply related to Memacs, the project leader developed a research
software *[[http://tagstore.org][tagstore]]*. This system allows users to store (local) files
using tags an not a hierarchy of folders. As a natural extension,
using tags without a hierarchy of folders. As a natural extension,
tagstore targets associative access for (local) files. You might want
to check out tagstore too. Memacs and tagstore are a very useful
combination.
Expand All @@ -161,6 +166,8 @@ combination.
If you want to contribute to this cool project, please fork and
contribute or write an additional module!

See docs/FAQs_and_Best_Practices.org for more developing information.

We are sure that there are a *lot* of cool ideas for other modules out
there! This is just the beginning!

Expand Down
1 change: 1 addition & 0 deletions README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See Readme.org (open with GNU Emacs)
2 changes: 1 addition & 1 deletion bin/memacs_maildir.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"""
COPYRIGHT_YEAR = "2011-2012"
COPYRIGHT_AUTHORS = """Karl Voit <tools@Karl-Voit.at>,
Armin Wieser <armin.wieser@gmail.com>,
Armin Wieser <armin.wieser@gmail.com>,
Daniel Fussenegger <daniel.pandapaps@gmail.com>"""


Expand Down
2 changes: 1 addition & 1 deletion bin/memacs_mbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"""
COPYRIGHT_YEAR = "2011-2012"
COPYRIGHT_AUTHORS = """Karl Voit <tools@Karl-Voit.at>,
Armin Wieser <armin.wieser@gmail.com>,
Armin Wieser <armin.wieser@gmail.com>,
Daniel Fussenegger <daniel.pandapaps@gmail.com>"""


Expand Down
32 changes: 32 additions & 0 deletions bin/memacs_photos.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Time-stamp: <2012-03-10 18:04:01 armin>

from memacs.photos import PhotosMemacs

PROG_VERSION_NUMBER = u"0.1"
PROG_VERSION_DATE = u"2012-03-10"
PROG_SHORT_DESCRIPTION = u"Memacs for photos (exif)"
PROG_TAG = u"photos"
PROG_DESCRIPTION = u"""
This memacs module will walk through a given folder looking for photos.
If a photo is found, it will get a timestamp from the exif information.
Then an Org-mode file is generated.
"""
COPYRIGHT_YEAR = "2012"
COPYRIGHT_AUTHORS = """Karl Voit <tools@Karl-Voit.at>,
Armin Wieser <armin.wieser@gmail.com>"""

if __name__ == "__main__":
memacs = PhotosMemacs(
prog_version=PROG_VERSION_NUMBER,
prog_version_date=PROG_VERSION_DATE,
prog_description=PROG_DESCRIPTION,
prog_short_description=PROG_SHORT_DESCRIPTION,
prog_tag=PROG_TAG,
copyright_year=COPYRIGHT_YEAR,
copyright_authors=COPYRIGHT_AUTHORS
)
memacs.handle_main()
4 changes: 2 additions & 2 deletions bin/memacs_tagstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
PROG_VERSION_DATE = u"2012-03-14"
PROG_SHORT_DESCRIPTION = u"Memacs for tagstore"
PROG_TAG = u"tagstore"
PROG_DESCRIPTION = u"""The memacs module will fetch all infos
PROG_DESCRIPTION = u"""The memacs module will fetch all infos
of given file (-f or --store_file <path to Tagstore store.tgs file>),
parses the file and writes the output to an orgfile.
"""
COPYRIGHT_YEAR = "2011-2012"
COPYRIGHT_AUTHORS = """Karl Voit <tools@Karl-Voit.at>,
Armin Wieser <armin.wieser@gmail.com>,
Armin Wieser <armin.wieser@gmail.com>,
Daniel Fussenegger <daniel.pandapaps@gmail.com>"""


Expand Down
2 changes: 1 addition & 1 deletion bin/memacs_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

COPYRIGHT_YEAR = "2011-2012"
COPYRIGHT_AUTHORS = """Karl Voit <tools@Karl-Voit.at>,
Armin Wieser <armin.wieser@gmail.com>,
Armin Wieser <armin.wieser@gmail.com>,
Daniel Fussenegger <daniel.pandapaps@gmail.com> """

if __name__ == "__main__":
Expand Down
Loading

0 comments on commit 6be2e59

Please sign in to comment.