Welcome Guest.   Make a donation to an author on the site October 20, 2014, 05:58:52 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Learn about the DonationCoder.com microdonation system (DonationCredits).
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: New Script FARR Plugin: Clock  (Read 16895 times)
gogogadgetscott
Supporting Member
**
Posts: 22



Mechanical engineer who has inexplicable knowledge

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« on: February 17, 2008, 11:02:35 PM »

Overview:
This plugin displays the current date/time in a variety of formats.

Info:
http://gogogadgetscott.in.../computers/software/farr/

List of commands:
cl : list current date/time

Download:
http://gogogadgetscott.in...ware/farr/clock/Clock.zip



Special thanks goes to ecaradec for Fscript.
http://www.donationcoder....m/index.php?topic=12232.0
Logged
taichimaster
Charter Member
***
Posts: 159



View Profile WWW Give some DonationCredits to this forum member
« Reply #1 on: February 17, 2008, 11:27:25 PM »

Pretty cool plugin.  You seem to have left out the UTC format though smiley

It would be even cooler if you could extend the plugin to show the current time in different cities.

cl moscow
cl "hong kong"

Maybe you can scrap the output of http://www.timeanddate.com/worldclock/ ?

Another idea would be to display the calendar of the specified month.  Something like the "cal" command in *nix.

Something like:

$ cal 2 2008
   February 2008
Su Mo Tu We Th Fr Sa
                1  2
 3  4  5  6  7  8  9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29
Logged

mouser
First Author
Administrator
*****
Posts: 33,571



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #2 on: February 18, 2008, 12:18:24 AM »

very cool.  thumbs up
my only suggestion is to not call it cl, and instead maybe "fcl" so it doesnt interfere with normal searching for files that might start with cl.
Logged
mouser
First Author
Administrator
*****
Posts: 33,571



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #3 on: February 18, 2008, 12:22:34 AM »

this is close to my request here, i wonder if it could be added:
http://www.donationcoder....ic=8071.msg86321#msg86321

i think you could add that ability to your plugin if you let the options file provide an OFFSET +- hours for each entry, and a label for each entry so user could search by entry name.  just an idea!
Logged
Armando
Charter Member
***
Posts: 2,678



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #4 on: February 18, 2008, 12:49:14 AM »

very cool.  thumbs up
my only suggestion is to not call it cl, and instead maybe "fcl" so it doesnt interfere with normal searching for files that might start with cl.

Or "cl "
[copy or print]
^cl (.*)

This is the convention that I've adopted for all aliases + plugins : they end with a space.
Logged

"I suppose it can be said that I'm an absent-minded driver. It's true that I've driven through a number of red lights on occasion, but on the other hand, I've stopped at a lot of green ones but never gotten credit for it."
Glenn Gould
mouser
First Author
Administrator
*****
Posts: 33,571



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #5 on: June 09, 2008, 10:08:56 AM »

Just added this to the official FARR plugin list.

Couple of quick comments:
  • The zip file actually has the directory Clock inside it (My winzip context menu extension does this by default as well if you right click on the directory and say to zip, rather than selecting the files inside the directory and saying zip).  This actually can cause a problem for the updater since it just unpacks the contents into the plugin subdirectory resulting in a two-level deep install.  Can you fix that?
  • Changing from cl to fcl would be good idea or doing as Armando says with ^cl (.*)

Logged
Perry Mowbray
N.A.N.Y. Organizer
Charter Member
***
Posts: 1,807



Thoughtful Scribbles

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #6 on: June 14, 2008, 08:50:07 AM »

I just installed this plugin and it's quite neat, but thought that adding the ability to display future or past dates would be beneficial too.

