It is currently April 25th, 2024, 9:12 am

testers wanted - a non-Lua calendar

Clocks and timer skins
User avatar
moshi
Posts: 1740
Joined: November 13th, 2012, 9:53 pm

testers wanted - a non-Lua calendar

Post by moshi »

if you are just looking for a calendar, smurfier already made one. it's here: http://is.gd/nINESr, and it's awesome. my goal is to build something that one day is maybe 10% as good.

so what i did was building my own calendar (from scratch). this one does not use Lua, but is based on timestamps. it might be the first Rainmeter calendar that is.
moshical.jpg
there are some parts in the code about which i am surprised that they seem to work. so there might be bugs. if you find them, please report.

it's available here: (bahleted)

edit:
thanks everybody for the feedback. i decided not to further develop and maintain an easily configurable version, due to "incredibly messy execution".
will use it for my Sphynx theme though (now off to developed a Google Calendar reader).
You do not have the required permissions to view the files attached to this post.
Last edited by moshi on August 8th, 2013, 9:36 am, edited 2 times in total.
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: testers wanted - a non-Lua calendar

Post by smurfier »

Haven't looked at yours yet, but here is what I did one day while bored.

Code: Select all

[Variables]
OutsideMonth=0,0,255,255
OldMonth=0

[CurrentStamp]
Measure=Time

[CurrentFormula]
Measure=Time
Format=(%#H*3600+%#M*60+%#S)-(%#d*86400)

[Stamp]
Measure=Calc
Formula=CurrentStamp-[CurrentFormula]
DynamicVariables=1

[CurrentMonth]
Measure=Time
Format=%#m

[CheckMonth]
Measure=Calc
Formula=#OldMonth#<>CurrentMonth
IfAboveValue=0
IfAboveAction=[!SetVariable OldMonth [CurrentMonth]][!UpdateMeasureGroup Numbers]
DynamicVariables=1

[MonthStart]
Measure=Time
Format=%#w
TimeStamp=[Stamp]
OnUpdateAction=[!SetOptionGroup "Start5" "FontColor" ""][!SetOptionGroup "Start[MonthStart]" "FontColor" "#OutsideMonth#"]
DynamicVariables=1
Group=Numbers

[StartStamp]
Measure=Calc
Formula=Stamp-MonthStart*86400
Group=Numbers

[NewDay]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+41*86400)
OnUpdateAction=[!SetOptionGroup "Next1" "FontColor" ""][!SetOptionGroup "Next[NewDay]" "FontColor" "#OutsideMonth#"]
DynamicVariables=1
Group=Numbers

[NumberStyle]
H=32
W=32
X=5R
Y=r
StringAlign=CenterCenter
FontColor=255,255,255,255
SolidColor=0,0,0,100

[NewWeek]
X=16
Y=5R

;Week 1
[0]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter0]
Meter=String
MeasureName=0
MeterStyle=NumberStyle
X=16
Y=16
Group=Start0|Start1|Start2|Start3|Start4|Start5

[1]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter1]
Meter=String
MeasureName=1
MeterStyle=NumberStyle
Group=Start1|Start2|Start3|Start4|Start5

[2]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter2]
Meter=String
MeasureName=2
MeterStyle=NumberStyle
Group=Start2|Start3|Start4|Start5

[3]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter3]
Meter=String
MeasureName=3
MeterStyle=NumberStyle
Group=Start3|Start4|Start5

[4]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter4]
Meter=String
MeasureName=4
MeterStyle=NumberStyle
Group=Start4|Start5

[5]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter5]
Meter=String
MeasureName=5
MeterStyle=NumberStyle
Group=Start5

[6]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter6]
Meter=String
MeasureName=6
MeterStyle=NumberStyle

[7]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

;Week 2
[Meter7]
Meter=String
MeasureName=7
MeterStyle=NumberStyle|NewWeek

[8]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter8]
Meter=String
MeasureName=8
MeterStyle=NumberStyle

[9]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter9]
Meter=String
MeasureName=9
MeterStyle=NumberStyle

[10]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter10]
Meter=String
MeasureName=10
MeterStyle=NumberStyle

[11]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter11]
Meter=String
MeasureName=11
MeterStyle=NumberStyle

[12]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter12]
Meter=String
MeasureName=12
MeterStyle=NumberStyle

[13]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter13]
Meter=String
MeasureName=13
MeterStyle=NumberStyle

[14]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

;Week 3
[Meter14]
Meter=String
MeasureName=14
MeterStyle=NumberStyle|NewWeek

[15]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter15]
Meter=String
MeasureName=15
MeterStyle=NumberStyle

[16]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter16]
Meter=String
MeasureName=16
MeterStyle=NumberStyle

[17]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter17]
Meter=String
MeasureName=17
MeterStyle=NumberStyle

[18]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter18]
Meter=String
MeasureName=18
MeterStyle=NumberStyle

[19]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter19]
Meter=String
MeasureName=19
MeterStyle=NumberStyle

[20]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter20]
Meter=String
MeasureName=20
MeterStyle=NumberStyle

[21]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

;Week 4
[Meter21]
Meter=String
MeasureName=21
MeterStyle=NumberStyle|NewWeek

[22]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter22]
Meter=String
MeasureName=22
MeterStyle=NumberStyle

[23]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter23]
Meter=String
MeasureName=23
MeterStyle=NumberStyle

[24]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter24]
Meter=String
MeasureName=24
MeterStyle=NumberStyle

