metadata

Subclassing the Django ImageFileField

萝らか妹 提交于 2019-12-04 14:48:09
问题 I'm interested in subclassing django's ImageFileField to allow access to the image IPTC metadata, something like: >>> from myapp.models import SomeModel >>> obj = SomeModel.objects.all()[0] # or what have you >>> obj.image.iptc['keywords'] ('keyword','anotherkeyword','etc') ... the docs say to read over django's internal code, which I did; I've tried to produce a working implementation and I am not sure what I'm doing -- I've defined custom fields before, but I can't come up with boilerplate

Python: What is the most feature-rich library for loading audio metadata from various formats?

筅森魡賤 提交于 2019-12-04 11:20:19
I'm looking for a good, feature-rich, library for reading metadata from various audio formats (MP3, FLAC, OGG, WAV, etc.). I have already looked at Mutagen, but the documentation is nearly nonexistent, and it seems incapable of loading basic information such as artist and audio title. Are the artist and audio title encoded properly? What particular formats is it failing one - often ID3 information is poorly encoded. http://wiki.python.org/moin/UsefulModules#ID3Handling (A List of ID3 modules) I would try ID3Reader , which has support for ID3v1, which Mutagen seems to be missing. see taglib and

removing 'Program Name' in metadata for images [on hold]

时光怂恿深爱的人放手 提交于 2019-12-04 10:53:20
In Windows file properties, it's called 'Program Name' under Origin. In Adobe Bridge, it's called 'Application' under File Properties. I believe it adds the name of the program used to create the file. It cannot be edited/removed in Bridge or Windows. I really don't understand how it gets added because certain images taken from a camera and edited in Lightroom does not add the attribute, and other times it does. One file was edited in Photoshop and tagged Photoshop, but when imported into Lightroom and exported, the attribute said Windows Photo Viewer instead. Bottom line, I want the attribute

How do you configure WCF to support FaultContracts where both the host and client are in the same process using a net.pipe?

笑着哭i 提交于 2019-12-04 10:53:11
I'm trying to create an in-process unit test for my service to client interactions using net.pipe binding. Like a good WCF service it uses FaultContractAttribute on service operations to expose possible faults (wrapped exceptions) to metadata. I would like to have the client and service endpoints configured thru XML (App.config). However, whenever a fault is thrown, it's just a CommunicationException "pipe has closed", and not the typed Fault I was expecting. System.ServiceModel.CommunicationException: There was an error reading from the pipe: The pipe has been ended. (109, 0x6d). I tried

PHP: Read TrueType/OpenType metadata of the font file

末鹿安然 提交于 2019-12-04 08:39:40
How to read the fonts details? For example, fonts contain information like copyright, family name, designer, version, and more in their metadata. I would like also the script to be able to count the amount of glyphs in the file, as well as return what languages the font supports. For example, a typical font could contain western, swedish and romain language support, and have hundreds of glyphs. It should support truetype and opentype font files. Thanks in advance for any help on achieving this! Dutchie432 I know this is an old thread, but there has been some movement on the topic over on this

How do I retrieve the properties of a photo taken on a digital camera using .NET?

北城以北 提交于 2019-12-04 08:39:31
Preferably in VB.Net, but C# is fine, how can I access the extra properties added to a file by my digital camera, like Date Picture Taken , Shutter Speed or Camera Model ? The following article should be helpful. I maintain a library that offers comprehensive support for extracting image metadata from a variety of file formats. https://github.com/drewnoakes/metadata-extractor-dotnet When I built something similar I used this article quite a bit. But basically you're looking for the EXIF data embedded in the image. There are a number of great libraries to extract it for you, if you don't want

Pandas _metadata of DataFrame persistence error

随声附和 提交于 2019-12-04 08:10:00
I have finally figured out how to use _metadata from a DataFrame, everything works except I am unable to persist it such as to hdf5 or json. I know it works because I copy the frame and _metadata attributes copy over "non _metadata" attributes don't. example df = pandas.DataFrame #make up a frame to your liking pandas.DataFrame._metadata = ["testmeta"] df.testmeta = "testmetaval" df.badmeta = "badmetaval" newframe = df.copy() newframe.testmeta -->outputs "testmetaval" newframe.badmeta ---> raises attribute error #json test df.to_json(Path) revivedjsonframe = pandas.io.json.read_json(Path)

Is it possible to store hidden metadata information that is tied to a specific Table or Cell within a Word document?

◇◆丶佛笑我妖孽 提交于 2019-12-04 08:03:13
I am trying to store metadata (basically a unique id) along with each cell of a table in a Word document. Currently, for the add-in I'm developing, I am querying the database, and building a table inside the Word document using the data that is retrieved. I want to be able to save any of the user's edits to the document, and persist it back to the database. My initial thought was to store a unique id along with each cell in the table so that I would be able to tell which records to update. I would also like to store some sort of "isChanged" flag within each cell so that I could tell which

Get metadata from DOI

百般思念 提交于 2019-12-04 07:49:07
问题 A digital object identifier (DOI) is a globally unique string that identifies an electronic document (for example, a PDF of an academic article). It essentially provides a method for creating a permalink to a document (for example, http://dx.doi.org/10.1145/146585.146609). Is there a web service (or any other system) to get the metadata (preferably in BibTeX form) of a document from a given DOI? Edited to add some expository information. 回答1: curl -LH "Accept: text/bibliography; style=bibtex"

How to use generateProviderServiceMetadata() working with passport-saml

╄→гoц情女王★ 提交于 2019-12-04 06:51:22
I have the following issue: I want to generate the SAML-metadata, for my SSO-ServiceProvider, using node.js and the package 'passport-saml'. This package includes the method 'generateServiceProviderMetadata( decryptionCert )' which will generate a service provider metadata document suitable for supplying to an identity provider. this requires an decryptionCert... Which decryptionCert shall I use, i.e. where and how to get it? As far as I understand, I need something like: privateCert: fs.readFileSync('./cert.pem', 'utf-8') where do I get './cert.pem' ? Any advises and hints will be appreciated