Home Download Buy Blog Forum Support

ExportHtml Plugin (rename from PrintHtml)

Re: ExportHtml Plugin (rename from PrintHtml)

Postby facelessuser on Tue Nov 06, 2012 2:10 pm

castles_made_of_sand wrote:This is lame dude, I can't even change theme on the fly ;)

lol, I know right :).

So here is an example of the new background handeling.

This is ST2
Screen Shot 2012-11-06 at 6.44.28 AM.png
Screen Shot 2012-11-06 at 6.44.28 AM.png (51.33 KiB) Viewed 4223 times


Here is Export HTML (notice I don't pad the end of the lines yet with color, but generally it looks pretty good...except for the horrible theme :)).

Screen Shot 2012-11-06 at 6.49.40 AM.png
Screen Shot 2012-11-06 at 6.49.40 AM.png (79 KiB) Viewed 4231 times


Transparency might not be exactly spot on, but it is pretty close. I have to guess how ST2 might be doing it, and then I have a little fudge factor in their to adjust things. In the example above, I believe the reddish and purplish colors use transparency, so they are pretty close.

The padding is trickier than you would think. I am trying to keep the text in tables so I can easily copy and paste any section to an email (which I use a lot). And I am also trying to preserve wrapping for printing. All of these things can be at odds with each other...and exhausting. This is also why, if you use certain fonts, you may see a break between code lines. It is hard for me to get the spans to fill in those lines because they don't respond to height properites, but I can't check their pixel height at compile time in python, I would have to do that at run time and then pad every span...ugh. If I remove the table, the problem goes away, but then if I copy and paste a section of the HTML, I lose page background color, and it loses the uniform right edge. If I use block elements and float them left, I lose the easy way to test for line length and wrap them. Web coding can be a real pain.
facelessuser
 
Posts: 1576
Joined: Tue Apr 05, 2011 7:38 pm

Re: ExportHtml Plugin (rename from PrintHtml)

Postby sublimator on Tue Nov 06, 2012 4:29 pm

facelessuser wrote:castles_made_of_sand wrote:
This is lame dude, I can't even change theme on the fly

lol, I know right .


Glad you got the joke :)
It is better to remain silent and be thought a fool, than to speak out and remove all doubt
sublimator
 
Posts: 649
Joined: Thu Mar 20, 2008 5:41 am

Re: ExportHtml Plugin (rename from PrintHtml)

Postby facelessuser on Wed Nov 07, 2012 5:11 am

Okay. Background support is done. I think I may have also solved the gaps between rows with certain fonts on certain platforms.

This is generated by ExportHTML, not ST2 :).

Screen Shot 2012-11-06 at 9.57.12 PM.png
Screen Shot 2012-11-06 at 9.57.12 PM.png (86.85 KiB) Viewed 4173 times


That's all.
facelessuser
 
Posts: 1576
Joined: Tue Apr 05, 2011 7:38 pm

Re: ExportHtml Plugin (rename from PrintHtml)

Postby facelessuser on Fri Nov 09, 2012 6:56 pm

One more thing. The new background coloring feature caused one side affect for people me when copying and pasting code into Outlook.

Apparently, if outlook has html code pasted in it with spans who have a color darker than about 62 luminescence, it renders all the text in those spans as white. Kind of annoying. So I added a feature that the few people who paste dark themes into emails in Outlook might use. The feature causes ExportHTML to scale up the entire theme to ensure that all background colors are at least 62 luminescence (this can be configured to a different value if desired; between 0-255). I also fixed an issue where some themes wouldn't work because I hadn't encoded the plist proper that I stuff into the HTML; that is now fixed as well.

Example:
    // Minum allowed background lumens a.k.a brightness (0-255)
"bg_min_lumen_threshold": 62,

...

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

Re: ExportHtml Plugin (rename from PrintHtml)

Postby facelessuser on Mon Nov 12, 2012 6:59 pm