[25]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter25]
Meter=String
MeasureName=25
MeterStyle=NumberStyle

[26]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter26]
Meter=String
MeasureName=26
MeterStyle=NumberStyle

[27]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter27]
Meter=String
MeasureName=27
MeterStyle=NumberStyle

;Week 5
[28]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter28]
Meter=String
MeasureName=28
MeterStyle=NumberStyle|NewWeek
Group=Next14

[29]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter29]
Meter=String
MeasureName=29
MeterStyle=NumberStyle
Group=Next14|Next13

[30]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter30]
Meter=String
MeasureName=30
MeterStyle=NumberStyle
Group=Next14|Next13|Next12

[31]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter31]
Meter=String
MeasureName=31
MeterStyle=NumberStyle
Group=Next14|Next13|Next12|Next11

[32]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter32]
Meter=String
MeasureName=32
MeterStyle=NumberStyle
Group=Next14|Next13|Next12|Next11|Next10

[33]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter33]
Meter=String
MeasureName=33
MeterStyle=NumberStyle
Group=Next14|Next13|Next12|Next11|Next10|Next9

[34]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter34]
Meter=String
MeasureName=34
MeterStyle=NumberStyle
Group=Next14|Next13|Next12|Next11|Next10|Next9|Next8

;Week6
[35]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter35]
Meter=String
MeasureName=35
MeterStyle=NumberStyle|NewWeek
Group=Next14|Next13|Next12|Next11|Next10|Next9|Next8|Next7

[36]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter36]
Meter=String
MeasureName=36
MeterStyle=NumberStyle
Group=Next14|Next13|Next12|Next11|Next10|Next9|Next8|Next7|Next6

[37]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter37]
Meter=String
MeasureName=37
MeterStyle=NumberStyle
Group=Next14|Next13|Next12|Next11|Next10|Next9|Next8|Next7|Next6|Next5

[38]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter38]
Meter=String
MeasureName=38
MeterStyle=NumberStyle
Group=Next14|Next13|Next12|Next11|Next10|Next9|Next8|Next7|Next6|Next5|Next4

[39]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter39]
Meter=String
MeasureName=39
MeterStyle=NumberStyle
Group=Next14|Next13|Next12|Next11|Next10|Next9|Next8|Next7|Next6|Next5|Next4|Next3

[40]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter40]
Meter=String
MeasureName=40
MeterStyle=NumberStyle
Group=Next14|Next13|Next12|Next11|Next10|Next9|Next8|Next7|Next6|Next5|Next4|Next3|Next2

[41]
Measure=Time
Format=%#d
TimeStamp=([StartStamp]+#CURRENTSECTION#*86400)
DynamicVariables=1
Group=Numbers

[Meter41]
Meter=String
MeasureName=41
MeterStyle=NumberStyle
Group=Next14|Next13|Next12|Next11|Next10|Next9|Next8|Next7|Next6|Next5|Next4|Next3|Next2|Next1
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
User avatar
iNjUST
Posts: 117
Joined: June 20th, 2012, 12:44 am

Re: testers wanted - a non-Lua calendar

Post by iNjUST »

Gee willikers, that's a mess of code. I assume you're aware of MeterStyles? You could clean up probably half of your code just with that.

Pretty neat idea, but incredibly messy execution. My brain hurts from skimming the code...

Have a look at the calendar that's part of my simplex suite that I made a while ago. The calendar that I made there was from scratch as well, no Lua. But it is less than 400 lines, and could probably be further condensed. It lacks date-changing, but your TimeStamp concept could be pretty easily implemented to add that. It also lacks previous and next month days in the empty gaps at the beginning and end, but I'd like to add that in at some point too.

Keep at the experimentation and innovation, though. Your patience and diligence shown here is no small thing. But remember the adage, "less is more"; or, K.I.S.S.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5406
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: testers wanted - a non-Lua calendar

Post by eclectic-tech »

@Moshi

Nice work! :thumbup:

My only suggestion would be a different design to mark the current day; current scheme is seldom centered over the date number.

Aligning roundline meters with varying text is a trade-off at best and like your preview, the circle is slightly off at all non-centered dates; too high when near top, too low at the bottom, too far left, or too far right...

Perhaps simply having the current date text in bold and/or a different color.

Just my 2-cents! :D

Leap years and all other functions and displays works great on my old XP machine (GDI+) and latest beta of Rainmeter.

Thanks!

Edit: Just noticed the arrow symbols show as boxes (no character) on my machine; did you use a particular fontface rather than an image?
Image
User avatar
moshi
Posts: 1740
Joined: November 13th, 2012, 9:53 pm

Re: testers wanted - a non-Lua calendar

Post by moshi »

smurfier wrote:Haven't looked at yours yet, but here is what I did one day while bored.
thanks, that what interesting. you're using a more "mathematical" approach to determine the starting point.
User avatar
moshi
Posts: 1740
Joined: November 13th, 2012, 9:53 pm

Re: testers wanted - a non-Lua calendar

Post by moshi »

eclectic-tech wrote: ...

at least in Windows 7 when a font lacks a character, it falls back to a font that has it. seems Windows XP does not have this feature. thanks for reporting, next version will use < and > when XP is detected.

as for the circle, yeah i'm having trouble getting that nicely placed. i still like think i'll keep it, as i want to use colors and styles for events.
or i'll completely give up on the configurability and use images instead (which actually would allow even more configurability :) )