Zim

[Feature request] Calendar View

Asked by Benjamin noury

Hi,

Zim is great for PIM and I would like to use it even more for managing my meetings and everything else but it lacks a way to have an overview of the month or of the week.

I mean something like this : http://palcal.sourceforge.net/test.htm

I've written a custom action that manage that through formation zim pages from Calendar namespace into pal files and then using pal ( http://palcal.sourceforge.net/ ), it produce an html calendar.

The limitation of this way to produce the calendar is that I can't click on an event and directly get to its page in zim and see the annotations about the event. I have to always switch, it gets quickly annoying.
Also I need to reactualise the calendar everytime I make a modification and I can't do it if I'm not using linux. It feels like losing much of Zim's power.

I'm not a programmer and I don't know anything about python and so I don't know what is possible to do but efficient time management in ZIm would be great.

Some features request for that plugin or whatever (for my usage)
* Automatic update à la Zim
* Categories of event (Work, fun, ...) (through tags ) leads to coloring in the calendar view
* events in calendar are links as links in Zim ( ie links to zim page or website)
* Possibility to show only one or some categorie

For reference here is the bash script I use (in french, I can translate it if needed)

* Syntax for event : ~[hh:mm [- hh:mm]]EVENT[@tag]
* pal permise colored output of calendars (not in the above screenshot, but it can ;) )

#2 "pal file" per category : [cat].pal and [cat]-zim.pal

