{"id":13762587,"url":"https://github.com/chfoo/warcat","last_synced_at":"2025-04-12T09:28:13.333Z","repository":{"id":48002252,"uuid":"9325786","full_name":"chfoo/warcat","owner":"chfoo","description":"Tool and library for handling Web ARChive (WARC) files.","archived":false,"fork":false,"pushed_at":"2024-10-11T09:28:20.000Z","size":110,"stargazers_count":156,"open_issues_count":15,"forks_count":20,"subscribers_count":10,"default_branch":"develop","last_synced_at":"2025-04-03T11:08:55.315Z","etag":null,"topics":["python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chfoo.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"COPYING.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-04-09T16:23:47.000Z","updated_at":"2025-03-07T22:15:00.000Z","dependencies_parsed_at":"2024-11-16T21:30:39.552Z","dependency_job_id":"8aa8ee1c-6ffb-4974-b0e4-2120ecb50826","html_url":"https://github.com/chfoo/warcat","commit_stats":{"total_commits":71,"total_committers":4,"mean_commits":17.75,"dds":0.05633802816901412,"last_synced_commit":"f1abeaf0bea317fb320d90352e2006c80b863a8a"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chfoo%2Fwarcat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chfoo%2Fwarcat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chfoo%2Fwarcat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chfoo%2Fwarcat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chfoo","download_url":"https://codeload.github.com/chfoo/warcat/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248545592,"owners_count":21122168,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python"],"created_at":"2024-08-03T14:00:49.232Z","updated_at":"2025-04-12T09:28:13.270Z","avatar_url":"https://github.com/chfoo.png","language":"Python","readme":"WARCAT: Web ARChive (WARC) Archiving Tool\n=========================================\n\nTool and library for handling Web ARChive (WARC) files.\n\n2024-10-11: Please have a look at a new project `warcat-rs \u003chttps://github.com/chfoo/warcat-rs\u003e`_. It is written in Rust, peforms faster and more correctly, and is designed to work with other programs using JSON. Missing features and bugs mentioned here will also be addressed in the new project soon.\n\nQuick Start\n===========\n\nRequirements:\n\n* Python 3\n\nInstall stable version::\n\n    pip-3 install warcat\n\nOr install latest version::\n\n    git clone git://github.com/chfoo/warcat.git\n    pip-3 install -r requirements.txt\n    python3 setup.py install\n\n\nExample Run::\n\n    python3 -m warcat --help\n    python3 -m warcat list example/at.warc.gz\n    python3 -m warcat verify megawarc.warc.gz --progress\n    python3 -m warcat extract megawarc.warc.gz --output-dir /tmp/megawarc/ --progress\n\n\nSupported commands\n++++++++++++++++++\n\nconcat\n    Naively join archives into one\nextract\n    Extract files from archive\nhelp\n    List commands available\nlist\n    List contents of archive\npass\n    Load archive and write it back out\nsplit\n    Split archives into individual records\nverify\n    Verify digest and validate conformance\n\n\nLibrary\n+++++++\n\nExample:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e import warcat.model\n    \u003e\u003e\u003e warc = warcat.model.WARC()\n    \u003e\u003e\u003e warc.load('example/at.warc.gz')\n    \u003e\u003e\u003e len(warc.records)\n    8\n    \u003e\u003e\u003e record = warc.records[0]\n    \u003e\u003e\u003e record.warc_type\n    'warcinfo'\n    \u003e\u003e\u003e record.content_length\n    233\n    \u003e\u003e\u003e record.header.version\n    '1.0'\n    \u003e\u003e\u003e record.header.fields.list()\n    [('WARC-Type', 'warcinfo'), ('Content-Type', 'application/warc-fields'), ('WARC-Date', '2013-04-09T00:11:14Z'), ('WARC-Record-ID', '\u003curn:uuid:972777d2-4177-4c63-9fde-3877dacc174e\u003e'), ('WARC-Filename', 'at.warc.gz'), ('WARC-Block-Digest', 'sha1:3C6SPSGP5QN2HNHKPTLYDHDPFYKYAOIX'), ('Content-Length', '233')]\n    \u003e\u003e\u003e record.header.fields['content-type']\n    'application/warc-fields'\n    \u003e\u003e\u003e record.content_block.fields.list()\n    [('software', 'Wget/1.13.4-2608 (linux-gnu)'), ('format', 'WARC File Format 1.0'), ('conformsTo', 'http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf'), ('robots', 'classic'), ('wget-arguments', '\"http://www.archiveteam.org/\" \"--warc-file=at\" ')]\n    \u003e\u003e\u003e record.content_block.fields['software']\n    'Wget/1.13.4-2608 (linux-gnu)'\n    \u003e\u003e\u003e record.content_block.payload.length\n    0\n    \u003e\u003e\u003e bytes(warc)[:60]\n    b'WARC/1.0\\r\\nWARC-Type: warcinfo\\r\\nContent-Type: application/war'\n    \u003e\u003e\u003e bytes(record.content_block.fields)[:60]\n    b'software: Wget/1.13.4-2608 (linux-gnu)\\r\\nformat: WARC File Fo'\n\n\n.. note::\n\n    The library may not be entirely thread-safe yet.\n\n\nAbout\n=====\n\nThe goal of the Warcat project is to create a tool and library as easy and fast as manipulating any other archive such as tar and zip archives.\n\nWarcat is designed to handle large, gzip-ed files by partially extracting them as needed.\n\nWarcat is provided without warranty and cannot guarantee the safety of your files. Remember to make backups and test them!\n\n\n* Homepage: https://github.com/chfoo/warcat\n* Documentation: http://warcat.readthedocs.org/\n* Questions?: https://answers.launchpad.net/warcat\n* Bugs?: https://github.com/chfoo/warcat/issues\n* PyPI: https://pypi.python.org/pypi/Warcat/\n* Chat: irc://irc.efnet.org/archiveteam-bs (I'll be on #archiveteam-bs on EFnet) \n\n\nSpecification\n+++++++++++++\n\nThis implementation is based loosely on draft ISO 28500 papers ``WARC_ISO_28500_version1_latestdraft.pdf`` and ``warc_ISO_DIS_28500.pdf`` which can be found at http://bibnum.bnf.fr/WARC/ .\n\n\nFile format\n+++++++++++\n\nHere's a quick description:\n\nA WARC file contains one or more Records concatenated together. Each Record contains Named Fields, newline, a Content Block, newline, and newline. A Content Block may be two types: {binary data} or {Named Fields, newline, and binary data}. Named Fields consists of string, colon, string, and newline.\n\nA Record may be compressed with gzip. Filenames ending with ``.warc.gz`` indicate one or more gzip compressed files concatenated together.\n\n\nAlternatives\n++++++++++++\n\nWarcat is inspired by\n\n* https://github.com/internetarchive/warc\n* http://code.hanzoarchives.com/warc-tools\n\n\nDevelopment\n===========\n\n.. image:: https://travis-ci.org/chfoo/warcat.png\n    :target: https://travis-ci.org/chfoo/warcat\n    :alt: Travis build status\n\n\nTesting\n+++++++\n\nAlways remember to test. Continue testing::\n\n    python3 -m unittest discover -p '*_test.py'\n    nosetests3\n\n\nTo-do\n+++++\n\n* Smart archive join\n* Regex filtering of records\n* Generate index to disk (eg, for fast resume)\n* Grab files like wget and archive them\n* See TODO and FIXME markers in code\n* etc.\n\n","funding_links":[],"categories":["Tools \u0026 Software","[](#table-of-contents) Table of contents","File conversion"],"sub_categories":["WARC I/O Libraries","[](#warc)Tools for working with WARC (WebARChive) files","Download automation"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchfoo%2Fwarcat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchfoo%2Fwarcat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchfoo%2Fwarcat/lists"}