Save as Web Page

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Save as Web Page

Rustieru
I am trying to write a plugin to save my scores in various formats.

The htm / web page save does not work.

Can someone tell me if I am doing something wring please?

Thx.

-Rll




score = Sibelius.ActiveScore;
scoreName = score.FileName;
file = Sibelius.GetFile(scoreName);
pathBase = file.Name;
//trace("Path Base = " & pathBase);


fileNameOnly = file.NameNoPath;
//trace("Just file name = " &fileNameOnly);

pathToXML = "C:\\Users\\RpB\\Dropbox\\Sibelius Files - Copy\\xml\\" & fileNameOnly;
//trace("Complete path to XML = " & pathToXML);

Sc = Sibelius.ActiveScore;
Sc.ExportScoreAsPDF("C:\\Users\\RpB\\Documents\\Sibelius Files\\pdf\\%f.pdf");

Sc.SaveAs(pathToXML,"XML");

trace(fileNameOnly);
Sc.SaveAs(fileNameOnly,"TEXT");
-Rll
Reply | Threaded
Open this post in threaded view
|

Re: Save as Web Page

Bob Zawalich-3

There is no support, as far as I know, for SaveAs to use "Text" as a format. These are the documented formats:

 

 

Plus you really want to use ExportAsPDF and SaveAsAudio for those formats, and SaveAsSibeliusx for earlier Sib versions. I have really only seen SIBL, Midi, XML, and MXL in published plugins, though one shipping plugin Convert Folder to Graphics has this code

 

                        if (BmpFormat = True)  {extension = 'BMP ';}

                        if (EpsFormat = True)  {extension = 'EPSF';}

                        if (PictFormat = True)  {extension = 'PICT';}

                        if (TiffFormat = True)  {extension = 'TIFF';}

       if (PngFormat = True) {extension = 'PNG';}

 

so I would think these graphics format would work too.

 

The Export Folder of Scores As Web Pages plugin in Batch Processing creates a Text file and the appends various lines to it as a way to generate Scorch files that link in a Sib6 format sib file. You might have a look at that code.

 

bob

 

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Rustieru
Sent: Monday, December 5, 2016 4:33 AM
To: [hidden email]
Subject: [Plugin-dev] Save as Web Page

 

I am trying to write a plugin to save my scores in various formats.

 

The htm / web page save does not work.

 

Can someone tell me if I am doing something wring please?

 

Thx.

 

-Rll

 

 

 

 

score = Sibelius.ActiveScore;

scoreName = score.FileName;

file = Sibelius.GetFile(scoreName);

pathBase = file.Name;

//trace("Path Base = " & pathBase);

 

 

fileNameOnly = file.NameNoPath;

//trace("Just file name = " &fileNameOnly);

 

pathToXML = "C:\\Users\\RpB\\Dropbox\\Sibelius Files - Copy\\xml\\" & fileNameOnly; //trace("Complete path to XML = " & pathToXML);

 

Sc = Sibelius.ActiveScore;

