Created
July 16, 2012 13:06
-
-
Save ms-studio/3122602 to your computer and use it in GitHub Desktop.
A Scribus script for generating an automatic colophon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
un petit script destiné à générer un colophon technique | |
License GPL 2.0 | |
Auteur: manuel schmalstieg | |
""" | |
from scribus import * | |
# if newDocument(PAPER_A4, (10, 10, 10, 10), PORTRAIT, 1, UNIT_POINTS, NOFACINGPAGES, FIRSTPAGERIGHT, 1): | |
# createText(20, 20, 500, 120, "ColophonTextBox") | |
if haveDoc(): | |
myNewObject = createText(20, 20, 500, 120, "ColophonTextBox") | |
myNiceFont = getFont(myNewObject) | |
setText("Ce document a ete créé avec Scribus ... Il utilise les fontes suivantes: "+str(myNiceFont) , "ColophonTextBox") | |
""" | |
Note: | |
we need a way to get the content creator .... Scribus 1.4.1 | |
For the fonts: | |
we will use this | |
getFont(...) | |
getFont(["name"]) -> string | |
for each item ... 1 ou 0 ... 4 ... | |
nous allons créer un SET, (ou liste) qui n'acceptera que des nouveaux éléments. | |
""" | |
# getFontNames(...) | |
# getFontNames() -> list | |
# Returns a list with the names of all available fonts. | |
# setText("text", ["name"]) | |
# Sets the text of the text frame "name" to the text of the string "text". | |
# saveDocAs("Border_2.sla") #Make sure this is writable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment