Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mailman-tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
irt-public
mailman-tools
Commits
10359af1
Commit
10359af1
authored
6 years ago
by
Conrad Holmberg
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
https://gitlab.med.stanford.edu/irt-public/mailman-tools
parents
d271ae3a
a4c49dad
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
TODO.rst
+0
-21
0 additions, 21 deletions
TODO.rst
manage_list.py
+21
-1
21 additions, 1 deletion
manage_list.py
with
21 additions
and
22 deletions
TODO.rst
+
0
−
21
View file @
10359af1
...
...
@@ -27,24 +27,3 @@ dump/restore site
-----------------
there's no function to dump/restore site settings for Mailman
Operations
==========
manage held messages
--------------------
we need to be able to list, and operate on held messages from CLI:
* list
* approve
* reject
manage subscriptions
--------------------
we need an ability for self-subscribed lists to clean up subscription queue:
* list
* approve
* reject
This diff is collapsed.
Click to expand it.
manage_list.py
+
21
−
1
View file @
10359af1
...
...
@@ -23,7 +23,7 @@ def get_ml(args):
return
(
client
,
ml
)
def
held_list
(
args
):
def
held_list
2
(
args
):
client
,
ml
=
get_ml
(
args
)
held_data
=
[]
for
held
in
ml
.
held
:
...
...
@@ -40,6 +40,26 @@ def held_list(args):
print
json
.
dumps
(
held_data
,
indent
=
2
)
def
held_list
(
args
):
client
,
ml
=
get_ml
(
args
)
held_data
=
[]
page
=
ml
.
get_held_page
(
count
=
100
)
while
len
(
page
)
>
0
:
for
held
in
page
:
if
args
.
fields
:
data_hash
=
{}
for
f
in
args
.
fields
:
data_hash
[
f
]
=
held
.
rest_data
[
f
]
held_data
.
append
(
data_hash
)
else
:
held_data
.
append
(
held
.
rest_data
)
if
not
args
.
detailed
:
del
held_data
[
-
1
][
'
msg
'
]
page
=
page
.
next
print
json
.
dumps
(
held_data
,
indent
=
2
)
def
held_approve
(
args
):
client
,
ml
=
get_ml
(
args
)
results
=
[]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment