From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/26120 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Staal Newsgroups: gmane.text.pandoc Subject: Re: pandoc as a linkchecker? Date: Sat, 12 Sep 2020 15:38:02 -0400 Message-ID: <39aaa3fd-e0c8-4580-761b-607d6e9311f9@usa.net> References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32945"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCGYLPE23UARBG6H6T5AKGQESCQD5HQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sat Sep 12 21:38:06 2020 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-qt1-f185.google.com ([209.85.160.185]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kHBLa-0008Ug-NK for gtp-pandoc-discuss@m.gmane-mx.org; Sat, 12 Sep 2020 21:38:06 +0200 Original-Received: by mail-qt1-f185.google.com with SMTP id a14sf9057261qtp.15 for ; Sat, 12 Sep 2020 12:38:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1599939485; cv=pass; d=google.com; s=arc-20160816; b=v5NZJoCvJuhOaUEHbH+HUJivwxIGsEC8GJWTq0tAfeYIGKx5yy+3imikkMSRnQlHn7 BwIWRu2oOyn2jRqQPK7R+Ju/R4xKxLF7UFVhwO+0WTov8uRTK2phm7XsAO73EIfzeWZw 5c3SgiYo09nX5Z8HUJi87fcwojk58yoxmU1+UsANtK52kdEwqRepDwWjOkEr9HuzsIjo ijGjukukI6IlILlcD5jE6PtSjmXR6vMjAF9X/UvNpXCfrawjzYQrA1vvMlTPAnjG5EBV FI2jwPFgLIZBfT0omfOJkziHYsXk5ImVLvkYVSPWd6tFQX/+/eA54PwWs8Y/ByEus+Fw Gs+g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject:sender:dkim-signature; bh=0/yndZnB3n5MLYmTTZ170eRz6sbLFc9pB1itCILQql8=; b=DvEigsSD2von/cZ4VcgGnXN5DUpd2UaHzVruhX/QA2tOKlQ83fKLw1Ba6PpvoBvxWb T3eRmFStsq4yBmQ6Wil67j0CjFDT0rRHzkjtKW52rS8OowXa+9GBFkPmC/c7eT2qPfq7 Px8qnxZ1GxkTk2GUOIIEzxkBzLChLzNoIPP2YqwhnVKVKRU+NeKps941dFmLBYHZGvYj H2zuQjxnXR0520vBoADpcmtqZZSQHPBeiDc/ywyBcS+zHtg8/6dybijsnPqdlNUqQ3Ok bcGAwMXPSS3dZluKoT8Z7RsCoLRmBILno8lJiIcVvuXN5125BvPJKQhPnItjAjLSDJoQ /Sfg== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 71.191.170.84 is neither permitted nor denied by domain of dstaal-Jdbf3xiKgS8@public.gmane.org) smtp.mailfrom=DStaal-Jdbf3xiKgS8@public.gmane.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=usa.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=0/yndZnB3n5MLYmTTZ170eRz6sbLFc9pB1itCILQql8=; b=hlpgGyArQw2MeD5nwFomc8FQ7Ixfe6/B1NmAQ/7GP6FfRSONT+mJUuzkxABdcQ6FEv LwUlB4bQd6p8QsnJmvrqdm9miJewSKM37RC3ZbOpSptE7hS/be5P3Wslf13uIu9+8w1w BoifpZknBIENPLa6rZGLVDnml0x81ICm785C4WLYyy/ogAXapSizPwQSukmCgFl90M8N Z/bkLDpmGWZb2vLtvh4ul5chVeZpT98m7tCGA/xu3avpOrPYZJC8MQR8FiwN+xSqnws7 0wWFvMtKmbRGEewpzkjbFu3edIBOT69RoWu3VxTi8O3TbvR7gn/DXZtwjOGWsm9F9Orp 5L4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=0/yndZnB3n5MLYmTTZ170eRz6sbLFc9pB1itCILQql8=; b=eQkTljECRWKQfmYQZjfhJZIts7A2ipxsiViL3KsS3gg8Ou5yuc/CYus+CPDTuvw5L0 Prtxlx9RBzFfC3qKltz6P9oij1B5XXZ6PFJF2LBSPYkjdt8hwmjVV4+WJ1PXWhCnOFPA ZadX/o+Cr64g+tfL+NEV/ul3ZyhsbC4kyr4oZApGGQM1wGVz6aSgBqQ6owk2c0vOcB/m 70Yo81t75ay61twk1SuoHfe8NcgXsDqiIy/0zJPjD4MEzkxW/3JSP3T3cTVv+km8WcHk FacK2ezJGKN8Zmjhuq7z2AEeTmayzWhEEqmcyFekv4GixWSIwQN9LujcU8ZdGqycdybF Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM532s9Vt04EGJ85pzsThhdpsAYF3H0dto+OvyM9VjvCV5dBbexZIT A7xWnJzJrQPM6bOdnJJuE+8= X-Google-Smtp-Source: ABdhPJx6POk7f1C5cK+FtUJpCFxmBY3LlHKDMzi5lTLtRuG5xbCi3a4LP7jt/So4zgxjdejXwwzuDA== X-Received: by 2002:ac8:37b5:: with SMTP id d50mr7427842qtc.228.1599939485816; Sat, 12 Sep 2020 12:38:05 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a0c:a446:: with SMTP id w64ls1372879qvw.7.gmail; Sat, 12 Sep 2020 12:38:03 -0700 (PDT) X-Received: by 2002:a05:6214:805:: with SMTP id df5mr7503161qvb.78.1599939483169; Sat, 12 Sep 2020 12:38:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599939483; cv=none; d=google.com; s=arc-20160816; b=ByeWC1wf/mQBUTSd8Xp11q1Nk5fNgKJCn6HzBW7y/ouQfp0tNgNrYDXf/Cb60u235g zLe6x6GEDzLkMgaN9PZQjN0VBb1oDsvg0KztdtwnEFcO/MgqAcNKJf078/rxNQDa4fyq X0gkkPs9XIgtsQP6oYmUGF0IlX9ufzhoEmEWno5FVyf540OLDi5u6dK4g4z68iaA7nTr HU1FBd6NkpSD3o+4mZrYMfMPa6ZieTxwm4sD/M4/0HnVGyvomOMPL/3YRddcYZqyiso7 Q+On7afut/Avffyhl1mXoOeHYxVUwUu8wpwk5RbagrNqF5SkZSwv6b2+IKZBvUOM/ksQ eK1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject; bh=MId9OlYKwAiir9nHRWkbP2Slym/sCtH0bNyaVM1kTtk=; b=d7kk0NB2xU2wNNNFLKqIV/U/f8Ulu4lfW4WgnrF5scFWLGFFnH3NP/7psd+AdBqjbb EStvB1nGr39SKmfi2N+2wcpPelHovJw/aURldfW0wTP8BIvA9bvSmrwzCx0OnJkyihyd aAHQr3uyDAaIgncp/CLxLK/yJto7ZEhornEMyRzOzD3rBC+w9FqxZ1l2gO8N7oIcGJ69 c6hBA0NFAZphNnIx0sB6aq6378tOQ7wgRjMtgqkyrvqQpxBLGCfvXEiLJ5fp2pNIRfAR gh5TlLPpZsfJLuDdN7x/KnFPk81ZKnx4ZpJVQk+wFLrNPRLt31vZGwC2Aof66dk+q9d9 gnxw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 71.191.170.84 is neither permitted nor denied by domain of dstaal-Jdbf3xiKgS8@public.gmane.org) smtp.mailfrom=DStaal-Jdbf3xiKgS8@public.gmane.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=usa.net Original-Received: from mail.magehandbook.com (static-71-191-170-84.washdc.fios.verizon.net. [71.191.170.84]) by gmr-mx.google.com with ESMTP id a189si386878qke.3.2020.09.12.12.38.03 for ; Sat, 12 Sep 2020 12:38:03 -0700 (PDT) Received-SPF: neutral (google.com: 71.191.170.84 is neither permitted nor denied by domain of dstaal-Jdbf3xiKgS8@public.gmane.org) client-ip=71.191.170.84; Original-Received: from MacBook-Pro.lan (unknown [192.168.1.84]) by mail.magehandbook.com (Postfix) with ESMTP id 4BpjZy6MyszhS for ; Sat, 12 Sep 2020 15:38:02 -0400 (EDT) In-Reply-To: Content-Language: en-US X-Original-Sender: DStaal-Jdbf3xiKgS8@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 71.191.170.84 is neither permitted nor denied by domain of dstaal-Jdbf3xiKgS8@public.gmane.org) smtp.mailfrom=DStaal-Jdbf3xiKgS8@public.gmane.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=usa.net Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:26120 Archived-At: On 9/12/20 3:12 PM, Joseph Reagle wrote: > Pandoc already chases links for `self-contained`, so I suspect this wouldn't be hard. Bonus: could it report the line of a markdown file where a broken link is? I suspect the problem would be with Pandoc's definition of 'line' and 'file'. Pandoc like many unix tools only really appears to read files as a convenience to the user - it's really reading streams of lines. You can pass it multiple files, and it just treats them all as one big stream of lines. So I suspect Pandoc has no real idea of line numbers or files when working on things - it just knows that it saw an error in the current line being read. (As a further complication: If you're reading markdown or similar, what is a 'line'? Do you mean anything that ends with a newline, or do you mean any contiguous block of text that could be written as one line? That is: Does wrapping the text alter the number of lines in the file?) Daniel T. Staal -- --------------------------------------------------------------- This email copyright the author. Unless otherwise noted, you are expressly allowed to retransmit, quote, or otherwise use the contents for non-commercial purposes. This copyright will expire 5 years after the author's death, or in 30 years, whichever is longer, unless such a period is in excess of local copyright law. ---------------------------------------------------------------