<?xml version='1.0' encoding='utf-8' ?>

<rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/' xmlns:atom10='http://www.w3.org/2005/Atom'>
<channel>
  <title>Dreamwidth Development</title>
  <link>https://dw-dev.dreamwidth.org/</link>
  <description>Dreamwidth Development - Dreamwidth Studios</description>
  <lastBuildDate>Mon, 17 Jun 2013 05:31:40 GMT</lastBuildDate>
  <generator>LiveJournal / Dreamwidth Studios</generator>
  <lj:journal>dw_dev</lj:journal>
  <lj:journaltype>community</lj:journaltype>
  <image>
    <url>https://v2.dreamwidth.org/482697/10</url>
    <title>Dreamwidth Development</title>
    <link>https://dw-dev.dreamwidth.org/</link>
    <width>100</width>
    <height>38</height>
  </image>

<item>
  <guid isPermaLink='true'>https://dw-dev.dreamwidth.org/143629.html</guid>
  <pubDate>Mon, 17 Jun 2013 05:31:40 GMT</pubDate>
  <title>Data and query structure for faceted styles search</title>
  <link>https://dw-dev.dreamwidth.org/143629.html</link>
  <description>Posted by: &lt;span lj:user=&apos;momijizukamori&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://momijizukamori.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://momijizukamori.dreamwidth.org/&apos;&gt;&lt;b&gt;momijizukamori&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I have been researching this, and while I&apos;ve found a lot of articles on how to set up faceted searching using existing search engines (mostly Solr, though a few with Sphinx), and a bunch of articles on frontend design for faceted search.... there is not a lot on optimizing data structure or queries that I can find. And I know basically nothing about code optimization so - tossing this out here!&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;cut-wrapper&quot;&gt;&lt;span style=&quot;display: none;&quot; id=&quot;span-cuttag___1&quot; class=&quot;cuttag&quot;&gt;&lt;/span&gt;&lt;b class=&quot;cut-open&quot;&gt;(&amp;nbsp;&lt;/b&gt;&lt;b class=&quot;cut-text&quot;&gt;&lt;a href=&quot;https://dw-dev.dreamwidth.org/143629.html#cutid1&quot;&gt;Data structures&lt;/a&gt;&lt;/b&gt;&lt;b class=&quot;cut-close&quot;&gt;&amp;nbsp;)&lt;/b&gt;&lt;/span&gt;&lt;div style=&quot;display: none;&quot; id=&quot;div-cuttag___1&quot; aria-live=&quot;assertive&quot;&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;cut-wrapper&quot;&gt;&lt;span style=&quot;display: none;&quot; id=&quot;span-cuttag___2&quot; class=&quot;cuttag&quot;&gt;&lt;/span&gt;&lt;b class=&quot;cut-open&quot;&gt;(&amp;nbsp;&lt;/b&gt;&lt;b class=&quot;cut-text&quot;&gt;&lt;a href=&quot;https://dw-dev.dreamwidth.org/143629.html#cutid2&quot;&gt;Query Structure&lt;/a&gt;&lt;/b&gt;&lt;b class=&quot;cut-close&quot;&gt;&amp;nbsp;)&lt;/b&gt;&lt;/span&gt;&lt;div style=&quot;display: none;&quot; id=&quot;div-cuttag___2&quot; aria-live=&quot;assertive&quot;&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Tragically the already existing options are &apos;use Solr&apos;, &apos;use something written on a Java server backend&apos;, or &apos;use a client-side Javascript library (which won&apos;t work with JS off and will probably not work on a 1300+ collection, but we didn&apos;t stress-test it to see)&apos;&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=dw_dev&amp;ditemid=143629&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://dw-dev.dreamwidth.org/143629.html</comments>
  <category>styles</category>
  <lj:security>public</lj:security>
  <lj:poster>momijizukamori</lj:poster>
  <lj:reply-count>12</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://dw-dev.dreamwidth.org/143534.html</guid>
  <pubDate>Sat, 15 Jun 2013 09:39:39 GMT</pubDate>
  <title>Styles have been moved!</title>
  <link>https://dw-dev.dreamwidth.org/143534.html</link>
  <description>Posted by: &lt;span lj:user=&apos;ninetydegrees&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://ninetydegrees.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://ninetydegrees.dreamwidth.org/&apos;&gt;&lt;b&gt;ninetydegrees&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here are the new locations:&lt;br /&gt;&lt;br /&gt;bin/upgrading/s2layers/... =&amp;gt; styles/...&lt;br /&gt;bin/upgrading/s2layers.dat =&amp;gt; styles/s2layers.dat&lt;br /&gt;&lt;br /&gt;ext/dw-nonfree/bin/upgrading/s2layers/... =&amp;gt; ext/dw-nonfree/styles&lt;br /&gt;ext/dw-nonfree/bin/upgrading/s2layers.dat =&amp;gt; ext/dw-nonfree/styles/s2layers.dat&lt;br /&gt;&lt;br /&gt;If you&apos;re working on a styles bug, you may want to save your files, update your code and work on a new branch (or do what&apos;s necessary to update your current branch and reapply your changes).&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=dw_dev&amp;ditemid=143534&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://dw-dev.dreamwidth.org/143534.html</comments>
  <category>styles</category>
  <lj:security>public</lj:security>
  <lj:poster>ninetydegrees</lj:poster>
  <lj:reply-count>6</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://dw-dev.dreamwidth.org/141299.html</guid>
  <pubDate>Tue, 14 May 2013 20:07:34 GMT</pubDate>
  <title>Bug 3459 - new styles categorization system (brainstorming + RFC)</title>
  <link>https://dw-dev.dreamwidth.org/141299.html</link>
  <description>Posted by: &lt;span lj:user=&apos;momijizukamori&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://momijizukamori.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://momijizukamori.dreamwidth.org/&apos;&gt;&lt;b&gt;momijizukamori&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;(Apologies to anyone seeing this twice, I posted it in &lt;span style=&apos;white-space: nowrap;&apos;&gt;&lt;a href=&apos;https://dw-dev-training.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/comm_staff.png&apos; alt=&apos;[site community profile] &apos; width=&apos;16&apos; height=&apos;16&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://dw-dev-training.dreamwidth.org/&apos;&gt;&lt;b&gt;dw_dev_training&lt;/b&gt;&lt;/a&gt;&lt;/span&gt; but Mark and D suggested here was probably a better fit!)&lt;br /&gt;&lt;br /&gt;So, this is the gigantic project that&apos;s been kicking around my head the last few months, because I love our themes but right now, the organization is nooooot there. And I love organization. The &lt;a href=&quot;http://bugs.dwscoalition.org/show_bug.cgi?id=3459&quot;&gt;full bugzilla listing&lt;/a&gt; has all the debates and links and what not, but I&apos;m going to add the summary of UI implementation I ran by Denise below:&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;cut-wrapper&quot;&gt;&lt;span style=&quot;display: none;&quot; id=&quot;span-cuttag___1&quot; class=&quot;cuttag&quot;&gt;&lt;/span&gt;&lt;b class=&quot;cut-open&quot;&gt;(&amp;nbsp;&lt;/b&gt;&lt;b class=&quot;cut-text&quot;&gt;&lt;a href=&quot;https://dw-dev.dreamwidth.org/141299.html#cutid1&quot;&gt;quoted from Bugzilla&lt;/a&gt;&lt;/b&gt;&lt;b class=&quot;cut-close&quot;&gt;&amp;nbsp;)&lt;/b&gt;&lt;/span&gt;&lt;div style=&quot;display: none;&quot; id=&quot;div-cuttag___1&quot; aria-live=&quot;assertive&quot;&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Because the scope of this runs through Perl, MySQL, BML, and Javascript, today I sat down and wrote out a vague work-flow for how looking at themes by category in /customize should run, and how adding themes as an admin should run, so I have an idea of what I need to do.&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;cut-wrapper&quot;&gt;&lt;span style=&quot;display: none;&quot; id=&quot;span-cuttag___2&quot; class=&quot;cuttag&quot;&gt;&lt;/span&gt;&lt;b class=&quot;cut-open&quot;&gt;(&amp;nbsp;&lt;/b&gt;&lt;b class=&quot;cut-text&quot;&gt;&lt;a href=&quot;https://dw-dev.dreamwidth.org/141299.html#cutid2&quot;&gt;very rough, mind you&lt;/a&gt;&lt;/b&gt;&lt;b class=&quot;cut-close&quot;&gt;&amp;nbsp;)&lt;/b&gt;&lt;/span&gt;&lt;div style=&quot;display: none;&quot; id=&quot;div-cuttag___2&quot; aria-live=&quot;assertive&quot;&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;I&apos;d really appreciate feedback on if I missed any important stuff, logistics of the UI implementation, and how exactly we should store this information in the databases. Or even on the list of categories I have so far, though there will probably be a bigger, more official RFC when things get far enough.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=dw_dev&amp;ditemid=141299&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://dw-dev.dreamwidth.org/141299.html</comments>
  <category>styles</category>
  <lj:security>public</lj:security>
  <lj:poster>momijizukamori</lj:poster>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://dw-dev.dreamwidth.org/140484.html</guid>
  <pubDate>Fri, 26 Apr 2013 14:03:12 GMT</pubDate>
  <title>The Great Big Styles Move</title>
  <link>https://dw-dev.dreamwidth.org/140484.html</link>
  <description>Posted by: &lt;span lj:user=&apos;ninetydegrees&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://ninetydegrees.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://ninetydegrees.dreamwidth.org/&apos;&gt;&lt;b&gt;ninetydegrees&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Dear fellow devs,&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://bugs.dwscoalition.org/show_bug.cgi?id=4726&quot;&gt;bug 4726&lt;/a&gt; will move all folders in /bin/upgrading/s2layers/ as well as /bin/upgrading/s2layers.dat to /bin/styles. I have this mostly patched so, if you&apos;re currently working on any of these files, please set your bug as blocking mine so I can keep my patch up-to-date and know when it&apos;s safe to push it.&lt;br /&gt;&lt;br /&gt;Thank you!&lt;br /&gt;&lt;br /&gt;P.S. baggyeyes, I&apos;ve already done this for your bug as I know you&apos;re working on it. :)&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=dw_dev&amp;ditemid=140484&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://dw-dev.dreamwidth.org/140484.html</comments>
  <category>styles</category>
  <lj:security>public</lj:security>
  <lj:poster>ninetydegrees</lj:poster>
  <lj:reply-count>12</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://dw-dev.dreamwidth.org/126188.html</guid>
  <pubDate>Sun, 30 Sep 2012 14:28:31 GMT</pubDate>
  <title>Reminder: when making changes to Core2 check all styles please</title>
  <link>https://dw-dev.dreamwidth.org/126188.html</link>
  <description>Posted by: &lt;span lj:user=&apos;ninetydegrees&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://ninetydegrees.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://ninetydegrees.dreamwidth.org/&apos;&gt;&lt;b&gt;ninetydegrees&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you make any change to Core2 --frontend but also backend, please check whether this also affects any of our official styles and open a bug for them if you don&apos;t want to update them as part of your own bug. It&apos;s the only way to make sure everything stays up-to-date and functional, and only requires a simple &apos;grep -ril&apos;. :)&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=dw_dev&amp;ditemid=126188&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://dw-dev.dreamwidth.org/126188.html</comments>
  <category>styles</category>
  <lj:security>public</lj:security>
  <lj:poster>ninetydegrees</lj:poster>
  <lj:reply-count>4</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://dw-dev.dreamwidth.org/123466.html</guid>
  <pubDate>Mon, 10 Sep 2012 16:35:40 GMT</pubDate>
  <title>Opinions sought: Too much info on tag usage available to styles?</title>
  <link>https://dw-dev.dreamwidth.org/123466.html</link>
  <description>Posted by: &lt;span lj:user=&apos;swaldman&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://swaldman.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://swaldman.dreamwidth.org/&apos;&gt;&lt;b&gt;swaldman&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I&apos;ve been working on Bug 1723, and while doing that I&apos;ve noticed something that I don&apos;t think is right.&lt;br /&gt;&lt;br /&gt;The following information on tag usage is exposed to the style system (via the TagDetail class):&lt;ol&gt;    &lt;li&gt;&lt;tt&gt;use_count&lt;/tt&gt;: The number of times that the tag in question is used in the journal (at present it&apos;s the total number of times, but bug 1723 will most likely change it to being an approximation of the number of times that it&apos;s used in posts that the current user can see. This isn&apos;t important now :-))&lt;/li&gt;    &lt;li&gt;&lt;tt&gt;visibility&lt;/tt&gt;: The most-relaxed security level that the tag is ever used in.&lt;/li&gt;    &lt;li&gt;&lt;tt&gt;security_counts&lt;/tt&gt;: How many times it is used at each security level, &lt;strong&gt;including security levels that the current user does not have access to&lt;/strong&gt;.&lt;/li&gt;&lt;/ol&gt;(1) is fine, and is used by all styles (there is a privacy leak at present, but bug 1723 is meant to fix that)&lt;br /&gt;(2) seems like info that styles don&apos;t really need to know, but it can&apos;t hurt&lt;br /&gt;(3) concerns me, because it exposes information that the current user shouldn&apos;t have.&lt;br /&gt;&lt;br /&gt;For example, let&apos;s say that user A has not been granted access by user B. User B posts a lot with the tag &amp;quot;hatemyboss&amp;quot;. Most of these posts are protected or private, but one of the posts is public. Because of the public post, user A is able to see the &amp;quot;hatemyboss&amp;quot; tag. If user A were to go away and write his own style that used the info in (3) above, he would be able to find out how often user B has used &amp;quot;hatemyboss&amp;quot; in protected, private and filtered posts.&lt;br /&gt;&lt;br /&gt;I&apos;m told that none of DW&apos;s official styles use the info in (3). This doesn&apos;t mean that a custom style doesn&apos;t use it somewhere, on DW or another site using the code.&lt;br /&gt;&lt;br /&gt;I think that there are three options:&lt;br /&gt;(a) Leave things as they are&lt;br /&gt;(b) Stop exposing the security_counts variable to the styles system&lt;br /&gt;(c) Keep the variable, but force all the values to zero&lt;br /&gt;&lt;br /&gt;I prefer (c), because it deals with the privacy issue without totally breaking any custom styles that use this information. We could add a note in core2.s2 explaining what is going on, and &lt;em&gt;maybe&lt;/em&gt; remove the variable totally in a year&apos;s time or something.&lt;br /&gt;&lt;br /&gt;What are other peoples&apos; opinions?&lt;br /&gt;&lt;br /&gt;If anybody wants to have a look for themselves, search for:&lt;ul&gt;    &lt;li&gt;&amp;quot;class TagDetail&amp;quot; in core2.s2&lt;/li&gt;    &lt;li&gt;&amp;quot;$t-&amp;gt;{security_counts}&amp;quot; in S2.pm&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=dw_dev&amp;ditemid=123466&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://dw-dev.dreamwidth.org/123466.html</comments>
  <category>styles</category>
  <lj:mood>geeky</lj:mood>
  <lj:security>public</lj:security>
  <lj:poster>swaldman</lj:poster>
  <lj:reply-count>14</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://dw-dev.dreamwidth.org/113891.html</guid>
  <pubDate>Thu, 19 Apr 2012 06:05:37 GMT</pubDate>
  <title>Some tools for S2 patching</title>
  <link>https://dw-dev.dreamwidth.org/113891.html</link>
  <description>Posted by: &lt;span lj:user=&apos;momijizukamori&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://momijizukamori.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://momijizukamori.dreamwidth.org/&apos;&gt;&lt;b&gt;momijizukamori&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;...mostly because as anyone who gets all the bugzilla and/or style notifs knows, I did a lot of that this week *g*&lt;br /&gt;&lt;br /&gt;First, preview images - I&apos;d been doing them with Ubuntu&apos;s screenshot utility and photoshop, which is 1) really slow and 2) doesn&apos;t really adequately strip and compress images. So! Enter &lt;a href=&quot;https://chrome.google.com/webstore/detail/cpngackimfmofbokmjmljamhdncknpmg&quot;&gt;Screen Capture&lt;/a&gt; for Google Chrome, which I&apos;ve been using with the &apos;full page&apos; setting, and set to skip pop-ups and save straight to a temp image directory, where I can then rename the screenshots. After that, &lt;span style=&apos;white-space: nowrap;&apos;&gt;&lt;a href=&apos;https://geekosaur.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://geekosaur.dreamwidth.org/&apos;&gt;&lt;b&gt;geekosaur&lt;/b&gt;&lt;/a&gt;&lt;/span&gt; and &lt;span style=&apos;white-space: nowrap;&apos;&gt;&lt;a href=&apos;https://exor674.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://exor674.dreamwidth.org/&apos;&gt;&lt;b&gt;exor674&lt;/b&gt;&lt;/a&gt;&lt;/span&gt; (with a little sideline ImageMagick input from &lt;span style=&apos;white-space: nowrap;&apos;&gt;&lt;a href=&apos;https://www.dreamwidth.org/profile?user=tamouse_&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://www.dreamwidth.org/profile?user=tamouse_&apos;&gt;&lt;b&gt;tamouse_&lt;/b&gt;&lt;/a&gt;&lt;/span&gt; helped me write this handy little shell script, to process all the pngs in the directory you run them on - it resizes them, crops them, strips color profiles, and indexes them.&lt;br /&gt;&lt;br /&gt;&lt;textarea cols=&quot;50&quot; rows=&quot;10&quot;&gt;#!/bin/bash
