Обсуждение: pull raw text of a message by message-id
We currently have a (really handy) facility to pull a message from the archives by message-ID, eg: http://archives.postgresql.org/message-id/603c8f070905202040v66cd3054t434c0b73aa844c63@mail.gmail.com Could we possibly get a similar type of link that pulls the raw contents of the message, without any HTML markup? This would be useful when (for example) a message contains a patch that is included inline rather than as an attachment, and would also be useful for tool-building (e.g. given a message-ID, download the patch and attempt to apply it to my local working copy). ...Robert
Robert Haas <robertmhaas@gmail.com> writes: > We currently have a (really handy) facility to pull a message from the > archives by message-ID, eg: > http://archives.postgresql.org/message-id/603c8f070905202040v66cd3054t434c0b73aa844c63@mail.gmail.com > Could we possibly get a similar type of link that pulls the raw > contents of the message, without any HTML markup? +1, but this would be better brought up on pgsql-www. regards, tom lane
Tom Lane escribió: > Robert Haas <robertmhaas@gmail.com> writes: > > We currently have a (really handy) facility to pull a message from the > > archives by message-ID, eg: > > > http://archives.postgresql.org/message-id/603c8f070905202040v66cd3054t434c0b73aa844c63@mail.gmail.com > > > Could we possibly get a similar type of link that pulls the raw > > contents of the message, without any HTML markup? > > +1, but this would be better brought up on pgsql-www. I've been playing with this a bit and I've set up an experimental script. Please give it a try and let me know how it goes. http://archives.postgresql.org/msgtxt.php?id=MESSAGE-ID For example, this message is at: http://archives.postgresql.org/msgtxt.php?id=8797.1242906435@sss.pgh.pa.us The archives are now regenerating, which will take a couple of hours, to add a "text/plain" link at the right of the Message-Id line on the headers that will take you to this unadorned text copy. Note that I haven't set up an automatic run of the script that creates the text/plain copies yet, so this will only work for messages on pgsql-hackers that were posted before now. I'll work on that later. Keep in mind that this is all experimental, so don't be surprised if things break horribly (but report them back). -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.
On Sun, May 24, 2009 at 11:34 AM, Alvaro Herrera <alvherre@commandprompt.com> wrote: > Tom Lane escribió: >> Robert Haas <robertmhaas@gmail.com> writes: >> > We currently have a (really handy) facility to pull a message from the >> > archives by message-ID, eg: >> >> > http://archives.postgresql.org/message-id/603c8f070905202040v66cd3054t434c0b73aa844c63@mail.gmail.com >> >> > Could we possibly get a similar type of link that pulls the raw >> > contents of the message, without any HTML markup? >> >> +1, but this would be better brought up on pgsql-www. > > I've been playing with this a bit and I've set up an experimental script. > Please give it a try and let me know how it goes. > http://archives.postgresql.org/msgtxt.php?id=MESSAGE-ID > > For example, this message is at: > http://archives.postgresql.org/msgtxt.php?id=8797.1242906435@sss.pgh.pa.us > > The archives are now regenerating, which will take a couple of hours, to add > a "text/plain" link at the right of the Message-Id line on the headers that > will take you to this unadorned text copy. > > Note that I haven't set up an automatic run of the script that creates the > text/plain copies yet, so this will only work for messages on pgsql-hackers > that were posted before now. I'll work on that later. > > Keep in mind that this is all experimental, so don't be surprised if things > break horribly (but report them back). Oh, this is awesome. It would be handy to include a link on the HTML version of the page for when people are trying to pull down a patch that someone has foolishly included in the body of the email rather than attaching it. This will also be of great assistance in writing commitfest management tools (on which point, I'm working on getting the stuff I finished during PGcon up so people can criticize it :-) but I haven't quite gotten there yet). ...Robert
Robert Haas escribió: > Oh, this is awesome. It would be handy to include a link on the HTML > version of the page for when people are trying to pull down a patch > that someone has foolishly included in the body of the email rather > than attaching it. There already is one :-) Look at the headers -- after the Message-Id there is a link which says "text/plain". -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Alvaro Herrera <alvherre@commandprompt.com> writes: > There already is one :-) Look at the headers -- after the Message-Id there is > a link which says "text/plain". On the couple of messages I tried this on, that link leads to a page saying "not found" :-( regards, tom lane
Tom Lane escribió: > Alvaro Herrera <alvherre@commandprompt.com> writes: > > There already is one :-) Look at the headers -- after the Message-Id there is > > a link which says "text/plain". > > On the couple of messages I tried this on, that link leads to a page > saying "not found" :-( Probably you tried messages that hadn't been indexed. I had only generated pgsql-hackers, and even then not the most recent ones; but I just added the generation step to the script that runs every 10 minutes, so all recent messages should be indexed on all lists. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Andrew Dunstan <andrew@dunslane.net> writes: > Tom Lane wrote: >> On the couple of messages I tried this on, that link leads to a page >> saying "not found" :-( > Really? I just tried 4 pages picked at random off the -hackers list > <http://archives.postgresql.org/pgsql-hackers/2009-05/index.php> and all > the "text/plain" links worked as expected. I retried the messages I looked at before, and they work now, so I guess the update script hadn't finished? regards, tom lane
Tom Lane wrote: > Alvaro Herrera <alvherre@commandprompt.com> writes: > >> There already is one :-) Look at the headers -- after the Message-Id there is >> a link which says "text/plain". >> > > On the couple of messages I tried this on, that link leads to a page > saying "not found" :-( > > > Really? I just tried 4 pages picked at random off the -hackers list <http://archives.postgresql.org/pgsql-hackers/2009-05/index.php> and all the "text/plain" links worked as expected. I even went back to something in 2000 and it still worked. cheers andrew
Alvaro Herrera wrote: > Robert Haas escribi?: > > > Oh, this is awesome. It would be handy to include a link on the HTML > > version of the page for when people are trying to pull down a patch > > that someone has foolishly included in the body of the email rather > > than attaching it. > > There already is one :-) Look at the headers -- after the Message-Id there is > a link which says "text/plain". I don't see a text/plain option on this page: http://archives.postgresql.org/pgsql-hackers/2009-05/msg00466.php Why? -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. +
Bruce Momjian escribió: > Alvaro Herrera wrote: > > Robert Haas escribi?: > > > > > Oh, this is awesome. It would be handy to include a link on the HTML > > > version of the page for when people are trying to pull down a patch > > > that someone has foolishly included in the body of the email rather > > > than attaching it. > > > > There already is one :-) Look at the headers -- after the Message-Id there is > > a link which says "text/plain". > > I don't see a text/plain option on this page: > > http://archives.postgresql.org/pgsql-hackers/2009-05/msg00466.php > > Why? Argh. I think this whole thing died when I fixed the bug about message-id links in the message body being mangled reported by Tom, some days ago. The Message-id links are now being generated internally by Mhonarc instead of your script ... I don't think it's difficult to fix this problem but I don't have time to do it right now :-( (Maybe it's time I bit the bullet and stopped kludging the Mhonarc install all over the place and instead spent some time on the new archives code ...) -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.
On Thu, Jun 4, 2009 at 5:53 PM, Alvaro Herrera<alvherre@commandprompt.com> wrote: > Bruce Momjian escribió: >> Alvaro Herrera wrote: >> > Robert Haas escribi?: >> > >> > > Oh, this is awesome. It would be handy to include a link on the HTML >> > > version of the page for when people are trying to pull down a patch >> > > that someone has foolishly included in the body of the email rather >> > > than attaching it. >> > >> > There already is one :-) Look at the headers -- after the Message-Id there is >> > a link which says "text/plain". >> >> I don't see a text/plain option on this page: >> >> http://archives.postgresql.org/pgsql-hackers/2009-05/msg00466.php >> >> Why? > > Argh. I think this whole thing died when I fixed the bug about > message-id links in the message body being mangled reported by Tom, some > days ago. The Message-id links are now being generated internally by > Mhonarc instead of your script ... > > I don't think it's difficult to fix this problem but I don't have time > to do it right now :-( > > (Maybe it's time I bit the bullet and stopped kludging the Mhonarc > install all over the place and instead spent some time on the new > archives code ...) I see that this has been fixed, but should I count on it staying fixed? My original motivation for asking for it was to integrate it into the CommitFest management tool I've been hacking on (http://coridan.postgresql.org/), but I probably don't want to do that if it's apt to break frequently. One suggestion: Could you make it return a 404 error if the message ID is unknown, rather than 200 OK and a body of "not found"? ...Robert