Correct links to mailstats webpage, add -q to pip3 in spec

This commit is contained in:
Brian Read 2025-03-28 12:22:55 +00:00
parent 736315d47e
commit 4d29da7f3d
3 changed files with 12 additions and 10 deletions

View File

@ -39,9 +39,9 @@
<div style="width:100%;overflow-x:auto;font-size:1cqw"> <div style="width:100%;overflow-x:auto;font-size:1cqw">
<!---Navigation here--> <!---Navigation here-->
<div class='linksattop'> <div class='linksattop'>
<a class='prevlink' href='http://${DomainName}/mailstats/mailstats_for_${PreviousDate}.html'>Previous</a> <a class='prevlink' href='http://${SystemName}.${DomainName}/mailstats/mailstats_for_${PreviousDate}.html'>Previous</a>
<div class='divshowindex'><a class='showindex' href='http://${DomainName}/mailstats/'>Index of files</a></div> <div class='divshowindex'><a class='showindex' href='http://${SystemName}.${DomainName}/mailstats/'>Index of files</a></div>
<a class='nextlink' href='http://${DomainName}/mailstats/mailstats_for_${NextDate}.html'>Next</a></div> <!--format important here - used to insert see in browser for email --> <a class='nextlink' href='http://${SystemName}.${DomainName}/mailstats/mailstats_for_${NextDate}.html'>Next</a></div> <!--format important here - used to insert see in browser for email -->
<br /> <br />
<h2>${structure:title}</h2> <h2>${structure:title}</h2>
<br /> <br />

View File

@ -1136,8 +1136,9 @@ if __name__ == "__main__":
ConfigDB = read_config_file(db_dir+"configuration") ConfigDB = read_config_file(db_dir+"configuration")
DomainName = get_value(ConfigDB, "DomainName", "type") #'bjsystems.co.uk' # $cdb->get('DomainName')->value; DomainName = get_value(ConfigDB, "DomainName", "type") #'bjsystems.co.uk' # $cdb->get('DomainName')->value;
SystemName = get_value(ConfigDB, "SystemName", "type")
hello_string = "Mailstats:"+Mailstats_version+' for '+DomainName+" for "+analysis_date+" Printed at:"+formatted_datetime hello_string = "Mailstats:"+Mailstats_version+' for '+SystemName+"."+DomainName+" for "+analysis_date+" Printed at:"+formatted_datetime
print(hello_string) print(hello_string)
version_string = "Chameleon:"+chameleon_version+" Python:"+python_version version_string = "Chameleon:"+chameleon_version+" Python:"+python_version
if isThonny: if isThonny:
@ -1687,6 +1688,7 @@ if __name__ == "__main__":
PreviousDate=previous_date_str, PreviousDate=previous_date_str,
NextDate=next_date_str, NextDate=next_date_str,
DomainName=DomainName, DomainName=DomainName,
SystemName=SystemName
) )
except Exception as e: except Exception as e:
print(f"Chameleon template Exception {e}") print(f"Chameleon template Exception {e}")
@ -1783,7 +1785,7 @@ if __name__ == "__main__":
filepath = html_page_dir+"mailstats_for_"+analysis_date+".html" filepath = html_page_dir+"mailstats_for_"+analysis_date+".html"
html_content = read_html_from_file(filepath) html_content = read_html_from_file(filepath)
# Replace the Navigation by a "See in browser" prompt # Replace the Navigation by a "See in browser" prompt
replace_str = f"<div class='divseeinbrowser' style='text-align:center;'><a class='seeinbrowser' href='http://{DomainName}/mailstats/mailstats_for_{analysis_date}.html'>See in browser</a></div>" replace_str = f"<div class='divseeinbrowser' style='text-align:center;'><a class='seeinbrowser' href='http://{SystemName}.{DomainName}/mailstats/mailstats_for_{analysis_date}.html'>See in browser</a></div>"
html_content = replace_between(html_content, "<div class='linksattop'>", ">Next</a></div>", replace_str) html_content = replace_between(html_content, "<div class='linksattop'>", ">Next</a></div>", replace_str)
if not noemailfile: if not noemailfile:
# Write out the email html to a web page # Write out the email html to a web page

View File

@ -124,13 +124,13 @@ sed -i "s|__BUILD_DATE_TIME__|$now|" $RPM_BUILD_ROOT/usr/bin/mailstats.py
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT | grep -v "\.pyc" | grep -v "\.pyo" > %{name}-%{version}-filelist /sbin/e-smith/genfilelist $RPM_BUILD_ROOT | grep -v "\.pyc" | grep -v "\.pyo" > %{name}-%{version}-filelist
%pre %pre
/usr/bin/pip3 install pymysql /usr/bin/pip3 install -q pymysql
/usr/bin/pip3 install numpy /usr/bin/pip3 install -q numpy
/usr/bin/pip3 install plotly /usr/bin/pip3 install -q plotly
/usr/bin/pip3 install pandas /usr/bin/pip3 install -q pandas
%clean %clean
/bin/rm -rf $RPM_BUILD_ROOT /bin/rm -rf $RPM_BUILD_ROOT
%files -f %{name}-%{version}-filelist %files -f %{name}-%{version}-filelist
%defattr(-,root,root) %defattr(-,root,root)