emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Kitchin <jkitchin@andrew.cmu.edu>
To: Grant Rettke <gcr@wisdomandwonder.com>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Source code to check URLs in an org mode document?
Date: Sat, 5 Apr 2014 09:50:48 -0400	[thread overview]
Message-ID: <CAJ51ETrYxkU38PtYqTU6F53Qp6oRLFpsoesTGm7EGxd_US_sTw@mail.gmail.com> (raw)
In-Reply-To: <CAAjq1mdv1H+4f0mm-1XJPegKOECK4Q-TDRWO+yhJ7kUwNnWjAA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1418 bytes --]

You can parse the buffer, and run some code on all of the links. I did
something like this here
http://kitchingroup.cheme.cmu.edu/blog/2013/09/28/Changing-links-to-files-so-they-work-in-a-blog/for
another reason. You could adapt that to do your link validation. I
guess you will need to send a request to the url to see if it is valid.

John

-----------------------------------
John Kitchin
Associate Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu



On Fri, Apr 4, 2014 at 10:23 PM, Grant Rettke <gcr@wisdomandwonder.com>wrote:

> Hi,
>
> One of my documents has ~200 HTML links in the footnotes.
>
> Wondering how folks check the links?
>
> My goal is that:
> 1. Each footnote with a URL is evaluated
> 2. They are evaluated to determine whether the URL is valid
> 3. Check whether or not the page exists
> 4. Add some indicate in the footnote that it was found not to be up on
> some date.
>
> This might require some custom coding, no?
>
> Regards,
>
> Grant Rettke | AAAS, ACM, AMA, COG, FSF, IEEE, Sigma Xi
> grettke@acm.org | http://www.wisdomandwonder.com/
> “Wisdom begins in wonder.” --Socrates
> ((λ (x) (x x)) (λ (x) (x x)))
> “Life has become immeasurably better since I have been forced to stop
> taking it seriously.” --Thompson
>
>

[-- Attachment #2: Type: text/html, Size: 2100 bytes --]

      reply	other threads:[~2014-04-05 13:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-05  2:23 Source code to check URLs in an org mode document? Grant Rettke
2014-04-05 13:50 ` John Kitchin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJ51ETrYxkU38PtYqTU6F53Qp6oRLFpsoesTGm7EGxd_US_sTw@mail.gmail.com \
    --to=jkitchin@andrew.cmu.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=gcr@wisdomandwonder.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).