?
Current Path : /usr/share/emacs/24.3/lisp/calendar/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : //usr/share/emacs/24.3/lisp/calendar/cal-html.elc |
;ELC ;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:08:28 2024 ;;; from file /builddir/build/BUILD/emacs-24.3/lisp/calendar/cal-html.el ;;; in Emacs version 24.3.1 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\302\303\304\305\306\307\310\301&\210\311\312\313\314\315\316\310\303&\210\311\317\304\320\315\321\310\303&\210\311\322\323\324\315\325\310\303&\210\311\326\327\330\331\332\315\333\310\303& \210\311\334\335\336\337\340\315\321\310\303& \210\311\341\342\343\315\316\337\340\310\303& \207" [require calendar custom-declare-group calendar-html nil "Options for HTML calendars." :prefix "cal-html-" :group custom-declare-variable cal-html-directory "~/public_html" "Directory for HTML pages generated by cal-html." :type string cal-html-print-day-number-flag "Non-nil means print the day-of-the-year number in the monthly cal-html page." boolean cal-html-year-index-cols 3 "Number of columns in the cal-html yearly index page." integer cal-html-day-abbrev-array calendar-day-abbrev-array "Array of seven strings for abbreviated day names (starting with Sunday)." :set-after (calendar-day-abbrev-array) (vector (string :tag "Sun") (string :tag "Mon") (string :tag "Tue") (string :tag "Wed") (string :tag "Thu") (string :tag "Fri") (string :tag "Sat")) cal-html-holidays t "If non-nil, include holidays as well as diary entries." :version "24.3" cal-html-css-default (concat "<STYLE TYPE=\"text/css\">\n" " BODY { background: #bde; }\n" " H1 { text-align: center; }\n" " TABLE { padding: 2pt; }\n" " TH { background: #dee; }\n" " TABLE.year { width: 100%; }\n" " TABLE.agenda { width: 100%; }\n" " TABLE.header { width: 100%; text-align: center; }\n" " TABLE.minical TD { background: white; text-align: center; }\n" " TABLE.agenda TD { background: white; text-align: left; }\n" " TABLE.agenda TH { text-align: left; width: 20%; }\n" " SPAN.NO-YEAR { color: #0b3; font-weight: bold; }\n" " SPAN.ANN { color: #0bb; font-weight: bold; }\n" " SPAN.BLOCK { color: #048; font-style: italic; }\n" " SPAN.HOLIDAY { color: #f00; font-weight: bold; }\n" "</STYLE>\n\n") "Default cal-html css style. You can override this with a \"cal.css\" file."] 10) #@28 HTML code for end of page. (defconst cal-html-e-document-string "<BR><BR>\n</BODY>\n</HTML>" (#$ . 2557)) #@39 HTML code for beginning of table row. (defconst cal-html-b-tablerow-string "<TR>\n" (#$ . 2669)) #@33 HTML code for end of table row. (defconst cal-html-e-tablerow-string "</TR>\n" (#$ . 2772)) #@40 HTML code for beginning of table data. (defconst cal-html-b-tabledata-string " <TD>" (#$ . 2870)) #@34 HTML code for end of table data. (defconst cal-html-e-tabledata-string " </TD>\n" (#$ . 2975)) #@42 HTML code for beginning of table header. (defconst cal-html-b-tableheader-string " <TH>" (#$ . 3077)) #@36 HTML code for end of table header. (defconst cal-html-e-tableheader-string " </TH>\n" (#$ . 3186)) #@29 HTML code for end of table. (defconst cal-html-e-table-string "</TABLE>\n<!-- ================================================== -->\n" (#$ . 3292)) #@67 HTML code for a day in the minical - links NUM to month-page#NUM. (defconst cal-html-minical-day-format " <TD><a href=%s#%d>%d</TD>\n" (#$ . 3447)) #@30 Initial block for html page. (defconst cal-html-b-document-string (concat "<HTML>\n" "<HEAD>\n" "<TITLE>Calendar</TITLE>\n" "<!--This buffer was produced by cal-html.el-->\n\n" cal-html-css-default "<LINK REL=\"stylesheet\" TYPE=\"text/css\" HREF=\"cal.css\">\n" "</HEAD>\n\n" "<BODY>\n\n") (#$ . 3602)) #@47 Alist of symbols and their HTML replacements. (defconst cal-html-html-subst-list '(("&" . "&") ("\n" . "<BR>\n")) (#$ . 3912)) #@32 Return STRING as html comment. (defalias 'cal-html-comment #[(string) "\301\302\303\304\305#\"\207" [string format "<!-- ====== %s ====== -->\n" replace-regexp-in-string "--" "++"] 6 (#$ . 4049)]) #@50 Return a hyperlink to url LINK with text STRING. (defalias 'cal-html-href #[(link string) "\302\303 #\207" [link string format "<A HREF=\"%s\">%s</A>"] 4 (#$ . 4257)]) #@34 Return STRING as html header h3. (defalias 'cal-html-h3 #[(string) "\301\302\"\207" [string format "\n <H3>%s</H3>\n"] 3 (#$ . 4432)]) #@34 Return STRING as html header h1. (defalias 'cal-html-h1 #[(string) "\301\302\"\207" [string format "\n <H1>%s</H1>\n"] 3 (#$ . 4581)]) #@37 Return STRING as html table header. (defalias 'cal-html-th #[(string) "\303\304 \n$\207" [cal-html-b-tableheader-string string cal-html-e-tableheader-string format "%s%s%s"] 5 (#$ . 4730)]) #@38 Return table tag with attribute ARG. (defalias 'cal-html-b-table #[(arg) "\301\302\"\207" [arg format "\n<TABLE %s>\n"] 3 (#$ . 4927)]) #@105 Return name of html page for numeric MONTH and four-digit YEAR. For example, "2006-08.html" for 8 2006. (defalias 'cal-html-monthpage-name #[(month year) "\302\303 #\207" [year month format "%d-%.2d.html"] 4 (#$ . 5071)]) #@200 Insert a link to the html page for numeric MONTH and four-digit YEAR. If optional argument CHANGE-DIR is non-nil and MONTH is 1 or 2, the link points to a different year and so has a directory part. (defalias 'cal-html-insert-link-monthpage #[(month year &optional change-dir) "\303\304\205 \305\235\205 \306\307\n\"\310 \n\"P\311 !\"!c\207" [change-dir month year cal-html-h3 cal-html-href (1 12) format "../%d/" cal-html-monthpage-name calendar-month-name] 6 (#$ . 5301)]) #@74 Insert a link tagged with MONTH name, to index page for four-digit YEAR. (defalias 'cal-html-insert-link-yearpage #[(month year) "\302\303\304\305!\306\307\310 !\"#!c\207" [month year cal-html-h1 format "%s %s" calendar-month-name cal-html-href "index.html" number-to-string] 8 (#$ . 5786)]) #@155 Prompt for the html calendar output directory for four-digit YEAR. Return the expanded directory name, which is based on `cal-html-directory' by default. (defalias 'cal-html-year-dir-ask-user #[(year) "\302\303\304\302\305\306\" \"\"!\207" [year cal-html-directory expand-file-name read-directory-name "Enter HTML calendar directory name: " format "%d"] 7 (#$ . 6086)]) #@140 Insert the header for the numeric MONTH page for four-digit YEAR. Contains links to previous and next month and year, and current minical. (defalias 'cal-html-insert-month-header #[(month year) "\306\307!c\210c\210 c\210\310\311\f\312W\203 \fT\313\f_ \314\211$\315\n\"T\n\245\n\312W\203: \316V\203: \fS\f\316W\203C \fS*\317 \f\320#\210\310\311\f\312W\203W \fT\313\f_ \314\316$\315\n\"T\n\245\n\312W\203y \316V\203y \fS\f\316W\203\202 \fS*\321 \f\"\210\310\311\f\312W\203\225 \fT\313\f_ \314\316$\315\n\"T\n\245\n\312W\203\267 \316V\203\267 \fS\f\316W\203\300 \fS*\317 \f\320#\210c\210 c\210\310\311\f\312W\203\333 \fT\313\f_ \314\211$\315\n\"T\n\245\n\312W\203\375 \316V\203\375 \fS\f\316W\203\fS*\322 \f\"\210c\210c\210c\207" [cal-html-b-tablerow-string cal-html-b-tabledata-string macro-y nmonths year month cal-html-b-table "class=header" 12 nil 0 + -1 mod 1 cal-html-insert-link-monthpage t cal-html-insert-link-yearpage cal-html-insert-minical cal-html-e-tabledata-string cal-html-e-tablerow-string cal-html-e-table-string] 5 (#$ . 6464)]) (autoload 'holiday-in-range "holidays") #@45 Insert a minical for numeric MONTH of YEAR. (defalias 'cal-html-insert-minical #[(month year) "\306\307\310 E!\nZ\311\" \211\312U\203A \211\313W\203# \314 !S\315 \316\246!\2059 \315 \317\246!?\2069 \315 \320\246!)\203A \321\202E \322SH*\306\323\307\f E!\nZZ\311\"\324 \"\325\326\327!\330\331!\261\210 c\210\311\313!\"!\"W\203\220 \332#\306!\n\\\311\"H!c\210!T\211!\202s *$c\210 c\210\313%\"%\"W\203\267 &'\261\210%T\211%\202\241 *\f\313!\"!\"W\203\370 \333(!\211T$c\210\315\306\334!\310#\311\"!\203\357 !T\fU\204\357 $ \261\210!T\211!\202\300 * \313!\"!\"W\203&'\261\210!T\211!\202.$)\326\335!\261\207" [month year calendar-week-start-day blank-days last end-blank-days mod calendar-day-of-week 1 7 2 0 abs zerop 4 100 400 29 [31 28 31 30 31 30 31 31 30 31 30 31] 6 cal-html-monthpage-name nil cal-html-comment "MINICAL" cal-html-b-table "class=minical border=1 align=center" cal-html-th format + "MINICAL end" monthpage-name date cal-html-b-tablerow-string i --dotimes-limit-- cal-html-day-abbrev-array cal-html-e-tablerow-string _i cal-html-b-tabledata-string cal-html-e-tabledata-string cal-html-minical-day-format cal-html-e-table-string] 7 (#$ . 7615)]) #@103 Make a one page yearly mini-calendar for four-digit YEAR. There are 12/cols rows of COLS months each. (defalias 'cal-html-insert-year-minicals #[(year cols) "c\210\306\307 !!c\210\310\311!\n\261\210\312\313\fW\203F c\210\314T \"\210\315T \"\210c\210\316\317T\"!\203? \n\261\210T\211\202 *\261\207" [cal-html-b-document-string year cal-html-b-tablerow-string i --dotimes-limit-- cal-html-b-tabledata-string cal-html-h1 number-to-string cal-html-b-table "class=year" 12 0 cal-html-insert-link-monthpage cal-html-insert-minical zerop mod cal-html-e-tabledata-string cols cal-html-e-tablerow-string cal-html-e-table-string cal-html-e-document-string] 5 (#$ . 8853)]) #@114 Protect special characters in STRING from HTML. Characters are replaced according to `cal-html-html-subst-list'. (defalias 'cal-html-htmlify-string #[(string) ";\203 \302\303\304\305 \"!\306#\207\307\207" [string cal-html-html-subst-list replace-regexp-in-string regexp-opt mapcar car #[(x) "\302 \"A\207" [x cal-html-html-subst-list assoc] 3] ""] 5 (#$ . 9549)]) #@130 Convert a diary entry ENTRY to html with the appropriate class specifier. Optional argument CLASS is the class specifier to use. (defalias 'cal-html-htmlify-entry #[(entry &optional class) "\2061 \304\305\306 8\"\203 \307\2021 \304\310\306 8\"\203 \311\2021 \304\312\306 @8!\306 8\"\2040 \313\2021 \314\315\316\n\317 \211A@)!#)\207" [class entry start x string-match "block" 2 "BLOCK" "anniversary" "ANN" number-to-string "NO-YEAR" "NORMAL" format "<span class=%s>%s</span>" cal-html-htmlify-string] 6 (#$ . 9924)]) #@242 Return a string of concatenated, HTML-ified diary entries. DATE-LIST is a list of diary entries. Return only those matching DATE. Optional argument HOLIDAYS non-nil means the input is actually a list of holidays, rather than diary entries. (defalias 'cal-html-htmlify-list #[(date-list date &optional holidays) "\305\306\307 \307\211\203' @\211@\203 \310\f\n@\"\203 \nBA\211\204\f \307\311!+\312#\207" [result date-list p --dolist-tail-- date mapconcat #[(x) "\302 \205 \303\"\207" [x holidays cal-html-htmlify-entry "HOLIDAY"] 3] nil calendar-date-equal reverse "<BR>\n "] 6 (#$ . 10452)]) (autoload 'diary-list-entries "diary-lib") #@67 Generate a list of all diary-entries from absolute date D1 to D2. (defalias 'cal-html-list-diary-entries #[(d1 d2) "\302\303! ZT\304#\207" [d1 d2 diary-list-entries calendar-gregorian-from-absolute t] 4 (#$ . 11112)]) #@214 Insert HTML commands for a range of days in monthly calendars. HTML commands are inserted for the days of the numeric MONTH in four-digit YEAR. Includes diary entries in DIARY-LIST, and holidays in HOLIDAY-LIST. (defalias 'cal-html-insert-agenda-days #[(month year diary-list holiday-list) "\306\307\310 E!\nZ\311\" \211\312U\203@ \211\313W\203\"