for f in *.png; do
    convert -resize 150x114^ -gravity north -extent 150x114 -sharpen 25 +dither -type Palette &quot;$f&quot; png8:&quot;out.png&quot; &amp;&amp;
        pngnq -n 256 -s 1 -f out.png &amp;&amp;
        pngcrush -c 3 -bit_depth 8 -rem alla -brute out-nq8.png &quot;$f&quot; &amp;gt;/dev/null &amp;&amp;
        rm out.png out-nq8.png
done
&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;I&apos;ve been using it on my own machine, as I run Ubuntu, but I believe all the appropriate packages are now on the Dreamhack server, too, for server-side use.&lt;br /&gt;&lt;br /&gt;Second, &lt;span style=&apos;white-space: nowrap;&apos;&gt;&lt;a href=&apos;https://rb.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://rb.dreamwidth.org/&apos;&gt;&lt;b&gt;rb&lt;/b&gt;&lt;/a&gt;&lt;/span&gt; posted &lt;a href=&quot;http://dw-dev.dreamwidth.org/106347.html&quot;&gt;a handy little script for sorting properties for color themes and generating appropriate headers&lt;/a&gt;. I updated it to match our current formatting for files, add sorting for a few more properties, and output more verbose instructions on what to do next at the end.&lt;br /&gt;&lt;br /&gt;&lt;textarea cols=&quot;50&quot; rows=&quot;10&quot;&gt;
#!/usr/bin/perl
#
#

