Commit graph

25 commits

Author SHA1 Message Date
aae7504e13 ListUsers.py: Externalize class & rename some variables
This actually makes the whole file easier to read and maintain. I've
still to refactor the output to something.
2020-05-30 09:51:25 +02:00
8008fa36b9 General overhaul, better messages, ordered imports etc 2019-10-25 10:17:39 +02:00
8d4d2038d3 Typing support and sqlite3.Row!
Typing will be handy in further development, as well will i settle down
to sqlite3.Row. Fetchall() returns now a list(grr) with
dict-imitating/sumating objects, which you can call keys() on and will
return them, what we now already use for Backups, which comes handy.

Also Typing gives the ability to let the code even more documentate
itself. It's planned to use all over the place but i've to read myself
into it yet more to get started on that one.
It's a step in the right direction!
2019-10-25 03:03:47 +02:00
84508820a6 ListUsers: Implement --user flag, rename --list to --list-asc 2019-10-25 01:57:29 +02:00
b7ffedfba2 Rename SQLitedb to SQLiteDB 2019-10-23 18:13:42 +02:00
7d5ef3b493 Wording fix in docstring 2019-10-23 15:01:44 +02:00
0eeafa626e Documentation work all over the place
Renamed also some paramters
2019-10-23 14:27:48 +02:00
a17d0ed30f ListUsers: UAP and APP => Unapproved and Approved replaced 2019-10-22 15:56:05 +02:00
389b614de9 Revert "ListUsers: UAP and APP renamed, function updates /home/users.txt"
This reverts commit 84cc83db3c.
2019-10-22 15:52:00 +02:00
84cc83db3c ListUsers: UAP and APP renamed, function updates /home/users.txt
On every register() call the System rewrites the /home/users.txt to
reflect currently active users. Will fall apart when something
unexpected happened, but that's @helix responsibility.
2019-10-22 15:47:17 +02:00
452204a5e9 ListUsers: --list sorts all approved users ascending 2019-10-22 15:26:52 +02:00
24eee6e84e Shebang/env for script execution 2019-10-22 13:51:01 +02:00
710ceacd7c Breaking up the code smell regarding the CFG.py!
It began smelling already but having some duplicate code across the
interfaces is still better than having all of it all over the place.

It enables to write specific flags which are nice to have. For example,
Import.py requires the --Import flag because it WANTS the user to read
the whole Help before it acts actually as an importer. When the user
supplies something they should know what's currently happening.

Also removes the hardcoded dependency on lib.CFG-Calls from most calls
which was already embarassingly present. Introduced some db and
cfg-variables which doesnt clutter anything but suck much less.

In future we provide a set of default arguments and a bare minimum -
config_ui as the bare minimum, default as the full blown storm.

This is rather big because it also patches several other smells
including a bug where a user from the db wouldnt be reported as existent
2019-10-19 22:36:00 +02:00
934b6bf75a Factor out 'as CFG' 2019-10-19 14:32:01 +02:00
cdc72a30f4 Factor out REG_FILE 2019-10-19 14:25:43 +02:00
04d95c2d08 realign layout 2019-10-13 22:26:57 +02:00
290e72f159 Add various documentation to the System class and sqlitedb-Class...
... which are all written in rst-format, which sphynx understands and has
an own formal specification in  http://docutils.sourceforge.net/rst.html
2019-10-13 21:09:24 +02:00
d413662b36 Adds ability to delete users in db as well as on the system + type hints..
.... in function names for further documentation.
2019-10-13 18:49:38 +02:00
a984b14c37 Implement -f/--file option. Defaults to stdout 2019-10-13 10:46:25 +02:00
6e86bf11bb -a Flag: default false, do action on only approved users 2019-10-12 19:25:11 +02:00
cab4cd25a2 Well, that alternative view rocks hard... 2019-10-12 14:21:26 +02:00
b368ea058c huh, that already looks close to good... o.o 2019-10-12 13:57:38 +02:00
f06d4fa945 first steps towards real listings! 2019-10-12 13:34:01 +02:00
3915843943 introducing the -u flag, which turns on the 'unapproved' mode.
Oh, and just testing it in ListUsers.py :)
2019-10-12 12:26:16 +02:00
2eeeebdacb Add sceleton for listusers.py 2019-10-12 11:54:29 +02:00