Skip to main content
Topic: File Organization (Read 10043 times) previous topic - next topic

File Organization

The purpose of this tool is to provide a sort of 'version management'.
A possible scenario:
- When you think a draft version of your score is ready to be 'promoted' or secured,
you can register the date last modified in the File Info comments section, create a
read-only copy in a dedicated folder, with one or more suffixes added to the file
name to see at a glance the date last modified, the creation date of the copy and/or
a 'version text'.
- Then you can safely continue working with the original draft version.
- If you want to work again with the secured version, you could unlock it, or leave
it locked and create a new, writable copy in your 'working' folder. 

The tool window:
- The date modified, shown at the top of the window, is extracted from the Windows
file system.
- The 'File Info Comments' frame shows the comment section of the 'File Info' from
the input file. 
- The actions that you select in the 'Actions' frame are not accomplished until you
click one of the buttons 'Save changes' or 'Save copy'.

If you save a copy of the input file, you can add one or more suffixes:
- #m, followed by the date modified
- #c, followed by the creation date of the copy
- #v, followed by a self chosen text
(Remark: Any suffixes of the input file are not retained in the name of the copy.)
Via a popup window you can choose the folder for the copy. (Remark: If the folder
doesn't exist, you'll be ask if it should be created.)

Installation:
Since the script is written in the Python programming language, it can't be run directly in the NWC Tools environment, so I have build an executable file from it (file_organization.exe) and a Windows installation file.
I can't attach it here, bt you can find the zipped installation file in my website: https://www.opagust.be/content/nwc-file-organization.
In order to download the installation file, you'll now have to be logged in.
You may use an account I created:
- username: 'NWC User'
- password: 'Usertools'
Or you can create your own account, so you can be informed of future updates.
 
After you have downloaded that file, you can unpack and run it. It will install the tool as a Windows application. It will suggest a folder, but you can change that. Copy that folder name.
The next step is the installation in NWC:
- Open the User Tools window (via Tools/User Tool...)
- Click 'New...' and fill in the dialog box:
  - Choose e group and a name
  - In the command line, paste the folder name where the tool is installed, followed by '/file_organization.exe' (without the quotes)
   - Choose 'File Text' as Input Type
   - In the Options section: leave 'Compress Input' unchecked and chek the other ones.
- Click 'OK'
Always look on the bright side of life!

 

Re: File Organization

Reply #1
Quote
Pagina niet gevonden
!


Re: File Organization

Reply #3
Yup!

Re: File Organization

Reply #4
Thanks for developing this tool. I’m going to try it out later today.

Re: File Organization

Reply #5
Thanks for developing this tool. I’m going to try it out later today.
Hi SEBC,
I noticed you've been quite busy these days, but I wonder: have you already found time to try this tool?
I'm curious if it satisfies your needs.
Let me know if it can be improved.
Always look on the bright side of life!

Re: File Organization

Reply #6
Sorry, I’ve been working under Production deadlines but will let you know when I am able to do so. Thanks for checking in.

Re: File Organization

Reply #7
I started using this tool today. I like being able to put the date modified in the File info comments.

Can you explain how to use the "create user objects to print date modified" option?

Thanks

Re: File Organization

Reply #8
Can you explain how to use the "create user objects to print date modified" option?
Thanks
If you check this action, and  save the changes, a user object 'PageTxtMaestro.nw' (if not already present) and  'PageTxt.nw' with 'Page Style' = 'Modified' will be inserted in your score.
This will print the date modified in the bottom left corner of each page. If you want it to be printed at another position, you can change the PageTxt object.
I suggest you just try it and do a 'Print Review'.
Always look on the bright side of life!

Re: File Organization

Reply #9
I’m getting an error message when I try to use that function. It asks me if I want to save the change. I say yes. And then it takes me to the screen with my score and I can’t do anything else from there except cancel. I cannot do a print preview. What am I doing wrong?

Re: File Organization

Reply #10
I’m getting an error message when I try to use that function. It asks me if I want to save the change. I say yes. And then it takes me to the screen with my score and I can’t do anything else from there except cancel. I cannot do a print preview. What am I doing wrong?
It's not sure that you did something wrong, maybe the program did (wich implies it was me that did something wrong ::) )
Have you tried it on another file with the same result?
You mention you get an error message, what does it exactly say?
Maybe you can include the file, then I can try it myself to search what causes the problem.
Always look on the bright side of life!