my ( $theme_human, $author_name, $layout_human, $is_nonfree ) = @ARGV;

sub diehelp {
    warn &quot;Syntax: newtheme ThemeName AuthorName LayoutName IsNonfree&quot;;
    exit;
}

if ( !$theme_human ) {
    warn &quot;No theme name provided.&quot;;
    diehelp;
}
if ( !$layout_human ) {
    warn &quot;No layout name provided.&quot;;
    diehelp;
}

( $layout_name = lc ( $layout_human ) ) =~ s/\s//g;
( $theme_name = lc ( $theme_human ) ) =~ s/\s//g;


my ( @dropped, @css, @set, $in_css );
while ( &amp;lt;STDIN&amp;gt; ) {
    my $line = $_;

    if ( $in_css ) {
        if ( $line =~ m/&quot;&quot;&quot;; }/ ) {
            $in_css = 0;
            next;
        }
        push( @css, $line );
    } elsif ( $line =~ m/function Page::print_theme_stylesheet/ ) {
        $in_css = 1;
    } elsif ( /^\.$/ ) {
        break;
    } else {
        next unless $line;
        if ( $line =~ m/^layerinfo / ) {
            push( @dropped, $line );
            next;
        }

        push( @set, $line );
    }
}

# process @set lines
my ( @unknown, @presentation, @page, @entries, @modules, @fonts, @images );
foreach ( @set ) {
    if ( /userlite_interaction_links = / || /_management_links = / || /module.*order/ || /module.*show/ ) {
        push( @dropped, $_ );
    } elsif ( /font/ ) {
        push( @fonts, $_ );
    } elsif ( /module/ ) {
        push( @modules, $_ );
    } elsif ( /entry/ ) {
        push( @entries, $_ );
    } elsif ( /comment/ ) {
        push( @entries, $_ );
    } elsif ( /links/ || /layout/ ) {
        push( @presentation, $_ );
    } elsif ( /color/ ) {
        push( @page, $_ );
    } elsif ( /image/ ) {
        push( @images, $_ );
    } else {
        push( @unknown, $_ );
    }
}

