Permalink
Browse files

initial relase of rework and conversion to cherrypy

  • Loading branch information...
1 parent 1383010 commit 4e9c76a5890aab0b32c6fffd412d0cc46624a994 @sim0nx committed Aug 25, 2013
Showing with 6,849 additions and 7,948 deletions.
  1. +9 −0 .gitignore
  2. +0 −4 MeMaTool/.gitignore
  3. +0 −3 MeMaTool/MANIFEST.in
  4. +0 −10 MeMaTool/MeMaTool.egg-info/PKG-INFO
  5. +0 −1 MeMaTool/MeMaTool.egg-info/dependency_links.txt
  6. +0 −7 MeMaTool/MeMaTool.egg-info/entry_points.txt
  7. +0 −1 MeMaTool/MeMaTool.egg-info/not-zip-safe
  8. +0 −2 MeMaTool/MeMaTool.egg-info/paster_plugins.txt
  9. +0 −2 MeMaTool/MeMaTool.egg-info/requires.txt
  10. +0 −1 MeMaTool/MeMaTool.egg-info/top_level.txt
  11. +0 −19 MeMaTool/README.txt
  12. +0 −175 MeMaTool/bin/mematool_reminders.py
  13. +0 −8 MeMaTool/compile_i18n.sh
  14. +0 −83 MeMaTool/development.ini.sample
  15. +0 −19 MeMaTool/docs/index.txt
  16. +0 −46 MeMaTool/docs/syn2cat.schema
  17. +0 −276 MeMaTool/ez_setup.py
  18. +0 −63 MeMaTool/mematool/config/deployment.ini_tmpl
  19. +0 −58 MeMaTool/mematool/config/environment.py
  20. +0 −68 MeMaTool/mematool/config/middleware.py
  21. +0 −30 MeMaTool/mematool/config/routing.py
  22. +0 −124 MeMaTool/mematool/controllers/auth.py
  23. +0 −84 MeMaTool/mematool/controllers/error.py
  24. +0 −221 MeMaTool/mematool/controllers/groups.py
  25. +0 −382 MeMaTool/mematool/controllers/mails.py
  26. +0 −417 MeMaTool/mematool/controllers/members.py
  27. +0 −437 MeMaTool/mematool/controllers/payments.py
  28. +0 −138 MeMaTool/mematool/controllers/preferences.py
  29. +0 −290 MeMaTool/mematool/controllers/profile.py
  30. +0 −19 MeMaTool/mematool/lib/app_globals.py
  31. +0 −254 MeMaTool/mematool/lib/base.py
  32. +0 −32 MeMaTool/mematool/lib/helpers.py
  33. +0 −36 MeMaTool/mematool/lib/syn2cat/auth/auth_ldap.py
  34. +0 −29 MeMaTool/mematool/lib/syn2cat/crypto.py
  35. +0 −79 MeMaTool/mematool/lib/syn2cat/ldapConnector.py
  36. +0 −13 MeMaTool/mematool/lib/syn2cat/regex.py
  37. +0 −14 MeMaTool/mematool/lib/syn2cat/singleton.py
  38. +0 −142 MeMaTool/mematool/public/css/app.css
  39. +0 −9 MeMaTool/mematool/public/css/bootstrap.min.css
  40. +0 −36 MeMaTool/mematool/public/css/ie.css
  41. +0 −29 MeMaTool/mematool/public/css/print.css
  42. +0 −265 MeMaTool/mematool/public/css/screen.css
  43. +0 −578 MeMaTool/mematool/public/css/ui.css
  44. BIN MeMaTool/mematool/public/images/footerlogo.png
  45. BIN MeMaTool/mematool/public/images/ui/ui-bg_diagonals-thick_18_b81900_40x40.png
  46. BIN MeMaTool/mematool/public/images/ui/ui-bg_diagonals-thick_20_666666_40x40.png
  47. BIN MeMaTool/mematool/public/images/ui/ui-bg_flat_10_000000_40x100.png
  48. BIN MeMaTool/mematool/public/images/ui/ui-bg_glass_100_f6f6f6_1x400.png
  49. BIN MeMaTool/mematool/public/images/ui/ui-bg_glass_100_fdf5ce_1x400.png
  50. BIN MeMaTool/mematool/public/images/ui/ui-bg_glass_65_ffffff_1x400.png
  51. BIN MeMaTool/mematool/public/images/ui/ui-bg_gloss-wave_35_f6a828_500x100.png
  52. BIN MeMaTool/mematool/public/images/ui/ui-bg_highlight-soft_100_eeeeee_1x100.png
  53. BIN MeMaTool/mematool/public/images/ui/ui-bg_highlight-soft_75_ffe45c_1x100.png
  54. BIN MeMaTool/mematool/public/images/ui/ui-icons_222222_256x240.png
  55. BIN MeMaTool/mematool/public/images/ui/ui-icons_228ef1_256x240.png
  56. BIN MeMaTool/mematool/public/images/ui/ui-icons_ef8c08_256x240.png
  57. BIN MeMaTool/mematool/public/images/ui/ui-icons_ffd27a_256x240.png
  58. BIN MeMaTool/mematool/public/images/ui/ui-icons_ffffff_256x240.png
  59. +0 −6 MeMaTool/mematool/public/javascript/bootstrap.min.js
  60. +0 −16 MeMaTool/mematool/public/javascript/jquery.js
  61. +0 −784 MeMaTool/mematool/public/javascript/ui.jquery.js
  62. BIN MeMaTool/mematool/public/pylons-logo.gif
  63. +0 −21 MeMaTool/mematool/templates/syn2cat/auth/login.mako
  64. +0 −166 MeMaTool/mematool/templates/syn2cat/base.mako
  65. +0 −47 MeMaTool/mematool/templates/syn2cat/groups/editGroup.mako
  66. +0 −24 MeMaTool/mematool/templates/syn2cat/groups/listGroups.mako
  67. +0 −78 MeMaTool/mematool/templates/syn2cat/mails/editAlias.mako
  68. +0 −45 MeMaTool/mematool/templates/syn2cat/mails/editDomain.mako
  69. +0 −32 MeMaTool/mematool/templates/syn2cat/mails/listAliases.mako
  70. +0 −23 MeMaTool/mematool/templates/syn2cat/mails/listDomains.mako
  71. +0 −268 MeMaTool/mematool/templates/syn2cat/members/editMember.mako
  72. +0 −71 MeMaTool/mematool/templates/syn2cat/members/viewAll.mako
  73. +0 −198 MeMaTool/mematool/templates/syn2cat/members/viewDiff.mako
  74. +0 −44 MeMaTool/mematool/templates/syn2cat/payments/bulkAdd.mako
  75. +0 −63 MeMaTool/mematool/templates/syn2cat/payments/editPayment.mako
  76. +0 −63 MeMaTool/mematool/templates/syn2cat/payments/listPayments.mako
  77. +0 −59 MeMaTool/mematool/templates/syn2cat/payments/showOutstanding.mako
  78. +0 −5 MeMaTool/mematool/templates/syn2cat/pendingMemberValidations.mako
  79. +0 −40 MeMaTool/mematool/templates/syn2cat/preferences/edit.mako
  80. +0 −232 MeMaTool/mematool/templates/syn2cat/profile/edit.mako
  81. +0 −40 MeMaTool/mematool/templates/syn2cat/profile/editAvatar.mako
  82. +0 −35 MeMaTool/mematool/templates/syn2cat/statistics/index.mako
  83. +0 −8 MeMaTool/mematool/templates/syn2cat/unauthorized.mako
  84. +0 −15 MeMaTool/mematool/templates/syn2cat2/auth/login.mako
  85. +0 −177 MeMaTool/mematool/templates/syn2cat2/base.mako
  86. +0 −23 MeMaTool/mematool/templates/syn2cat2/groups/listGroups.mako
  87. +0 −23 MeMaTool/mematool/templates/syn2cat2/mails/listDomains.mako
  88. +0 −5 MeMaTool/mematool/templates/syn2cat2/members/exportCSV.mako
  89. +0 −10 MeMaTool/mematool/templates/syn2cat2/members/exportRCSLCSV.mako
  90. +0 −4 MeMaTool/mematool/templates/syn2cat2/members/view.mako
  91. +0 −45 MeMaTool/mematool/templates/syn2cat2/members/viewAll.mako
  92. +0 −41 MeMaTool/mematool/templates/syn2cat2/payments/bulkAdd.mako
  93. +0 −62 MeMaTool/mematool/templates/syn2cat2/payments/editPayment.mako
  94. +0 −62 MeMaTool/mematool/templates/syn2cat2/payments/listPayments.mako
  95. +0 −43 MeMaTool/mematool/templates/syn2cat2/payments/showOutstanding.mako
  96. +0 −5 MeMaTool/mematool/templates/syn2cat2/pendingMemberValidations.mako
  97. +0 −34 MeMaTool/mematool/tests/__init__.py
  98. +0 −7 MeMaTool/mematool/tests/functional/test_auth.py
  99. +0 −7 MeMaTool/mematool/tests/functional/test_members.py
  100. +0 −7 MeMaTool/mematool/tests/functional/test_payments.py
  101. 0 MeMaTool/mematool/tests/test_models.py
  102. +0 −29 MeMaTool/mematool/websetup.py
  103. +0 −6 MeMaTool/redeploy.sh
  104. +0 −32 MeMaTool/setup.cfg
  105. +0 −37 MeMaTool/setup.py
  106. +0 −1 MeMaTool/setup_tables.sh
  107. +0 −2 MeMaTool/start.sh
  108. +0 −21 MeMaTool/test.ini
  109. +0 −11 MeMaTool/update_i18n.sh
  110. +0 −51 MeMaTool/who.ini
  111. +12 −0 config/cherrypy.conf_sample
  112. +49 −0 config/mematool.conf_sample
  113. BIN {MeMaTool/mematool/public → htdocs}/bg.png
  114. +1 −0 htdocs/css/bootstrap-theme.min.css
  115. +9 −0 htdocs/css/bootstrap.min.css
  116. +481 −0 htdocs/css/datepicker.css
  117. 0 {MeMaTool/mematool/public → htdocs}/css/main.css
  118. 0 {MeMaTool/mematool/public → htdocs}/css/mematool_bootstrap_custom.css
  119. BIN {MeMaTool/mematool/public → htdocs}/favicon.ico
  120. BIN htdocs/fonts/glyphicons-halflings-regular.eot
  121. +228 −0 htdocs/fonts/glyphicons-halflings-regular.svg
  122. BIN htdocs/fonts/glyphicons-halflings-regular.ttf
  123. BIN htdocs/fonts/glyphicons-halflings-regular.woff
  124. BIN {MeMaTool/mematool/public → htdocs}/images/glyphicons-halflings-white.png
  125. BIN {MeMaTool/mematool/public → htdocs}/images/glyphicons-halflings.png
  126. BIN {MeMaTool/mematool/public → htdocs}/images/icons/add.png
  127. BIN {MeMaTool/mematool/public → htdocs}/images/icons/cross.png
  128. BIN {MeMaTool/mematool/public → htdocs}/images/icons/flags/de.png
  129. BIN {MeMaTool/mematool/public → htdocs}/images/icons/flags/en.png
  130. BIN {MeMaTool/mematool/public → htdocs}/images/icons/flags/fr.png
  131. BIN {MeMaTool/mematool/public → htdocs}/images/icons/flags/lu.png
  132. BIN {MeMaTool/mematool/public → htdocs}/images/icons/flags/nl.png
  133. BIN {MeMaTool/mematool/public → htdocs}/images/icons/fullmember.png
  134. BIN {MeMaTool/mematool/public → htdocs}/images/icons/new.png
  135. BIN {MeMaTool/mematool/public → htdocs}/images/icons/notfullmember.png
  136. BIN {MeMaTool/mematool/public → htdocs}/images/icons/notok.png
  137. BIN {MeMaTool/mematool/public → htdocs}/images/icons/ok.png
  138. BIN {MeMaTool/mematool/public → htdocs}/images/icons/payment.png
  139. BIN {MeMaTool/mematool/public → htdocs}/images/icons/pencil.png
  140. BIN {MeMaTool/mematool/public → htdocs}/images/logo.png
  141. +1,395 −0 htdocs/javascript/bootstrap-datepicker.js
  142. +6 −0 htdocs/javascript/bootstrap.min.js
  143. +6 −0 htdocs/javascript/jquery-2.0.3.min.js
  144. +1 −0 htdocs/javascript/jquery.min.js
  145. +15 −0 htdocs/javascript/locales/bootstrap-datepicker.ar.js
  146. +14 −0 htdocs/javascript/locales/bootstrap-datepicker.bg.js
  147. +14 −0 htdocs/javascript/locales/bootstrap-datepicker.ca.js
  148. +15 −0 htdocs/javascript/locales/bootstrap-datepicker.cs.js
  149. +14 −0 htdocs/javascript/locales/bootstrap-datepicker.cy.js
  150. +14 −0 htdocs/javascript/locales/bootstrap-datepicker.da.js
  151. +17 −0 htdocs/javascript/locales/bootstrap-datepicker.de.js
  152. +13 −0 htdocs/javascript/locales/bootstrap-datepicker.el.js
  153. +14 −0 htdocs/javascript/locales/bootstrap-datepicker.es.js
  154. +14 −0 htdocs/javascript/locales/bootstrap-datepicker.et.js
  155. +16 −0 htdocs/javascript/locales/bootstrap-datepicker.fi.js
  156. +17 −0 htdocs/javascript/locales/bootstrap-datepicker.fr.js
  157. +15 −0 htdocs/javascript/locales/bootstrap-datepicker.he.js
  158. +13 −0 htdocs/javascript/locales/bootstrap-datepicker.hr.js
  159. +16 −0 htdocs/javascript/locales/bootstrap-datepicker.hu.js
  160. +15 −0 htdocs/javascript/locales/bootstrap-datepicker.id.js
  161. +14 −0 htdocs/javascript/locales/bootstrap-datepicker.is.js
  162. +16 −0 htdocs/javascript/locales/bootstrap-datepicker.it.js
  163. +15 −0 htdocs/javascript/locales/bootstrap-datepicker.ja.js
  164. +15 −0 htdocs/javascript/locales/bootstrap-datepicker.ka.js
  165. +13 −0 htdocs/javascript/locales/bootstrap-datepicker.kr.js
  166. +16 −0 htdocs/javascript/locales/bootstrap-datepicker.lt.js
  167. +16 −0 htdocs/javascript/locales/bootstrap-datepicker.lv.js
  168. +14 −0 htdocs/javascript/locales/bootstrap-datepicker.mk.js
  169. +14 −0 htdocs/javascript/locales/bootstrap-datepicker.ms.js
  170. +14 −0 htdocs/javascript/locales/bootstrap-datepicker.nb.js
  171. +16 −0 htdocs/javascript/locales/bootstrap-datepicker.nl-BE.js
  172. +14 −0 htdocs/javascript/locales/bootstrap-datepicker.nl.js
  173. +15 −0 htdocs/javascript/locales/bootstrap-datepicker.no.js
  174. +15 −0 htdocs/javascript/locales/bootstrap-datepicker.pl.js
  175. +15 −0 htdocs/javascript/locales/bootstrap-datepicker.pt-BR.js
  176. +16 −0 htdocs/javascript/locales/bootstrap-datepicker.pt.js
  177. +15 −0 htdocs/javascript/locales/bootstrap-datepicker.ro.js
  178. +14 −0 htdocs/javascript/locales/bootstrap-datepicker.rs-latin.js
  179. +14 −0 htdocs/javascript/locales/bootstrap-datepicker.rs.js
  180. +15 −0 htdocs/javascript/locales/bootstrap-datepicker.ru.js
  181. +15 −0 htdocs/javascript/locales/bootstrap-datepicker.sk.js
  182. +14 −0 htdocs/javascript/locales/bootstrap-datepicker.sl.js
  183. +15 −0 htdocs/javascript/locales/bootstrap-datepicker.sq.js
  184. +16 −0 htdocs/javascript/locales/bootstrap-datepicker.sv.js
  185. +15 −0 htdocs/javascript/locales/bootstrap-datepicker.sw.js
  186. +14 −0 htdocs/javascript/locales/bootstrap-datepicker.th.js
  187. +16 −0 htdocs/javascript/locales/bootstrap-datepicker.tr.js
  188. +15 −0 htdocs/javascript/locales/bootstrap-datepicker.ua.js
  189. +14 −0 htdocs/javascript/locales/bootstrap-datepicker.uk.js
  190. +16 −0 htdocs/javascript/locales/bootstrap-datepicker.zh-CN.js
  191. +17 −0 htdocs/javascript/locales/bootstrap-datepicker.zh-TW.js
  192. +0 −10 {MeMaTool/mematool/public → htdocs}/javascript/mematool.js
  193. BIN {MeMaTool/mematool/public → htdocs}/unauthorized.gif
  194. BIN {MeMaTool/mematool → }/i18n/de/LC_MESSAGES/mematool.mo
  195. 0 {MeMaTool/mematool → }/i18n/de/LC_MESSAGES/mematool.po
  196. BIN {MeMaTool/mematool → }/i18n/en/LC_MESSAGES/mematool.mo
  197. 0 {MeMaTool/mematool → }/i18n/en/LC_MESSAGES/mematool.po
  198. BIN {MeMaTool/mematool/i18n/lb → i18n/lu}/LC_MESSAGES/mematool.mo
  199. 0 {MeMaTool/mematool/i18n/lb → i18n/lu}/LC_MESSAGES/mematool.po
  200. 0 {MeMaTool/mematool → }/i18n/mematool.pot
  201. +98 −0 mematool-run.py
  202. +63 −0 mematool/__init__.py
  203. +211 −0 mematool/controllers/__init__.py
  204. +218 −0 mematool/controllers/groups.py
  205. +119 −0 mematool/controllers/index.py
  206. +376 −0 mematool/controllers/mails.py
  207. +391 −0 mematool/controllers/members.py
  208. +441 −0 mematool/controllers/payments.py
  209. +135 −0 mematool/controllers/preferences.py
  210. +266 −0 mematool/controllers/profile.py
  211. +15 −27 {MeMaTool → }/mematool/controllers/statistics.py
  212. 0 {MeMaTool/mematool → mematool/helpers}/__init__.py
  213. +1 −1 {MeMaTool/mematool/lib/syn2cat → mematool/helpers}/countrycodes.py
  214. 0 {MeMaTool/mematool/lib/syn2cat → mematool/helpers}/countrycodes.txt
  215. 0 {MeMaTool/mematool/lib/syn2cat → mematool/helpers}/countrycodes_to_python.pl
  216. +47 −0 mematool/helpers/crypto.py
  217. +9 −9 MeMaTool/mematool/model/__init__.py → mematool/helpers/exceptions.py
  218. +264 −0 mematool/helpers/i18ntool.py
  219. +43 −0 mematool/helpers/ldapConnector.py
  220. +4 −4 {MeMaTool/mematool/model → mematool/helpers}/lechecker.py
  221. +12 −14 MeMaTool/mematool/model/meta.py → mematool/helpers/regex.py
  222. 0 {MeMaTool/mematool/config → mematool/model}/__init__.py
  223. +16 −16 {MeMaTool → }/mematool/model/baseModelFactory.py
  224. +4 −5 {MeMaTool → }/mematool/model/dbmodel.py
  225. +62 −70 {MeMaTool → }/mematool/model/ldapModelFactory.py
  226. +114 −42 {MeMaTool → }/mematool/model/ldapmodel.py
  227. +108 −0 mematool/model/satool.py
  228. 0 MeMaTool/mematool/controllers/__init__.py → sessions/.keep
  229. +25 −0 templates/syn2cat/auth/login.mako
  230. +194 −0 templates/syn2cat/base.mako
  231. +5 −6 {MeMaTool/mematool/templates/syn2cat2 → templates/syn2cat}/groups/editGroup.mako
  232. +21 −0 templates/syn2cat/groups/listGroups.mako
  233. +22 −12 {MeMaTool/mematool/templates/syn2cat2 → templates/syn2cat}/mails/editAlias.mako
  234. +7 −7 {MeMaTool/mematool/templates/syn2cat2 → templates/syn2cat}/mails/editDomain.mako
  235. +2 −4 {MeMaTool/mematool/templates/syn2cat2 → templates/syn2cat}/mails/listAliases.mako
  236. +20 −0 templates/syn2cat/mails/listDomains.mako
  237. +35 −42 {MeMaTool/mematool/templates/syn2cat2 → templates/syn2cat}/members/editMember.mako
  238. 0 {MeMaTool/mematool → }/templates/syn2cat/members/exportCSV.mako
  239. 0 {MeMaTool/mematool → }/templates/syn2cat/members/exportRCSLCSV.mako
  240. 0 {MeMaTool/mematool → }/templates/syn2cat/members/view.mako
  241. +43 −0 templates/syn2cat/members/viewAll.mako
  242. +6 −6 {MeMaTool/mematool/templates/syn2cat2 → templates/syn2cat}/members/viewDiff.mako
  243. +40 −0 templates/syn2cat/payments/bulkAdd.mako
  244. +64 −0 templates/syn2cat/payments/editPayment.mako
  245. +61 −0 templates/syn2cat/payments/listPayments.mako
  246. +45 −0 templates/syn2cat/payments/showOutstanding.mako
  247. +9 −0 templates/syn2cat/pendingMemberValidations.mako
  248. +13 −5 {MeMaTool/mematool/templates/syn2cat2 → templates/syn2cat}/preferences/edit.mako
  249. +20 −25 {MeMaTool/mematool/templates/syn2cat2 → templates/syn2cat}/profile/edit.mako
  250. +5 −7 {MeMaTool/mematool/templates/syn2cat2 → templates/syn2cat}/profile/editAvatar.mako
  251. +0 −3 {MeMaTool/mematool/templates/syn2cat2 → templates/syn2cat}/statistics/index.mako
  252. +0 −1 {MeMaTool/mematool/templates/syn2cat2 → templates/syn2cat}/unauthorized.mako
  253. +80 −0 test.py
  254. 0 {MeMaTool/mematool/lib → test}/__init__.py
  255. 0 {MeMaTool/mematool/lib/syn2cat → test/mematool}/__init__.py
  256. 0 {MeMaTool/mematool/lib/syn2cat/auth → test/mematool/model}/__init__.py
  257. 0 {MeMaTool/mematool/tests/functional → test/mematool/model/ldap}/__init__.py
  258. +219 −0 test/mematool/model/ldapModelFactory.py
  259. 0 MeMaTool/mematool/public/javascript/profile.jquery.js → tmp/.keep
