Your message dated Sat, 24 Oct 2015 18:19:57 +0000
with message-id <[email protected]>
and subject line Bug#679194: fixed in ical2html 2.1-1
has caused the Debian Bug report #679194,
regarding ical2html: Option to specify that week starts on Monday
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
679194: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=679194
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: ical2html
Version: 2.0-1
Severity: wishlist
Tags: upstream patch

Dear Maintainer,

I'd like to have a new option (e.g. -m) so the week starts on Monday
instead of Sunday.

Patch is attached.

If you need some information, follow up, etc. feel free to contact me
again.

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-2-686-pae (SMP w/2 CPU cores)
Locale: LANG=ca_ES.UTF-8, LC_CTYPE=ca_ES.UTF-8 (charmap=ISO-8859-15) (ignored: 
LC_ALL set to ca_ES@euro)
Shell: /bin/sh linked to /bin/bash

Versions of packages ical2html depends on:
ii  libc6     2.13-33
ii  libical0  0.48-2

ical2html recommends no packages.

ical2html suggests no packages.

-- no debconf information
diff --git a/ical2html.c b/ical2html.c
index 5f7eaca..ad9e9fe 100644
--- a/ical2html.c
+++ b/ical2html.c
@@ -44,6 +44,7 @@
   -d, --description            include event's long description in a <PRE>\n\
   -f, --footer=TEXT            add text at the bottom of the HTML file\n\
   -z, --timezone=country/city  adjust for this timezone (default: GMT)\n\
+  -m, --monday		       draw Monday as first week day (Sunday is default)\n\
   start is of the form yyyymmdd, e.g., 20020927 (27 Sep 2002)\n\
   duration is in days or weeks, e.g., P5W (5 weeks) or P60D (60 days)\n\
   file is an iCalendar file, default is standard input\n"
@@ -57,10 +58,11 @@ static struct option options[] = {
   {"description", 0, 0, 'd'},
   {"footer", 1, 0, 'f'},
   {"timezone", 1, 0, 'z'},
+  {"monday", 0, 0, 'm'},
   {0, 0, 0, 0}
 };
 
