master
Dave Winer 9 years ago
parent d54f42ca90
commit a655339911

@ -90,7 +90,17 @@ There will always be more work to do here. ;-)
##### v0.61 6/24/15 by DW
Files with the extension .opml are now be rendered as outlines. There's a template for outlines, it uses the new outlineBrowser toolkit. If you want the raw OPML text from the server, add an Accept header with the value: text/x-opml, following a convention established by the OPML Editor. Here's an <a href="http://montauk.scripting.com/test.opml">example</a> of an OPML file rendered through the new template.
Files with the extension .opml are now rendered as outlines.
There's a <a href="http://fargo.io/code/pagepark/defaultopmltemplate.txt">template</a> for outlines, it uses the new <a href="https://github.com/scripting/outlineBrowser">outlineBrowser</a> toolkit. Here's an <a href="http://montauk.scripting.com/test.opml">example</a> of an OPML file rendered through the new template.
If you want the raw OPML text from the server, you can do it one of two ways:
1. Add ?format=opml at the end of the url. <a href="http://montauk.scripting.com/test.opml?format=opml">Example</a>.
2. If you're making the request in a program, you can add an Accept header with the value: text/x-opml, following a convention established by the OPML Editor.
As with scripts and markdown files, you can turn the feature off in config.json.
##### v0.60 5/26/15 by DW

@ -1,4 +1,4 @@
var myVersion = "0.61s", myProductName = "PagePark";
var myVersion = "0.61t", myProductName = "PagePark";
//The MIT License (MIT)
@ -257,6 +257,7 @@ function handleHttpRequest (httpRequest, httpResponse) {
});
}
function serveFile (f, config) {
var formatParam = parsedUrl.query.format.toLowerCase (); //url ends with ?format=abc -- 6/24/15 by DW
function httpReturn (val, type) { //2/17/15 by DW
httpResponse.writeHead (200, {"Content-Type": type});
httpResponse.end (val.toString ());
@ -306,8 +307,8 @@ function handleHttpRequest (httpRequest, httpResponse) {
}
break;
case config.extOpmlFiles: //6/23/15 by DW
var flReturnHtml = !hasAcceptHeader ("text/x-opml");
if (pageparkPrefs.flProcessOpmlFiles && config.flProcessOpmlFiles && flReturnHtml) { //xxx
var flReturnHtml = (!hasAcceptHeader ("text/x-opml")) && (formatParam != "opml");
if (pageparkPrefs.flProcessOpmlFiles && config.flProcessOpmlFiles && flReturnHtml) { //6/24/15 by DW
getOpmlTemplate (function (theTemplate) {
var opmltext = data.toString (), pagetable = new Object ();
opmlLib.readOpmlString (opmltext, function (theOutline) {

Loading…
Cancel
Save