Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
Update readme and new easter egg
  • Loading branch information
BdR76 committed Sep 18, 2024
1 parent b807916 commit f4cf077
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 52 deletions.
70 changes: 35 additions & 35 deletions CSVLintNppPlugin/Forms/AboutForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,37 +64,37 @@ private void DisplayEasterEgg()
string obj = "";
Image img = CSVLintNppPlugin.Properties.Resources.easteregg;

int easter = IsEaster(today);
if (easter > 0)
{
// March/April ?th, varies
msg = string.Format("Easter {0}day", (easter == 1 ? "Sun" : "Mon"));
obj = "an Easter egg";
img = CSVLintNppPlugin.Properties.Resources.easteregg;
}
else
{
int daymonth = today.Month * 100 + today.Day;
int daymonth = today.Month * 100 + today.Day;

switch (daymonth)
{
case 317: // March 17th
msg = "St. Patrick's Day";
obj = "a four-leaf clover";
img = CSVLintNppPlugin.Properties.Resources.clover;
break;
case 1031: // October 31st
msg = "Halloween";
obj = "a spooky pumpkin";
img = CSVLintNppPlugin.Properties.Resources.pumpkin;
break;
case 101: // January 1st
case 1231: // December 31th
msg = "New Year" + (daymonth == 1231 ? "'s Eve" : "");
obj = "an oliebol";
img = CSVLintNppPlugin.Properties.Resources.oliebol;
break;
}
switch (daymonth)
{
case 422: // April 22nd
case 605: // June 5th
msg = (daymonth == 422 ? "Earth Day" : "World Environment Day") + ", support your local climate change organizations";
obj = "a globe";
img = CSVLintNppPlugin.Properties.Resources.earth;
break;
case 1031: // October 31st
msg = "Halloween";
obj = "a spooky pumpkin";
img = CSVLintNppPlugin.Properties.Resources.pumpkin;
break;
case 101: // January 1st
case 1231: // December 31th
msg = "New Year" + (daymonth == 1231 ? "'s Eve" : "");
obj = "an oliebol";
img = CSVLintNppPlugin.Properties.Resources.oliebol;
break;
default:
int easter = IsEaster(today);
if (easter > 0)
{
// March/April ?th, varies
msg = string.Format("Easter {0}day", (easter == 1 ? "Sun" : "Mon"));
obj = "an Easter egg";
img = CSVLintNppPlugin.Properties.Resources.easteregg;
};
break;
};

// initialization easter egg
Expand All @@ -110,7 +110,7 @@ private void DisplayEasterEgg()
//private void displayEasterEgg_old()
//{
// // tooltip initialization easter eggs
// helperTip.SetToolTip(picClover, "Happy St. Patricks day! You've found a four-leaf clover ;)");
// helperTip.SetToolTip(picEarth, "Earth Day, support your local climate change organizations! You've found a globe ;)");
// helperTip.SetToolTip(picEasterEgg, "Happy Easter Day! You've found an Easter egg ;)");
// helperTip.SetToolTip(picPumpkin, "Happy Halloween! You've found a spooky pumpkin ;)");
// helperTip.SetToolTip(picOliebol, "Happy New Year! You've found an oliebol ;)");
Expand All @@ -126,7 +126,7 @@ private void DisplayEasterEgg()
// {
// int daymonth = (today.Month * 100 + today.Day);
//
// if (daymonth == 317) picClover.Visible = true; // March 17th
// if (daymonth == 317) picEarth.Visible = true; // April 22nd
// if (daymonth == 1031) picPumpkin.Visible = true; // October 31st
// if (daymonth == 1231) picOliebol.Visible = true; // December 31th
// if (daymonth == 101) picOliebol.Visible = true; // January 1st
Expand Down Expand Up @@ -167,9 +167,9 @@ private void picEasterEgg_Click(object sender, EventArgs e)
{
// show image
if (ForceEasterEgg <= 5) picEasterEgg.Image = CSVLintNppPlugin.Properties.Resources.easteregg; // click 5 times
else if (ForceEasterEgg <= 10) picEasterEgg.Image = CSVLintNppPlugin.Properties.Resources.clover; // click 5 more times etc.
else if (ForceEasterEgg <= 15) picEasterEgg.Image = CSVLintNppPlugin.Properties.Resources.pumpkin;
else picEasterEgg.Image = CSVLintNppPlugin.Properties.Resources.oliebol;
else if (ForceEasterEgg <= 10) picEasterEgg.Image = CSVLintNppPlugin.Properties.Resources.pumpkin; // click 5 more times etc.
else if (ForceEasterEgg <= 15) picEasterEgg.Image = CSVLintNppPlugin.Properties.Resources.oliebol;
else picEasterEgg.Image = CSVLintNppPlugin.Properties.Resources.earth;

// update help text + counter
helperTip.SetToolTip(picEasterEgg, "On certain days in the year you'll find an easter egg here ;)");
Expand Down
2 changes: 1 addition & 1 deletion CSVLintNppPlugin/PluginInfrastructure/SettingsBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public void ShowDialog()

ContextMenuStrip cm = new ContextMenuStrip();

//var img = CSVLintNppPlugin.Properties.Resources.clover;
//var img = CSVLintNppPlugin.Properties.Resources.earth;
//ContextMenuStrip cm = new ContextMenuStrip("Light mode (background colors)", img, colorMenuItem_Click);
cm.Items.Add("Light mode (background colors)", CSVLintNppPlugin.Properties.Resources.setcolor1, colorMenuItem_Click);
cm.Items.Add("Light mode (foreground colors)", CSVLintNppPlugin.Properties.Resources.setcolor2, colorMenuItem_Click);
Expand Down
24 changes: 13 additions & 11 deletions CSVLintNppPlugin/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions CSVLintNppPlugin/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,6 @@
<data name="oliebol" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\oliebol1_32px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="clover" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\clover_32px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="pumpkin" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\pumpkin_32px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
Expand Down Expand Up @@ -154,4 +151,7 @@
<data name="setcolor4" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\setcolor4.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="earth" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\earth_32px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
Binary file added CSVLintNppPlugin/Resources/earth_32px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 15 additions & 1 deletion docs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,9 @@ Sort on **length of value** to sort on the character length of the values, for e
Sort **ascending** start with low values, end with high values `0 -> 9, A -> Z`
Sort **descending** start with high values, end with low values `Z -> A, 9 -> 0`

When sorting on value, text columns will be sorted alphabetically, integer and
decimal columns are sorted numerically and datetime values are sorted chronologically.

When sorting on a column that contains several of the same values, then the
sort order for the lines with those values will not change. Meaning that lines
with the same value will be in the sort order as they were before sorting.
Expand Down Expand Up @@ -597,7 +600,18 @@ File and column metadata in [W3C CSV schema JSON](https://www.w3.org/TR/tabular-

### Datadictionary CSV ###

File and column metadata in CSV format.
Column metadata in CSV format, generates comma-separated metadata
which contains the following columns:

| Column | Description | Example |
|-------------|--------------------------------------------------|-----------------------|
| Nr | Column sequence number | 1, 2, 3 etc |
| ColumnName | Column name | PAT_ID, VisitDate etc |
| DataType | String, Integer, Decimal, DateTime, Date or Time | |
| Width | Column maximum width total | |
| Decimals | Nr of decimals, only for DataType=Decimal | 1, 2, 3 etc |
| Mask | Mask only for DataType=Decimal or DateTime | #0.00, dd-MM-yyyy etc |
| Enumeration | Enumeration items separated by pipe character | No\|Yes\|Unknown |

### Python ###

Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ right. It will check the input data for the following errors:
* Non-numeric values in numeric columns, example value "n/a" when column datatype is Integer
* Incorrect decimal separator, example value "12.34" when DecimalSymbol is set to comma
* Too many decimals, example value "12.345" when NumberDigits=2.
* Incorrect date format, example value "12/31/2018" when DateTimeFormat=dd/mm/yyyy
* Incorrect date format, example value "12/31/2024" when DateTimeFormat=dd/mm/yyyy

Roadmap/goals
-------------
Expand Down

0 comments on commit f4cf077

Please sign in to comment.