my $filename = &quot;$ENV{LJHOME}/temp/$layout_name-$theme_name.s2&quot;;
open TMP_FILE, &quot;&amp;gt; $filename&quot;;

print TMP_FILE &amp;lt;&amp;lt;&quot;EOT&quot;;
#NEWLAYER: $layout_name/$theme_name
layerinfo type = &quot;theme&quot;;
layerinfo name = &quot;$theme_human&quot;;
layerinfo redist_uniq = &quot;$layout_name/$theme_name&quot;;
layerinfo author_name = &quot;$author_name&quot;;

set layout_authors = [ { &quot;name&quot; =&amp;gt; &quot;$author_name&quot;, &quot;type&quot; =&amp;gt; &quot;user&quot; } ];
EOT

# print @set lines
sub print_section {
    my ( $name, @lines ) = @_;

    if (@lines) {
        print TMP_FILE&amp;lt;&amp;lt;&quot;EOT&quot;;

##===============================
## $name
##===============================

EOT
        foreach ( @lines ) {
            print TMP_FILE $_;
        }
    }
}

print_section( &quot;Presentation&quot;, @presentation );
print_section( &quot;Page&quot;, @page );
print_section( &quot;Entry&quot;, @entries );
print_section( &quot;Module&quot;, @module );
print_section( &quot;Fonts&quot;, @fonts );
print_section( &quot;Images&quot;, @images );
if ( @css ) {
    print TMP_FILE &quot;\n&quot;;
    print TMP_FILE &apos;function Page::print_theme_stylesheet() { &quot;&quot;&quot;&apos; . &quot;\n&quot;;
    foreach ( @css ) {
        print TMP_FILE &quot;    &quot; . $_;
    }
    print TMP_FILE &apos;&quot;&quot;&quot;; }&apos; . &quot;\n&quot;;
}
print_section( &quot;Unknown - DELETE THIS SECTION after reclassifying lines&quot;, @unknown );
print_section( &quot;Dropped - DELETE THIS SECTION after verifying none of it is needed&quot;, @dropped );
print TMP_FILE &quot;\n&quot;;
close TMP_FILE;

