Difference between revisions of "NewFromTemplateSpec"
(structure in SVG files) |
|||
Line 5: | Line 5: | ||
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 | 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 11: | Line 11: | ||
Definition of template : [[ClipTemplates]]. | Definition of template : [[ClipTemplates]]. | ||
Abstract : templates are svg files included in « ''/usr/.../inkscape/templates/'' ». Others templates can be easily | Abstract : templates are svg files included in « ''/usr/.../inkscape/templates/'' ». Others templates can be easily adds in « ''~/.inkscape/templates'' ». | ||
=== Attributes === | === Attributes === | ||
Line 29: | Line 29: | ||
* a '''website link''' | * a '''website link''' | ||
=== | ==== Name ==== | ||
Every template must have an default english name. If name is not set, the | Every template must have an default english name. If name is not set, the file name will be displayed. | ||
Default english name: | Default english name: | ||
<sodipodi:namedview | <sodipodi:namedview | ||
inkscape: | inkscape:template-name="desktop 1024x768" | ||
/> | /> | ||
French translation: | French translation: | ||
<sodipodi:namedview | <sodipodi:namedview | ||
inkscape: | inkscape:template-name-fr="fond d'écran 1024x768" | ||
/> | /> | ||
=== | === 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. | 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. | ||
Line 49: | Line 49: | ||
* if you make a new CD cover template, you have to put: | * if you make a new CD cover template, you have to put: | ||
<sodipodi:namedview | <sodipodi:namedview | ||
inkscape: | inkscape:template-category="Covers/CD" | ||
/> | /> | ||
'''Use / for subcategories. You can put more than one /. Example : Covers/CD/Front ; Covers/CD/Back ; ...''' | '''Use / for subcategories. You can put more than one /. Example : Covers/CD/Front ; Covers/CD/Back ; ...''' | ||
Line 55: | Line 55: | ||
* if you make a new desktop template: | * if you make a new desktop template: | ||
<sodipodi:namedview | <sodipodi:namedview | ||
inkscape: | inkscape:template-category="Desktop" | ||
/> | /> | ||
* if you make a new paper sizes template: | * if you make a new paper sizes template: | ||
<sodipodi:namedview | <sodipodi:namedview | ||
inkscape: | inkscape:template-category="Paper sizes" | ||
/> | /> | ||
'''Q: Should we use underscore between words ? like "Paper_sizes"''' | '''Q: Should we use underscore between words ? like "Paper_sizes"''' | ||
=== Date === | |||
Only in english notation : 10/23/2005" | |||
Example: | |||
<sodipodi:namedview | |||
inkscape:template-date="12/20/2008" | |||
/> | |||
=== Structure in SVG files === | |||
<sodipodi:namedview | |||
inkscape:template-name="Web banner 728x90" | |||
inkscape:template-name-fr="Bannière Web 728x90" | |||
inkscape:template-category="Web/Banner" | |||
inkscape:template-description="A banner for a website, size: 728x90 px" | |||
inkscape:template-description-fr="Une bannière pour site web, taille : 728x90 px" | |||
inkscape:template-date="12/20/2008" | |||
inkscape:template-authors="Albin, Binnette, John" | |||
inkscape:template-contacts="albin@ink.com, john@mail.com" | |||
inkscape:template-websites="http://john.inkscape.org, http://binnette.perso.net" | |||
/> | |||
=== Current categories === | === Current categories === |
Revision as of 09:30, 15 May 2010
'New from template' dialog's specification
Page : NewFromTemplateSpec
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
Listing 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
- a date
- name(s) of author(s)
- an email address
- a website link
Name
Every template must have an default english name. If name is not set, the file name will be displayed.
Default english name:
<sodipodi:namedview inkscape:template-name="desktop 1024x768" />
French translation:
<sodipodi:namedview inkscape:template-name-fr="fond d'écran 1024x768" />
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.
Examples:
- if you make a new CD cover template, you have to put:
<sodipodi:namedview inkscape:template-category="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:
<sodipodi:namedview inkscape:template-category="Desktop" />
- if you make a new paper sizes template:
<sodipodi:namedview inkscape:template-category="Paper sizes" />
Q: Should we use underscore between words ? like "Paper_sizes"
Date
Only in english notation : 10/23/2005"
Example:
<sodipodi:namedview inkscape:template-date="12/20/2008" />
Structure in SVG files
<sodipodi:namedview inkscape:template-name="Web banner 728x90" inkscape:template-name-fr="Bannière Web 728x90" inkscape:template-category="Web/Banner" inkscape:template-description="A banner for a website, size: 728x90 px" inkscape:template-description-fr="Une bannière pour site web, taille : 728x90 px" inkscape:template-date="12/20/2008" inkscape:template-authors="Albin, Binnette, John" inkscape:template-contacts="albin@ink.com, john@mail.com" inkscape:template-websites="http://john.inkscape.org, http://binnette.perso.net" />
Current categories
From ClipTemplates.
- Covers
- CD
- CD_cover_300dpi.svg
- DVD
- DVD_cover_regular_300dpi.svg
- DVD_cover_slim_300dpi.svg
- DVD_cover_superslim_300dpi.svg
- DVD_cover_ultraslim_300dpi.svg
- TAPE
- no file
- VHS
- no file
- CD
- Desktops
- desktop_1024x768.svg
- desktop_1600x1200.svg
- desktop_640x480.svg
- desktop_800x600.svg
- Labels
- no file
- Backgrounds (Q: Is this the same category as Desktop ?)
- no file
- Banners
- no file
- Icons
- icon_16x16.svg
- icon_32x32.svg
- icon_48x48.svg
- icon_64x64.svg
- Paper sizes
- A4_landscape.svg
- A4.svg
- business_card_85x54mm.svg
- business_card_90x50mm.svg
- Letter_landscape.svg
- Letter.svg
- Videos
- video_HDTV_1920x1080.svg
- video_NTSC_720x486.svg
- video_PAL_720x576.svg
- Slideshows
- LaTeX_Beamer.svg
- Web
- Buttons
- no file
- Banners
- web_banner_468x60.svg
- web_banner_728x90.svg
- Buttons
- Fonts
- fontforge_glyph.svg
- 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 (oK, it's Portuguese Brazil)
- default_pt.svg (don't respect spec ! must be renamed default.pt.svg)
- default.sk.svg
- default.svg (in English)
- 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:
Mockup of NFT dialog for procedural templates:
Behind the curtains
Metadata
Integration with ccHost
ccHost is deprecated ! prefer GetHotNewStuff
Integration with GetHotNewStuff
Q: what is it ?
see also : http://inkscapestuff.org/
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.