cal command alternatives

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Message
Author
mfb

#31 Post by mfb »

"If you want to get ahead, get a hat" was still popular advice in London, when I was young. Since Mochi has now acquired one, he may now have answered his own question.

However, amigo might advise a sombrero might be bigger and better and lead to much faster advancement.
Attachments
anes018.gif
(37.24 KiB) Downloaded 585 times

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#32 Post by BarryK »

tallboy wrote:Ancient Puppy:
/root/.packages/builtin_files/minixcal
In /root/.jwm-tray:

Code: Select all

<Clock format="%H:%M:%S">minixcal</Clock>
Activate by click on clock.
Ancient!
Yeah, I suppose it does go back a long way.
I am still using it in EasyOS. Yes, click on the clock to run it.

Source:
http://distro.ibiblio.org/easyos/source ... .1.tar.bz2

Compile guidance here:
https://github.com/bkauler/oe-qky-src/b ... l_1.1.1.bb
[url]https://bkhome.org/news/[/url]

User avatar
torm
Posts: 186
Joined: Sat 07 Mar 2015, 19:56

#33 Post by torm »

@MochiMoppel
... and v1.23.1 is NOT OK, please see the note about tahr versions on previous page.


@mcb
It may sound a bit off-topic, but for more complex command-line calendars
with more features try:

- pal_0.4.3-8
- gcal_3.6.3-3
- calcurse_3.1.4-2
- when_1.1.31-3
- wyrd_1.4.4-1

.. can be installed from Puppy Package Manager.

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#34 Post by MochiMoppel »

torm wrote:@MochiMoppel
... and v1.23.1 is NOT OK, please see the note about tahr versions on previous page.
...and I wrote that busybox v1.21.0 looks OK to me. On the previous page you compared Tahr versions, suggesting that Tahr makes the difference. You didn't mention that they use different busybox versions, which I only know now after having dowloaded Tahr6.0.6.

I agree that Tahr6.0.6 with its busybox v1.23.1 is not OK but Tahr6.0.6 shows no bugs when using Tahr6.0.5's busybox v1.21.0 instead. So this clearly seems to be a problem with this particular busybox version and can easily be "fixed" by reverting to the older version.

Still you should deem yourself lucky. Busybox cal can get even worse. With v1.21.0 and locale ja_JP I get no weekday labels at all. This is particularly strange as the Kanji character for "Month" is correctly displayed in the first line. The Kanji character for "Monday" is the same but cal can't display it. None of the numerous other calendar apps have problems with the labels.
Attachments
cal_locale_ja_JP.png
(6.21 KiB) Downloaded 404 times

User avatar
tallboy
Posts: 1760
Joined: Tue 21 Sep 2010, 21:56
Location: Drøbak, Norway

#35 Post by tallboy »

Barry wrote:Ancient!
Yeah, I suppose it does go back a long way.
I am still using it in EasyOS. Yes, click on the clock to run it.
It seems it has always been there, and I would find a Puppy without it, incomplete! :shock: I use it, very often several times every day, and in the best of 'nix traditions, it only does exactly what it should do! :D
True freedom is a live Puppy on a multisession CD/DVD.

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#36 Post by rufwoof »

torm wrote:calcurse_3.1.4-2
.. can be installed from Puppy Package Manager.
I run/use calcurse 4.3 and like it a lot. The only thing I run X for is to run a browser (no window decorations, no tray ...etc., browser maximised, where both X and browser run under restricted userid). cli/textual is very quick, especially if you use tmux and set up a tput based menu system. From X I ctrl-alt-F4 to switch to console, 'l' to mount a ext (Linux) partition where my calendar resides, 'c' to start calcurse in a new tmux window. Calcurse uses a simple text file, so easily edited, or shared across devices (ssh in and attach to the tmux session). I prefer keeping my diary/calendar/events/tasks local rather than utilising a online alternative.
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#37 Post by MochiMoppel »

tallboy wrote:/root/.packages/builtin_files/minixcal
In /root/.jwm-tray:

Code: Select all

<Clock format="%H:%M:%S">minixcal</Clock>
If your minixcal is in /root/.packages you are probably running the""real" thing, but the line in /root/.jwm-tray doesn't mean much.
In my puppy minixcal is just a wrapper script for igucal, a minixcal derivate created by forum member Iguleder (he used the same word "ancient" when he complained about minixcal). Main difference is that igucal is not hardcoded to lauch osmo, instead it runs /usr/local/bin/defaultcalendar, therefore the button on top reads "Personal organizer" and not "Launch Osmo Calendar".

Still another fake minixcal in Dpup Strech. Here minixcal is a script launching yad --calendar, probably the simplest of many ways to launch the GTK calendar widget.

User avatar
tallboy
Posts: 1760
Joined: Tue 21 Sep 2010, 21:56
Location: Drøbak, Norway

