Streamlining the file format set

17 views
Skip to first unread message

Miro

unread,
Sep 3, 2020, 12:17:22 AM9/3/20
to Notecase Pro

Hi,
one of the issues for beginners is that NoteCase Pro has way too many file formats to chose from:
- 2 based on Sqlite (supported on Android as well)
   - .ncdb -> plain
   . .ncde -> encrypted
- 3 based on HTML (not supported on Android)
   - .ncd -> plain
   - .nce -> encrypted
   - .ncz -> compressed

The idea is to reduce the official file format set to only first two.
All HTML-based file formats would not be official anymore (not visible in Open/Save As), but you would still be able to use/generate them through Import/export as legacy formats, so no data would be wasted, you would just need to do one-time action per document:
  - create new .ncdb or .ncde document
  - import old .ncd/.nce/.ncz document into a new one and Save

This would reduce the chaos built over a large span of time.

What do you think?

BR,
  Miro

info.sim...@googlemail.com

unread,
Sep 6, 2020, 9:35:28 AM9/6/20
to Notecase Pro
Hi Miro,

I mainly use the Sqlite based file formats- However I had a case where the database structure seemed to be corrupt and saving the file as ncd saved me a lot of time. Having this as export option would b just fine for me

Best regards

Raimund

Jeff

unread,
Sep 6, 2020, 10:26:34 AM9/6/20
to 'info.sim...@googlemail.com' via Notecase Pro
In all the years I've used NCP, I've only used the sqlite formats and have never used the html formats. So it would not matter to me.

Are there particular advantages to the html versions? Perhaps importing a webpage into ncp — which I've never tried.  Do you Miro have any idea how many people, if any, use the html formats? Probably not many since the app defaults to the Sqlite formats when saving.

Jeff

Sep 6, 2020 9:35:32 AM 'info.sim...@googlemail.com' via Notecase Pro <noteca...@googlegroups.com>:

--
You received this message because you are subscribed to the Google Groups "Notecase Pro" group.
To unsubscribe from this group and stop receiving emails from it, send an email to notecase-pro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/notecase-pro/529d973c-1514-4578-9894-2556cb979c19n%40googlegroups.com.

Paul Merrell

unread,
Sep 6, 2020, 10:59:25 AM9/6/20
to Notecase Pro
On Sun, Sep 6, 2020 at 7:26 AM Jeff <malk...@orthohelp.com> wrote:
>
> Are there particular advantages to the html versions? Perhaps importing a webpage into ncp — which I've never tried. Do you Miro have any idea how many people, if any, use the html formats? Probably not many since the app defaults to the Sqlite formats when saving.

Biggest advantage I'm aware of is in troubleshooting documents using
the .ncd format. You can view an .ncd in a text file editor, validate
it with HTML Tidy, etc.

Best regards,

Paul


--
[Notice not included in the above original message: The U.S. National
Security Agency neither confirms nor denies that it intercepted this
message.]
¯\_(ツ)_/¯

Paul Merrell

unread,
Sep 7, 2020, 7:31:32 AM9/7/20
to Notecase Pro
> On Sun, Sep 6, 2020 at 7:26 AM Jeff <malk...@orthohelp.com> wrote:
> >
> > Are there particular advantages to the html versions? Perhaps importing a webpage into ncp — which I've never tried. Do you Miro have any idea how many people, if any, use the html formats? Probably not many since the app defaults to the Sqlite formats when saving.

Another difference is that the HTML formats tend to produce smaller
files. For example, the Help file in .ncz format (compressed HTML) is
714.8 kB
and 2.7 MB in .ncd (uncompressed HTML),
but in .ncdb format is 5.2 MB.

It's because of the file size difference that I've tended to use .ncz
as my default format. No currently valid reason why; it's probably
instinctive from the days of dealing with the storage limitations of
floppy disks. :-)

On the other hand, very large documents find a better home in .ncdb
because the SQLite format is more stable so long as you don't fall
behind on compacting the files.

I've begun work on a script to bulk process directories containing
.ncd and .ncz files to convert them to .ncdb, optionally to also
process subdirectories recursively. One option will be to set the
icons to assign for parent and leaf notes, since NC Pro doesn't do
that automatically when importing.

Paul Merrell

unread,
Sep 7, 2020, 7:36:35 AM9/7/20
to Notecase Pro
Sorry, my cat Clarence switched his tail and sent that last post
before I was ready. :-)

I'm also thinking about a separate script to delete the .ncd and .ncz
files after the first script has run and there's been some time to
check that no disaster has happened.

I was going to end that post that Clarence so kindly sent with a
solicitation for feature requests in the bulk document processing
scripts. If you have any ideas, I'd love to hear them.

Jeff

