<table><tr><td style="">xciml created this revision.<br />xciml added a reviewer: Framework: Syntax Highlighting.<br />xciml added a project: Framework: Syntax Highlighting.<br />Restricted Application added projects: Kate, Frameworks.<br />Restricted Application added a subscriber: kwrite-devel.<br />xciml requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D14236">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>This patch aims at making the kate-syntax-highlighter tool independent of the filesystem for better use in pipelines.</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">A --stdin option was added to signify that the text stream comes from standard input instead of a file. If a source file is still provided, the program implicitly chooses that instead.</li>
</ul>

<p>This makes the tool usable in pipelines.</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">MIME types can now be used in the -s option</li>
</ul>

<p>This is useful for when the file name can't be trusted to give an appropriate type (it might be a hash), but the MIME type is provided by a protocol or database through which the file is accessed. This way translation to the program's syntax names doesn't have to be done outside of the program.</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">A -T/--title option was added to explicitly specify the HTML page's title. I arbitrarily chose "Kate Syntax Highlighter" as a default title from stdin streams and the default is unchanged for a specified source file.</li>
</ul>

<p>This is needed because now that a filename isn't guaranteed, it's hard to make a default title that's always appropriate. So just let the user specify it without having to rummage through it later to replace it.</p>

<p>Other than these added features, behaviour does (should) not change.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R216 Syntax Highlighting</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D14236">https://phabricator.kde.org/D14236</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/cli/kate-syntax-highlighter.cpp<br />
src/lib/htmlhighlighter.cpp<br />
src/lib/htmlhighlighter.h<br />
src/lib/repository.cpp<br />
src/lib/repository.h</div></div></div><br /><div><strong>To: </strong>xciml, Framework: Syntax Highlighting<br /><strong>Cc: </strong>kde-frameworks-devel, kwrite-devel, Framework: Syntax Highlighting, michaelh, genethomas, kevinapavew, ngraham, bruns, demsking, cullmann, vkrause, sars, dhaumann<br /></div>