Skip to content

urgor/calendarr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Synopsis

Create stadium like shape calendar png image. Or circle. Cross out past days, highlight current day or custom days. Style customizable amlost everything.

Code Example

Simplest bootstrap (calendar_example.php) file:

use Urgor\Calendarr\Reg;
use Urgor\Calendarr\Config\Cfg;

include '../vendor/autoload.php';

Reg::setConfig(Cfg::create('./calendarr_config_summer.ini'));
$calendarr = new Urgor\Calendarr\Calendar();
$calendarr->drawAndOutput();

Or look into Reg and create your own custom bootstrap interface.

Motivation

Everyone has their own representation (idea) of how to visualise the year. So this is my representation of calendar.

Installation

Depends on GD and FreeType libs. Checkout, put somwhere into www dir and request http://....calendar_example.php . It will generates png image with common headers (by default).

Configuration

Example config file calendar.ini contain some styles for calendar. Read comment and create your own style.

Possible style keywords with their values are:

  • color = ff0000 ; css hex color representation (in rgb or rgba format)
  • font = UbuntuMono-B.ttf ; just font file name
  • size = 12 ; font size in px
  • hatch_color = 000000cc ; color
  • hatch_thick = 3 ; crosses out the text, in px
  • hatch_type = double_rough ; crosses out past days { strict | double_strict | rough | double_rough }
  • frame_color = 00cc00
  • frame_thick = 2
  • background_color = ff0000
  • background_growth = 2 ; enlarge background frame on this px amount

Also, you can find web configurator at my site.

Contributors

Any feedback and pullrequests are appreciated.

License

Use Calendarr at your own risk.

About

Stadium like calendar

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages