Initial checkin of Pika from heckimp
This commit is contained in:
59
data/tips/fortunes.xsl
Normal file
59
data/tips/fortunes.xsl
Normal file
@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- This simple XSL transformation creates a text version from
|
||||
pika-tips.xml.in which can then be used to seed
|
||||
https://wiki.pika.technology.heckin/FortuneCookies in the PIKA Wiki. -->
|
||||
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<!-- Pass this stylesheet a lang parameter in order to select a language. -->
|
||||
<xsl:param name="lang" />
|
||||
|
||||
<xsl:output method="text" />
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:apply-templates select="//thetip[lang($lang)]" />
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="thetip">
|
||||
* <xsl:apply-templates />
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="tt">
|
||||
<xsl:text>{{{</xsl:text>
|
||||
<xsl:apply-templates />
|
||||
<xsl:text>}}}</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<!-- This sucks, but I don't seem to get xsl:strip-space to work. -->
|
||||
<xsl:template match="text()">
|
||||
<xsl:call-template name="search-and-replace">
|
||||
<xsl:with-param name="input" select="." />
|
||||
<xsl:with-param name="search-string" select="'
 '" />
|
||||
<xsl:with-param name="replace-string" select="' '" />
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="search-and-replace">
|
||||
<xsl:param name="input" />
|
||||
<xsl:param name="search-string" />
|
||||
<xsl:param name="replace-string" />
|
||||
<xsl:choose>
|
||||
<xsl:when test="$search-string and contains($input, $search-string)">
|
||||
<xsl:value-of select="substring-before($input, $search-string)" />
|
||||
<xsl:value-of select="$replace-string" />
|
||||
<xsl:call-template name="search-and-replace">
|
||||
<xsl:with-param name="input"
|
||||
select="substring-after($input, $search-string)" />
|
||||
<xsl:with-param name="search-string" select="$search-string" />
|
||||
<xsl:with-param name="replace-string" select="$replace-string" />
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$input" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
8
data/tips/its/pika-tips.its
Normal file
8
data/tips/its/pika-tips.its
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0"?>
|
||||
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
|
||||
<its:withinTextRule withinText="yes" selector="//thetip//b |
|
||||
//thetip//big |
|
||||
//thetip//tt"/>
|
||||
<its:translateRule selector="/pika-tips" translate="no"/>
|
||||
<its:translateRule selector="//thetip" translate="yes"/>
|
||||
</its:rules>
|
6
data/tips/its/pika-tips.loc
Normal file
6
data/tips/its/pika-tips.loc
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<locatingRules>
|
||||
<locatingRule name="PikaTips" pattern="*.xml">
|
||||
<documentRule localName="pika-tips" target="pika-tips.its"/>
|
||||
</locatingRule>
|
||||
</locatingRules>
|
35
data/tips/meson.build
Normal file
35
data/tips/meson.build
Normal file
@ -0,0 +1,35 @@
|
||||
pika_tips = i18n.merge_file(
|
||||
input : 'pika-tips.xml.in',
|
||||
output: '@BASENAME@',
|
||||
data_dirs: meson.current_source_dir(),
|
||||
po_dir: potips_dir,
|
||||
install: true,
|
||||
install_dir: pikadatadir / 'tips',
|
||||
)
|
||||
|
||||
fortunes_tips = custom_target('fortunes-tips',
|
||||
input : [ pika_tips, 'fortunes.xsl', ],
|
||||
output: 'fortunes-tips',
|
||||
command: [
|
||||
xsltproc,
|
||||
'--stringparam', 'lang', 'en',
|
||||
'--path', meson.current_source_dir(),
|
||||
'--output', '@OUTPUT@',
|
||||
'@INPUT1@',
|
||||
'@INPUT0@',
|
||||
],
|
||||
)
|
||||
|
||||
if xmllint.found()
|
||||
custom_target('validate-tips',
|
||||
command: [
|
||||
xmllint,
|
||||
'--output', '@OUTPUT@',
|
||||
'--path', meson.current_source_dir(),
|
||||
'--valid', pika_tips,
|
||||
],
|
||||
output: [ 'validate-tips-output.xml' ],
|
||||
build_by_default: true,
|
||||
install: false
|
||||
)
|
||||
endif
|
19
data/tips/pika-tips.dtd
Normal file
19
data/tips/pika-tips.dtd
Normal file
@ -0,0 +1,19 @@
|
||||
<!-- Simple DTD for PIKA tips -->
|
||||
|
||||
<!ELEMENT pika-tips (tip+)>
|
||||
|
||||
<!ELEMENT tip (thetip+)>
|
||||
<!ATTLIST tip level (start|beginner|intermediate|advanced) #REQUIRED>
|
||||
<!ATTLIST tip help CDATA #IMPLIED>
|
||||
|
||||
<!ENTITY % markup "(#PCDATA|b|big|tt)*">
|
||||
|
||||
<!ELEMENT b %markup;>
|
||||
<!ATTLIST b xml:lang CDATA #IMPLIED>
|
||||
<!ELEMENT big %markup;>
|
||||
<!ATTLIST big xml:lang CDATA #IMPLIED>
|
||||
<!ELEMENT tt %markup;>
|
||||
<!ATTLIST tt xml:lang CDATA #IMPLIED>
|
||||
|
||||
<!ELEMENT thetip %markup;>
|
||||
<!ATTLIST thetip xml:lang CDATA #IMPLIED>
|
235
data/tips/pika-tips.xml.in
Normal file
235
data/tips/pika-tips.xml.in
Normal file
@ -0,0 +1,235 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pika-tips SYSTEM "pika-tips.dtd">
|
||||
|
||||
<!-- This is a list of tips for PIKA. -->
|
||||
<!-- -->
|
||||
<!-- The tips parser supports a very basic markup language. You may use -->
|
||||
<!-- the tag b to specify bold text, big to increase the font size and -->
|
||||
<!-- tt to switch to a monospace font. -->
|
||||
|
||||
<pika-tips>
|
||||
|
||||
<!-- -->
|
||||
<!-- Tips for beginners start here -->
|
||||
<!-- (for people who are not familiar yet with layers and image formats) -->
|
||||
<!-- -->
|
||||
|
||||
<tip level="beginner">
|
||||
<thetip>
|
||||
You can get context-sensitive help for most of PIKA's features by
|
||||
pressing the F1 key at any time. This also works inside the menus.
|
||||
</thetip>
|
||||
</tip>
|
||||
<tip level="beginner" help="pika-layer-dialog">
|
||||
<thetip>
|
||||
PIKA uses layers to let you organize your image. Think of them
|
||||
as a stack of slides or filters, such that looking through them you
|
||||
see a composite of their contents.
|
||||
</thetip>
|
||||
</tip>
|
||||
<tip level="beginner" help="pika-layer-menu">
|
||||
<thetip>
|
||||
You can perform many layer operations by right-clicking on the text
|
||||
label of a layer in the Layers dialog.
|
||||
</thetip>
|
||||
</tip>
|
||||
<tip level="beginner" help="pika-file-save">
|
||||
<thetip>
|
||||
Saving an image uses XCF, PIKA's native file format (file extension
|
||||
<tt>.xcf</tt>). This preserves the layers and many aspects of your
|
||||
work-in-progress, allowing to work on it again later.
|
||||
Once a project is completed, you can export it as JPEG, PNG, GIF, etc.
|
||||
</thetip>
|
||||
</tip>
|
||||
<tip level="beginner" help="pika-image-flatten">
|
||||
<thetip>
|
||||
Most plug-ins work on the current layer of the current image. In
|
||||
some cases, you will have to merge all layers (Image→Flatten Image)
|
||||
if you want the plug-in to work on the whole image.
|
||||
</thetip>
|
||||
</tip>
|
||||
<tip level="beginner" help="pika-layer-alpha-add">
|
||||
<thetip>
|
||||
If a layer's name in the Layers dialog is displayed in <b>bold</b>,
|
||||
this layer doesn't have an alpha-channel. You can add an alpha-channel
|
||||
using Layer→Transparency→Add Alpha Channel.
|
||||
</thetip>
|
||||
</tip>
|
||||
<tip level="beginner">
|
||||
<thetip>
|
||||
Not all effects can be applied to all kinds of images. This is
|
||||
indicated by a grayed-out menu-entry. You may need to change
|
||||
the image mode to RGB (Image→Mode→RGB), add an alpha-channel
|
||||
(Layer→Transparency→Add Alpha Channel) or flatten it
|
||||
(Image→Flatten Image).
|
||||
</thetip>
|
||||
</tip>
|
||||
<tip level="beginner">
|
||||
<thetip>
|
||||
You can adjust or move a selection by using <tt>Alt</tt>-drag.
|
||||
If this makes the window move, your window manager uses the
|
||||
<tt>Alt</tt> key already. Most window managers can be
|
||||
configured to ignore the <tt>Alt</tt> key or to use
|
||||
the <tt>Super</tt> key (or "Windows logo") instead.
|
||||
</thetip>
|
||||
</tip>
|
||||
|
||||
<!-- -->
|
||||
<!-- Tips for intermediate users start here -->
|
||||
<!-- -->
|
||||
|
||||
<tip level="intermediate">
|
||||
<thetip>
|
||||
You can drag and drop many things in PIKA. For example, dragging
|
||||
a color from the toolbox or from a color palette and dropping it into
|
||||
an image will fill the current selection with that color.
|
||||
</thetip>
|
||||
</tip>
|
||||
<tip level="intermediate">
|
||||
<thetip>
|
||||
You can use the middle mouse button to pan around the image
|
||||
(or optionally hold <tt>Spacebar</tt> while you move the mouse).
|
||||
</thetip>
|
||||
</tip>
|
||||
<tip level="intermediate" help="pika-concepts-image-grid">
|
||||
<thetip>
|
||||
Click and drag on a ruler to place a guide on an image. All
|
||||
dragged selections will snap to the guides. You can remove
|
||||
guides by dragging them off the image with the Move tool.
|
||||
</thetip>
|
||||
</tip>
|
||||
<tip level="intermediate" help="pika-file-new">
|
||||
<thetip>
|
||||
You can drag a layer from the Layers dialog and drop it onto the
|
||||
toolbox. This will create a new image containing only that layer.
|
||||
</thetip>
|
||||
</tip>
|
||||
<tip level="intermediate">
|
||||
<thetip>
|
||||
A floating selection must be anchored to a new layer or to the last
|
||||
active layer before doing other operations on the image. Click on the
|
||||
"New Layer" or the "Anchor Layer" button in the
|
||||
Layers dialog, or use the menus to do the same.
|
||||
</thetip>
|
||||
</tip>
|
||||
<tip level="intermediate">
|
||||
<thetip>
|
||||
PIKA supports gzip compression on the fly. Just add <tt>.gz</tt>
|
||||
(or <tt>.bz2</tt>, if you have bzip2 installed) to the filename and
|
||||
your image will be saved compressed. Of course loading compressed
|
||||
images works too.
|
||||
</thetip>
|
||||
</tip>
|
||||
<tip level="intermediate">
|
||||
<thetip>
|
||||
Pressing and holding the <tt>Shift</tt> key before making a selection
|
||||
allows you to add to the current selection instead of replacing it.
|
||||
Using <tt>Ctrl</tt> before making a selection subtracts from the
|
||||
current one.
|
||||
</thetip>
|
||||
</tip>
|
||||
<tip level="intermediate" help="pika-selection-stroke">
|
||||
<thetip>
|
||||
You can draw simple squares or circles using Edit→Stroke Selection.
|
||||
It strokes the edge of your current selection. More complex shapes
|
||||
can be drawn using the Path tool or with Filters→Render→Gfig.
|
||||
</thetip>
|
||||
</tip>
|
||||
<tip level="intermediate" help="pika-path-stroke">
|
||||
<thetip>
|
||||
If you stroke a path (Edit→Stroke Path), the paint tools can
|
||||
be used with their current settings. You can use the Paintbrush in
|
||||
gradient mode or even the Eraser or the Smudge tool.
|
||||
</thetip>
|
||||
</tip>
|
||||
<tip level="intermediate" help="pika-using-paths">
|
||||
<thetip>
|
||||
You can create and edit complex selections using the Path tool.
|
||||
The Paths dialog allows you to work on multiple paths and to convert
|
||||
them to selections.
|
||||
</thetip>
|
||||
</tip>
|
||||
<tip level="intermediate" help="pika-using-quickmask">
|
||||
<thetip>
|
||||
You can use the paint tools to change the selection. Click on the
|
||||
"Quick Mask" button at the bottom left of an image window.
|
||||
Change your selection by painting in the image and click on the button
|
||||
again to convert it back to a normal selection.
|
||||
</thetip>
|
||||
</tip>
|
||||
<tip level="intermediate" help="pika-channel-dialog">
|
||||
<thetip>
|
||||
You can save a selection to a channel (Select→Save to Channel) and
|
||||
then modify this channel with any paint tools. Using the buttons in
|
||||
the Channels dialog, you can toggle the visibility of this new channel
|
||||
or convert it to a selection.
|
||||
</thetip>
|
||||
</tip>
|
||||
|
||||
<!-- -->
|
||||
<!-- Tips for advanced users start here -->
|
||||
<!-- (this is mostly for learning shortcut keys) -->
|
||||
<!-- -->
|
||||
|
||||
<tip level="advanced">
|
||||
<thetip>
|
||||
After you enabled "Dynamic Keyboard Shortcuts" in the
|
||||
Preferences dialog, you can reassign shortcut keys. Do so by bringing
|
||||
up the menu, selecting a menu item, and pressing the desired key
|
||||
combination. If "Save Keyboard Shortcuts" is enabled, the
|
||||
key bindings are saved when you exit PIKA.
|
||||
You should probably disable "Dynamic Keyboard Shortcuts"
|
||||
afterwards, to prevent accidentally assigning/reassigning shortcuts.
|
||||
</thetip>
|
||||
</tip>
|
||||
<tip level="advanced">
|
||||
<thetip>
|
||||
If your screen is too cluttered, you can press <tt>Tab</tt>
|
||||
in an image window to toggle the visibility of the toolbox
|
||||
and other dialogs.
|
||||
</thetip>
|
||||
</tip>
|
||||
<tip level="advanced">
|
||||
<thetip>
|
||||
<tt>Shift</tt>-click on the eye icon in the Layers dialog to hide all
|
||||
layers but that one. <tt>Shift</tt>-click again to show all layers.
|
||||
</thetip>
|
||||
</tip>
|
||||
<tip level="advanced">
|
||||
<thetip>
|
||||
<tt>Ctrl</tt>-clicking on the layer mask's preview in the Layers dialog
|
||||
toggles the effect of the layer mask. <tt>Alt</tt>-clicking on the layer
|
||||
mask's preview in the Layers dialog toggles viewing the mask directly.
|
||||
</thetip>
|
||||
</tip>
|
||||
<tip level="advanced">
|
||||
<thetip>
|
||||
You can use <tt>Ctrl</tt>-<tt>Tab</tt> to cycle through all layers in
|
||||
an image (if your window manager doesn't trap those keys...).
|
||||
</thetip>
|
||||
</tip>
|
||||
<tip level="advanced" help="pika-tool-bucket-fill">
|
||||
<thetip>
|
||||
<tt>Ctrl</tt>-click with the Bucket Fill tool to have it use
|
||||
the background color instead of the foreground color.
|
||||
Similarly, <tt>Ctrl</tt>-clicking with the eyedropper tool
|
||||
sets the background color instead of the foreground color.
|
||||
</thetip>
|
||||
</tip>
|
||||
<tip level="advanced" help="pika-tools-transform">
|
||||
<thetip>
|
||||
<tt>Ctrl</tt>-drag with the Rotate tool will constrain the
|
||||
rotation to 15 degree angles.
|
||||
</thetip>
|
||||
</tip>
|
||||
<tip level="advanced">
|
||||
<thetip>
|
||||
If some of your scanned photos do not look colorful enough, you
|
||||
can easily improve their tonal range with the "Auto"
|
||||
button in the Levels tool (Colors→Levels). If there are any
|
||||
color casts, you can correct them with the Curves tool
|
||||
(Colors→Curves).
|
||||
</thetip>
|
||||
</tip>
|
||||
|
||||
</pika-tips>
|
Reference in New Issue
Block a user