%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/mailman/bin/
Upload File :
Create Path :
Current File : //lib/mailman/bin/export.pyo

�
��ac@sGdZddlZddlZddlZddlZddlZddlZddlmZddl	Z	ddl
mZddl
mZddl
m
Z
ddl
mZddl
mZdd	lmZdd
lmZeZdZd2ZdZidej6dej6dej6dej6dej6dej6dej6dej 6dej!6dej"6dej#6dej$6d ej%6d!ej&6Z'd"d3d#��YZ(d$e)fd%��YZ*d&�Z+d'�Z,d(�Z-d)�Z.ie+d*6e,d+6e-d,6Z/yej0d-�Wne1k
rnXe.e/d.<d/�Z2d0�Z3e4d1krCe3�ndS(4s/Export an XML representation of a mailing list.i����N(tescape(tDefaults(tErrors(t
MemberAdaptor(tUtils(tmm_cfg(tMailList(t_t t
msg_headert
msg_footert
digest_headert
digest_footertautoresponse_postings_texttautoresponse_admin_texttautoresponse_request_textitbooltradiotstringttexttemailt
email_listthosttnumbertuploadtselectttopicstcheckboxt
email_list_ext
header_filtertIndentercBs/eZdd�Zd�Zd�Zd�ZRS(icCs||_d|_||_dS(Ni(t_fpt_indentt_width(tselftfptindentwidth((sX/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/bin/export.pyt__init__Gs		cCs|jd7_dS(Ni(R (R"((sX/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/bin/export.pytindentLscCs|jd8_dS(Ni(R (R"((sX/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/bin/export.pytdedentOscCsA|dkr-|jj|j|jd�n|jj|�dS(Ns
R(RtwriteR R!(R"ts((sX/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/bin/export.pyR(Ss!(t__name__t
__module__R%R&R'R((((sX/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/bin/export.pyRFs		t	XMLDumpercBskeZd�Zd�Zed�Zd�Zd�Zd
d�Z	d
d�Z
d�Zd�Zd	�Z
RS(cCs%t|�|_d|_g|_dS(N(RRtNonet
_tagbuffert_stack(R"R#((sX/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/bin/export.pyR%[s	cCsng}xX|j�D]J\}}|dkr4d}ntt|��}|jd||f�qWtj|�S(Nts%s="%s"(titemsR-RtstrtappendtSPACEtjoin(R"ttagattrstattrstktv((sX/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/bin/export.pyt
_makeattrs`s	cCs�|js
dS|j\}}d|_|rAd|j|�}nd}|r�|jd||fIJ|jj�|jj|�n|jd||fIJdS(NRR0s<%s%s>s<%s%s/>(R.R-R:RR&R/R3(R"tmoretnamet
attributestattrstr((sX/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/bin/export.pyt_flushls		
cKs|j�||f|_dS(N(R?R.(R"t_namet	_tagattrs((sX/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/bin/export.pyt
_push_element}s
cCsYt|j�}|jdt�|sU|jj�}|jj�|jd|IJndS(NR;s</%s>(RR.R?tFalseR/tpopRR'(R"R@tbufferedR<((sX/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/bin/export.pyt_pop_element�s
cKs�|j�|r&d|j|�}nd}|dkrR|jd||fIJn/tt|��}|jd||||fIJdS(NRR0s<%s%s/>s
<%s%s>%s</%s>(R?R:R-RRtunicode(R"R@t_valuet_attributesR7tvalue((sX/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/bin/export.pyt_element�s
c	Cs�tt|dt��}|j||�}|j�|\}}|dkrPdSxX|dD]L}t|t�svq[n|d}	|	jd�r�q[n|d}
d}t	|d�r�|j
||
|	|d�}n|dkr�t||	�}n|	dkrq[n|r(|	tkr(tj
|�}nt|
}t|t�r�|jdd|	d	|�x|D]}
|jd
|
�qaW|jd�q[|jd|d|	d	|�q[WdS(Ntuse_dollar_stringsiiRtgetValueitoptionR<ttypeRJ(RtgetattrRCt
GetConfigInfotGetConfigCategoriesR-t
isinstancettuplet
startswiththasattrRMtDOLLAR_STRINGSRt	to_dollartTYPEStlistRBRKRF(R"tmlistR8tsubcattis_convertedtinfotlabeltguitdatatvarnametvtypeRJtwidget_typeR9((sX/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/bin/export.pyt_do_list_categories�s8



cCs�|jdd|j�|jd�|jd|jdddd�|jd|jdddd�xztjD]o}|j|�}|dkr�|j	||�qkx8g|D]}|d	^q�D]}|j	|||�q�WqkW|j
d�|jd
�t|j��}xzt
|j��D]f}td|�}	|j|�}
|
|krZ|
|	d<n|jd
|	�|jd|j|��|jd||j|���|jd|j|��i}	|j|�}|tjkr�d|	d<nGd|	d<idtj6dtj6dtj6j|j|�d�|	d<||krn|j|tj�rad|	d<qxd|	d<n
d|	d<|j|�}|r�tjj|�}
|
j �|	d<n|jd|	�xQt!j"j#�D]@\}}|d kr�q�n|j||�}|j||�q�W|j$|�}|s;|jd�n;|jd�x|D]}|jd|�qOW|j
d�|j
d
�qW|j
d
�|j
d�dS(!NRZR<t
configurationRNtpreferred_languageRORtpassworditrostertidtoriginaltmembertrealnametlanguagetenabledtstatustdisabledtbyusertbyadmintbybouncetunknowntreasontplaintdeliverytmimetregulartchangedtdigestRttopic(sdigestRw(%RBt_internal_nameRKRgRhRtADMIN_CATEGORIEStGetConfigSubCategoriesR-ReRFtsettgetDigestMemberKeystsortedt
getMemberstdicttgetMemberCPAddresst
getMemberNametgetMemberPasswordtgetMemberLanguagetgetDeliveryStatusRtENABLEDtBYUSERtBYADMINtBYBOUNCEtgettgetMemberOptiontDisableMimetgetDeliveryStatusChangeTimetdatetimet
fromtimestampt	isoformatRtOPTINFOR1tgetMemberTopics(R"R[tpassword_schemeR8tsubcatsttR\t	digestersRlR7tcasedRpR{twhenRNtflagRJRR}((sX/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/bin/export.pyt
_dump_list�s�
				$


	












cCs�|jdIJ|jdidd6dd6�xgt|�D]Y}yt|dt�}Wn*tjk
r�tjt	d�IJq8nX|j
||�q8W|jd�dS(	Ns&<?xml version="1.0" encoding="UTF-8"?>tmailmans)http://www.w3.org/2001/XMLSchema-instances	xmlns:xsisssi-1.0.xsdsxsi:noNamespaceSchemaLocationtlocksNo such list: %(listname)s(RRBR�RRCRtMMUnknownListErrortsyststderrRR�RF(R"t	listnamesR�tlistnameR[((sX/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/bin/export.pytdumps
cCsx|jr|j�qWdS(N(R/RF(R"((sX/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/bin/export.pytclosesN(R*R+R%R:tTrueR?RBRFR-RKReR�R�R�(((sX/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/bin/export.pyR,Zs				
#	K	cCsdS(Ns{NONE}((Rh((sX/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/bin/export.pytno_passwordscCsd|S(Ns{PLAIN}((Rh((sX/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/bin/export.pytplaintext_passwordscCs&tj|�}dtj|j��S(Ns{SHA}(Rtsha_newtbase64t	b64encodeR|(Rhth((sX/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/bin/export.pytsha_password"scCsFtjt�}tj|�}|j|�dtj|j�|�S(Ns{SSHA}(	tosturandomtSALT_LENGTHRR�tupdateR�R�R|(RhtsaltR�((sX/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/bin/export.pyt
ssha_password's
tnoneRwtshaitsshacCs~tjdtjdtd��}|jddddddd	d
dtd��|jd
dddd	d
dtd��|jdddtdddtd��|jdddgddd	d
dddddtd��|j�\}}|r|j	�|j
td��n|jrFxtD]}|j
�GHq!Wtjd�n|jj�tkrq|j
td��n|||fS( NtversiontusagesW%%prog [options]

Export the configuration and members of a mailing list in XML format.s-os--outputfiletmetavartFILENAMEtdefaultRORthelpsSOutput XML to FILENAME.  If not given, or if FILENAME is '-', standard out is
used.s-ps--password-schemeR�s�Specify the RFC 2307 style hashing scheme for passwords included in the
output.  Use -P to get a list of supported schemes, which are
case-insensitive.s-Ps--list-hash-schemestactiont
store_trues^List the supported password hashing schemes and exit.  The scheme labels are
case-insensitive.s-ls
--listnameR3tLISTNAMEtdestR�s�The list to include in the output.  If not given, then all mailing lists are
included in the XML output.  Multiple -l flags may be given.sUnexpected argumentsisInvalid password scheme(toptparsetOptionParserRtVERSIONRt
add_optionR-RCt
parse_argst
print_helpterrortlist_hash_schemestSCHEMEStupperR�texitR�tlower(tparsertoptstargsR_((sX/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/bin/export.pyt	parseargs=s8




	
cCs�t�\}}}|jdkr-tj}ntj|jdd�}zXt|�}|jri|j}nt	j
�}|j|t|j
j��|j�Wd|tjk	r�|j�nXdS(Nt-twsutf-8(NR�(R�t
outputfileR-R�tstdouttcodecstopenR,R�Rt
list_namesR�R�R�R�R�(R�R�R�R#tdumperR�((sX/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/bin/export.pytmainds	t__main__(R	R
RRR
RR((5t__doc__R�R�R�R�R�R�txml.sax.saxutilsRtpathstMailmanRRRRRtMailman.MailListRtMailman.i18nRR�t__i18n_templates__R4RWR�tToggletRadiotStringtTexttEmailt	EmailListtHosttNumbert
FileUploadtSelecttTopicstCheckboxtEmailListExtHeaderFilterRYRtobjectR,R�R�R�R�R�R�tNotImplementedErrorR�R�R*(((sX/builddir/build/BUILDROOT/mailman-2.1.15-30.el7_9.2.x86_64/usr/lib/mailman/bin/export.pyt<module>sr













�				


	'	

Zerion Mini Shell 1.0