print &quot;Parsed theme now saved in file: $filename\n&quot;;
print &quot;Be sure to check this for hardcoded font sizes and color codes that can be shortened.\n&quot;;
print &quot;This new text needs to be put into the existing file named:\n&quot;;
print &quot;$ENV{LJHOME}/bin/upgrading/s2layers/$layout_name/theme.s2\n\n&quot;;
if ( @images ) {
    print &quot;This layout appears to have image(s). Change their url to $layout_name/$theme_name(_imagename, if multiple), rename the image to $theme_name(_imagename), and put in:\n&quot;;
    print &quot;$ENV{LJHOME}/htdocs/stc/$layout_name/$theme_name.png\n\n&quot;;
    }
print &quot;Theme also needs a preview screenshot. Resize to 150x114px and put in:\n&quot;;
print &quot;$ENV{LJHOME}/htdocs/img/customize/previews/$layout_name/$theme_name.png\n\n&quot;;
print &quot;(for additional reference on cleaning themes, see http://wiki.dwscoalition.org/notes/Newbie_Guide_for_People_Patching_Styles#Adding_a_New_Color_Theme )&quot;;
&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;This is written to be used server-side right now, with a command-line input like &apos;./newtheme.pl &quot;Human-Readable Theme Name&quot; user &quot;Layout This Theme Is For&quot; yes &amp;lt; inputfile&apos; I&apos;ve been running it client-side by changing line 74, &apos;my $filename = &quot;$ENV{LJHOME}/temp/$layout_name-$theme_name.s2&quot;;&apos; to &apos;my $filename = &quot;temp_themes/$layout_name-$theme_name.s2&quot;;&apos; (otherwise it tries to write to root, and That&apos;s Bad. And unnecessary)&lt;br /&gt;&lt;br /&gt;Third, for the tiny handful of people doing S2 work on gedit (shhh, I like it, okay), I made some &lt;a href=&quot;http://pastebin.com/MVdY2XRb&quot;&gt;mods to the CSS syntax highlighting file (pastebin because the file is big)&lt;/a&gt;. I tried to get it to make a custom S2 language, but it was being fussy about parsing it, and a lot of the .s2 files are largely CSS anyway. So this adds highlighting for S2 variables and S2 keywords! It goes in a file called CSS.lang in home/.local/usr/share/gtksourceview-2.0/language-specs, which will probably not exist if you haven&apos;t made custom languages. If you&apos;re on newer versions that use GTK3, that 2.0 should be a 3.0. You may have to manually select the highlighting, for some reason it only registers the .s2 extension some of the time.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=dw_dev&amp;ditemid=113891&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://dw-dev.dreamwidth.org/113891.html</comments>
  <category>scripts</category>
  <category>styles</category>
  <lj:security>public</lj:security>
  <lj:poster>momijizukamori</lj:poster>
  <lj:reply-count>4</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://dw-dev.dreamwidth.org/106645.html</guid>
  <pubDate>Thu, 19 Jan 2012 09:57:36 GMT</pubDate>
  <title>Info gathering; S2 links that do not preserve style=</title>
  <link>https://dw-dev.dreamwidth.org/106645.html</link>
  <description>Posted by: &lt;span lj:user=&apos;exor674&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://exor674.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://exor674.dreamwidth.org/&apos;&gt;&lt;b&gt;exor674&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I have noticed certain in-journal links such as next and previous do not preserve the style= setting and really should.&lt;br /&gt;&lt;br /&gt;Can people please look at links and compile a list of places that do &lt;strong&gt;not&lt;/strong&gt; preserve this option so I can open a bug.&lt;br /&gt;&lt;br /&gt;Thanks.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=dw_dev&amp;ditemid=106645&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://dw-dev.dreamwidth.org/106645.html</comments>
  <category>styles</category>
  <lj:security>public</lj:security>
  <lj:poster>exor674</lj:poster>
  <lj:reply-count>3</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://dw-dev.dreamwidth.org/106347.html</guid>
  <pubDate>Sat, 07 Jan 2012 10:27:12 GMT</pubDate>
  <title>S2 Patch Assist Script</title>
  <link>https://dw-dev.dreamwidth.org/106347.html</link>
  <description>Posted by: &lt;span lj:user=&apos;jeshyr&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://jeshyr.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://jeshyr.dreamwidth.org/&apos;&gt;&lt;b&gt;jeshyr&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Right before my brain got refried by this stupid disease I was working on a script to turn the theme layers copied from DW  itself into the right format to paste into the s2 code in the sourcecode. I was doing it as I learned how so it&apos;s only been tested on about 5 different situations at the moment and I&apos;m quite sure it doesn&apos;t do everything so check all output please!!&lt;br /&gt;&lt;br /&gt;And yes, my brain got fried (again) by this stupid disability so I&apos;m on indefinite leave from developing for the mean time - and VERY disappointed about it.&lt;br /&gt;&lt;br /&gt;At the moment you want to pipe the theme layer through STDIN to the script, so something like&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$ ./newtheme.pl NewThemeName Rising &quot;Tabula Rasa&quot; yes &amp;lt; ~/file-with-theme-layer.txt&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;it will tell you what file it writes the output to, it will be something in $LJHOME/temp/&lt;br /&gt;&lt;br /&gt;Script&lt;br /&gt;&lt;br /&gt;&lt;textarea rows=&quot;15&quot; cols=&quot;80&quot;&gt;#!/usr/bin/perl
#
#

my ( $theme_human, $author_name, $layout_human, $is_nonfree ) = @ARGV;

sub diehelp {
    warn &quot;Syntax: newtheme ThemeName AuthorName LayoutName IsNonfree&quot;;
    exit;
}

if ( !$theme_human ) {
    warn &quot;No theme name provided.&quot;;
    diehelp;
}
if ( !$layout_human ) {
    warn &quot;No layout name provided.&quot;;
    diehelp;
}

( $layout_name = lc ( $layout_human ) ) =~ s/\s//g;
( $theme_name = lc ( $theme_human ) ) =~ s/\s//g;


my ( @dropped, @css, @set, $in_css );
while ( &amp;lt;STDIN&amp;gt; ) {
    my $line = $_;

    if ( $in_css ) {
        if ( $line =~ m/&quot;&quot;&quot;; }/ ) {
            $in_css = 0;
            next;
        }
        push( @css, $line );
    } elsif ( $line =~ m/function Page::print_theme_stylesheet/ ) {
        $in_css = 1;
    } elsif ( /^\.$/ ) {
        break;
    } else {
        next unless $line;
        if ( $line =~ m/^layerinfo / ) {
            push( @dropped, $line );
            next;
        }

        push( @set, $line );
    }
}

