X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=doc%2Fmd%2FDownload-CSS-styles-from-an-OPML-list.md;fp=doc%2FDownload-CSS-styles-from-an-OPML-list.md;h=26b7fb3e235b14ab667a2f0a12f54d2c21cd9b57;hb=53ed6d7d1e678d7486337ce67a2f17b30bac21ac;hp=eb66f955121740856df3964b34d49b59949077a1;hpb=d5d22a6d07917865c44148ad76f43c65a929a890;p=github%2Fshaarli%2FShaarli.git diff --git a/doc/Download-CSS-styles-from-an-OPML-list.md b/doc/md/Download-CSS-styles-from-an-OPML-list.md similarity index 92% rename from doc/Download-CSS-styles-from-an-OPML-list.md rename to doc/md/Download-CSS-styles-from-an-OPML-list.md index eb66f955..26b7fb3e 100644 --- a/doc/Download-CSS-styles-from-an-OPML-list.md +++ b/doc/md/Download-CSS-styles-from-an-OPML-list.md @@ -1,4 +1,3 @@ -#Download CSS styles from an OPML list ###Download CSS styles for shaarlis listed in an opml file Example php script: @@ -34,8 +33,8 @@ function createShaarliHashFromOPMLL($opmlFile) { $opmlXml = simplexml_load_string($opml); $outlineElements = $opmlXml->xpath("body/outline"); foreach($outlineElements as $site) { - $siteUrl = siteUrl((string) $site['htmlUrl']);[](.html) - $result[$siteUrl]=((string) $site['text']);[](.html) + $siteUrl = siteUrl((string) $site['htmlUrl']); + $result[$siteUrl]=((string) $site['text']); } return $result; } @@ -47,7 +46,7 @@ function getSiteFolder($url) { function get_http_response_code($theURL) { $headers = get_headers($theURL); - return substr($headers[0], 9, 3);[](.html) + return substr($headers[0], 9, 3); } /** @@ -122,7 +121,7 @@ function getDirectoryList ($directory) { while ($file = readdir($handler)) { // if file isn't this directory or its parent, add it to the results if ($file != "." && $file != "..") { - $results[ = realpath($realPath . "/" . $file);](-=-realpath($realPath-.-"/"-.-$file);.html) + $results[] = realpath($realPath . "/" . $file); } } // tidy up: close the handler @@ -142,7 +141,7 @@ function findKnownStyles() { $configFile = $folder."/config.ini"; if(file_exists($configFile)) { $iniParameters = parse_ini_file($configFile); - array_push($result, $iniParameters['site_url']);[](.html) + array_push($result, $iniParameters['site_url']); } } return $result; @@ -152,4 +151,4 @@ $knownStyles = findKnownStyles(); copyUserStylesFrom(createShaarliHashFromOPMLL(SHAARLI_RSS_OPML), $knownStyles); -``` +``` \ No newline at end of file