Hello everyone, Do any of you know whether there is a repository that contain Org files whose main purpose is to list important dates of a given context (specific countries, areas such as technology, biology, mathematics, computer science, etc.)? I'm asking this because I would like to have important dates of my country in the Org Agenda, so before creating that file on my own I wanted to know whether there are repositories that have already done that. --- alias: rdrg109
[-- Attachment #1: Type: text/plain, Size: 1334 bytes --] Hi, Rodrigo Morales <moralesrodrigo1100@gmail.com> writes: > Do any of you know whether there is a repository that contain Org files > whose main purpose is to list important dates of a given context > (specific countries, areas such as technology, biology, mathematics, > computer science, etc.)? You can use the diary for this and include those entries in your agenda. Here are some settings: '(org-agenda-include-diary t) '(calendar-mark-diary-entries-flag t) '(calendar-mark-holidays-flag t) '(calendar-view-holidays-initially-flag t) '(calendar-view-diary-initially-flag t) '(holiday-other-holidays '((holiday-fixed 1 1 "New Year's Day") (holiday-fixed 2 14 "Valentine's Day") (holiday-fixed 3 19 "Dia del Padre") (holiday-fixed 4 1 "April Fools' Day") (holiday-float 5 0 2 "Muttertag") (holiday-float 5 0 1 "Dia de la Madre") (holiday-easter-etc 39 "Vatertag") (holiday-fixed 5 30 "Vatertag") (holiday-fixed 10 31 "Halloween"))) '(htmlize-output-type 'inline-css) For custom diary files you might also want: (add-hook 'diary-list-entries-hook 'diary-include-other-diary-files) (add-hook 'diary-mark-entries-hook 'diary-mark-included-diary-files) Best wishes, Arne -- Unpolitisch sein heißt politisch sein ohne es zu merken [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 1125 bytes --]
[-- Attachment #1: Type: text/plain, Size: 927 bytes --] Hi Rodrigo, There are a few packages that define things like this, which can be added to the agenda view. You can see as examples the ones I use for national holidays in my config here: https://github.com/zzamboni/dot-doom/blob/master/doom.org#tasks-and-agenda I'm sure many others are available in MELPA and elsewhere. --Diego On Fri, 16 Apr 2021 at 04:21, Rodrigo Morales <moralesrodrigo1100@gmail.com> wrote: > > Hello everyone, > > Do any of you know whether there is a repository that contain Org files > whose main purpose is to list important dates of a given context > (specific countries, areas such as technology, biology, mathematics, > computer science, etc.)? > > I'm asking this because I would like to have important dates of my > country in the Org Agenda, so before creating that file on my own I > wanted to know whether there are repositories that have already done > that. > > --- > alias: rdrg109 > > [-- Attachment #2: Type: text/html, Size: 1557 bytes --]
If you want solar based information (equinox, solstice, etc.), which is not quite what you mentioned, I used this script to generate org file headings: #+begin_src shell :results output raw tmpfile=$(mktemp /tmp/date.XXXXXX) for year in $(seq 2018 2068) do links http://aa.usno.navy.mil/seasons?year=${year} -dump | \ grep -E 'helion|quinox|olstice' > ${tmpfile} while read -r line do item=$(echo $line | awk '{print $1}') date="$(echo $line | awk '{print $5 " " $4 " " $3}') ${year}" isodate=$(date --date="${date}" +"%Y-%m-%d %H:%M") echo "** <${isodate}> $item" done < ${tmpfile} done rm ${tmpfile} #+end_src This script assumes "links" is available but is otherwise sort of portable for any bash like shell. But I haven't used it since 2018 when I generated the data for the next 50 years so cannot guarantee the website is still there! :-) -- : Eric S Fraga via Emacs 28.0.50, Org release_9.4.4-254-g37749c
On 2021-04-16, at 17:55, Eric S Fraga <e.fraga@ucl.ac.uk> wrote: > If you want solar based information (equinox, solstice, etc.), which is > not quite what you mentioned, I used this script to generate org file > headings: Can't Emacs itself generate those data? -- Marcin Borkowski http://mbork.pl
Marcin Borkowski <mbork@mbork.pl> writes:
> On 2021-04-16, at 17:55, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
>
>> If you want solar based information (equinox, solstice, etc.), which is
>> not quite what you mentioned, I used this script to generate org file
>> headings:
>
> Can't Emacs itself generate those data?
Hmm. I don't see a date function in Elisp...
--
David Masterson
David Masterson <dsmasterson92630@outlook.com> wrote:
> Hmm. I don't see a date function in Elisp...
(current-time-string), if that helps.
On 2021-04-18, at 01:42, David Masterson <dsmasterson92630@outlook.com> wrote: > Marcin Borkowski <mbork@mbork.pl> writes: > >> On 2021-04-16, at 17:55, Eric S Fraga <e.fraga@ucl.ac.uk> wrote: >> >>> If you want solar based information (equinox, solstice, etc.), which is >>> not quite what you mentioned, I used this script to generate org file >>> headings: >> >> Can't Emacs itself generate those data? > > Hmm. I don't see a date function in Elisp... Have you checked the files solar.el and lunar.el? Best, -- Marcin Borkowski http://mbork.pl