Re: File Organization

Reply #11
Have you tried it on another file with the same result?

I actually was able to get that file to work. I was cancelling instead of exiting after I ran the tool.

You mention you get an error message, what does it exactly say?

In a different file, I am getting an error message related to visibility and key signatures. I have a hidden staff for a descant line. Have you tried the tool when there is a hidden staff?

Here's the traceback when I cancel:

Traceback (most recent call last):
  File "file_organization.py", line 68, in read_score
  File "C:\Users\gustv\PycharmProjects\PYNWC\nwc.py", line 612, in __init__
  File "C:\Users\gustv\PycharmProjects\PYNWC\nwc.py", line 127, in __init__
  File "C:\Users\gustv\PycharmProjects\PYNWC\nwc.py", line 138, in check
AssertionError: |Key|Signature:Bb,Eb,Ab|Tonic:E|Visibility:Never: field Visibility not in ['Signature', 'Tonic', 'HideCancels', 'AutoSys']

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\gustv\AppData\Local\Programs\Python\Python38\Lib\site-packages\cx_Freeze\initscripts\__startup__.py", line 40, in run
  File "C:\Users\gustv\AppData\Local\Programs\Python\Python38\Lib\site-packages\cx_Freeze\initscripts\Console.py", line 37, in run
  File "file_organization.py", line 400, in <module>
  File "file_organization.py", line 71, in read_score
AssertionError: |Key|Signature:Bb,Eb,Ab|Tonic:E|Visibility:Never: field Visibility not in ['Signature', 'Tonic', 'HideCancels', 'AutoSys']

Re: File Organization

Reply #12
I corrected a bug. The program checks the validity of the input file against a list of valid fields per object type. For a key signature, I hadn't included the fields visiblity and color in that list.
You can install the new version via https://www.opagust.be/?q=content/nwc-file-organization
Always look on the bright side of life!

Re: File Organization

Reply #13
I'm getting a new error message with the new installation. I removed the old one first. Perhaps that was a mistake:

Traceback (most recent call last):
  File "C:\Users\gustv\AppData\Local\Programs\Python\Python38\Lib\site-packages\cx_Freeze\initscripts\__startup__.py", line 40, in run
  File "C:\Users\gustv\AppData\Local\Programs\Python\Python38\Lib\site-packages\cx_Freeze\initscripts\Console.py", line 37, in run
  File "file_organization.py", line 400, in <module>
  File "file_organization.py", line 68, in read_score
  File "C:\Users\gustv\PycharmProjects\PYNWC\nwc.py", line 617, in __init__
  File "C:\Users\gustv\PycharmProjects\PYNWC\nwc.py", line 127, in __init__
  File "C:\Users\gustv\PycharmProjects\PYNWC\nwc.py", line 136, in check
AttributeError: module 'nwc_terms' has no attribute 'type_opt_value_list'


Re: File Organization

Reply #15
28/07/2020: version 1.1 added: see https://www.opagust.be/?q=content/nwc-file-organization

- correction of a bug when reading 'localrepeatclose' bar from the inputfile.

- Added possibility to change the default location of the 'print object' via arguments in the command line of the User Tool Description window.
* Arguments (with the dashes, without the quotes, case sensitive): '-XLoc', '-YLoc', '-X', '-Y', each followed by the desired value.
* Leave a space between the argument names and the values, use no commas.
*Valid values:
   -XLoc: Left, Center, Right (default = Left)
   -YLoc: Top, Bottom (default = Top)
   -X and -Y: horizontal and vertical offset (default = 0)
* Example: With the arguments "-XLoc Left -Yloc Bottom -Y 10", the date modified will be printed at the bottom left of the page, with a vertical offset of 10.
Always look on the bright side of life!

Re: File Organization

Reply #16
In the statistics of my website I noticed that there ware recently some downloads of another tool: NWCTOOLS ENVIRONMENT.
This is a tool which is still in development. The version on my website is a test version from two months ago.
I hope I will be able to publish the final version 1.0 in the near future.
But in the mean time: if you downloaded the tesst version an tried it out: all feedback is welcome!
Always look on the bright side of life!

Re: File Organization

Reply #17
In order to download the installation file, you'll now have to be logged in.

You may use an account I created:
- username: 'NWC User'
- password: 'Usertools'

Or you can create your own account, so you can be informed of future updates.
Always look on the bright side of life!