Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)

src/b/o/boar-HEAD/boar/archive/tasks.py   boar(Download)
def generate_page_image(page_id):
    from boar.archive.models import Page
    page = Page.objects.get(id=page_id)
    if not subprocess.call(['convert', '-density', '300', unicode(page.pdf.path), '-colorspace', 'RGB', unicode(re.sub(r'\.pdf$', '.jpg', page.pdf.path))]):
        page.image = re.sub(r'\.pdf$', '.jpg', unicode(page.pdf))