unread,
Sep 7, 2020, 9:04:16 AM9/7/20
to Paul Merrell
Now you have me really worried.


so long as you don't fall
behind on compacting the files.


I do not recall ever compacting my ncp files! Where and how do you compact them? In Android or in Windows?

Jeff

Sep 7, 2020 7:31:36 AM Paul Merrell <mar...@gmail.com>:

--
You received this message because you are subscribed to the Google Groups "Notecase Pro" group.
To unsubscribe from this group and stop receiving emails from it, send an email to notecase-pro...@googlegroups.com.

Jeff

unread,
Sep 7, 2020, 9:07:43 AM9/7/20
to Paul Merrell
I found the compact function. But it is one file at a time.

Can I compact several files at a time?

Sep 7, 2020 9:04:32 AM Jeff <malk...@orthohelp.com>:

Jeff

unread,
Sep 7, 2020, 9:17:11 AM9/7/20
to Paul Merrell
How about a feature that automatically compacts a file every so often?

Jeff

Sep 7, 2020 7:36:38 AM Paul Merrell <mar...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups "Notecase Pro" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to notecase-pro...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/notecase-pro/CAJ1g4g-JHjjyk9_kLby4rEe%3Di_KjrO%3DcVmr5e8P2zQ7inViQfA%40mail.gmail.com.
>

Miroslav Rajcic

unread,
Sep 7, 2020, 9:32:27 AM9/7/20
to Paul Merrell
Joining late to the discussion 🙂
I am not aware that regular compaction is needed that much, in general the program will check and notify you if your file needs to be compacted (checked each time you load Sqlite base formats).
If you only append contents, and do not delete much from your documents, that would explain why you never got prompted to compact.

On formats, .ncdb has advantage that any NCP parser/editor bug will only impact edited notes, on HTML it may impact entire document because entire document is being load from disk to RAM and saved back to disk (i.e. its decoded and encoded back on each "Save" operation).

Will try to find the data on format usage, not sure if I have that ready at hand...

Regards,
  Miro


From: noteca...@googlegroups.com <noteca...@googlegroups.com> on behalf of Jeff <malk...@orthohelp.com>
Sent: Monday, September 7, 2020 3:17 PM
To: Paul Merrell <noteca...@googlegroups.com>
Subject: Re: Streamlining the file format set
 

Paul Merrell

unread,
Sep 7, 2020, 10:12:25 AM9/7/20
to Notecase Pro
On Mon, Sep 7, 2020 at 6:17 AM Jeff <malk...@orthohelp.com> wrote:
>
> How about a feature that automatically compacts a file every so often?

How about a script that automatically compacts all open .ncdb or .ncde
documents? Attached.
CompactDocslua.ncdb

Jeff

unread,
Sep 7, 2020, 11:30:18 AM9/7/20
to Paul Merrell, Notecase Pro
That's terrific. Thank you.

Questions:
1. Does this script run in android, linux, or windows?

2. How do I run it?

3. What do you mean by 'open files'? Do the files need to be open in ncp for the script to work? If so, how is the script different from clicking on the 3-dot menu and then the 'compact document' option?

4. Can all  .ncdb or .ncde
files be compacted without needing to firs t open each individually?

Sep 7, 2020 10:12:29 AM Paul Merrell <mar...@gmail.com>:

--
You received this message because you are subscribed to the Google Groups "Notecase Pro" group.
To unsubscribe from this group and stop receiving emails from it, send an email to notecase-pro...@googlegroups.com.

Paul Merrell

unread,
Sep 7, 2020, 2:06:14 PM9/7/20
to Notecase Pro
On Mon, Sep 7, 2020 at 8:30 AM Jeff <malk...@orthohelp.com> wrote:
>
> That's terrific. Thank you.
>
> Questions:
> 1. Does this script run in android, linux, or windows?

Should run on all platforms supported by desktop NC Pro, Linux,
Windows, OS X, etc.
>
> 2. How do I run it?

Open the document it's in. Select the script's note title, then from
the Notes menu, select Current Note > Execute Current Note.

> 3. What do you mean by 'open files'? Do the files need to be open in ncp for the script to work?

Yes.

If so, how is the script different from clicking on the 3-dot menu and
then the 'compact document' option?

I don't know what the "3-dot menu" is. Is this an Android. The script
won't run on Android.

The difference from the Desktop NCPro Compact Document action is that
while that acts only on the current document, the script steps through
all open documents, and if it encounters an .ncdb or .ncde with
unsaved changes, it will save them and compact them.

> 4. Can all .ncdb or .ncde
>
> files be compacted without needing to firs t open each individually?

No. The script will only act on documents that are open. You can have
up to 20 documents open at once.

Best regards,

Paul
Reply all
Reply to author
Forward
0 new messages