A fairly useless feature I added for fun. You can use filters in ExportHtml and ExportBbcode. I guess this could be useful if you wanted to apply some filter to theme. Then you could use exportHtml to apply the filter and then extract the theme from the HTML via the download option in the toolbar. Anyways, I realize this feature is pretty worthless, but it was fun nonetheless.

You can use the following: invert, grayscale, sepia, brightness, saturation, hue, colorize.

Unaltered:
    // BBCODE menu items
"bbcode_panel": [
{
"To Clipboard - Format as BBCode": {
"numbers": false,
"multi_select": true
}
},


Invert:
    // BBCODE menu items
"bbcode_panel": [
{
"To Clipboard - Format as BBCode": {
"numbers": false,
"multi_select": true,
"filter": "invert"
}
},


grayscale:
    // BBCODE menu items
"bbcode_panel": [
{
"To Clipboard - Format as BBCode": {
"numbers": false,
"multi_select": true,
"filter": "grayscale"
}
},


sepia:
    // BBCODE menu items
"bbcode_panel": [
{
"To Clipboard - Format as BBCode": {
"numbers": false,
"multi_select": true,
"filter": "sepia"
}
},


Saturation:
    // BBCODE menu items
"bbcode_panel": [
{
"To Clipboard - Format as BBCode": {
"numbers": false,
"multi_select": true,
"filter": "saturation(1.5)"
}
},


Brightness:
    // BBCODE menu items
"bbcode_panel": [
{
"To Clipboard - Format as BBCode": {
"numbers": false,
"multi_select": true,
"filter": "brightness(1.2)"
}
},


colorize:
    // BBCODE menu items
"bbcode_panel": [
{
"To Clipboard - Format as BBCode": {
"numbers": false,
"multi_select": true,
"filter": "colorize(0)"
}
},



hue (shift):
    // BBCODE menu items
"bbcode_panel": [
{
"To Clipboard - Format as BBCode": {
"numbers": false,
"multi_select": true,
"filter": "hue(60)"
}
},


Chain some together:
    // BBCODE menu items
"bbcode_panel": [
{
"To Clipboard - Format as BBCode": {
"numbers": false,
"multi_select": true,
"filter": "hue(60);saturation(1.5);brightness(.8);invert"
}
},
facelessuser
 
Posts: 1576
Joined: Tue Apr 05, 2011 7:38 pm

Re: ExportHtml Plugin (rename from PrintHtml)

Postby quodlibet on Mon Nov 12, 2012 9:52 pm

facelessuser wrote:sepia:
    // BBCODE menu items
"bbcode_panel": [
{
"To Clipboard - Format as BBCode": {
"numbers": false,
"multi_select": true,
"filter": "sepia"
}
},



I think you just made Instagram for coders.
quodlibet
 
Posts: 561
Joined: Sat Jun 18, 2011 5:53 pm

Re: ExportHtml Plugin (rename from PrintHtml)

Postby facelessuser on Mon Nov 12, 2012 10:01 pm

quodlibet wrote:I think you just made Instagram for coders.


instacode?

I know, I hate myself a little for it :).
facelessuser
 
Posts: 1576
Joined: Tue Apr 05, 2011 7:38 pm

Re: ExportHtml Plugin (rename from PrintHtml)

Postby C0D312 on Mon Nov 12, 2012 10:24 pm

1 out of 5 *s

I need blur and vignette to make my code look pretty!1!!1!11!!!

(Also, torn edges would be nice)
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: ExportHtml Plugin (rename from PrintHtml)

Postby facelessuser on Mon Nov 12, 2012 10:43 pm

C0D312 wrote:1 out of 5 *s

I need blur and vignette to make my code look pretty!1!!1!11!!!

(Also, torn edges would be nice)


Yes, I think I heard that code runs better if it is prettier.
facelessuser
 
Posts: 1576
Joined: Tue Apr 05, 2011 7:38 pm

Re: ExportHtml Plugin (rename from PrintHtml)

Postby Grant on Tue Nov 13, 2012 3:00 am

@facelessuser: you are now inscribed in my signature. classic.
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 7 guests