Announcement

Collapse
No announcement yet.

CLI Calendar - When

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    CLI Calendar - When

    I stumbled across this little gem back in my Ubuntu days when I spent way too much time playing with conky.

    From the man page:

    When - a minimalistic personal calendar program.

    The basic idea is just to type `when' at the command line.
    The first time you run the program, it will prompt you for
    some setup information. To edit you calendar file in your
    favorite editor, do `when e'. The basic format of the
    calendar file is like this:

    2003 feb 3 , Fly to Stockholm to accept Nobel Prize.

    Once you have a calendar file, running the program as plain
    old `when' from the command line will print out the things on
    your calendar for the next two weeks.
    Included are commands that output data on a month or yearly basis also.
    Kubuntu 12.04 - Acer Aspire 5750G

    "I don't make a great deal of money, but I'm ok with that 'cause I don't hurt a lot of people in the process either"

    #2
    kewl! I installed it but can't figure out how to edit it, uses emacs.

    woodsmoke
    sigpic
    Love Thy Neighbor Baby!

    Comment


      #3
      Originally posted by woodsmoke View Post
      kewl! I installed it but can't figure out how to edit it, uses emacs.

      woodsmoke
      lol,

      edit the preferences file to read editor = kate in ~/.when

      man when gives a range of useful command options also.

      cheers
      Kubuntu 12.04 - Acer Aspire 5750G

      "I don't make a great deal of money, but I'm ok with that 'cause I don't hurt a lot of people in the process either"

      Comment


        #4
        done and it woiks!
        woodnotaCLIkindaguysmoke
        sigpic
        Love Thy Neighbor Baby!

        Comment


          #5
          It makes a fine 'ToDo' list for anybody wanting to incorporate this data into their desk conky...

          Now I'm wondering if it's possible to edit the calendar file from CLI?
          Kubuntu 12.04 - Acer Aspire 5750G

          "I don't make a great deal of money, but I'm ok with that 'cause I don't hurt a lot of people in the process either"

          Comment


            #6
            Cool.

            bra|10n, it looks like you can edit the .when/calendar file the same as any text file ... using nano, joe, via, emacs, sed, or even the real man's command line editor: cat.
            I'd rather be locked out than locked in.

            Comment


              #7
              Originally posted by SecretCode View Post
              Cool.

              bra|10n, it looks like you can edit the .when/calendar file the same as any text file ... using nano, joe, via, emacs, sed, or even the real man's command line editor: cat.
              cat.

              Hmm..

              Would you be so kind as to show how.

              This would be great; editing the calendar file via CLI reflecting the changes to 'ToDo' list immediately on the desktop using conky...

              Combine this with a on/off launcher (my other thread), and this is everything I'll need
              Kubuntu 12.04 - Acer Aspire 5750G

              "I don't make a great deal of money, but I'm ok with that 'cause I don't hurt a lot of people in the process either"

              Comment


                #8
                Using cat as an editor

                Advanced technique; should probably be a sticky in the HOWTO section.

                Type
                Code:
                cat > filename
                (or
                Code:
                cat >> filename
                to append to an existing file)

                Then type the exact desired contents of the file. Press Ctrl-D to finish.

                I'd rather be locked out than locked in.

                Comment


                  #9
                  Serious answer ... nano or joe are pretty good text-mode editors.
                  I'd rather be locked out than locked in.

                  Comment


                    #10
                    Thanks SecretCode,

                    cat is all I need for this.
                    Kubuntu 12.04 - Acer Aspire 5750G

                    "I don't make a great deal of money, but I'm ok with that 'cause I don't hurt a lot of people in the process either"

                    Comment


                      #11
                      @woodsmoke,

                      You might want to incorporate 'when' into your conky to view on-screen dates/appointments etc...

                      Code:
                      ${execpi 3600 when --future=2|cut -c 24-100}
                      You can adjust it as you see fit of course. I have mine set to show the next 2 days only. The beauty of the --future option* is that you can retain a list of dates that have past, while only showing current -> 2 days in advance in this case, in conky. This might be helpful if you need to retain a running record of such appointments. The cut '-c 24' part cuts out todays date (working for now), the '-100' shows more than enough of the detail to serve it's purpose. The 'update' time 3600 can be set to anything you want (must be > than the update_interval (1.0 normally) set in conky) and will depend on how you wish to use it, eg, for hourly appointments you might set it at 600...

                      * past=0 will also need to be placed into the preferences file, ~/.when/preferences
                      Last edited by bra|10n; Mar 30, 2012, 04:08 PM. Reason: minor_adjustment.1
                      Kubuntu 12.04 - Acer Aspire 5750G

                      "I don't make a great deal of money, but I'm ok with that 'cause I don't hurt a lot of people in the process either"

                      Comment

                      Working...
                      X