122

Dateline Style Calendar

Posted in System by rjorgenson 1528 days ago

My attempt to emulate a Dateline style calendar output in shell using my crappy ruby skills =] The script is in the geeklet but it is also at http://gist.github.com/410932 if you want to see it first/change stuff/whatever. This was mainly a proof of concept script that I could produce something mildly visually attractive and I will now be rolling this into my geeklets script with some customization options hopefully =]

The script requires no options but does color the current day's separator green(see screenshot). You can change that in the script or remove it all together if you wish. You can also change the separator characters.

geeklet screenshot

Geeklet files to download

Comments

User Avatar
rjorgenson 1521 days ago
Why do people keep down voting this? Does it not work for you? If it's broken let me know ... I'll fix it.
User Avatar
metallicash 249 days ago
Doesn't seem to work for me? I get the width but no actual text.
User Avatar
XxGeekToolxX 71 days ago
I have yet to find a long calendar that works for me.. dont know why :(
User Avatar
rjorgenson 1518 days ago
I fixed a bug that caused the days displayed to be off by one. The gist has been updated as well as a new .glet file uploaded with the correct script.
User Avatar
jschwal19 1518 days ago
Looks really nice, but the separator is off. Does it maybe require a certain font? Thanks though, great geeklet!

PS: I don't know why people are thumbing this down, I thumbed up!
User Avatar
KeithofNazareth 1512 days ago
This is awesome, thank you.

Jschwal19, just use a fixed width font and it will display properly.
User Avatar
rjorgenson 1502 days ago
Yes, sorry I forgot to mention it looks best with a fixed width font. I am using Anonymous Pro in the screenshot and use it for pretty much all my fixed width font needs.
User Avatar
Incognito 1247 days ago
~ great work! one of the best i've seen.
User Avatar
daviddelmonte 1215 days ago
+1 - it's great. Thanks for writing/posting it.. I voted..
User Avatar
kevintosh 1204 days ago
Hey! I made some MINOR modifications to it but I didn't think in uploading a geeklet or something, since it's YOUR original code and script ;)

I forked your code on github, so I leave the link here ( the code can be copied to a geeklet's source or whatever ;) )

Hope all like it! :)

Greetings!
User Avatar
Cutless009 1193 days ago
Would it be possible to get this script, sans the separator, with the current day colored red?  I figured out enough to get the separator off, but I tried like 15 different ways to color the day, and none of them worked.  Just not familiar enough with ruby to get it done.  Any chance you could do this?
User Avatar
ifuxusux 1175 days ago
Wonderful geeklet, but is there a way to make the date and day colored instead of the separator?
User Avatar
GBStudios 1030 days ago
Why don't you look at your emails? I mean, 188? Seriously, one of those is probably important!

Oh, by the way, great Geeklet
User Avatar
bradstone68 816 days ago
Can you tell me if it is possible to make the background transparent instead of a semi-transparent black? I love it!

Goodness gracious never mind! I see where you change it now. Thank you!
User Avatar
macinmac 778 days ago
Still works fine 10.7.4.

Thank you.
User Avatar
wholocked10 593 days ago
When I open the .glet, the window comes up asking if i'd like to add it, but they yes/no buttons are below the bottom of my screen, and i can't seem to find a way to select yes. Anyone know how to?
User Avatar
pgruneich 561 days ago
I've created an account just to help you out there, wholocked10.

Go to System Preferences > Keyboard > Keyboard Shortcuts.

There's a box selected "Text boxes and lists only", select the one below, "All Controls".

Close System Preferences. Open the Geeklet. Press Tab, Tab again and then Spacebar. You may check using F3 (Mission Control) if the blue is on "Yes" instead of "No" before you press spacebar.
User Avatar
wholocked10 550 days ago
Thanks pgruneich! It works now!
User Avatar
Cicidac 556 days ago
Sorry. When I open the .glet file, its too long for me to select the YES button. I read pgruneich's response, but it still doesn't work. Could someone just paste the command into a comment? Thanks
User Avatar
vanitas 334 days ago
Sorry but I'm a realy newbeee and I downloaded the wallpaper and the script. I've have run the script (OSX) but nothing happened on my wallpaper. What is to do to see the "Dateline Style Calender" in the Clear Blue wallpaper.
User Avatar
vanitas 331 days ago
Is here really no one who can help me?
User Avatar
milka17 218 days ago
When I run the geeklet, nothing happens. The script doesn't work and I can't understand why (I don't know anything about coding on Apple)... Can anyone help me?
User Avatar
psychoph03 203 days ago
The script at least for me with ruby 1.9 has a code error. On line 16 the associative array needs the => for each value.

it should read:

ABBR_DAYNAMES = {0 => 'Su', 1 => 'Mo', 2 => 'Tu', 3 => 'We', 4 => 'Th', 5 => 'Fr', 6 => 'Sa'}

instead of

ABBR_DAYNAMES = {0 , 'Su', 1 , 'Mo', 2 , 'Tu', 3 , 'We', 4, 'Th', 5 , 'Fr', 6 , 'Sa'}

i am no Ruby expert but I suspect something changed in Ruby's processing that requires associative arrays to be built differently. When I replaced the line it worked form me now.
User Avatar
halvard 160 days ago
Hey,

I can't get the script to work. I'm running osx 10.9.1, geektool v. 3.1.1.

All I get when I have the script is the red indicator light, so something is obviously wrong. do I have to edit the script to link to ruby or whats up?
User Avatar
rvonsch 156 days ago
As far as I know, this was working on 10.8 but now doesn't work at all on Mavericks
User Avatar
roadglide03 134 days ago
This code works with psychoph03 modification in Mavericks:

#!/usr/local/Cellar/ruby/2.1.1/bin/ruby

#

# Author: Robert Jorgenson

# Author email: rjorgenson@gmail.com

require 'Date'

ABBR_DAYNAMES = {0 => 'Su', 1 => 'Mo', 2 => 'Tu', 3 => 'We', 4 => 'Th', 5 => 'Fr', 6 => 'Sa'}

def build_month(year,month)

if month < 10 then

mnt = "0#{month}/#{year}"

else

mnt = "#{month}/#{year}"

end

return mnt

end

def days_in_month(year, month)

return (Date.new(year, 12, 31)
User Avatar
Lev2202 103 days ago
it does not seen to work for me.
User Avatar
-cj81499- 102 days ago
Deleted
User Avatar
-cj81499- 102 days ago
I found this code: http://pastebin.com/fDFj60VT Working on Mavericks. Its not quite the same but its better than nothing. I would love it if someone fixed the original though.

Log in to comment or register here.