{"id":13838303,"url":"https://github.com/jvns/dig-pretty","last_synced_at":"2025-03-15T16:31:45.743Z","repository":{"id":184876398,"uuid":"672613354","full_name":"jvns/dig-pretty","owner":"jvns","description":null,"archived":false,"fork":false,"pushed_at":"2023-07-31T14:33:29.000Z","size":10,"stargazers_count":81,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-27T03:46:48.450Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jvns.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-07-30T17:13:37.000Z","updated_at":"2024-08-17T06:38:29.000Z","dependencies_parsed_at":"2024-10-26T21:59:21.527Z","dependency_job_id":"a7d13e31-b058-4100-b16c-f66e211f8154","html_url":"https://github.com/jvns/dig-pretty","commit_stats":null,"previous_names":["jvns/dig-pretty"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvns%2Fdig-pretty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvns%2Fdig-pretty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvns%2Fdig-pretty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvns%2Fdig-pretty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jvns","download_url":"https://codeload.github.com/jvns/dig-pretty/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243760183,"owners_count":20343622,"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":[],"created_at":"2024-08-04T15:01:49.515Z","updated_at":"2025-03-15T16:31:45.413Z","avatar_url":"https://github.com/jvns.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# dig-pretty\n\nMake `dig`'s output prettier. A very basic Python script that reformats the\nYAML output of dig into a more human-readable format. Requires a relatively new\nversion of `dig` (new enough to support the `+yaml` option).\n\nMostly intended as a proof of concept to show that `dig` could have a more\nhuman-friendly output format, because I don't know enough C to try to\ncontribute a different output format to `dig`.\n\n## installation\n\nYou'll need Python 3 and `pyyaml` installed.\n\n```\npip install pyyaml\n```\n\nThen put it in your PATH somewhere\n\n## usage\n\nYou can pass any argument to it that `dig` supports. It'll just pass all the options through.\n\n```\ndig-pretty example.com\ndig-pretty +norecurse example.com\ndig-pretty @8.8.8.8 example.com\n```\n\n## example output\n\n\n```\n$ dig-pretty example.com\nReceived response from 192.168.1.1:53 (UDP), 56 bytes in 12ms\nHEADER:\n  status: NOERROR\n  opcode: QUERY\n  id: 61335\n  flags: qr rd ra\n  records: QUESTION: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1\n\nOPT PSEUDOSECTION:\n  EDNS: version: 0, flags: None, udp: 4096\n\nQUESTION SECTION:\n  example.com.\tIN\tA\n\nANSWER SECTION:\n  example.com.\t81459\tIN\tA\t93.184.216.34\n```\n\nCompare this to the `dig` output for the same query:\n\n```\n$ dig example.com\n; \u003c\u003c\u003e\u003e DiG 9.10.6 \u003c\u003c\u003e\u003e +all example.com\n;; global options: +cmd\n;; Got answer:\n;; -\u003e\u003eHEADER\u003c\u003c- opcode: QUERY, status: NOERROR, id: 5151\n;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1\n\n;; OPT PSEUDOSECTION:\n; EDNS: version: 0, flags:; udp: 1232\n;; QUESTION SECTION:\n;example.com.\t\tIN\tA\n\n;; ANSWER SECTION:\nexample.com.\t\t83385\tA\t93.184.216.34\n\n;; Query time: 57 msec\n;; SERVER: 192.168.1.1#53(192.168.1.1)\n;; WHEN: Sun Jul 30 14:22:44 EDT 2023\n;; MSG SIZE  rcvd: 56\n```\n\n(`dig-pretty` leaves out the query timing information and message size because\nI've never used that information and it's not part of the DNS record itself)\n\n## why not `dog`?\n\nThe goal of `dig-pretty` is show that you can have the power of `dig` (all of\nthe same options, and all of the same details in the output), but clearer\nformatting.\n\nTools like [dog](https://github.com/ogham/dog) or\n[doggo](https://github.com/mr-karan/doggo) are great but they don't support all\nthe options `dig` does, like `+norecurse`.\n\nI think older tools like `dig` deserve nice formatting too :)\n\n## contributing\n\nI don't necessarily plan to maintain this long term or add a lot of features but bug fixes are welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjvns%2Fdig-pretty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjvns%2Fdig-pretty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjvns%2Fdig-pretty/lists"}