Re: [O] ics calendar?

2017-09-11 Thread Matt Price
On Fri, Sep 8, 2017 at 11:52 AM, Eric Abrahamsen 
wrote:

> Matt Price  writes:
>
> > I've been using Kaushal's fantastic ox-hugo to build my course websites
> (see http://2017.hackinghistory.ca/ for one more or less finished
> example; slightly out of date and not-yet documented source files are on
> Github at
> > https://github.com/titaniumbones/Hacking-History/tree/2017).  It's a
> great system  and I love it.
> >
> > I've just noticed that Hugo supports .ics formats and thought it would
> be useful to have a calendar for the class. I've never done .ics exports in
> org -- I don't use the core calendar/agenda features very effectively --
> and am not sure
> > what the best way to do this would be.  So I'm really just asking
> whether other people do ics exports and if so, how you structure the org
> source files and so forth.
>
> In addition to what others have said, I'll note that the export process
> "flattens" all entries with dates, so the structure of the org file
> itself matters less. Apologies if you already knew that...
>
> Eric
>

thanks to both of you for the hints -- I have my dates in the headlines
themselves for various reasons, so I think I have to write a quick export
filter to remove them from the  ics output. Running a little short o ntime
for the start of class (!) but maybe in the next week or s; if I get it to
work I'll report back.


Re: [O] ics calendar?

2017-09-08 Thread Eric Abrahamsen
Matt Price  writes:

> I've been using Kaushal's fantastic ox-hugo to build my course websites (see 
> http://2017.hackinghistory.ca/ for one more or less finished example; 
> slightly out of date and not-yet documented source files are on Github at
> https://github.com/titaniumbones/Hacking-History/tree/2017).  It's a great 
> system  and I love it.
>
> I've just noticed that Hugo supports .ics formats and thought it would be 
> useful to have a calendar for the class. I've never done .ics exports in org 
> -- I don't use the core calendar/agenda features very effectively -- and am 
> not sure
> what the best way to do this would be.  So I'm really just asking whether 
> other people do ics exports and if so, how you structure the org source files 
> and so forth. 

In addition to what others have said, I'll note that the export process
"flattens" all entries with dates, so the structure of the org file
itself matters less. Apologies if you already knew that...

Eric




Re: [O] ics calendar?

2017-09-08 Thread Rasmus
Matt Price  writes:

> I've just noticed that Hugo supports .ics formats and thought it would be
> useful to have a calendar for the class. I've never done .ics exports in
> org -- I don't use the core calendar/agenda features very effectively --
> and am not sure what the best way to do this would be.  So I'm really just
> asking whether other people do ics exports and if so, how you structure the
> org source files and so forth.

1. Create the headline, "* Hacking History 2017 class {{{n}}}", maybe in a
   new file, classes.org.

2. Give it a date with "C-c .".  AFAIK you have to manually put the cursor
   on the new line.

3. M-x org-clone-subtree-with-time-shift and give
   (1- total-number-of-classes) plus a time shift, typically +1w-

4. Export to ICS, maybe as part of your publishing routine if ox-hugo uses
   ox-publish.

You should be able to create something like this,

* Hacking History 2017 class {{{n}}}
<2017-09-08 Fri 10:00-12:00>
* Hacking History 2017 class {{{n}}}
<2017-09-15 Fri 10:00-12:00>
* Hacking History 2017 class {{{n}}}
<2017-09-22 Fri 10:00-12:00>


I use org-caldav to synchronize with owncloud for what it is worth.

Hope it helps,
Rasmus

-- 
The right to be left alone is a human right




Re: [O] ics calendar?

2017-09-07 Thread Eric S Fraga
On Thursday,  7 Sep 2017 at 10:18, Matt Price wrote:
> So I'm really just asking whether other people do ics exports and if
> so, how you structure the org source files and so forth.

I use ics export to make my calendar available to my phone.  I have a
script that I run periodically which has the following lines:

--8<---cut here---start->8---
DIARY=...where my diary.org file resides...
emacs -Q --batch --debug-init \
--directory=${HOME}/s/emacs \
--load=custom.el \
--load=esf-org.el --visit=${DIARY}.org 
--eval='(org-icalendar-export-to-ics)'
--8<---cut here---end--->8---

and I then copy the resulting ics file to where Google Calendar, for
instance, can find it.  My custom.el has all of my Emacs customizations
and esf-org.el my org specific customizations.

I export all of my appointments and nothing else.  Tasks etc. are in
other org files.  I simply want my Pebble watch to vibrate when I have
an upcoming appointment and that's connected to my phone which needs my
calendar etc. etc. etc. :-) Sounds like the "For the want of a nail, the
kingdom was lost" kind of story: from Emacs via org to my watch in N
easy steps!

HTH,
eric

-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.10-723-g23eba9


signature.asc
Description: PGP signature


[O] ics calendar?

2017-09-07 Thread Matt Price
I've been using Kaushal's fantastic ox-hugo to build my course websites
(see http://2017.hackinghistory.ca/ for one more or less finished example;
slightly out of date and not-yet documented source files are on Github at
https://github.com/titaniumbones/Hacking-History/tree/2017).  It's a great
system  and I love it.

I've just noticed that Hugo supports .ics formats and thought it would be
useful to have a calendar for the class. I've never done .ics exports in
org -- I don't use the core calendar/agenda features very effectively --
and am not sure what the best way to do this would be.  So I'm really just
asking whether other people do ics exports and if so, how you structure the
org source files and so forth.

I look forward to hearing from everyone!

Matt