Notenik
Do More With Your Notes
Download on the Mac App Store

Notenik 7.2.0 - Some Nifty Enhancements

Posted on 20 Sep, 2021

Version 7.2.0 of Notenik includes a handful of nifty changes.

New and Improved Notenik Website

The Notenik website used to reside at Notenik.net.

That URL will still get you there (as will Notenik.com), but the primary name for the website has now been changed to Notenik.app because – well it's all about the Notenik App!

More significantly, the appearance and the contents of the site have both been improved. Check it out when you get a chance!

And, for those of you who are interested, the Notenik site is itself generated by a Notenik collection. You can see all the files that make it happen on GitHub, at github.com/hbowie/notenik-web.

Since it is often tempting to title a Note using the plural form of a word – but also common to want to refer to that Note using the singular form – if a wiki-style link does not immediately find its target, an ‘s’ will be added to the link internally, and the resulting Note will be used as the target, if such a Note exists.

Markdown Quote Sharing Now Respects Work Title Lookup

One of the options for sharing a Note is to format a quote in Markdown. But I noticed recently, after updating my Commonplace Book to look up work and author information in separate Collections, that not all of the information about the author's work was being included. This has now been fixed.

Added Quick Export and Open Command

There's a new command at the bottom of the File menu to perform a Quick Export and Open. This command will execute immediately, and perform the following sequence of actions.

  1. Export the current Collection in comma-separated values format;
  2. Automatically name the output file export.csv;
  3. Automatically place the output file in a Collection subfolder named quick-export;
  4. Ask the operating system to open the resulting output file using whatever application is your standard for editing .csv files (for me, this is Apple's Numbers app).

This command gives you a quick and easy way to view your Collection in the traditional rows-and-columns view associated with spreadsheets.

Object of a Merge Template Set Command can now include a Variable

One of the things I wanted to do when building the new Notenik.app site was to highlight the active link in the Navigation Bar. Normally this would mean that you would have to use JavaScript to modify the styling of the Nav Bar, depending on which page you were on, or would have to customize the coding of the Nav Bar for each different page on the site. But I didn't really want to do either of those things.

My Nav Bars (primary on top, secondary below) are coded in a couple of include files, so that I can pull them into each page as it is built. But then I needed to vary the CSS class specified for each item, depending on which page I was building. I could use a different global variable for each item, and then set the active one to a different class, in order to highlight it. It turns out (I had to check the code to verify) that a global variable specified in a primary file will be passed into include files, so that they can be referenced there. But then, how to set the global variables in a neat way, with a minimum amount of code?

Here's what I came up with, for inclusion in the content template file.

<?set index-class = another-page ?>
<?set links-class = another-page ?>
<?set news-class = another-page ?>
<?set docs-class = another-page ?>
<?set about-class = another-page ?>
<?set connect-class = another-page ?>
<?set license-class = another-page ?>
<?set privacy-class = another-page ?>
<?set support-class = another-page ?>
<?set =$title$=-class = current-page ?>

Do you see what I'm doing there? I first set the class for each nav item to its default value.

And then, with that last set command, I use the title variable – within the name of the global variable being set! – to change the appropriate class variable to the name of the class to use for highlighting.

It's kind of a neat solution. But it wouldn't have worked with earlier versions of Notenik, because the object of the set command – the name of the global variable to be set – couldn't include a variable!

But now it can!

Enjoy!

Hope you enjoy the new release! If you have questions or problems or suggestions for further improvements, just send me an email at hbowie@notenik.app, and I'll get back to you as quickly as I can.


Earlier News: Version 7.1.0 - Taking Dark Mode All the Way