metadata

Reading the PDF properties/metadata in Python

这一生的挚爱 提交于 2020-01-30 15:25:23
问题 How can I read the properties/metadata like Title, Author, Subject and Keywords stored on a PDF file using Python? 回答1: Try pdfminer: from pdfminer.pdfparser import PDFParser from pdfminer.pdfdocument import PDFDocument fp = open('diveintopython.pdf', 'rb') parser = PDFParser(fp) doc = PDFDocument(parser) print(doc.info) # The "Info" metadata Here's the output: >>> [{'CreationDate': 'D:20040520151901-0500', 'Creator': 'DocBook XSL Stylesheets V1.52.2', 'Keywords': 'Python, Dive Into Python,

Reading the PDF properties/metadata in Python

浪尽此生 提交于 2020-01-30 15:24:10
问题 How can I read the properties/metadata like Title, Author, Subject and Keywords stored on a PDF file using Python? 回答1: Try pdfminer: from pdfminer.pdfparser import PDFParser from pdfminer.pdfdocument import PDFDocument fp = open('diveintopython.pdf', 'rb') parser = PDFParser(fp) doc = PDFDocument(parser) print(doc.info) # The "Info" metadata Here's the output: >>> [{'CreationDate': 'D:20040520151901-0500', 'Creator': 'DocBook XSL Stylesheets V1.52.2', 'Keywords': 'Python, Dive Into Python,

Can matplotlib add metadata to saved figures?

情到浓时终转凉″ 提交于 2020-01-30 14:31:20
问题 I want to be able to ascertain the provenance of the figures I create using matplotlib, i.e. to know which version of my code and data created these figures. (See this essay for more on provenance.) I imagine the most straightforward approach would be to add the revision numbers of the code and data to the metadata of the saved figures, or as comments in a postscript file for example. Is there any easy way to do this in Matplotlib? The savefig function doesn't seem to be capable of this but

Set Google Sheets Column MetaData - Sheet ID is not being Set - Watch a spreadsheet column for being moved

放肆的年华 提交于 2020-01-30 03:55:15
问题 I'm using the Advanced Drive Service to set the Sheets column metadata. The column ID is being set, and I can retrieve it, but the sheetId property is not getting set. function setShColumnMetadata() { var request,response,ss,sh; ss = SpreadsheetApp.getActiveSpreadsheet(); sh = ss.getSheetByName('Employees'); request = [ { createDeveloperMetadata:{ developerMetadata:{ metadataKey:"employeeSh_DeptIdCol", metadataValue:JSON.stringify({ writtenBy:Session.getEffectiveUser().getEmail(), createdAt

What EXIF lib can I use from a Qt program (on embedded linux)?

半腔热情 提交于 2020-01-29 07:14:34
问题 Can anybody recommend a nice exif lib for tiff img that can be used with a Qt program? I would like to both read and write exif data. Please note that that I need a license that is compatible with a closed source program, so a lib that is using LGPL or a BSD style license would be really nice. My first plan was to use QExifImageHeader and QExifValue in Qt Extended, but then I noticed that Extended never got the LGPL licence and is on top of that it is discontinued.... The platform used is

What EXIF lib can I use from a Qt program (on embedded linux)?

微笑、不失礼 提交于 2020-01-29 07:14:14
问题 Can anybody recommend a nice exif lib for tiff img that can be used with a Qt program? I would like to both read and write exif data. Please note that that I need a license that is compatible with a closed source program, so a lib that is using LGPL or a BSD style license would be really nice. My first plan was to use QExifImageHeader and QExifValue in Qt Extended, but then I noticed that Extended never got the LGPL licence and is on top of that it is discontinued.... The platform used is

Can one (repeatedly) restructure a Firebird table in a single transaction?

孤街浪徒 提交于 2020-01-26 04:07:04
问题 Normally, I'd do a relatively complicated change of data type on column A like this: Create column B of the new data type Set B to contain the new values derived from A Drop A Rename B to A To guarantee the validity of my data model, I'd like to perform such restructuring within a single transaction. So far, I have not been able to do that, because, depending on the isolation level, either B is not considered to exist yet, or I'm not allowed to rename B ("update conflicts with concurrent

WCF Metadata publishing for this service is currently disabled

限于喜欢 提交于 2020-01-25 12:28:15
问题 I am struggling to display metadata while using WCF. I have looked all over the place. I'm not sure if it is a setting in my web.config file, or my actual service is not working properly. But I get the "Metadata publishing for this service is currently disabled." page when I debug. <?xml version="1.0"?> <configuration> <system.serviceModel> <bindings> <webHttpBinding> <binding name="myWebHttp"/> </webHttpBinding> </bindings> <behaviors> <serviceBehaviors> <behavior name="EDSCoastmap">

WCF Metadata publishing for this service is currently disabled

ε祈祈猫儿з 提交于 2020-01-25 12:28:11
问题 I am struggling to display metadata while using WCF. I have looked all over the place. I'm not sure if it is a setting in my web.config file, or my actual service is not working properly. But I get the "Metadata publishing for this service is currently disabled." page when I debug. <?xml version="1.0"?> <configuration> <system.serviceModel> <bindings> <webHttpBinding> <binding name="myWebHttp"/> </webHttpBinding> </bindings> <behaviors> <serviceBehaviors> <behavior name="EDSCoastmap">

ffmpeg sidedata or metadata per frame

雨燕双飞 提交于 2020-01-25 04:35:06
问题 I'm trying to add either some side data or metadata per frame using the FFMpeg encoding example Here's what I have tried so far: /* encode 1 second of video */ for (i = 0; i < 25; i++) { fflush(stdout); /* make sure the frame data is writable */ ret = av_frame_make_writable(frame); if (ret < 0) exit(1); /* prepare a dummy image */ /* Y */ for (y = 0; y < c->height; y++) { for (x = 0; x < c->width; x++) { frame->data[0][y * frame->linesize[0] + x] = x + y + i * 3; } } /* Cb and Cr */ for (y =