Sc.ExportScoreAsPDF("C:\\Users\\RpB\\Documents\\Sibelius

Files\\pdf\\%f.pdf");

 

Sc.SaveAs(pathToXML,"XML");

 

trace(fileNameOnly);

Sc.SaveAs(fileNameOnly,"TEXT");

 

 

 

--

View this message in context: http://sibelius-manuscript-plug-in-developers.3224780.n2.nabble.com/Save-as-Web-Page-tp7573270.html

Sent from the Sibelius ManuScript plug-in developers mailing list archive at Nabble.com.

_______________________________________________

Plugin-dev mailing list

[hidden email]

https://avid-listsrv1.avid.com/mailman/listinfo/plugin-dev


_______________________________________________
Plugin-dev mailing list
[hidden email]
https://avid-listsrv1.avid.com/mailman/listinfo/plugin-dev
Reply | Threaded
Open this post in threaded view
|

Re: Save as Web Page

Ed Hirschman
Roman made a plugin (paid version?) which saves an html file, Export Comments.  I think he essentially saves as text file with tags inserted and extension as html.

Regards,

Ed Hirschman


On Wed, Dec 7, 2016 at 12:29 PM, Bob Zawalich <[hidden email]> wrote:

There is no support, as far as I know, for SaveAs to use "Text" as a format. These are the documented formats:

 

 

Plus you really want to use ExportAsPDF and SaveAsAudio for those formats, and SaveAsSibeliusx for earlier Sib versions. I have really only seen SIBL, Midi, XML, and MXL in published plugins, though one shipping plugin Convert Folder to Graphics has this code

 

                        if (BmpFormat = True)  {extension = 'BMP ';}

                        if (EpsFormat = True)  {extension = 'EPSF';}

                        if (PictFormat = True)  {extension = 'PICT';}

                        if (TiffFormat = True)  {extension = 'TIFF';}

       if (PngFormat = True) {extension = 'PNG';}

 

so I would think these graphics format would work too.

 

The Export Folder of Scores As Web Pages plugin in Batch Processing creates a Text file and the appends various lines to it as a way to generate Scorch files that link in a Sib6 format sib file. You might have a look at that code.

 

bob

 

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Rustieru
Sent: Monday, December 5, 2016 4:33 AM
To: [hidden email]
Subject: [Plugin-dev] Save as Web Page

 

I am trying to write a plugin to save my scores in various formats.

 

The htm / web page save does not work.

 

Can someone tell me if I am doing something wring please?

 

Thx.

 

-Rll

 

 

 

 

score = Sibelius.ActiveScore;

scoreName = score.FileName;

file = Sibelius.GetFile(scoreName);

pathBase = file.Name;

//trace("Path Base = " & pathBase);

 

 

fileNameOnly = file.NameNoPath;

//trace("Just file name = " &fileNameOnly);

 

pathToXML = "C:\\Users\\RpB\\Dropbox\\Sibelius Files - Copy\\xml\\" & fileNameOnly; //trace("Complete path to XML = " & pathToXML);

 

Sc = Sibelius.ActiveScore;

Sc.ExportScoreAsPDF("C:\\Users\\RpB\\Documents\\Sibelius

Files\\pdf\\%f.pdf");

 

Sc.SaveAs(pathToXML,"XML");

 

trace(fileNameOnly);

Sc.SaveAs(fileNameOnly,"TEXT");

 

 

 

--

View this message in context: http://sibelius-manuscript-plug-in-developers.3224780.n2.nabble.com/Save-as-Web-Page-tp7573270.html

Sent from the Sibelius ManuScript plug-in developers mailing list archive at Nabble.com.

_______________________________________________

Plugin-dev mailing list

[hidden email]

https://avid-listsrv1.avid.com/mailman/listinfo/plugin-dev


_______________________________________________
Plugin-dev mailing list
[hidden email]
https://avid-listsrv1.avid.com/mailman/listinfo/plugin-dev



_______________________________________________
Plugin-dev mailing list
[hidden email]
https://avid-listsrv1.avid.com/mailman/listinfo/plugin-dev
Reply | Threaded
Open this post in threaded view
|

Re: Save as Web Page

Bob Zawalich-3

Yes, an HTML file is a text format file, so you can create one and write out any text you want, including HTML text. Export Folder of Scores As Web Pages does that.

 

But there is no mechanism for taking a Sib score and making a text file out of that, unless you consider that to be what exporting as XML does. The mechanism that Scorch used was to generate an small HTML file  by creating a text file and writing lines to it, that  links to a Sib score in Sib 6 format.

 

That really does not work in modern browsers though.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Ed Hirschman
Sent: Wednesday, December 7, 2016 9:37 AM
To: A mailing list for Sibelius plug-in developers <[hidden email]>
Subject: Re: [Plugin-dev] Save as Web Page

 

Roman made a plugin (paid version?) which saves an html file, Export Comments.  I think he essentially saves as text file with tags inserted and extension as html.

 

Regards,

 

Ed Hirschman

 

 

On Wed, Dec 7, 2016 at 12:29 PM, Bob Zawalich <[hidden email]> wrote:

There is no support, as far as I know, for SaveAs to use "Text" as a format. These are the documented formats:

 

 

Plus you really want to use ExportAsPDF and SaveAsAudio for those formats, and SaveAsSibeliusx for earlier Sib versions. I have really only seen SIBL, Midi, XML, and MXL in published plugins, though one shipping plugin Convert Folder to Graphics has this code

 

                        if (BmpFormat = True)  {extension = 'BMP ';}

                        if (EpsFormat = True)  {extension = 'EPSF';}

                        if (PictFormat = True)  {extension = 'PICT';}

                        if (TiffFormat = True)  {extension = 'TIFF';}

       if (PngFormat = True) {extension = 'PNG';}

 

so I would think these graphics format would work too.

 

The Export Folder of Scores As Web Pages plugin in Batch Processing creates a Text file and the appends various lines to it as a way to generate Scorch files that link in a Sib6 format sib file. You might have a look at that code.

 

bob

 

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Rustieru
Sent: Monday, December 5, 2016 4:33 AM
To: [hidden email]
Subject: [Plugin-dev] Save as Web Page

 

I am trying to write a plugin to save my scores in various formats.

 

The htm / web page save does not work.

 

Can someone tell me if I am doing something wring please?

 

Thx.

 

-Rll

 

 

 

 

score = Sibelius.ActiveScore;

scoreName = score.FileName;

file = Sibelius.GetFile(scoreName);

pathBase = file.Name;

//trace("Path Base = " & pathBase);

 

 

fileNameOnly = file.NameNoPath;

//trace("Just file name = " &fileNameOnly);

 

pathToXML = "C:\\Users\\RpB\\Dropbox\\Sibelius Files - Copy\\xml\\" & fileNameOnly; //trace("Complete path to XML = " & pathToXML);

 

Sc = Sibelius.ActiveScore;

Sc.ExportScoreAsPDF("C:\\Users\\RpB\\Documents\\Sibelius

Files\\pdf\\%f.pdf");

 

Sc.SaveAs(pathToXML,"XML");

 

trace(fileNameOnly);

Sc.SaveAs(fileNameOnly,"TEXT");

 

 

 

--

View this message in context: http://sibelius-manuscript-plug-in-developers.3224780.n2.nabble.com/Save-as-Web-Page-tp7573270.html

Sent from the Sibelius ManuScript plug-in developers mailing list archive at Nabble.com.

_______________________________________________

Plugin-dev mailing list

[hidden email]

https://avid-listsrv1.avid.com/mailman/listinfo/plugin-dev


_______________________________________________
Plugin-dev mailing list
[hidden email]
https://avid-listsrv1.avid.com/mailman/listinfo/plugin-dev

 


_______________________________________________
Plugin-dev mailing list
[hidden email]
https://avid-listsrv1.avid.com/mailman/listinfo/plugin-dev
Reply | Threaded
Open this post in threaded view
|

Re: Save as Web Page

Rustieru
In reply to this post by Bob Zawalich-3
Thx. Bob.

Thanks for your reply.   First time on here.

I can only see 'Convert folder of scores to web pages'  - unfortunately that doesn't work!   Interestingly, it creates an htm file, like using 'saveas' with 'text' option.  I must look and see what is in the htm file.

I am wondering whether I can be bothered to write a routine from scratch.
-Rll
Reply | Threaded
Open this post in threaded view
|

Re: Save as Web Page

Rustieru
In reply to this post by Ed Hirschman
Thx.  I may do that.
-Rll
Reply | Threaded
Open this post in threaded view
|

Re: Save as Web Page

Rustieru
In reply to this post by Bob Zawalich-3
Yep, it's a shame that Scorch only works in older Browsers.   Is there anything in the pipe-line to replace it?

-rll
-Rll
Reply | Threaded
Open this post in threaded view
|

Re: Save as Web Page

Bob Zawalich-3
See
http://www.sibelius.com/cgi-bin/helpcenter/chat/chat.pl?com=thread&start=685
560&groupid=3&

Nothing is currently available.

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Rustieru
Sent: Wednesday, December 7, 2016 1:05 PM
To: [hidden email]
Subject: Re: [Plugin-dev] Save as Web Page

Yep, it's a shame that Scorch only works in older Browsers.   Is there
anything in the pipe-line to replace it?

-rll



-----
-Rll
--
View this message in context:
http://sibelius-manuscript-plug-in-developers.3224780.n2.nabble.com/Save-as-
Web-Page-tp7573270p7573276.html
Sent from the Sibelius ManuScript plug-in developers mailing list archive at
Nabble.com.
_______________________________________________
Plugin-dev mailing list
[hidden email]
https://avid-listsrv1.avid.com/mailman/listinfo/plugin-dev

_______________________________________________
Plugin-dev mailing list
[hidden email]
https://avid-listsrv1.avid.com/mailman/listinfo/plugin-dev