File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Prerequisites before running this script in Fiji:
2+ #
3+ # Add the following lines to IJ_Prefs.txt:
4+ # Linux/Mac: ~/.imagej/IJ_Prefs.txt
5+ # Windows: C:\Users\<USERNAME>\.imagej\IJ_Prefs.txt
6+ #
7+ # .imcf.sender_email=imcf@unibas.ch
8+ # .imcf.smtpserver=smtp.unibas.ch
9+ #
10+ # Expected result: a mail is sent to nikolaus.ehrenfeuchter@unibas.ch from
11+ # imcf@unibas.ch, with Fiji printing "Successfully sent email to
12+ # <nikolaus.ehrenfeuchter@unibas.ch>".
13+
14+ from imcflibs .imagej .misc import send_notification_email
15+
16+ from imcflibs .log import LOG as log
17+ from imcflibs .log import enable_console_logging
18+ from imcflibs .log import set_loglevel
19+
20+ enable_console_logging ()
21+ set_loglevel (2 )
22+
23+ # see if logging works:
24+ log .warn ("warn" )
25+ log .debug ("DEBUG" )
26+
27+ send_notification_email (
28+ job_name = "my job" ,
29+ recipient = "nikolaus.ehrenfeuchter@unibas.ch" ,
30+ filename = "magic-segmentation.py" ,
31+ total_execution_time = "5 years" ,
32+ )
33+
34+ log .info ("DONE" )
You can’t perform that action at this time.
0 commit comments