]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - doc/md/Download-CSS-styles-from-an-OPML-list.md
Generate HTML documentation using MkDocs (WIP)
[github/shaarli/Shaarli.git] / 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 eb66f955121740856df3964b34d49b59949077a1..26b7fb3e235b14ab667a2f0a12f54d2c21cd9b57 100644 (file)
@@ -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