Skip to main content

metawarc (pronounced me-ta-warc) is a command line WARC files processing tools. Its goal is to make CLI interaction with files inside WARC archives so easy as possible. It provides a simple metawarc command that allows to extract metadata from images, documents and other files inside WARC archives.

1 Main features

  • Built-in WARC support

  • Metadata extraction for a lot of file formats

  • Low memory footprint

  • Documentation

  • Test coverage

2 File formats supported

MS Office OLE: .doc, .xls, .ppt

MS Office XML: .docx, .xlsx, .pptx

Adobe PDF: .pdf

Images: .png, .jpg, .tiff, .jpeg, .jp2

3 Installation

3.1 Any OS

A universal installation method (that works on Windows, Mac OS X, Linux, …, and always provides the latest version) is to use pip:

# Make sure we have an up-to-date version of pip and setuptools:
$ pip install --upgrade pip setuptools

$ pip install --upgrade metawarc

(If pip installation fails for some reason, you can try easy_install metawarc as a fallback.)

3.2 Python version

Python version 3.6 or greater is required.

4 Usage

Synopsis:

$ metawarc [command] [flags]  inputfile

See also metawarc --help and metawarc [command] --help for help for each command.

4.1 Examples

Extract metadata of all supported file types from ‘digital.gov.ru.warc.gz’ and output results to default filename ‘metadata.jsonl’:

$ metawarc metadata digital.gov.ru.warc.gz

Extract metadata for .doc and .docx file types from ‘digital.gov.ru.warc.gz’ and output results to default filename ‘metadata.jsonl’:

$ metawarc metadata --filetypes doc,docx digital.gov.ru.warc.gz

Extract metadata for .doc and .docx file types from ‘digital.gov.ru.warc.gz’ and output results to filename ‘digital_meta.jsonl’:

$ metawarc metadata --filetypes doc,docx --output digital_meta.jsonl digital.gov.ru.warc.gz

5 Commands

5.1 Metadata command

Extracts metadata from files inside .warc files. Returns JSON lines output for each file found.

Extract metadata for .doc and .docx file types from ‘digital.gov.ru.warc.gz’ and output results to filename ‘digital_meta.jsonl’:

$ metawarc metadata --filetypes doc,docx --output digital_meta.jsonl digital.gov.ru.warc.gz

5.2 Analyze command

Returns list of mime mimetypes with stats as number of files and total files size for each mime type

Analyzes ‘digital.gov.ru.warc.gz’ and output results of list of mime types as table to console

$ metawarc analyze digital.gov.ru.warc.gz

Download files

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

Source Distribution

metawarc-1.0.2.tar.gz (7.4 kB view details)

Uploaded Source

File details

Details for the file metawarc-1.0.2.tar.gz.

File metadata

  • Download URL: metawarc-1.0.2.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.4

File hashes

Hashes for metawarc-1.0.2.tar.gz
Algorithm Hash digest
SHA256 7941013d80265aaab9898d37cea25c43af326b018be1c7a7b488e464866f62a2
MD5 707c02207d3a9d1d95645f6415e4d18d
BLAKE2b-256 a7f811442e78eabd794e7c5f196d0fba43569455769158ef0b69a066f93c328d

See more details on using hashes here.

Release history Release notifications | RSS feed

2.0.1

2 files

2.0.0

2 files

1.3.1

2 files

1.1.1

1 file

This release

1.0.2 This release

1 file

1.0.1

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page