# process @set lines
my ( @unknown, @presentation, @page, @entries, @modules, @fonts );
foreach ( @set ) {
    if ( /userlite_interaction_links = / || /_management_links = / || /module.*order/ || /module.*show/ ) {
        push( @dropped, $_ ); 
    } elsif ( /font/ ) {
        push( @fonts, $_ );
    } elsif ( /module/ ) {
        push( @modules, $_ );
    } elsif ( /entry/ ) {
        push( @entries, $_ );
    } elsif ( /comment/ ) {
        push( @entries, $_ );
    } elsif ( /links/ ) {
        push( @presentation, $_ );
    } elsif ( /color/ ) {
        push( @page, $_ );
    } else {
        push( @unknown );
    }
}

my $filename = &quot;$ENV{LJHOME}/temp/$layout_name-$theme_name.s2&quot;;
open TMP_FILE, &quot;&amp;gt; $filename&quot;;

print TMP_FILE &amp;lt;&amp;lt;&quot;EOT&quot;;
#NEWLAYER: $layout_name/$theme_name
layerinfo &quot;type&quot; = &quot;theme&quot;;
layerinfo &quot;name&quot; = &quot;$theme_human&quot;;
layerinfo &quot;redist_uniq&quot; = &quot;$layout_name/$theme_name&quot;;
layerinfo &quot;author_name&quot; = &quot;$author_name&quot;;