#38 Post by tallboy »

MochiMoppel, my memory is not good enough to remember the details, but I think that minixcal was not part of the clock in the tray in my remastered Lucid. I had an older dPup where I used Minixcal, so I found a text somewhere about how to add it to the tray clock, using the .jwm-tray file.
I have Osmo installed, but I don't use it. I prefer the old tcl/tk-based Ical calender, so I'll convert to Igucal, thank you for mentioning it. :D

I have minixcal in /usr/X11R7/bin/

My /root/.jwm-tray:

Code: Select all

<JWM>
	<Tray autohide="false" insert="right" x="0" y="-1" border="1" width="0" height="28" layer="above" layout="horizontal" halign="left" valign="bottom" >
		<!-- Additional TrayButton attribute: label -->
		<TrayButton label="Menu" icon="mini-dog.xpm">root:3</TrayButton>
		<TrayButton popup="Show Desktop" icon="mini-desktop.xpm">showdesktop</TrayButton>
		<TrayButton popup="Screenshot" icon="shot.png">exec:shot1</TrayButton>
		<TrayButton popup="NoteCase" icon="notecase16.xpm">exec:notecase</TrayButton>
		<TrayButton popup="pFind" icon="find.png">exec:pfind</TrayButton>
        
		<!-- Additional Pager attributes; width, height -->
		<Pager/>
		<!-- Additional TaskList attribute: maxwidth -->
		<TaskList maxwidth="200"/>
		<Dock/>
		<!-- Additional Swallow attribute: height -->
		<Swallow name="xload" width="32">
xload -nolabel -fg red -hl white -bg "gray45"
		</Swallow>
		<Clock format="%H:%M:%S">minixcal</Clock>
	</Tray>
</JWM>
I tried to click the clock with minixcal removed from the code. Nothing happened at all, so it does the job when it is included in the code.
True freedom is a live Puppy on a multisession CD/DVD.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#39 Post by musher0 »

Not that it's important, but %H:%M:%S can be summarized as %R.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

some1
Posts: 117
Joined: Thu 17 Jan 2013, 11:07

#40 Post by some1 »

musher0 wrote: Not that it's important, but %H:%M:%S can be summarized as %R.
:?:

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#41 Post by MochiMoppel »

musher0 wrote:Not that it's important, but %H:%M:%S can be summarized as %R.
Not that it's important, but you probably meant %T

some1
Posts: 117
Joined: Thu 17 Jan 2013, 11:07

#42 Post by some1 »

MochiiMoppel wrote:
musher0 wrote: Not that it's important, but %H:%M:%S can be summarized as %R.
Not that it's important, but you probably meant %T
Not that it is important ,but to please the locals , you probably meant %X.

some1
Posts: 117
Joined: Thu 17 Jan 2013, 11:07

#43 Post by some1 »


User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#44 Post by MochiMoppel »

some1 wrote:Not that it is important ,but to please the locals , you probably meant %X.
That wouldn't be the same as %H:%M:%S , so I honestly,wholeheartedly,really,truly meant what I wrote: %T :wink:

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#45 Post by musher0 »

Seconds are useless in a general non scientific human context, hence %R. ;)
Plus date's seconds update calls upon the kernel 60 times a minute, which
can be a concern on old boxes.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
torm
Posts: 186
Joined: Sat 07 Mar 2015, 19:56

#46 Post by torm »

Modified a little the old pmonth_p program.
Also renamed it to tell the difference.

Summary.
In a way, sting ver.01 is not oriented at regular users,
while it could be useful for scripters - to avoid complicated
logic in GUI apps that should follow locale specific calendar
layout. Well, in GTK2 this may or not matter - as there is built-in and
almost fullfeatured widget for that purpose, other toolkits are not
that lucky in that respect.
Simplest use would be as input for Conky, GKrellm2, etc.

Features.
Automated locale support, week start day detection.
Abbreviated day labels with dual or single letter.
Numerical commandline arguments for current date marks,
and also for year and month selection - from 1800 to 9999.
Current date marks can also be turned off or selected from
seven different built-in options.
Month numerical value with or without leading zero.
Some error checking on input to avoid segfaults, etc.

Build.
No special dependencies, regular
make
make install
Expected build size is around 10 KB stripped.

License.
Public Domain. Feel free to relicense as needed.

Development.
Some of the code is still hacky and untested.
Could be extended with more "invisible" date marks
to support different scripts or outputs, etc.
Open for suggestions and fixes.

And a big fat disclaimer:
Note that sting ver.01 is a commandline program,
so likely there will be nothing happening when you doubleclick
on it with the mouse :wink:
Uh, just in case..
Attachments
sting-01_calendar_C-source.tar.gz
sting calendar C-source version 01
(4.4 KiB) Downloaded 69 times

Post Reply