Skip to content

Instantly share code, notes, and snippets.

Avatar

Norbert @ infoCatch mtrebron

View GitHub Profile
@mtrebron
mtrebron / behaviors.py
Created Sep 11, 2019
Related leadimage behavior
View behaviors.py
# -*- coding: utf-8 -*-
from pnz.www_pnz_de import _
from zope import schema
from plone.autoform.interfaces import IFormFieldProvider
from plone.supermodel import directives
from plone.supermodel import model
from plone.app.multilingual.dx.interfaces import ILanguageIndependentField
from plone.dexterity.interfaces import IDexterityContent
from z3c.relationfield.schema import RelationChoice
from plone.app.vocabularies.catalog import CatalogSource
@mtrebron
mtrebron / treepoem_pdf.py
Last active Nov 18, 2019
Treepoem save barcode as pdf
View treepoem_pdf.py
# -*- encoding:utf-8 -*-
from treepoem.__init__ import _format_code, _get_bbox, EPS_TEMPLATE, BWIPP, _get_ghostscript_binary
from treepoem.data import BarcodeType, barcode_types
import subprocess
def generate_ps_barcode(barcode_type, data, options=None):
"""generate postscript barcode, similar to treepoem.generate_barcode()
"""
if barcode_type not in barcode_types:
You can’t perform that action at this time.