Stickies
« join merge two databases togeteher - any way »

Welcome Guest. Please Login or Register.
Aug 19th, 2017, 11:55am


Click to go to the
Zhorn Software Web Site
Click to go to the
Knowledgebase

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: join merge two databases togeteher - any way  (Read 318 times)
leopoldus
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 96
xx join merge two databases togeteher - any way
« Thread started on: Mar 18th, 2017, 03:14am »

Is the any option to merge two Stickies databases together? I used for a long time two Stickies portable installations at the same machine, but with different data folders. Is there any fast and convenient way to merge the two databases together?

Thanks!
User IP Logged

Tom Revell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM

Gender: Male
Posts: 3554
xx Re: join merge two databases togeteher - any way
« Reply #1 on: Mar 18th, 2017, 07:45am »

Yes, this should be possible.

If you have no stored stickies, or should I say that you don't have stored stickies on both sides, then this becomes simpler.

Copy all of the rtf and png files together, and then open the stickies.ini files and merge them together as well. So long as the filenames are all unique, this will work OK.

If you do have stored notes on both sides, then you'll need to use MS Access to merge two tables together, but the same principles apply. Merging the store trees would be the most frustrating part, although that's possible as well.

A quick 'n' dirty way of doing it would be to use SSIT from the web site - run one set of data in Stickies, and use SSIT to open the second set, and bring the data across one note at a time. Depends on how many notes you need to merge really.

What types of data do you have which need merging?

Tom
User IP Logged

leopoldus
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 96
xx Re: join merge two databases togeteher - any way
« Reply #2 on: Mar 18th, 2017, 08:18am »

on Mar 18th, 2017, 07:45am, Tom Revell wrote:
Yes, this should be possible.


Thanks a lot Tom for your fast and detailed answers!

Quote:
Copy all of the rtf and png files together, and then open the stickies.ini files and merge them together as well. So long as the filenames are all unique, this will work OK.

Considering the algorithm used by Stickies while creating those files, whether filenames are supposed to be unique?

Quote:
If you have no stored stickies, or should I say that you don't have stored stickies on both sides, then this becomes simpler.

Yes, I have stored notes in the both installations: about a dozen in the first installation and more than a hundred with many subfolders in the second installation.

Quote:
If you do have stored notes on both sides, then you'll need to use MS Access to merge two tables together, but the same principles apply. Merging the store trees would be the most frustrating part, although that's possible as well.

Yes, I see. But the problem for me is the fact, that I have not ever worked with MS Access, so it might demands quite much efforts from me to get the basic skills.

Quote:
A quick 'n' dirty way of doing it would be to use SSIT from the web site - run one set of data in Stickies, and use SSIT to open the second set, and bring the data across one note at a time. Depends on how many notes you need to merge really.

I have quite many stickies in the both installations. So I'm afraid it will demands quite much time to import all notes one by one in any direction sad

Quote:
What types of data do you have which need merging?

Sorry, do you mean, whether my notes are text or images? The most of my stickies is text notes, only a few of notes contain images. Does it affect the result of merging databases?
User IP Logged

Tom Revell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM

Gender: Male
Posts: 3554
xx Re: join merge two databases togeteher - any way
« Reply #3 on: Mar 20th, 2017, 4:33pm »

Those content file, you'll find them in the "image" and "rtf" directories, should be unique between the two installations. The algorithm ensures that within one copy of Stickies there aren't ever any conflicts, but between two instances, there might be one or two clashes.

An image sticky is one which is just an image - and when you right-click it, you get a different menu. I don't mean notes which have an image added to, inserted into the text.

I guess the options are as follows:


  1. You use SSIT to manually merge the two instances. Disadvantage: slow and boring to do
  2. You use MS Access to also merge the stored notes. Disadvantage: you'll have to learn something about using Access
  3. You send the data files to me, and I'll get them merged. Disadvantage: you're sending me all of your data!


Tom
User IP Logged

leopoldus
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 96
xx Re: join merge two databases togeteher - any way
« Reply #4 on: Mar 21st, 2017, 06:14am »

