Skip to content

Instantly share code, notes, and snippets.

@ms-studio
Created July 16, 2012 13:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ms-studio/3122602 to your computer and use it in GitHub Desktop.
Save ms-studio/3122602 to your computer and use it in GitHub Desktop.
A Scribus script for generating an automatic colophon
#!/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