-#define OPTIONS "dp:P:c:C:f:z:"
+#define OPTIONS "dmp:P:c:C:f:z:"
 
 static const char *months[] = {"", "January", "February", "March", "April",
 			       "May", "June", "July", "August", "September",
@@ -249,14 +251,18 @@ title=\"1D\">day)</abbr></span>\n", start_utc.year, start_utc.month,
 static void print_calendar(const struct icaltimetype start,
 			   const struct icaldurationtype duration,
 			   const int nrevents, const event_item events[],
-			   const int do_description)
+			   const int do_description,
+			   const int starts_on_monday)
 {
   struct icaltimetype day;
   struct icaltimetype end;
   char s[9];
   int y, m, d, w;
-  int i = 0;			/* Loop over events */
-
+  int i = 0;		/* Loop over events */
+  int skip;		/* How many days to skip of that week until 1st */
+  int lastDay;
+  if (starts_on_monday) lastDay = 2; else lastDay = 1;
+  
   end = icaltime_add(start, duration);
 
   /* Loop over the years in our period */
@@ -271,14 +277,26 @@ static void print_calendar(const struct icaltimetype start,
       day = icaltime_from_string(s);
 
       printf("<table><caption>%s %d</caption>\n", months[m], y);
-      printf("<thead><tr><th>Sunday<th>Monday<th>Tuesday<th>Wednesday");
-      printf("<th>Thursday<th>Friday<th>Saturday\n");
+      printf("<thead><tr>");
+      if (starts_on_monday) {
+         printf("<th>Monday<th>Tuesday<th>Wednesday");
+      	 printf("<th>Thursday<th>Friday<th>Saturday<th>Sunday\n");
+      }
+      else {
+         printf("<th>Sunday<th>Monday<th>Tuesday<th>Wednesday");
+      	 printf("<th>Thursday<th>Friday<th>Saturday\n");
+
+      }
       printf("<tbody>\n");
 
       w = icaltime_day_of_week(day);
-      if (w != 1) {		/* Empty cells until 1st of month */
-	printf("<tr>\n");
-	for (; w > 1; w--) printf("<td class=skip>\n");
+      if (starts_on_monday)
+      	if (w == 1) skip = 6; else skip = w-2;
+      else
+        skip = w-1;
+
+      if (skip != 0) {
+        for(; skip > 0; skip--) printf("<td class=skip>\n");
       }
 
       /* Skip events before this day (can only occur at very start) */
@@ -291,7 +309,11 @@ static void print_calendar(const struct icaltimetype start,
 	sprintf(s, "%04d%02d%02d", y, m, d);
 	day = icaltime_from_string(s);
 	w = icaltime_day_of_week(day);
-	if (w == 1) printf("<tr>\n");
+	if (w == lastDay)
+	{
+		printf("<tr>\n");
+	}
+
 	printf("<td><p class=date>%d\n\n", d);
 
 	/* Print all events on this day (the events are sorted) */
@@ -430,6 +452,7 @@ int main(int argc, char *argv[])
   char c;
   int dummy1, dummy2, dummy3, do_description = 0;
   icaltimezone *tz;
+  int starts_on_monday = 0;
 
   /* We handle errors ourselves */
   icalerror_errors_are_fatal = 0;
@@ -450,6 +473,7 @@ int main(int argc, char *argv[])
     case 'd': do_description = 1; break;
     case 'f': footer = strdup(optarg); break;
     case 'z': tz = icaltimezone_get_builtin_timezone(optarg); break;
+    case 'm': starts_on_monday = 1; break;
     default: fatal(ERR_USAGE, USAGE);
     }
   }
@@ -489,7 +513,7 @@ int main(int argc, char *argv[])
 
   /* Print the sorted results */
   print_header(periodstart, duration);
-  print_calendar(periodstart, duration, nrevents, events, do_description);
+  print_calendar(periodstart, duration, nrevents, events, do_description, starts_on_monday);
   print_footer(footer);
 
   /* Clean up */

--- End Message ---
--- Begin Message ---
Source: ical2html
Source-Version: 2.1-1

We believe that the bug you reported is fixed in the latest version of
ical2html, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jonas Smedegaard <[email protected]> (supplier of updated ical2html package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sat, 24 Oct 2015 20:02:17 +0200
Source: ical2html
Binary: ical2html
Architecture: source amd64
Version: 2.1-1
Distribution: unstable
Urgency: medium
Maintainer: Jonas Smedegaard <[email protected]>
Changed-By: Jonas Smedegaard <[email protected]>
Description:
 ical2html  - create an HTML table from icalendar data
Closes: 679194
Changes:
 ical2html (2.1-1) unstable; urgency=medium
 .
   [ upstream ]
   * New release.
     + Add option to set LOCATION field.
     + Update default style sheet.
 .
   [ Jonas Smedegaard ]
   * Refer to FSF website (not postal address) in rules file header.
   * Update README.source to emphasize that control.in file is *not* a
     show-stopper for contributions, referring to wiki page for details.
   * Update copyright info:
     + Bump format to 1.0.
     + Update license for main code to W3C.
     + Extend coverage of packaging
     + Bump packaging license to GPL-3+.
     + Use License-Grant and License-Reference fields.
       Thanks to Ben Finney.
   * Declare compliance with Debian Policy 3.9.6.
   * Add patch 1001 to add option to start week on Monday.
     Closes: bug#679194. Thanks to Carles Pina i Estany.
   * Git-ignore quilt .pc dir.
   * Modernize CDBS:
     + Use unversioned autotools.
     + Stop suppress optional build-dependencies: All satisfied even in
       oldstable.
   * Update package relations:
     + Tighten build-dependency on cdbs.
     + Build-depend on automake (not automake1.11).
   * Bump debhelper compatibility level to 9.
   * Add lintian override regarding license in License-Reference field.
     See bug#786450.
   * Add lintian override regarding debhelper 9.
Checksums-Sha1:
 e2f2c37d5d1bee79c2861088af528e724a697cf6 1890 ical2html_2.1-1.dsc
 6c645ce1af2a246f050e5648c98bbe4ed596ce42 92735 ical2html_2.1.orig.tar.gz
 320b44b789d5fc9127007ba9f6b9beafd206b343 6300 ical2html_2.1-1.debian.tar.xz
 7479c2bcf63c4d939823ff920551719764386a23 21748 ical2html_2.1-1_amd64.deb
Checksums-Sha256:
 c62de6cd32f31f35b083abe5580f652c0d25abae068c548b1ae1359e1630e577 1890 
ical2html_2.1-1.dsc
 6dec95f0b4b7baaf7dd0555943cc24152a51feb589a3fb97d0c694362ea1a598 92735 
ical2html_2.1.orig.tar.gz
 267fe124f17a8df443eaa766d785fbc4cbea16e1cf5dac74050d7f95583cecef 6300 
ical2html_2.1-1.debian.tar.xz
 7a24fe426dbcd7b493d65158f4daca3f9442d0629a249b8d618ec252cf0f7a16 21748 
ical2html_2.1-1_amd64.deb
Files:
 f383f5579da1f0d0890adac04a0ff665 1890 utils optional ical2html_2.1-1.dsc
 bf0bb0e590aef266694b66a741d86191 92735 utils optional ical2html_2.1.orig.tar.gz
 7716153f0a6fd772f45740bfc6fb41dc 6300 utils optional 
ical2html_2.1-1.debian.tar.xz
 ec82cf2e363429daa5eb64b8d5c074b2 21748 utils optional ical2html_2.1-1_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJWK8hqAAoJECx8MUbBoAEh7FMQAI+4NBuzJA4UOo5Pk3KVB5IP
nrUIFtYBBWsUqfQdvbjp1B4uxsxwLnWLctg1kzbE8lVmhtpXmfYE8GtRT7nk9W71
dSscYzYWGtuNvvdL0Qi6ZLxwZK9Gv4+CmNUUKqp/gcr1Tag0JYtaabcAt/9DWwTI
uvRGwXOPRDL4z/gvPy0ErUDTq54WfhHr77YOfZ1XcIqJq9ZmyzoRAVc78fvVjWj6
GfIOCJPzn3Df5irrzIGIGJiAa2cwO0SLO3KnYuwDVTOc6I1kF9mMWNnh7vrUZNgw
y/XmikqUIk+wXGu5xkvEfutA3c5s/Se72FkC5ACJzQ/fryF+Lhe5UNeIpZAB6CtK
IW0PAWgg4bZwHASzAYemfbAkueVr9C/y0TY/DuaDpwErLGzchCyut6McecZoYxJK
nBNRRRG6Q1JW7Nh8CJv3wDP2awHmWcZzPHTXtDX7yFVTXfyZqF6K2YrVVbs7OuuP
52Gj10Ismt2yJKqRWJKvoeaKuUsz+P1pSRPSYoK++x3viskj2SKb40DE49jnoJck
5+zHct54fNNG2Pv5W6bBmdBjNn+eB0ItgVI2VTTZfwXSE/ol4RBIgmWZLXfkHfIM
ddax2ZBCKi/+qcq2V9ofO2QCcYVYWavK74FQ0JqnMcNd98zcU7zmMBjLFwEfzB3F
d6gRfRnk20gs3ROuwL8C
=gYlR
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to