on Mar 20th, 2017, 4:33pm, Tom Revell wrote:
I guess the options are as follows:
  • You use SSIT to manually merge the two instances. Disadvantage: slow and boring to do
  • You use MS Access to also merge the stored notes. Disadvantage: you'll have to learn something about using Access
  • You send the data files to me, and I'll get them merged. Disadvantage: you're sending me all of your data!

  • Thanks again! I will consider all the three option, including the last one!

    One more question. Should SSIT saves notes by stacks too? If it will, an extra work-around could be to manually "convert" temporarily every sored notes category to a stack with the same name and then after they are imported to convert stacks back to categories. What do you think of such solution?

    BTW what if I leave the original file stickies.ini unchanged, but copy content files from the [RTF] folder of the second installation? Will Stickies process find all of them at the next run? Which data and stickies properties will be lost?
    « Last Edit: Mar 21st, 2017, 06:16am by leopoldus » User IP Logged

    Tom Revell
    Administrator
    ImageImageImageImageImage


    member is offline

    Avatar




    Homepage PM

    Gender: Male
    Posts: 3554
    xx Re: join merge two databases togeteher - any way
    « Reply #5 on: Mar 21st, 2017, 2:35pm »

    Yes, you can copy the RTF content from one instance to the other. If there are any name clashes, just rename the incoming file to something else. You can call the files "tom", "bob" and "leo" if you want, they just need to be unique.

    When Stickies next starts, it will see all those new files it knows nothing about and ask to adopt them. The content will come across, but the title, colour, date, position, sleeping details etc will not.

    For desktop/stacked/sleeping/closed I suggest you look at the format of the stickies.ini file, and both copy the RTF files and merge the text files. That gets most of the work done. The RTF for stored notes is inside the MDB file, so you can then work to address those separately perhaps.

    Tom
    User IP Logged

    leopoldus
    Full Member
    ImageImageImage


    member is offline

    Avatar




    PM


    Posts: 96
    xx Re: join merge two databases togeteher - any way
    « Reply #6 on: Mar 22nd, 2017, 03:24am »

    on Mar 21st, 2017, 2:35pm, Tom Revell wrote:
    Yes, you can copy the RTF content from one instance to the other... they just need to be unique. When Stickies next starts, it will see all those new files it knows nothing about and ask to adopt them. The content will come across, but the title, colour, date, position, sleeping details etc will not.

    Thank you again, but I use the all functionality or your application, so the most of my notes has the title, sleeping details, alarms. Notes colours and positions are not random at me, but they have certain system and are relative to the essential information. So it is not a solution to save notes content only, while loosing all their properties. sad

    Quote:
    For desktop/stacked/sleeping/closed I suggest you look at the format of the stickies.ini file, and both copy the RTF files and merge the text files. That gets most of the work done.

    Do you mean to manually merge two files stickies.ini under "merging the text files"? If I concatinate them such way the resulting stickies.ini file would have double set of the sections [Options], [Stacks] and [Stickies]. Will Stickies.exe be able to understand such structure?

    Quote:
    The RTF for stored notes is inside the MDB file, so you can then work to address those separately perhaps.

    Is there any specific reason for such design? Or it is only legacy format which will be changed in the future versions? Would not it be more reasonable to use subfolders in order to save stored notes categories structure?
    User IP Logged

    Tom Revell
    Administrator
    ImageImageImageImageImage


    member is offline

    Avatar




    Homepage PM

    Gender: Male
    Posts: 3554
    xx Re: join merge two databases togeteher - any way
    « Reply #7 on: Mar 22nd, 2017, 3:32pm »

    Why is it the way it is? Yes, legacy. There used to be a companion app to Stickies named "Store" which put its information into an MDB file. Then after a while I folded the functionality into the one app, and in order to avoid everyone who used Store having to mangle their data, I just left the data storage as it was. There was no need to change.

    Those reasons still persist - there's no real need to alter the structure now. There is one good reason why you couldn't use folders - what if the user tries to use a character which isn't possible in a folder name. Perhaps were I starting over the data structure on disk would be different, but so far it seems to be working pretty well.

    To better explain how to get the contents merged, open stickies.ini.

    There are really just two relevant sections - [Stickies] and [Deleted Stickies], again a legacy thing. [Stickies] comprises Desktop, Attached, Sleeping and Recurring. Each line in both sections relates to one file in one of two subdirectories:

    o If the line has <IMAGE> on it, then it refers to a file in the "images" subdirectory.
    o If the line does not have that, then it refers to a file in the "rtf" subdirectory.

    The filename in each case is the same as the string after <ID> on each line.

    Before doing anything, make sure that Stickies is not running.

    You could copy all the lines from one [Stickies] section in the source ini file, and add them to the same section in the target. Then do the same thing with [Deleted Stickies] lines. Now that the extra lines are present, Stickies will expect to find files with all those <ID> values as well.

    Were you to run Stickies without copying the files, then you'd end up with lots of desktop/sleeping notes which all say "Missing content" in them.

    Were you to copy the files without editing the stickies.ini, you'd end up with the Orphan dialog popping up, asking you what to do with the new files Stickies has just found.

    The one area which is different is Stored notes. All Stored text note content and the metadata for those notes, is inside the MDB file. All stored image notes metadata is in the MDB file, but the content is instead held as PNG files, again in the "images" subdirectory.

    Tom
    User IP Logged

    Pages: 1  Notify Send Topic Print
    « Previous Topic | Next Topic »

    Donate $6.99 for 50,000 Ad-Free Pageviews!


    This forum powered for FREE by Conforums ©
    Sign up for your own Free Message Board today!
    Terms of Service | Privacy Policy | Conforums Support | Parental Controls