for copie in $paldir/*.pal
do head -n1 $copie > ${copie%%.pal}-zim.pal
done

#tagtest function converts tags in zim into pal file to write in

tagtest() {
 case $1 in
 travail | Travail | M2 | Master | Stage | master | stage) categorie=$paldir/M2-zim.pal ;;
 loisirs | amis | Loisirs) categorie=$paldir/loisirs-zim.pal;;
 ENS | ens|Enseignement|enseignement|mektro) categorie=$paldir/ens-zim.pal;;
 Lisa | lisa) categorie=$paldir/lisa-zim.pal;;
 todo | TODO | Todo|imp|important|Important) categorie=$paldir/todo-zim.pal;;
 *) categorie=$paldir/vrac-zim.pal;;
 esac
 }

for fichier in $ZimDir/*/*/*.txt
 do
# event are ~hh:mm event @tag in file [zim_root]/Calendar/year/month/day
 events=`grep -e ^~ $fichier | sed s/"~"//g | sed s/"\ "/_/g`
 if ! [ -z $events ]
 then
 date=`echo ${fichier##$ZimDir} | sed s/"\/"//g |sed s/.txt//g`
# Day can contain more than one event (sadly)
# spaces in $events are converted into "_" in order to avoid strange behaviour in this loop
 for event in $events
  do
  tag=`echo $event |grep -o @.* | sed s/"@"//g`
  tagtest $tag
  event=`echo ${event%%@$tag} | sed s/"_"/"\ "/g`
# That part parse for events written two times ( as I use traditional pal file and zim converted)
  if ! grep "$date $event" ${categorie%%-zim.pal}.pal 1>/dev/null
   then echo "$date $event" >> $categorie
  fi
 done
 fi
done

Thanks for reading
Benjamin

Question information

Language:
English Edit question
Status:
Solved
For:
Zim Edit question
Assignee:
No assignee Edit question
Solved by:
Jaap Karssenberg
Solved:
Last query:
Last reply:
Revision history for this message
Best Jaap Karssenberg (jaap.karssenberg) said :
#1

Hi Benjamin,

I'm afraid it is not exactly clear to me what functionality you are
requesting. Sounds like you want to extend calendar functions in zim,
but due to the whole discussion about palcal I'm a bit confused.
Probably because I don't know what palcal is or how it works.

I think it would help if you describe the features you would like in
zim first and then show the palcal as an example instead of talking
about issues with palcal integration. Please put such a feature
request in the bug tracker and not in the question section.

Regards,

Jaap

On Wed, Feb 23, 2011 at 8:00 PM, Benjamin noury
<email address hidden> wrote:
> New question #146604 on Zim:
> https://answers.launchpad.net/zim/+question/146604
>
> Hi,
>
> Zim is great for PIM and I would like to use it even more for managing my meetings and everything else but it lacks a way to have an overview of the month or of the week.
>
> I mean something like this : http://palcal.sourceforge.net/test.htm
>
> I've written a custom action that manage that through formation zim pages from Calendar namespace into pal files and then using pal ( http://palcal.sourceforge.net/ ), it produce an html calendar.
>
> The limitation of this way to produce the calendar is that I can't click on an event and directly get to its page in zim and see the annotations about the event. I have to always switch, it gets quickly annoying.
> Also I need to reactualise the calendar everytime I make a modification and I can't do it if I'm not using linux. It feels like losing much of Zim's power.
>
> I'm not a programmer and I don't know anything about python and so I don't know what is possible to do but efficient time management in ZIm would be great.
>
> Some features request for that plugin or whatever  (for my usage)
> * Automatic update à la Zim
> * Categories of event (Work, fun, ...) (through tags ) leads to coloring in the calendar view
> * events in calendar are links as links in Zim ( ie links to zim page or website)
> * Possibility to show only one or some categorie
>
> For reference here is the bash script I use (in french, I can translate it if needed)
>
> * Syntax for event :   ~[hh:mm [- hh:mm]]EVENT[@tag]
> * pal permise colored output of calendars (not in the above screenshot, but it can ;) )
>
> #2 "pal file" per category : [cat].pal and [cat]-zim.pal
>
> for copie in $paldir/*.pal
> do head -n1 $copie  > ${copie%%.pal}-zim.pal
> done
>
> #tagtest function converts tags in zim into pal file to write in
>
> tagtest() {
>        case $1 in
>        travail | Travail | M2 | Master | Stage | master | stage) categorie=$paldir/M2-zim.pal ;;
>        loisirs | amis | Loisirs) categorie=$paldir/loisirs-zim.pal;;
>        ENS | ens|Enseignement|enseignement|mektro) categorie=$paldir/ens-zim.pal;;
>        Lisa | lisa) categorie=$paldir/lisa-zim.pal;;
>        todo | TODO | Todo|imp|important|Important) categorie=$paldir/todo-zim.pal;;
>        *) categorie=$paldir/vrac-zim.pal;;
>        esac
>        }
>
> for fichier in $ZimDir/*/*/*.txt
>        do
> # event are ~hh:mm event @tag in file [zim_root]/Calendar/year/month/day
>        events=`grep -e ^~ $fichier | sed s/"~"//g | sed s/"\ "/_/g`
>        if ! [ -z $events ]
>        then
>        date=`echo ${fichier##$ZimDir} | sed s/"\/"//g |sed s/.txt//g`
> # Day can contain more than one event (sadly)
> # spaces in $events are converted into "_" in order to avoid strange behaviour in this loop
>        for event in $events
>                do
>                tag=`echo $event |grep -o @.* | sed s/"@"//g`
>                tagtest $tag
>                event=`echo ${event%%@$tag} | sed s/"_"/"\ "/g`
> # That part parse for events written two times ( as I use traditional pal file and zim converted)
>                if ! grep "$date $event" ${categorie%%-zim.pal}.pal 1>/dev/null
>                        then echo "$date $event" >> $categorie
>                fi
>        done
>        fi
> done
>
>
>
> Thanks for reading
> Benjamin
>
> --
> You received this question notification because you are an answer
> contact for Zim.
>

Revision history for this message
Benjamin noury (benjamin-noury) said :
#2

Thanks for answering.
As you wanted, I posted a feature request in the bug tracker. I hope the message to be clearer.

Regards,
Benjamin

Revision history for this message
Benjamin noury (benjamin-noury) said :
#3

Thanks Jaap Karssenberg, that solved my question.