Being javascript it's easy to change the plugin, so I added the following before the script formats the date:
Formatted for Javascript with the GeSHI Syntax Highlighter [copy or print]
  1.  var NewDate = new Date()            // Get current Date
  2.  
  3.  if (querynokeyword != "") {
  4.    // Why is querynokeyword always just the first word??
  5.    var arrayOfQuery = queryraw.split(" ");
  6.  
  7.    for (var i=1; i < arrayOfQuery.length; i++) {
  8.      if (IsNumeric(arrayOfQuery[i]) == true ) {
  9.        var ip = i + 1;
  10.        if (ip < arrayOfQuery.length ) {
  11.          switch(arrayOfQuery[ip].toLowerCase()) {
  12.            case "year":
  13.            case "yyyy": {// year
  14.            NewDate.setFullYear(NewDate.getFullYear() + parseFloat( arrayOfQuery[i]));
  15.            break;
  16.            }
  17.            case "quarter":
  18.            case "q": { // quarter
  19.            NewDate.setMonth(NewDate.getMonth() + (parseFloat( arrayOfQuery[i])*3));
  20.            break;
  21.            }
  22.            case "month":
  23.            case "m": { // month
  24.            NewDate.setMonth(NewDate.getMonth() + parseFloat( arrayOfQuery[i]));
  25.            break;
  26.            }
  27.            case "day":
  28.            case "y": // day of year
  29.            case "d": // day
  30.            case "w": { // weekday
  31.            NewDate.setDate(NewDate.getDate() + parseFloat( arrayOfQuery[i]));
  32.            break;
  33.            }
  34.            case "week":
  35.            case "ww": { // week of year
  36.            NewDate.setDate(NewDate.getDate() + (parseFloat( arrayOfQuery[i])*7));
  37.            break;
  38.            }
  39.            case "hour":
  40.            case "h": { // hour
  41.            NewDate.setHours(NewDate.getHours() + parseFloat( arrayOfQuery[i]));
  42.            break;
  43.            }
  44.            case "minute":
  45.            case "n": { // minute
  46.            NewDate.setMinutes(NewDate.getMinutes() + parseFloat( arrayOfQuery[i]));
  47.            break;
  48.            }
  49.            case "second":
  50.            case "s": { // second
  51.            NewDate.setSeconds(NewDate.getSeconds() + parseFloat( arrayOfQuery[i]));
  52.            break;
  53.            }
  54.            case "milliseconds":
  55.            case "ms": { // second
  56.            NewDate.setMilliseconds(NewDate.getMilliseconds() + parseFloat( arrayOfQuery[i]));
  57.            break;
  58.            }            
  59.          }
  60.        }
  61.      }
  62.    }
  63.  }

Works fine, but it raised some questions about Licensing: There was not a Licence defined in the file or on his website, so I'm not sure if I should have done that or not?

I wonder if we:
  • Should ensure that all Plugins have some sort of Licence attached to them?
  • Should have an area for Open Source plugins, especially the FScript variety, as they are so easy to change?

 undecided What do people think?
Logged

mouser
First Author
Administrator
*****
Posts: 33,571



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #7 on: June 15, 2008, 09:54:25 AM »

Quote
Works fine, but it raised some questions about Licensing: There was not a Licence defined in the file or on his website, so I'm not sure if I should have done that or not?

i don't want to speak for gogogadgetscott, but given the context, and the fact that source is released with this, and the spirit of this site, it seems clear to me that it's a pure good thing to share modifications like this, and i would consider these plugins open source by default  Thmbsup

I think basically all FARR plugins have been released as open source -- though maybe not "formally" with a license.  it's a good idea to include a clear license in them saying so.  we should choose a default license and include it with all the samples, then others will follow suit.
Logged
gogogadgetscott
Supporting Member
**
Posts: 22



Mechanical engineer who has inexplicable knowledge

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #8 on: June 15, 2008, 10:49:12 AM »

I apologize for not replying to the above comments. I have had some performance issues with FARR (searching history is slow) and am currently evaluating Lanchy  Sad

FARR Plugin: Clock is now officially released using GPLv3. Do as you wish with it  cheesy
Logged
mouser
First Author
Administrator
*****
Posts: 33,571



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #9 on: June 15, 2008, 10:52:40 AM »

there's no reason searching history should be slow (you can email me at mouser@donationcoder.com if you want to experiment and try to get it fixed); but otherwise, use whatever program works best for you  Thmbsup
Logged
gogogadgetscott
Supporting Member
**
Posts: 22