View
@@ -0,0 +1,9 @@
+.project
+.pydevproject
+.settings
+babel
+babel_repo
+tmp/
+sessions/
+config/*.conf
+*.sqlite
View
@@ -1,4 +0,0 @@
-*.pyc
-development.ini
-data/
-*.swp
View
@@ -1,3 +0,0 @@
-include mematool/config/deployment.ini_tmpl
-recursive-include mematool/public *
-recursive-include mematool/templates *
@@ -1,10 +0,0 @@
-Metadata-Version: 1.0
-Name: MeMaTool
-Version: 0.1dev
-Summary: UNKNOWN
-Home-page: UNKNOWN
-Author: UNKNOWN
-Author-email: UNKNOWN
-License: UNKNOWN
-Description: UNKNOWN
-Platform: UNKNOWN
@@ -1 +0,0 @@
-
@@ -1,7 +0,0 @@
-
- [paste.app_factory]
- main = mematool.config.middleware:make_app
-
- [paste.app_install]
- main = pylons.util:PylonsInstaller
-
@@ -1 +0,0 @@
-
@@ -1,2 +0,0 @@
-PasteScript
-Pylons
@@ -1,2 +0,0 @@
-Pylons>=0.10
-SQLAlchemy>=0.5
@@ -1 +0,0 @@
-mematool
View
@@ -1,19 +0,0 @@
-This file is for you to describe the MeMaTool application. Typically
-you would include information such as the information below:
-
-Installation and Setup
-======================
-
-Install ``MeMaTool`` using easy_install::
-
- easy_install MeMaTool
-
-Make a config file as follows::
-
- paster make-config MeMaTool config.ini
-
-Tweak the config file as appropriate and then setup the application::
-
- paster setup-app config.ini
-
-Then you are ready to go.
@@ -1,175 +0,0 @@
-#!/usr/bin/python
-
-#
-# Copyright (c) 2012 Georges Toth <georges _at_ trypill _dot_ org>
-#
-# This file is part of MeMaTool.
-#
-# MeMaTool is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# MeMaTool is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with MeMaTool. If not, see <http://www.gnu.org/licenses/>.
-
-import smtplib
-import string
-import random
-from email.mime.text import MIMEText
-
-import sys
-sys.path.append('/home/sim0n/MeMaTool/MeMaTool')
-
-
-import ConfigParser
-from mematool.model import Payment, Member
-import pylons
-
-
-from mematool.model.ldapModelFactory import LdapModelFactory
-import sqlalchemy
-from sqlalchemy.orm import sessionmaker
-from sqlalchemy.orm.exc import NoResultFound
-from sqlalchemy import and_, or_
-from datetime import date, datetime
-
-
-
-def id_generator(size=6, chars=string.ascii_uppercase + string.digits):
- return ''.join(random.choice(chars) for x in range(size))
-
-
-def sendReminder(mail):
- body = '''Hi,
-
---- Automatic mail ... do not reply to this mail directly ! ---
-
-
-This is a reminder for paying your syn2cat membership fee.
-If you are sure you have already paid, please ignore this mail...
-bank<->mematool synchronization is a manual task.
-BTW, you can see the status of your received payments in mematool[0] or contact me[1]
-if you wish.
-
-Please consider setting up a standing order or paying at least on a 6month
-basis.
-If possible also think about managing your payments autonomously so we don\'t
-have to bug you each time
-
-For those being late already a couple of months, I urge you to get in contact
-with me else we will have to consider your silence as a wish to leave the
-association.
-
-As always....payment troubles are ok and we are understanding....just let us
-know.
-
-
-Payment information:
-- 1 year fee = 114euro
-- Bank account:
- Holder: syn2cat a.s.b.l.
- Bank: BCEE
- IBAN: LU93 0019 3255 6612 9000
- BIC/SWIFT: BCEELULL
-
-
-
-cheerz.... see you and thanks for your continuing support
-
-
-
-[0]: https://mematool.hackerspace.lu:8443
-[1]: treasurer-payments@hackerspace.lu'''
-
-
- msg = MIMEText(body)
-
- from_ = 'syn2cat treasurer <' + id_generator(8) + '@hackerspace.lu>'
- to_ = mail
- msg['Subject'] = 'syn2cat membership fee'
- msg['From'] = from_
- msg['To'] = to_
-
- s = smtplib.SMTP('localhost')
- s.sendmail(from_, [to_], msg.as_string())
- s.quit()
-
-
-def printOutstanding(member, date):
- d = date
- today = datetime.now().date()
-
- print member
- print d.year, today.year
- print d.month, today.month
- print today.day
- print
-
-def getOutstanding(lmf):
- activeMembers = lmf.getActiveMemberList()
- members = {}
-
- for uid in activeMembers:
- last_payment = None
-
- try:
- last_payment = Session.query(Payment).filter(and_(Payment.uid == uid, Payment.verified == 1)).order_by(Payment.date.desc()).limit(1)[0]
- except:
- ''' Don't care if there is no payment '''
- pass
-
- m = lmf.getUser(uid)
-
- if last_payment:
- d = last_payment.date
- today = datetime.now().date()
-
- if d.year > today.year or (d.year == today.year and d.month >= today.month):
- pass
- elif d.year == today.year:
- if today.month - d.month == 1:
- if today.day == 28:
- members[m.uid] = [d, m.mail]
- else:
- pass
- else:
- if today.day % 7 == 0:
- members[m.uid] = [d, m.mail]
- else:
- pass
- else:
- if today.day % 7 == 0:
- members[m.uid] = [d, m.mail]
- else:
- pass
-
- return members
-
-
-config_global = ConfigParser.RawConfigParser()
-config_global.read('/home/sim0n/MeMaTool/MeMaTool/production.ini')
-cnf = {}
-cnf['mematool'] = {}
-
-for k, v in config_global.items('app:main'):
- cnf[k] = v
-
-db_url = config_global.get('app:main', 'sqlalchemy.url')
-__all__ = ['Session']
-db = sqlalchemy.create_engine(db_url)
-connection = db.connect()
-Session = sessionmaker(bind=db)()
-
-
-lmf = LdapModelFactory(cnf)
-members = getOutstanding(lmf)
-
-for k, v in members.items():
- printOutstanding(k, v[0])
- sendReminder(v[1])
View
@@ -1,8 +0,0 @@
-#!/bin/bash
-
-for k in `find mematool/i18n -name \*.po`
-do
- echo $k
- MO=`echo $k | sed "s/\.po/\.mo/"`
- msgfmt $k -o $MO
-done
@@ -1,83 +0,0 @@
-#
-# MeMaTool - Pylons development environment configuration
-#
-# The %(here)s variable will be replaced with the parent directory of this file
-#
-[DEFAULT]
-debug = true
-# Uncomment and replace with the address which should receive any error reports
-#email_to = you@yourdomain.com
-smtp_server = localhost
-error_email_from = paste@localhost
-
-[server:main]
-use = egg:Paste#http
-host = 127.0.0.1
-port = 5000
-
-[app:main]
-use = egg:MeMaTool
-full_stack = true
-static_files = true
-
-cache_dir = %(here)s/data
-beaker.session.key = mematool
-beaker.session.secret = somesecret
-
-# If you'd like to fine-tune the individual locations of the cache data dirs
-# for the Cache data, or the Session saves, un-comment the desired settings
-# here:
-#beaker.cache.data_dir = %(here)s/data/cache
-#beaker.session.data_dir = %(here)s/data/sessions
-
-# SQLAlchemy database URL
-sqlalchemy.url = sqlite:///%(here)s/development.db
-
-# WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT*
-# Debug mode will enable the interactive debugging tool, allowing ANYONE to
-# execute malicious code after an exception is raised.
-#set debug = false
-
-
-# Logging configuration
-[loggers]
-keys = root, routes, mematool, sqlalchemy
-
-[handlers]
-keys = console
-
-[formatters]
-keys = generic
-
-[logger_root]
-level = INFO
-handlers = console
-
-[logger_routes]
-level = INFO
-handlers =
-qualname = routes.middleware
-# "level = DEBUG" logs the route matched and routing variables.
-
-[logger_mematool]
-level = DEBUG
-handlers =
-qualname = mematool
-
-[logger_sqlalchemy]
-level = INFO
-handlers =
-qualname = sqlalchemy.engine
-# "level = INFO" logs SQL queries.
-# "level = DEBUG" logs SQL queries and results.
-# "level = WARN" logs neither. (Recommended for production systems.)
-
-[handler_console]
-class = StreamHandler
-args = (sys.stderr,)
-level = NOTSET
-formatter = generic
-
-[formatter_generic]
-format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] [%(threadName)s] %(message)s
-datefmt = %H:%M:%S
View
@@ -1,19 +0,0 @@
-mematool
-++++++++
-
-This is the main index page of your documentation. It should be written in
-`reStructuredText format <http://docutils.sourceforge.net/rst.html>`_.
-
-You can generate your documentation in HTML format by running this command::
-
- setup.py pudge
-
-For this to work you will need to download and install `buildutils`_,
-`pudge`_, and `pygments`_. The ``pudge`` command is disabled by
-default; to ativate it in your project, run::
-
- setup.py addcommand -p buildutils.pudge_command
-
-.. _buildutils: http://pypi.python.org/pypi/buildutils
-.. _pudge: http://pudge.lesscode.org/
-.. _pygments: http://pygments.org/
Oops, something went wrong.

0 comments on commit 4e9c76a

Please sign in to comment.