HEX
Server: Apache
System: Linux opal14.opalstack.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
User: curbgloabal_opal (1234)
PHP: 8.1.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/share/inkscape/extensions/svgcalendar.pyo
�
��Yc@s�dZdZddlZddlZddlTddlZddlZdejfd��YZe	dkr�e�Z
e
j�ndS(sI
calendar.py
A calendar generator plugin for Inkscape, but also can be used as a standalone
command line application.

Copyright (C) 2008 Aurelio A. Heckert <aurium(a)gmail.com>
Week number option added by Olav Vitters and Nicolas Dufour (2012)

More on ISO week number calculation on:
http://en.wikipedia.org/wiki/ISO_week_date
(The first week of a year is the week that contains the first Thursday
of the year.)

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program 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 General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
s0.3i����N(t*tSVGCalendarcBsbeZd�Zd�ZdZdZdZd�Zd�Zd�Z	d�Z
d�Zd�ZRS(	cCstjj|�|jjddddddd�|jjddddd	dd
ddd
d�|jjddddd	ddddd
d�|jjddddddddtd
d�|jjddddddddtd
d�|jjdddddddddd
d�|jjdddddddddd
d �|jjd!dddddd"dtd
d#�|jjd$dddd	dd%dd&d
d'�|jjd(dddddd)dd*d
d+�|jjd,dddddd-dd.d
d/�|jjd0dddddd1dd2d
d3�|jjd4dddddd5dd6d
d7�|jjd8dddddd9dd:d
d;�|jjd<dddddd=dd>d
d?�|jjd@ddddddAddBd
dC�|jjdDddddddEddFd
dG�|jjdHddddddIddJd
dK�|jjdLddddddMddNdOdPdQd
dR�|jjdSddddddTddUd
dV�|jjdWddddddXddYd
dZ�|jjd[dddddd\dd]d
d^�dS(_Ns--tabtactiontstorettypetstringtdestttabs--monthtinttmonthtdefaultithelpsCMonth to be generated. If 0, then the entry year will be generated.s--yeartyearsDYear to be generated. If 0, then the current year will be generated.s--fill-empty-day-boxestinkbooltfill_edbs*Fill empty day boxes with next month days.s--show-week-numbertshow_weeknrsInclude a week number column.s--start-dayt	start_daytsuns Week start day. ("sun" or "mon")s	--weekendtweekendssat+suns6Define the weekend days. ("sat+sun" or "sat" or "sun")s--auto-organizet
auto_organizes)Automatically set the size and positions.s--months-per-linetmonths_per_lineisNumber of months side by side.s
--month-widthtmonth_widtht6cms The width of the month days box.s--month-margintmonth_margint1cms"The space between the month boxes.s--color-yeart
color_years#888sColor for the year header.s
--color-monthtcolor_months#666s Color for the month name header.s--color-day-nametcolor_day_names#999s$Color for the week day names header.s--color-dayt	color_days#000sColor for the common day box.s--color-weekendt
color_weekends#777sColor for the weekend days.s--color-nmdt	color_nmds#BBBs1Color for the next month day, in enpty day boxes.s--color-weeknrtcolor_weeknrs#808080sColor for the week numbers.s
--month-namestmonth_namessJanuary February March sApril May June sJuly August September sOctober November Decembers!The month names for localization.s--day-namest	day_namessSun Mon Tue Wed Thu Fri Sats$The week day names for localization.s
--weeknr-nametweeknr_nametWks-The week number column name for localization.s
--encodingtinput_encodesutf-8s The input encoding of the names.(tinkextEffectt__init__tOptionParsert
add_optiontTruetFalse(tself((s-/usr/share/inkscape/extensions/svgcalendar.pyR'+s�cCs�tjd|jj�}tjd|jd��|j_tjd|jj�}tjd|jd��|j_t|jj�dkr�tj	dt
|jj�d�ddd	d
ddd
dddddg|j_nt|jj�dkr;tj	dt
|jj�d�dddddddg|j_n|jjdkretj
�j|j_n|jjdkr�d|j_n|jjdkr�tjd�n
tjd�|j|jj�|j_|j|jj�|j_dS( Ns\s*(.*[^\s])\s*s\s+iisThe month name list "s" is invalid. Using default.tJanuarytFebruarytMarchtApriltMaytJunetJulytAugustt	SeptembertOctobertNovembertDecemberisThe day name list "tSuntMontTuetWedtThutFritSatitmonRi(tretmatchtoptionsR tsplittgroupR!tlenR%terrormsgtstrRtdatetimettodayRtcalendartsetfirstweekdaytunittouuRR(R,tm((s-/usr/share/inkscape/extensions/svgcalendar.pytvalidate_options�s6!!			
icCs?|j|jj�jd��|_|j|jj�jd��|_|jjr`d|_n	d|_|jj	r�|j|jkr�d|_
q�d|_
n|jj
|_
|jj	r�|jd|j
|_|jd|_n|jj
|_|jj|_|jd	|j|_|jd
|_|jd	|_|jjdkr�|j|j|j|j
|j|j
dd|_n|j|jd|_it|jd�d6d
d6dd6dd6|jjd6|_|jj�|_|jj|jd<|jj�|_|jj|jd<|jj�|_|jj|jd<t|jd�|jd<d|jd<|jj�|_|jj|jd<t|jd�|jd<|jj�|_|jj |jd<t|jd�|jd<d|jd<|jj�|_!|jj"|j!d<t|jd�|j!d<dS(Ntwidththeightiiiig�������?i
ii	is	font-sizetarialsfont-familytmiddlestext-anchortcenters
text-aligntfillg�?tboldsfont-weight(#RMtdocumenttgetroottgettdoc_wtdoc_hRCRtcols_beforeRRtmonth_wRRtday_wtday_htmonth_hR	tyear_marginRHRt	style_daytcopyt
style_weekendRt	style_nmdRtstyle_monthRtstyle_day_nameRt
style_yearRtstyle_weeknrR(R,((s-/usr/share/inkscape/extensions/svgcalendar.pytcalculate_size_and_positions�s^$$	

cCs)|jjdkr�|jjdkr4|dkr4tS|jjdkrV|dkrVtS|jjdkrx|dkrxtS|jjdkr%|dkr%tSn�|jjdkr�|dkr�tS|jjdkr�|dkr�tS|jjdkr|dkrtS|jjdkr%|dkr%tStS(NRssat+suniitsati(RCRRR*R+(R,tpos((s-/usr/share/inkscape/extensions/svgcalendar.pyt
is_weekend�s$cCsHg}x;|D]3}x*|D]"}|dkr|j|�qqWq
W|S(Ni(tappend(R,tcaltcal2tweektday((s-/usr/share/inkscape/extensions/svgcalendar.pyt
in_line_month�s

cCs�itj|j�d6t|j|jd�d6t|jd�d6}y<t|jj	|d|jj
�tjj
|d|�_Wn$tjtd��td�nXtjj
|d	�}d
}|jjdkr�|jj}n'|jjd}|j|jjd
�|jjr4|jd
|jj�nx�|D]�}itj|j�d6t|j|�d6t|j�d6}y.t||jj
�tjj
|d|�_Wn$tjtd��td�nX|d7}q;WdS(Ntstyleitxityittexts*You must select a correct system encoding.tgiR(tsimplestyletformatStyleRfRHR]R^R_tunicodeRCR R$R%tetreet
SubElementRwRGt_texitRR!RnRtinsertR"Rg(R,RxRNttxt_attstgwtweek_xR!twday((s-/usr/share/inkscape/extensions/svgcalendar.pytwrite_month_headers<(
(cCs�idt|j|j|j|j�dt|jd|j|j�dd6dt|�dt|jj	�d6}t
jj|j
d	|�}|j||�t
jj|d	�}tj|jj	|�}|d
kr|jj	d
krA|jtj|jj	d
d��}qAn%|jtj|jj	|d
��}|dkru|jtj|jj	d
d
��}n%|jtj|jj	|d
��}t|�dkr�|jd
d
d
d
d
d
d
g�nt|�dkr|j�|jd
d
d
d
d
d
d
g�|j�n|d
jd
�|d
jd
�}t}	d
}
x�|D]�}|jd
kr�|jjdkr�|d
d
ks�|jjdkr�|d
d
ks�|jd
kr|jjdkr�|dd
ks�|jjdkr|dd
kr|jd
7_nd
}|jjr�|jd
kr�|d
d
koO|dd
kr�|j}
itj|
�d6t|j|�d6t|j|
d�d6}t|j�t
jj|d|�_|d
7}q�|d
7}nxW|D]O}|j}
|j ||j!�r|j"}
n|d
kr,|j#}
nitj|
�d6t|j|�d6t|j|
d�d6}|d
kr�|jj$r�n�|d
kr|	r�t||�t
jj|d|�_|d
8}q(t||�t
jj|d|�_|d
7}n't|�t
jj|d|�_t%}	|d
7}q�W|
d
7}
qSW|jd
7_|j|j&kr�d
|_|jd
7_ndS(Ns
translate(t,it)t	transformtmonth_R~tidRxiiiiR@RiRtRuiRvRw('RHRaR]Rtmonth_x_posR_R`tmonth_y_posRCRR%R|R}tyear_gR�RKt
monthcalendarRsRFRntreversetcountR*tweeknrRRRiRyRzR^RwRbRmR\RdReRR+R(R,RNR�RxtgdaysRotbefore_montht
next_monthtbmdtbeforetweek_yRqR�RtRr((s-/usr/share/inkscape/extensions/svgcalendar.pytcreate_month#s�H+%(%%
"
$
""""0	$


	&
%
!	cCs|j�|j�|jj�}idt|jj�d6}tjj	|d|�|_
itj|j
�d6t|jd�d6t|jd�d6}t|jj�tjj	|j
d	|�_|jjd
krx:tdd�D]}|j|�q�Wn|j|jj�dS(
Ntyear_R�RxRtiRug�?RvRwiii
(RORjRWRXRHRCRR%R|R}R�RyRzRhRZR^RwR	trangeR�(R,tparentR�RN((s-/usr/share/inkscape/extensions/svgcalendar.pyteffect|s

*(
t__name__t
__module__R'ROR�R�R�RjRmRsR�R�R�(((s-/usr/share/inkscape/extensions/svgcalendar.pyR)s	]	$	:			#	Yt__main__(t__doc__t__version__RKRARIR%RyR&RR�tetaffect(((s-/usr/share/inkscape/extensions/svgcalendar.pyt<module>s
�e