Skip to main content

Document provenance/metadata analysis — creator app, editing time, author chain, AI-gen markers

Project description

provenance-analyser

Document provenance signals — the lens-family member that reads a document's metadata (who authored it, how long they spent in it, what app made it, what's been flagged) rather than its content.

document-analyser reads the text; records-analyser reads the data; this one reads the provenance — the same .docx/.pdf/.pptx/.xlsx bytes interpreted as a record of authorship and effort. Generalises image-analyser's C2PA signal (which surfaces AI-gen markers for images) to the document formats. Explicit-only — those extensions continue to auto-route to document/records by default.

The single most cited signal here is Office's TotalTime field — the cumulative editing time in minutes that Word/PowerPoint/Excel track per document. A 50-page paper with 23 minutes of editing time is a story; a 10-page paper with 14 hours is another.

Install

pip install provenance-analyser

Use

Python:

from provenance_analyser import ProvenanceAnalyser

result = ProvenanceAnalyser().analyse("essay.docx")
print(result.creator_app)                  # "Microsoft Office Word"
print(result.total_editing_time_minutes)   # 23
print(result.revision_count)               # 4
print(result.author)                       # "Jane Student"
print(result.last_modified_by)             # "Jane Student"
print(result.flags)                        # ["edit_time_low_for_size"]

CLI:

provenance-analyser essay.docx          # human summary
provenance-analyser essay.pdf --json    # raw JSON
provenance-analyser serve               # HTTP API on port 8014
provenance-analyser manifest            # capability manifest

HTTP (provenance-analyser serve on port 8014):

curl -F file=@essay.docx http://localhost:8014/analyse

Signals

  • Creatorcreator_app (Microsoft Office Word / Google Docs / LibreOffice / Pages / Pandoc / iText), producer (PDF only — the engine that wrote the file).
  • Authorshipauthor, last_modified_by. A mismatch is itself a signal.
  • Timelinecreated, modified. Created-and-modified-within-N-seconds is suspicious.
  • Effort (Office only)total_editing_time_minutes (the cumulative time the doc was open in edit mode), revision_count (number of saves).
  • Size hints (from metadata, not from extraction)page_count, word_count, paragraph_count.
  • AI-gen markers — explicit hints in the creator/producer/title strings (ChatGPT, Claude, LLM, gpt, etc.). Conservative — false negatives expected, false positives rare.
  • Flags — heuristic warnings: edit_time_low_for_size, created_modified_same_minute, author_mismatch, ai_generation_marker, revision_count_zero.

Supported formats

Format Source of metadata
.docx python-docx core_properties + docProps/app.xml (TotalTime, Application, Words)
.pptx python-pptx core_properties + docProps/app.xml
.xlsx openpyxl workbook.properties + docProps/app.xml
.pdf pypdf reader.metadata (Creator, Producer, CreationDate, ModDate, Author)

For images, use image-analyser directly — it already covers EXIF, IPTC, XMP, and C2PA. This member is for office documents and PDFs.

The family

Part of the lens analyser family.

What you want Use
The document's text document-analyser
The document's provenance provenance-analyser (this)
An image's metadata (EXIF / C2PA) image-analyser
Any file → right engine auto-analyser

Triangulation

The interesting signal is rarely one number alone. A polished essay (document-analyser: high readability) + 18 minutes total editing time (provenance-analyser) + an AI chat with low critical-thinking (conversation-analyser) tells a different story than the same essay with 14 hours of editing time. Each member is one input; you compose them.

Limits

  • TotalTime is set by the authoring app — closed Office stops counting; idle time in an open doc still counts. It's a strong relative signal across student submissions, not an absolute clock.
  • PDFs converted from another format (Word → PDF) keep the converter's metadata, not the original author's; this is correct behaviour but worth knowing.
  • AI-generation markers are conservative — explicit creator-string matches only. Absence is not evidence of human authorship.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

provenance_analyser-0.1.0.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

provenance_analyser-0.1.0-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

Details for the file provenance_analyser-0.1.0.tar.gz.

File metadata

  • Download URL: provenance_analyser-0.1.0.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for provenance_analyser-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4c742b604d39da26f5dc4677026465b99520a12d7fb41b28db6e144c061b0236
MD5 0d0202fbaa5d4303fdba36871775a681
BLAKE2b-256 b59b8d855e2aef684f4fe5085395f798d7ccc28895b0ec63b4e0269d9df60531

See more details on using hashes here.

File details

Details for the file provenance_analyser-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for provenance_analyser-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0197275e468d050eb80f98090557d2285287f1b2fff871a74ad4eae8cae27cd9
MD5 a105eb9463975c01aa2b3c25892f7f3c
BLAKE2b-256 1722f2a350474ee166068ac6ff72aa5d672ba2b09f56c913d9de917f9d9ade91

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page