Mechanical engineer who has inexplicable knowledge

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #10 on: June 15, 2008, 10:57:03 AM »

This sounds like my issue...
http://www.donationcoder....m/index.php?topic=11871.0
Logged
mouser
First Author
Administrator
*****
Posts: 33,571



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #11 on: June 15, 2008, 10:58:25 AM »

ok, i'm putting the new file format save/load at top of my todo list, and we'll see if we can't get this solved asap.
Logged
gogogadgetscott
Supporting Member
**
Posts: 22



Mechanical engineer who has inexplicable knowledge

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #12 on: June 15, 2008, 11:01:55 AM »

Thank you, mouser. Your the best  Cool
Logged
Perry Mowbray
N.A.N.Y. Organizer
Charter Member
***
Posts: 1,807



Thoughtful Scribbles

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #13 on: June 17, 2008, 04:04:35 AM »

I think basically all FARR plugins have been released as open source -- though maybe not "formally" with a license.  it's a good idea to include a clear license in them saying so.  we should choose a default license and include it with all the samples, then others will follow suit.

Cool, sounds like it should be  smiley

How about hosting the file? At the moment it's on GoGoGadetScott's site

FARR Plugin: Clock is now officially released using GPLv3. Do as you wish with it  cheesy

I've just about finished adding TaiChiMaster's request for World Time Zones.

I was having an issue with RegEx's in the JavaScript though: they don't seem to be working. Is that FScript.dll or FARR?

Logged

ecaradec
Honorary Member
**
Posts: 408



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #14 on: June 21, 2008, 05:28:49 AM »

I was having an issue with RegEx's in the JavaScript though: they don't seem to be working. Is that FScript.dll or FARR?

What is your issue with regexes ?
- FARR regexes are used to filter output (output many results and let farr filter and sort the results )
- You can use javascript to filter your results but you have to implement sorting and filtering

Logged

Blog & Projects : Blog | Qatapult | SwiffOut | FScript
Perry Mowbray
N.A.N.Y. Organizer
Charter Member
***
Posts: 1,807



Thoughtful Scribbles

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #15 on: June 21, 2008, 09:37:43 PM »

I was having an issue with RegEx's in the JavaScript though: they don't seem to be working. Is that FScript.dll or FARR?

What is your issue with regexes ?
- FARR regexes are used to filter output (output many results and let farr filter and sort the results )
- You can use javascript to filter your results but you have to implement sorting and filtering

My issues were my code  embarassed or at least my understanding of some code I'd borrowed. It was neither Fscript or FARR (not surprising  Wink): I've got my RegExes working fine in JavaScript, thanks.

Did have some questions over in your Fscript thread tho...  smiley
Logged

mouser
First Author
Administrator
*****
Posts: 33,571



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #16 on: June 25, 2008, 05:10:33 PM »

gogogadget, can you see if version 2.12.03 solves the slow read/write of settings file issue?
Logged
lanux128
Global Moderator
*****
Posts: 6,108



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #17 on: July 24, 2008, 02:43:06 AM »

Another idea would be to display the calendar of the specified month.  Something like the "cal" command in *nix.

you can use the plugin mentioned in this thread with some relevant console tools to make it work.
Logged

gogogadgetscott
Supporting Member
**
Posts: 22



Mechanical engineer who has inexplicable knowledge

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #18 on: August 31, 2008, 09:33:56 PM »

I am currently running v2.30.31 and find the performance has much improved on my machine. Thank you, mouser.
Logged
delio77
Supporting Member
**
Posts: 1

View Profile Give some DonationCredits to this forum member
« Reply #19 on: April 06, 2010, 05:11:52 PM »

The copy part of this doesnt work on my win7 boxes.

CL works but selecting the right format doesnt copy it to the clipboard.
Logged
mouser
First Author
Administrator
*****
Posts: 33,571



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #20 on: April 06, 2010, 05:19:13 PM »

there are other clipboard functions in farr.. i wonder if they are all broken on win7?
if you type: paste
and select one of the results, can you see if it works.
Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.069s | Server load: 0.1 ]