Home Download Buy Blog Forum Support

ExportHtml Plugin (rename from PrintHtml)

Re: ExportHtml Plugin (rename from PrintHtml)

Postby facelessuser on Sat Apr 21, 2012 4:28 pm

Image

You can click the link and go straight to the annotation in the HTML.

Version 0.3.0
- Add annotation jump table for the HTML. Show table with "alt+double_click"

Let me know if you find any bugs.
facelessuser
 
Posts: 1567
Joined: Tue Apr 05, 2011 7:38 pm

Re: ExportHtml Plugin (rename from PrintHtml)

Postby SeanWcom on Sun Apr 22, 2012 2:13 am

Very cool!

Any plans on making this available in package manager? I think you mentioned once that you would if folks wanted that... +1 from me, if you're taking requests. ;)
Multiple selections... one of my favorite ST2 features. View some noob-friendly screen casts here.
SeanWcom
 
Posts: 101
Joined: Wed Aug 03, 2011 1:31 am
Location: Georgia

Re: ExportHtml Plugin (rename from PrintHtml)

Postby facelessuser on Sun Apr 22, 2012 2:56 am

SeanWcom wrote:Very cool!

Any plans on making this available in package manager? I think you mentioned once that you would if folks wanted that... +1 from me, if you're taking requests. ;)


I have put in a request. As soon as wbond gets around to it, it should be there.
facelessuser
 
Posts: 1567
Joined: Tue Apr 05, 2011 7:38 pm

Re: ExportHtml Plugin (rename from PrintHtml)

Postby Sedna on Mon Apr 23, 2012 10:53 am

I modified ExportHtml.py a little bit because I prefer own font face and font size for the Html view:

It tries at first to find font_size and font_face from ExportHtml.subleme-settings before using the defaults.
Just replace lines 469-470 containing
Code: Select all
        self.font_size = settings.get('font_size', 10)
        self.font_face = settings.get('font_face', 'Consolas')


with

Code: Select all

        self.font_size = sublime.load_settings(PACKAGE_SETTINGS).get("font_size", settings.get('font_size', 10))
        self.font_face = sublime.load_settings(PACKAGE_SETTINGS).get("font_face", settings.get('font_face', 'Consolas'))
Sedna
 
Posts: 2
Joined: Mon Mar 19, 2012 2:28 pm

Re: ExportHtml Plugin (rename from PrintHtml)

Postby facelessuser on Mon Apr 23, 2012 1:57 pm

You can now specify an alternate font_size and font_face via the settings file.


    // By default, ExportHtml uses your current font_face and font_size.
// You can change this setting to always use this value. By default,
// the setting is a literal false, but you can change it to an actual
// font_face to enable this setting.
"alternate_font_face": false,

// By default, ExportHtml uses your current font_face and font_size.
// You can change this setting to always use this value. By default,
// the setting is a literal false, but you can change it to an actual
// font_size to enable this setting.
"alternate_font_size": false,
facelessuser
 
Posts: 1567
Joined: Tue Apr 05, 2011 7:38 pm

Re: ExportHtml Plugin (rename from PrintHtml)

Postby facelessuser on Mon Apr 30, 2012 6:35 pm

Plugin is now on package control.

Also, a couple of fixes have been made.

Version 0.4.0
- Fix regression with option numbers = false
- Fix issue where if transparency was included in hex color, color would not render
- Fix regression where annotation table would not show
facelessuser
 
Posts: 1567
Joined: Tue Apr 05, 2011 7:38 pm

Re: ExportHtml Plugin (rename from PrintHtml)

Postby Grant on Thu Aug 09, 2012 12:20 pm

For a moment I thought that the active color schemes were being applied, but now that I've changed color schemes, it doesn't seem to be taking effect. Was it ever observing the active color scheme or does it play by its own rules?

For example, I have tried exporting the ExportHtml.sublime-settings file using this Tango theme and what I see in the browser is not what is displayed in Sublime Text 2.

BTW, I do have "alternate_scheme" set to false, as in the default settings.
Attachments
ExportHtml-Tango-Theme-original.PNG
Color scheme in ST2 editor
ExportHtml-Tango-Theme-original.PNG (7.13 KiB) Viewed 1704 times
ExportHtml-Tango-Theme.PNG
Color scheme exported to browser
ExportHtml-Tango-Theme.PNG (8.09 KiB) Viewed 1704 times
Grant
 
Posts: 68
Joined: Fri Jan 20, 2012 2:42 pm

Re: ExportHtml Plugin (rename from PrintHtml)

Postby facelessuser on Thu Aug 09, 2012 2:32 pm

Grant wrote:For a moment I thought that the active color schemes were being applied, but now that I've changed color schemes, it doesn't seem to be taking effect. Was it ever observing the active color scheme or does it play by its own rules?

For example, I have tried exporting the ExportHtml.sublime-settings file using this Tango theme and what I see in the browser is not what is displayed in Sublime Text 2.

BTW, I do have "alternate_scheme" set to false, as in the default settings.


Just remove the "color_scheme" setting form the particular setting you wish to adopt the current theme. If the "color_scheme" is specified, it will use it, if it isn't, it grabs whatever is the current theme.

For instance, I have this in my settings file to give show the current theme in the browser:


        // Browser view color (selections and multi-selections allowed)
{
"Browser View - Current Color": {
"numbers": true,
"multi_select": true
}
},
facelessuser
 
Posts: 1567
Joined: Tue Apr 05, 2011 7:38 pm

Re: ExportHtml Plugin (rename from PrintHtml)

Postby Grant on Fri Aug 10, 2012 1:52 pm

That's it. Thanks!
Grant
 
Posts: 68
Joined: Fri Jan 20, 2012 2:42 pm

Re: ExportHtml Plugin (rename from PrintHtml)

Postby Grant on Mon Aug 13, 2012 6:09 pm

Any chance in getting formatted into the clipboard?

Here's a couple links that I found that may be of some use:
CoffeeGhost - Pyperclip -- A cross-platform clipboard module for Python
HTML Clipboard Format (MSDN)
Grant
 
Posts: 68
Joined: Fri Jan 20, 2012 2:42 pm

PreviousNext

Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 14 guests