Difference between revisions of "NewFromTemplateSpec"

From Inkscape Wiki
Jump to navigation Jump to search
(add attributes, etc)
m (Add category Proposals)
 
(23 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
= 'New from template' dialog's specification =
 
= 'New from template' dialog's specification =
 +
Page : [[NewFromTemplateSpec]]
 +
 +
Blueprint : https://blueprints.edge.launchpad.net/inkscape/+spec/new-from-template-dialog
 +
 
== Synopsis ==
 
== Synopsis ==
 
Long-time users tend to keep a great deal of templates around. Inkscape allows to pick templates from a simple submenu which isn't flexible enough.
 
Long-time users tend to keep a great deal of templates around. Inkscape allows to pick templates from a simple submenu which isn't flexible enough.
  
Implementing a Scribus-like New From Template (''further as NFT'') dialog with additional search capability would help keeping templates organized and easili accessible.
+
Implementing a Scribus-like New From Template (''further as NFT'') dialog with additional search capability would help keeping templates organized and easily accessible.
  
 
== Templates ==
 
== Templates ==
Line 9: Line 13:
 
Definition of template : [[ClipTemplates]].
 
Definition of template : [[ClipTemplates]].
  
Abstract : templates are svg files included in « ''/usr/.../inkscape/templates/'' ». Others templates can be easily addes in « ''~/.inkscape/templates'' ».
+
Abstract : templates are svg files included in « ''/usr/.../inkscape/templates/'' ». Others templates can be easily adds in « ''~/.inkscape/templates'' ».
  
 
=== Attributes ===
 
=== Attributes ===
Listing of attributes for each templates:
+
List of attributes for each templates:
  
 
;must be set:
 
;must be set:
Line 22: Line 26:
 
* a '''description in english'''
 
* a '''description in english'''
 
* some '''translations of the description'''
 
* some '''translations of the description'''
 +
* <s>some '''keywords'''</s> (see talk page)
 +
* a '''license'''
 
* a '''date'''
 
* a '''date'''
 
* '''name(s) of author(s)'''
 
* '''name(s) of author(s)'''
Line 27: Line 33:
 
* a '''website link'''
 
* a '''website link'''
  
=== Template name ===
+
==== Name ====
Every template must have an default english name. If name is not set, the filename will be displayed.
+
Every template must have a default english name. If name is not set, the file name will be displayed.
 +
 
 +
=== Category ===
 +
Templates must be categorized. That's why we must add a new attribute named « category » into every templates svg files. This attribute will allow the NFT dialog to only display categories with at least one template.
 +
 
 +
Use "/" for subcategories. You can put more than one "/". Examples: "Covers/CD/Front" ; "Covers/CD/Back"
  
Default english name:
+
Use " " between words and not "_". Examples: "Paper sizes" and not "Paper_sizes"
<sodipodi:namedview
 
    inkscape:templateName="desktop 1024x768"
 
/>
 
  
French translation:
+
=== Keywords ===
<sodipodi:namedview
+
Those keywords can be used in order to research a template. For example if you type "Desktop" in the search entry of the NFT dialog, it will show you all template witch contain the keyword "Desktop" (see talk page about usefulness).
    inkscape:templateNameFr="fond d'écran 1024x768"
 
/>
 
  
=== Template category ===
+
=== Date ===
Templates must be categorized. That's why we must add a new attribute named « category » into every templates svg files. This attribute will allow the NFT dialog to only display categories with at least one template.
+
Only in english notation : 10/23/2005"
  
Examples:
+
=== Structure in SVG files ===
  
* if you make a new CD cover template, you have to put:
+
'''''Note: this structure is still preliminary and mainly to start discussion. There are several shortcomings that need to be addressed:'''''
<sodipodi:namedview
 
    inkscape:templateCategory="Covers/CD"
 
/>
 
'''Use / for subcategories. You can put more than one /. Example : Covers/CD/Front ; Covers/CD/Back ; ...'''
 
  
* if you make a new desktop template:
+
Tags will follow recommendations of freedesktop.org. See http://create.freedesktop.org/wiki/ResourceTagging
<sodipodi:namedview
+
<pre>
     inkscape:templateCategory="Desktop"
+
<tags>
/>
+
  <tag>
 +
    <key>name</key>
 +
    <label xml:lang="en">Web banner 728x90</label>
 +
    <label xml:lang="fr">Bannière web 728x90</label>
 +
  </tag>
 +
  <tag>
 +
    <key>template-category</key>
 +
    <label xml:lang="en">Web/Banner</label>
 +
  </tag>
 +
  <tag>
 +
    <key>description</key>
 +
    <label xml:lang="en">A banner for a website, size: 728x90 px</label>
 +
     <label xml:lang="fr">Une bannière pour site web, taille : 728x90 px</label>
 +
  </tag>
 +
</tags>
 +
</pre>
  
* if you make a new paper sizes template:
+
'''Note:'''
<sodipodi:namedview
+
* name is already stored in metadata as title but in one only language.
    inkscape:templateCategory="Paper sizes"
+
* license, date, authors are already stored in metadata.
/>
+
* email of authors can be written next to authors names.
'''Q: Should we use underscore between words ? like "Paper_sizes"'''
+
* website can be stored in metadata as Source.
  
 
=== Current categories ===
 
=== Current categories ===
Line 77: Line 94:
 
** VHS
 
** VHS
 
**# no file
 
**# no file
 +
 +
* Default
 +
** Language '''(Files in this category will not appear in NFT dialog. Only the good language will appear)'''
 +
**# default.svg '''(in English)'''
 +
**# default.be.svg (ca, cs, de, eo, es, eu, fi, fr, hu, it, ja, lt, nl, pl, pt_BR, sk)
 +
** Units (will probably be removed and replaced by a combobox that's allow to select unit)
 +
**# default_mm.svg
 +
**# default_pt.svg
  
 
* Desktops
 
* Desktops
Line 84: Line 109:
 
*# desktop_800x600.svg
 
*# desktop_800x600.svg
  
* Labels
+
* Fonts
*# no file
+
*# fontforge_glyph.svg
 
 
* Backgrounds '''(Q: Is this the same category as Desktop ?)'''
 
*# no file
 
 
 
* Banners
 
*# no file
 
  
 
* Icons
 
* Icons
Line 98: Line 117:
 
*# icon_48x48.svg
 
*# icon_48x48.svg
 
*# icon_64x64.svg
 
*# icon_64x64.svg
 +
 +
* Labels
 +
*# no file
  
 
* Paper sizes
 
* Paper sizes
Line 106: Line 128:
 
*# Letter_landscape.svg
 
*# Letter_landscape.svg
 
*# Letter.svg
 
*# Letter.svg
 +
 +
* Slideshows
 +
*# LaTeX_Beamer.svg
 +
 +
* Template themes
 +
*# no file
 +
 +
* Uncategorized
 +
*# black_opaque.svg
 +
*# white_opaque.svg
 +
*# no_borders.svg
 +
*# no_layers.svg
  
 
* Videos
 
* Videos
Line 111: Line 145:
 
*# video_NTSC_720x486.svg
 
*# video_NTSC_720x486.svg
 
*# video_PAL_720x576.svg
 
*# video_PAL_720x576.svg
 
* Slideshows
 
*# LaTeX_Beamer.svg
 
  
 
* Web
 
* Web
Line 122: Line 153:
 
**# web_banner_728x90.svg
 
**# web_banner_728x90.svg
  
* Fonts
+
;about languages
*# fontforge_glyph.svg
+
About Portuguese Brazil. See the list of language in the User Profile that wiki (pt-br) or locale bash pt_BR. I think that only BR may conflict with other language. Also use about.pt_BR.svg .. RFC1766 meta-tag in HTML4 or history http://en.wikipedia.org/wiki/Language_localisation ... Acceptable change to BR only if there is a conflict with another BR.
 
 
* Template themes
 
*# no file
 
 
 
* Others (and uncategorized)
 
*# black_opaque.svg
 
*# white_opaque.svg
 
*# no_borders.svg
 
*# no_layers.svg
 
 
 
* Default '''(Files in this category will not appear in NFT dialog. Only the good language will appear)'''
 
*# default.be.svg
 
*# default.ca.svg
 
*# default.cs.svg
 
*# default.de.svg
 
*# default.eo.svg
 
*# default.es.svg
 
*# default.eu.svg
 
*# default.fi.svg
 
*# default.fr.svg
 
*# default.hu.svg
 
*# default.it.svg
 
*# default.ja.svg
 
*# default.lt.svg
 
*# default_mm.svg '''(don't respect spec ! must be renamed default.mm.svg)'''
 
*# default.nl.svg
 
*# default.pl.svg
 
*# default.pt_BR.svg '''(Q: what's pt_BR ?)'''
 
*# default_pt.svg '''(don't respect spec ! must be renamed default.pt.svg)'''
 
*# default.sk.svg
 
*# default.svg '''(in English)'''
 
  
 
== Functionality ==
 
== Functionality ==
Line 175: Line 175:
 
=== Metadata ===
 
=== Metadata ===
 
=== Integration with ccHost ===
 
=== Integration with ccHost ===
 +
ccHost is deprecated ! prefer GetHotNewStuff
 +
 +
=== Integration with GetHotNewStuff ===
 +
* http://ghns.freedesktop.org/
 +
* http://inkscapestuff.org/
 +
 +
=== Integration with OCAL ===
 +
* http://www.openclipart.org/ (Open Clip Art Library)
 +
 
=== NFT as menu item ===
 
=== NFT as menu item ===
 +
???
 +
 
== Future improvements ==
 
== Future improvements ==
 
In case someone comes up with a decent web service to host updatable templates, the dialog should notificate on updates and allow grabbing updated versions.
 
In case someone comes up with a decent web service to host updatable templates, the dialog should notificate on updates and allow grabbing updated versions.
 +
 +
[[Category:Developer Documentation]]
 +
[[Category:Proposals]]
 +
[[Category:Specification]]

Latest revision as of 10:40, 31 March 2012

'New from template' dialog's specification

Page : NewFromTemplateSpec

Blueprint : https://blueprints.edge.launchpad.net/inkscape/+spec/new-from-template-dialog

Synopsis

Long-time users tend to keep a great deal of templates around. Inkscape allows to pick templates from a simple submenu which isn't flexible enough.

Implementing a Scribus-like New From Template (further as NFT) dialog with additional search capability would help keeping templates organized and easily accessible.

Templates

Definition

Definition of template : ClipTemplates.

Abstract : templates are svg files included in « /usr/.../inkscape/templates/ ». Others templates can be easily adds in « ~/.inkscape/templates ».

Attributes

List of attributes for each templates:

must be set
  • a default english name (en: desktop 1024x768)
  • a category
if necessary
  • some translations of the name (fr: fond d'écran 1024x768)
  • a description in english
  • some translations of the description
  • some keywords (see talk page)
  • a license
  • a date
  • name(s) of author(s)
  • an email address
  • a website link

Name

Every template must have a default english name. If name is not set, the file name will be displayed.

Category

Templates must be categorized. That's why we must add a new attribute named « category » into every templates svg files. This attribute will allow the NFT dialog to only display categories with at least one template.

Use "/" for subcategories. You can put more than one "/". Examples: "Covers/CD/Front" ; "Covers/CD/Back"

Use " " between words and not "_". Examples: "Paper sizes" and not "Paper_sizes"

Keywords

Those keywords can be used in order to research a template. For example if you type "Desktop" in the search entry of the NFT dialog, it will show you all template witch contain the keyword "Desktop" (see talk page about usefulness).

Date

Only in english notation : 10/23/2005"

Structure in SVG files

Note: this structure is still preliminary and mainly to start discussion. There are several shortcomings that need to be addressed:

Tags will follow recommendations of freedesktop.org. See http://create.freedesktop.org/wiki/ResourceTagging

<tags>
  <tag>
    <key>name</key>
    <label xml:lang="en">Web banner 728x90</label>
    <label xml:lang="fr">Bannière web 728x90</label>
  </tag>
  <tag>
    <key>template-category</key>
    <label xml:lang="en">Web/Banner</label>
  </tag>
  <tag>
    <key>description</key>
    <label xml:lang="en">A banner for a website, size: 728x90 px</label>
    <label xml:lang="fr">Une bannière pour site web, taille : 728x90 px</label>
  </tag>
</tags>

Note:

  • name is already stored in metadata as title but in one only language.
  • license, date, authors are already stored in metadata.
  • email of authors can be written next to authors names.
  • website can be stored in metadata as Source.

Current categories

From ClipTemplates.

  • Covers
    • CD
      1. CD_cover_300dpi.svg
    • DVD
      1. DVD_cover_regular_300dpi.svg
      2. DVD_cover_slim_300dpi.svg
      3. DVD_cover_superslim_300dpi.svg
      4. DVD_cover_ultraslim_300dpi.svg
    • TAPE
      1. no file
    • VHS
      1. no file
  • Default
    • Language (Files in this category will not appear in NFT dialog. Only the good language will appear)
      1. default.svg (in English)
      2. default.be.svg (ca, cs, de, eo, es, eu, fi, fr, hu, it, ja, lt, nl, pl, pt_BR, sk)
    • Units (will probably be removed and replaced by a combobox that's allow to select unit)
      1. default_mm.svg
      2. default_pt.svg
  • Desktops
    1. desktop_1024x768.svg
    2. desktop_1600x1200.svg
    3. desktop_640x480.svg
    4. desktop_800x600.svg
  • Fonts
    1. fontforge_glyph.svg
  • Icons
    1. icon_16x16.svg
    2. icon_32x32.svg
    3. icon_48x48.svg
    4. icon_64x64.svg
  • Labels
    1. no file
  • Paper sizes
    1. A4_landscape.svg
    2. A4.svg
    3. business_card_85x54mm.svg
    4. business_card_90x50mm.svg
    5. Letter_landscape.svg
    6. Letter.svg
  • Slideshows
    1. LaTeX_Beamer.svg
  • Template themes
    1. no file
  • Uncategorized
    1. black_opaque.svg
    2. white_opaque.svg
    3. no_borders.svg
    4. no_layers.svg
  • Videos
    1. video_HDTV_1920x1080.svg
    2. video_NTSC_720x486.svg
    3. video_PAL_720x576.svg
  • Web
    • Buttons
      1. no file
    • Banners
      1. web_banner_468x60.svg
      2. web_banner_728x90.svg
about languages

About Portuguese Brazil. See the list of language in the User Profile that wiki (pt-br) or locale bash pt_BR. I think that only BR may conflict with other language. Also use about.pt_BR.svg .. RFC1766 meta-tag in HTML4 or history http://en.wikipedia.org/wiki/Language_localisation ... Acceptable change to BR only if there is a conflict with another BR.

Functionality

Types of templates

NFT dialog provides access to both static and dynamically created (procedural) templates. Static templates are simple SVG files. Dynamically created templates are scripts like Perfect-Bound Cover. See GUI mockup section below for GUI considerations.

GUI

Scribus

Scribus NFT dialog is really good ! We have to reproduce this dialog. Uses tabs: tab 1 for custom and tab 2 for templates.

Mockup

Mockup of NFT dialog for static templates:

Nft-dialog-static-mockup.png

Mockup of NFT dialog for procedural templates:

Nft-dialog-procedural-mockup.png

Behind the curtains

Metadata

Integration with ccHost

ccHost is deprecated ! prefer GetHotNewStuff

Integration with GetHotNewStuff

Integration with OCAL

NFT as menu item

???

Future improvements

In case someone comes up with a decent web service to host updatable templates, the dialog should notificate on updates and allow grabbing updated versions.