Page 1 of 1

Schematic Tools Module

PostPosted: Fri Jul 05, 2019 7:53 pm
by trogluddite
I've long wished that FlowStone had a "Save as a Copy..." menu item, so that I could save a quick backup but carry on using the current file as my main working version. Being able to avoid all the WIndows file dialogues would be even better! And how about all those project sub-folders of presets that I made and snippets of Ruby code?!

A full on source-code manager like Git seems like overkill - but FlowStone and Ruby have (nearly) all the tools to do exactly what I need. So I made a little module that can sit at the top of my schematics to take the donkey work out of managing backups. The module can...

- Back up the current schematic plus any resource files that belong to the project to a unique sub-folder within a nominated backups folder. If the schematic folder itself is nested within parent project folders, no problem - the source folder can also be nominated so that the whole lot is backed up.

- Folder paths can be absolute or relative to the schematic's folder, and may include automatic substitutions for the schematic name, date and/or time. Date and time stamps are formatted so that they sort into time order. If that still doesn't make each backup's folder name unique, an auto-incrementing index is automatically added.

- Any files and/or folders may be excluded from backing up by giving a list of filters, which may use the usual Windows file path wild-cards for matching. For example *.txt would prevent text files from being backed up.

- The option to pop-up a confirmation dialogue before saving anything. A list of the files which would be saved are available at a module output so that you can check that everything's set up OK before committing.

- An area to scribble notes which will be included as a text file within the backup folder.

- Buttons to open the schematic folder or the backups folder in Windows explorer.

- Buttons to copy the schematic's full path, the schematic's folder path, or the backups folder path to the Windows clipboard.

The only thing I haven't worked out yet is how to make it press CTRL-S first so that I definitely get the current edits into the backup - so I can't completely exclude my ailing memory from mucking things up just yet!! :lol:

schematic_tools.fsm
(7.11 KiB) Downloaded 1054 times

Re: Schematic Tools Module

PostPosted: Fri Jul 05, 2019 10:19 pm
by adamszabo
Very cool indeed!

Re: Schematic Tools Module

PostPosted: Fri Jul 05, 2019 10:53 pm
by tulamide
trogluddite wrote:- Back up the current schematic plus any resource files that belong to the project to a unique sub-folder within a nominated backups folder.

I guess you're talking about the last saved version of the schematic, not the current schematic, right?

Re: Schematic Tools Module

PostPosted: Sat Jul 06, 2019 1:58 am
by trogluddite
tulamide wrote:I guess you're talking about the last saved version of the schematic, not the current schematic, right?

Exactly. That's the limitation I was on about at the end of the first post - if you haven't pressed CTRL-S first, you might be missing some recent edits. It's a nice little labour saver; but without direct access to FlowStone's file menu, I can't automate it any further.

It should be possible via Win32API to read the unsaved-file marker in the FlowStone window's title bar and then send it simulated shortcut keys - the module already accesses the Windows clipboard that way, and I've done very similar things using AutoHotkey in the past. However, I need a break from the Windows API docs for a bit before I do any more! :lol:

Re: Schematic Tools Module

PostPosted: Sat Jul 06, 2019 8:11 am
by Spogg
This is a very impressive demonstration of file management using Ruby, trog. Amazing! :ugeek:

Cheers

Spogg

Re: Schematic Tools Module

PostPosted: Sat Jul 06, 2019 11:57 am
by tulamide
Spogg wrote:This is a very impressive demonstration of file management using Ruby, trog. Amazing! :ugeek:

Cheers

Spogg

Now here comes a very selfish reply of being upset: You say that as if nobody before had shared file management. Like nobody before had created an automatic file loader with selectable extension and setting the root folder + plus reading from all subfolders, that you use in pretty much every sample based synth you offer.

Re: Schematic Tools Module

PostPosted: Sat Jul 06, 2019 4:01 pm
by Spogg
Ahh but I didn’t say it was the only file management system I’d ever seen! :lol:

Cheers

Spogg

Re: Schematic Tools Module

PostPosted: Thu Sep 05, 2019 2:21 pm
by jesterstudios
adamszabo wrote:Very cool indeed!

Sure is cool. I catch myself sitting and staring at the program not knowing what to do sometimes.