set layout_authors = [ { &quot;name&quot; =&amp;gt; &quot;$author_name&quot;, &quot;type&quot; =&amp;gt; &quot;user&quot; } ];
EOT

# print @set lines
sub print_section {
    my ( $name, @lines ) = @_;

    if (@lines) {
        print TMP_FILE&amp;lt;&amp;lt;&quot;EOT&quot;;

##===============================
## $name
##===============================
EOT
        foreach ( @lines ) {
            print TMP_FILE $_;
        }
    }
}

print_section( &quot;Presentation&quot;, @presentation );
print_section( &quot;Page&quot;, @page );
print_section( &quot;Entry&quot;, @entries );
print_section( &quot;Module&quot;, @module );
print_section( &quot;Fonts&quot;, @fonts );
if ( @css ) {
    print TMP_FILE &quot;\n&quot;;
    print TMP_FILE &apos;function Page::print_theme_stylesheet() { &quot;&quot;&quot;&apos; . &quot;\n&quot;;
    foreach ( @css ) {
        print TMP_FILE &quot;    &quot; . $_;
    }
    print TMP_FILE &apos;&quot;&quot;&quot;; }&apos; . &quot;\n&quot;;
}
print_section( &quot;Unknown - DELETE THIS SECTION after reclassifying lines&quot;, @unknown );
print_section( &quot;Dropped - DELETE THIS SECTION after verifying none of it is needed&quot;, @dropped );
print TMP_FILE &quot;\n&quot;;
close TMP_FILE;

print &quot;Parsed theme now saved in file: $filename\n&quot;;
print &quot;This new text needs to be put into the existing file named:\n&quot;;
print &quot;$ENV{LJHOME}/bin/upgrading/s2layers/$theme_name/theme.s2\n\n&quot;;
print &quot;Theme also needs a preview screenshot. Resize to 150x114px and put in:\n&quot;;
print &quot;$ENV{LJHOME}/htdocs/img/customize/previews/$theme_name/$layout_name.png\n\n&quot;;
&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;Feedback, cases that break it, improvements, etc. would all be great.&lt;br /&gt;&lt;br /&gt;r&lt;br /&gt;&lt;br /&gt;Edit: Now with super bonus functioning HTML tags!&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=dw_dev&amp;ditemid=106347&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://dw-dev.dreamwidth.org/106347.html</comments>
  <category>styles</category>
  <category>scripts</category>
  <lj:security>public</lj:security>
  <lj:poster>jeshyr</lj:poster>
  <lj:reply-count>1</lj:reply-count>
</item>
</channel>
</rss>
