#!/bin/php true)); $i = 0; foreach ($xml->entry as $entry) { if($i > 56) { // TITLE $title = $entry->title; // CONTENT $content = $entry->content; $content = $converter->convert($content); // AUTHOR $author = $entry->author->name; // TAGS if (isset($entry->categories)) { echo "YES!"; foreach ($entry->categories->attributes as $tag) { if (!(substr_compare($tag->scheme, "http://schemas.google.com/", 0, 26))) { $tags = $tags . $tag->term . ", "; } $tags = substr($tags, 0, strlen($tags) - 2); } } // Pubdate $pubdate = $entry->published; date_default_timezone_set("UTC"); $pubdate = date("d F Y", strtotime($pubdate)); // FILENAME $date = $entry->published; $date = date("Y-m-d-H-i", strtotime($date)); $filetitle = str_replace(" ", "-", $title); $filename = $date . "-" . $filetitle . ".md"; if(isset($tags)){ $filecontent = <<