Loading ...
Sorry, an error occurred while loading the content.

Re: [Clip] Outline calendar - ancient history

Expand Messages
  • David
    Hi libbazet I f you still want the clip I think it is the one below = V5 MultiLine NoSurting TabWidth=30 H= ;Readme CreateCalender Version 0.1 Author:
    Message 1 of 2 , Apr 9 6:18 AM
    • 0 Attachment
      Hi libbazet
      I f you still want the clip I think it is the one below

      = V5 MultiLine NoSurting TabWidth=30

      H=";Readme"
      CreateCalender Version 0.1

      Author: andreas k├╝stermeyer

      Hi all,

      The clip creates files in the homedirectory of NoteTAB

      EX: NoteTAB\documents\2000\January.otl
      \February.otl
      ...........

      At this moment it supports only the GERMAN language

      This is my 3rd Clip so you can say that I'm a beginner,
      but I found the idea to create OutLineDocuments that I can
      use as an Organizer very helpfull.

      The problem at this moment is, that the creating of the sides
      will be seen by the user, perhaps it would be better to
      do this in the Background? But how?

      On the other hand, what does this Clip still need
      to work correctly when errors occur?

      If you think, that this Clip is usefull I also would like to
      give the user the choice, to create it in english language

      But what would the title be in english

      German: Sunntag, den 12.02.05
      English: Sunday 12.02.05 ????


      If everything works right, the next step would be to create clips
      that creates formated text for the daily pages
      Or search functions e: TODAY or by DATE

      I use a version with this functions, but they also have to be tested


      H="CreateCalender"

      ;//
      ;//
      ;//
      ^!SetArray %ArrayDaysEngS%=Su;Mo;Tu;We;Th;Fr;Sa
      ^!SetArray %ArrayDaysEngL%=Sunday ;Monday ;Teusday ;Wednesday;Thursday
      ;Friday ;Saturday ;
      ^!SetArray
      %ArrayMonthEngL%=January;February;March;April;May;June;July;August;September
      ;October;November;December
      ^!SetArray
      %ArrayDaysF%=01;02;03;04;05;06;07;08;09;10;11;12;13;14;15;16;17;18;19;20;21;
      22;23;24;25;26;27;28;29;30;31
      ^!SetArray %ArrayMonthF%=01;02;03;04;05;06;07;08;09;10;11;12
      ^!SetArray %ArrayMonthLength%=31;2;31;30;31;30;31;31;30;31;30;31

      ;// Name of [FirstDay of the year + LengthFebruary] 2000 -> 2005
      ;// nDD n=1->Su; n=2->Mo;... -> %ArrayDaysEngS%
      ;// nDD DD = Length of February
      ^!SetArray %ArrayYears%=729;228;328;428;529;728

      ;// User input
      ;// Choose the year
      ^!Set %year%=^?[January=_2000|2001|2002|2003|2004|2005]

      ;// ShortForm
      ;// year for heading 2 sign
      ;// 2001 -> 01
      ^!Set %year2sign%=^$StrCopy(^%year%;3;2)$

      ;// ShortForm year 1 sign
      ;// 2001 -> 1
      ^!Set %DayDateIdx%=^$StrCopy(^%year%;4;1)$
      ^!Inc %DayDateIdx%

      ^!Set %DayDate%=^%ArrayYears^%DayDateIdx%%

      ;// -> ArrayDaysEngS
      ;//n = 1 -> Su
      ;//n = 2 -> Mo
      ;//n = .......
      ;//n = 7 -> Sa
      ^!Set %ddIdx%=^$StrCopy(^%DayDate%;1;1)$

      ;// Length February -> %ArrayYears%
      ;// DD
      ^!Set %LengthFebruary%=^$StrCopy(^%DayDate%;2;2)$

      ;// Loop Index Month
      ^!Set %MonthIdx%=0
      ^!GoTo LoopYear

      ;// Create a OutLineDocument for each month
      ;// do this 12x
      ;// Date for first day = 1

      :LoopYear
      ^!Set %dayIDX%=1
      ^!If ^%MonthIdx% <= 11 LoopCreateOutLine ELSE End

      ;// OutLineDocument for each Month
      ;// Create the Path with Filename
      ;// C:\Programme\NoteTab Pro\Documents\2000\January.otl
      ;//^!Open ^%FileName%

      :LoopCreateOutline
      ;//^!SetScreenUpdate Off
      ^!Inc %MonthIdx%
      ^!Set %FileName%=^%ArrayMonthEngL^%MonthIdx%%
      ^!Set %FileName%=^$GetDocumentPath$^%year%\^%FileName%.OTL

      ;// Do not overwrite
      ^!IfFileExist ^%FileName% Error

      ;//Create Path
      ^!MkDir ^$GetDocumentPath$^%year%

      ;// ^!TextToFile "FileName" AnyText
      ;// Creates a disk file containing the specified text.
      ;// If a file with such a name already exists on disk,
      ;// it will be replaced by the new file.
      ;// !!! ^%FileName% -> "^%FileName%"
      ^!TextToFile "^%FileName%" =V4 Outline MultiLine NoSorting
      TabWidth=30^%nl%^%nl%
      ^!Open ^%fileName%

      ;// Set Length Month
      ;// Check if it's February
      ^!If ^%MonthIdx% = 2 FebruaryLength ELSE StandardLength

      ;// Get the length of February
      :FebruaryLength
      ^!Set %MonthLength%=^%LengthFebruary%
      ^!GoTo LoopDays
      ;// Get StandardLength of the other months
      :StandardLength
      ^!Set %MonthLength%=^%ArrayMonthLength^%MonthIdx%%
      ^!GoTo LoopDays

      ;// Do this for each day of the month
      :LoopDays
      ^!If ^%dayIdx% <= ^%MonthLength% LoopNameDays ELSE SaveMonth

      ;// Save the Document
      :SaveMonth
      ^!Save
      ^!GoTo LoopYear

      ;// Check if we have reached Saturday
      :LoopNameDays
      ^!IF ^%ddIdx% > 7 StartSunday ELSE LoopCreateDays

      ;// We start again with Sunday
      :StartSunday
      ^!Set %ddIdx%=1
      ^!GoTo LoopCreateDays

      ;// Get the ShortNames -> Mo Tu ....
      ;// Get the LongNames -> Monday Tuesday
      ;// and create string for header. Form: -> Mo 01.01.00
      ;// String -> ^%short% ^%datef%.^%monthf%.^%year2sign%
      ;// %short% = Mo
      ;// %datef% = 01
      ;// %Monthf% = 01
      ;// %year2sign% = 00
      ;// and Insert Text Form ->

      :LoopCreateDays
      ^!Set %short%=^%ArrayDaysEngS^%ddIdx%%
      ^!Set %long%=^%ArrayDaysEngL^%ddIdx%%
      ^!Set %datef%=^%ArrayDaysF^%dayIdx%%
      ^!Set %monthf%=^%ArrayMonthF^%monthIdx%%
      ^!Set %header%=^%short% ^%datef%.^%monthF%.^%year2sign%
      ;// add header
      ^!Addheading ^%header%
      ;// Insert Text
      ^!Jump Text_Start
      ^!InsertText ^%long% ^%datef% ^%monthF% ^%year2sign% ^P
      ^!Keyboard ENTER
      ^!Inc %ddIdx%
      ^!Inc %dayIdx%
      ^!GoTo LoopDays

      ;// the calender allready exsists
      :Error
      ^!Info Calender <^%year%> allready exsists!
      ^!Goto Exit

      THANKYOU DAVE
      ----- Original Message -----
      From: "libbazet" <libbazet@...>
      To: <ntb-clips@yahoogroups.com>
      Sent: Wednesday, April 09, 2003 12:54 PM
      Subject: [Clip] Outline calendar - ancient history


      > Jody, Andreas K├╝stermeyer, or other old-timers
      >
      > In January of 2000, we had a discussion about a clip which created a
      > calendar using 12 outlines (1 for each month). At the time, I
      > copied and worked with it. Alas, I have switch jobs and can no
      > longer locate the clip (if in fact I still have it). If anyone has
      > this clip (or something similiar) I would appreciate it if you could
      > send me the info.
      >
      > If no one still has this clip, could you give me some ideas on how I
      > might recreate it.
      >
      > Thanks
      > Elizabeth Wild
      >
      >
      >
      >
      >
      > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
      >
      >
    • libbazet
      David, I will need to take a closer look, but on first glance that appears to be exactly the on that I remembered. Thanks for you quick response. Elizabeth
      Message 2 of 2 , Apr 9 7:33 AM
      • 0 Attachment
        David,

        I will need to take a closer look, but on first glance that appears
        to be exactly the on that I remembered.

        Thanks for you quick response.

        Elizabeth Wild
        libbazet@...
      Your message has been successfully submitted and would be delivered to recipients shortly.