|
@@ -79,7 +79,6 @@ function _s_backbone_get_request_parameters() {
|
|
|
|
|
|
function til() {
|
|
|
require_once('lib/html_dom.php');
|
|
|
-
|
|
|
$url = 'https://davidawindham.com/til/index.html';
|
|
|
$html = file_get_html($url);
|
|
|
$i = 0;
|
|
@@ -90,7 +89,6 @@ function til() {
|
|
|
}
|
|
|
function pull_til() {
|
|
|
require_once('lib/html_dom.php');
|
|
|
-
|
|
|
$url = 'https://davidawindham.com/til/index.html';
|
|
|
$html = file_get_html($url);
|
|
|
$i = 0;
|
|
@@ -101,7 +99,6 @@ function pull_til() {
|
|
|
}
|
|
|
function pull_til_all() {
|
|
|
require_once('lib/html_dom.php');
|
|
|
-
|
|
|
$url = 'https://davidawindham.com/til/index.html';
|
|
|
$html = file_get_html($url);
|
|
|
$i = 0;
|
|
@@ -111,7 +108,6 @@ function pull_til_all() {
|
|
|
}
|
|
|
function bookmarks() {
|
|
|
require_once('lib/html_dom.php');
|
|
|
-
|
|
|
$url = 'https://davidawindham.com/bookmarks/';
|
|
|
$html = file_get_html($url);
|
|
|
$i = 0;
|
|
@@ -124,7 +120,6 @@ function bookmarks() {
|
|
|
}
|
|
|
function bookmarks_pull() {
|
|
|
require_once('lib/html_dom.php');
|
|
|
-
|
|
|
$url = 'https://davidawindham.com/bookmarks/';
|
|
|
$html = file_get_html($url);
|
|
|
$i = 0;
|
|
@@ -137,7 +132,6 @@ function bookmarks_pull() {
|
|
|
}
|
|
|
function bookmarks_all() {
|
|
|
require_once('lib/html_dom.php');
|
|
|
-
|
|
|
$url = 'https://davidawindham.com/bookmarks/';
|
|
|
$html = file_get_html($url);
|
|
|
$i = 0;
|
|
@@ -147,22 +141,9 @@ function bookmarks_all() {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-function photo() {
|
|
|
- require_once('lib/html_dom.php');
|
|
|
|
|
|
- $url = 'https://photo.davidwindham.com/#16734437965516';
|
|
|
- $html = file_get_html($url);
|
|
|
- $i = 0;
|
|
|
- foreach ($html->find('.photo .overlay h1') as $li) {
|
|
|
- if (!empty($html)) {
|
|
|
- echo str_replace('href="/', 'href="https://photo.davidawindham.com/', $li . ' ');
|
|
|
- if (++$i == 18) break;
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
function work() {
|
|
|
require_once('lib/html_dom.php');
|
|
|
-
|
|
|
$url = 'https://davidawindham.com/til/notes/work';
|
|
|
$html = file_get_html($url);
|
|
|
$i = 0;
|
|
@@ -199,160 +180,214 @@ function todone() {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-function code() {
|
|
|
- require_once('lib/html_dom.php');
|
|
|
|
|
|
- $url = 'https://code.davidawindham.com/david';
|
|
|
- $html = file_get_html($url);
|
|
|
- $i = 0;
|
|
|
- foreach ($html->find('.item a.name, p.has-emoji, span.time-since') as $li) {
|
|
|
- if (!empty($html)) {
|
|
|
- //$time = find('.time-since') as $time;
|
|
|
- echo str_replace('href="/', 'href="https://code.davidawindham.com/', $li . ' ');
|
|
|
- //echo $time . ' ';
|
|
|
- if (++$i == 9) break;
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
function docs() {
|
|
|
require_once('lib/html_dom.php');
|
|
|
-
|
|
|
$url = 'https://davidawindham.com/til/docs';
|
|
|
$html = file_get_html($url);
|
|
|
$i = 0;
|
|
|
foreach ($html->find('.markdown ul li') as $li) {
|
|
|
if (!empty($html)) {
|
|
|
echo $li;
|
|
|
- if (++$i == 7) break;
|
|
|
+ if (++$i == 5) break;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-function docs_code() {
|
|
|
+function lists() {
|
|
|
require_once('lib/html_dom.php');
|
|
|
-
|
|
|
- $url = 'https://code.davidawindham.com/david/til/src/main/docs';
|
|
|
+ $url = 'https://davidawindham.com/til/lists/';
|
|
|
$html = file_get_html($url);
|
|
|
$i = 0;
|
|
|
- foreach ($html->find('table tr td') as $li) {
|
|
|
+ foreach ($html->find('.markdown ul li') as $li) {
|
|
|
if (!empty($html)) {
|
|
|
- //if($i++ == 1) continue;
|
|
|
- echo str_replace('href="/', 'href="https://code.davidawindham.com/', $li);
|
|
|
- if(!($i++ % 3)) {
|
|
|
- echo '<br>';
|
|
|
- }
|
|
|
- if (++$i == 1) break;
|
|
|
+ echo $li;
|
|
|
+ if (++$i == 5) break;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-function lists() {
|
|
|
+function notes() {
|
|
|
require_once('lib/html_dom.php');
|
|
|
|
|
|
- $url = 'https://davidawindham.com/til/lists/';
|
|
|
+ $url = 'https://davidawindham.com/til/notes/';
|
|
|
$html = file_get_html($url);
|
|
|
$i = 0;
|
|
|
foreach ($html->find('.markdown ul li') as $li) {
|
|
|
if (!empty($html)) {
|
|
|
echo $li;
|
|
|
- if (++$i == 7) break;
|
|
|
+ if (++$i == 5) break;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-function lists_code() {
|
|
|
+
|
|
|
+function playing() {
|
|
|
require_once('lib/html_dom.php');
|
|
|
|
|
|
- $url = 'https://code.davidawindham.com/david/til/src/main/lists';
|
|
|
+ $url = 'https://davidawindham.com/til/lists/now/playing';
|
|
|
$html = file_get_html($url);
|
|
|
$i = 0;
|
|
|
- foreach ($html->find('table tr td') as $li) {
|
|
|
+ foreach ($html->find('.markdown ul li') as $li) {
|
|
|
if (!empty($html)) {
|
|
|
- //if($i++ == 1) continue;
|
|
|
- if (++$i == 2) break;
|
|
|
- echo str_replace('href="/', 'href="https://code.davidawindham.com/', $li);
|
|
|
- if(!($i++ % 3)) {
|
|
|
- echo '<br>';
|
|
|
- }
|
|
|
-
|
|
|
+ echo $li;
|
|
|
+ if (++$i == 3) break;
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
-function notes() {
|
|
|
+function watching() {
|
|
|
require_once('lib/html_dom.php');
|
|
|
|
|
|
- $url = 'https://davidawindham.com/til/notes/';
|
|
|
+ $url = 'https://davidawindham.com/til/lists/now/watching';
|
|
|
$html = file_get_html($url);
|
|
|
$i = 0;
|
|
|
foreach ($html->find('.markdown ul li') as $li) {
|
|
|
if (!empty($html)) {
|
|
|
echo $li;
|
|
|
- if (++$i == 7) break;
|
|
|
+ if (++$i == 3) break;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
function listening() {
|
|
|
require_once('lib/html_dom.php');
|
|
|
-
|
|
|
$url = 'https://davidawindham.com/studio/music/';
|
|
|
$html = file_get_html($url);
|
|
|
$i = 0;
|
|
|
foreach ($html->find('ul .wtracks li') as $li) {
|
|
|
if (!empty($html)) {
|
|
|
echo $li;
|
|
|
- if (++$i == 7) break;
|
|
|
+ if (++$i == 3) break;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
function reading() {
|
|
|
require_once('lib/html_dom.php');
|
|
|
-
|
|
|
$url = 'https://davidawindham.com/til/lists/now/reading';
|
|
|
$html = file_get_html($url);
|
|
|
$i = 0;
|
|
|
foreach ($html->find('.markdown ul li') as $li) {
|
|
|
if (!empty($html)) {
|
|
|
echo $li;
|
|
|
- if (++$i == 7) break;
|
|
|
+ if (++$i == 3) break;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
function learning() {
|
|
|
require_once('lib/html_dom.php');
|
|
|
-
|
|
|
$url = 'https://davidawindham.com/til/lists/now/learning';
|
|
|
$html = file_get_html($url);
|
|
|
$i = 0;
|
|
|
foreach ($html->find('.markdown ul li') as $li) {
|
|
|
if (!empty($html)) {
|
|
|
echo $li;
|
|
|
- if (++$i == 7) break;
|
|
|
+ if (++$i == 3) break;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-function playing() {
|
|
|
+
|
|
|
+/********************************/
|
|
|
+/************ Code ************/
|
|
|
+/********************************/
|
|
|
+
|
|
|
+function code() {
|
|
|
require_once('lib/html_dom.php');
|
|
|
|
|
|
- $url = 'https://davidawindham.com/til/lists/now/playing';
|
|
|
+ $url = 'https://code.davidawindham.com/david?tab=activity';
|
|
|
$html = file_get_html($url);
|
|
|
$i = 0;
|
|
|
- foreach ($html->find('.markdown ul li') as $li) {
|
|
|
+ foreach ($html->find('.content ul li') as $li) {
|
|
|
+ foreach ($li->find('span.text') as $comment) {
|
|
|
+
|
|
|
+ if (!empty($html)) {
|
|
|
+ $str = array('href="/', 'light');
|
|
|
+ $replace = array('href="https://code.davidawindham.com/', '');
|
|
|
+ //echo str_replace($str,$replace, $li . ' - ' . $commit . ' - ' . $comment . '<br>');
|
|
|
+ echo str_replace($str,$replace, $li . '' . $comment . '<br>');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //foreach ($html->find('span.text') as $comment) {}
|
|
|
+ if (++$i == 5) break;
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+function commits() {
|
|
|
+ require_once('lib/html_dom.php');
|
|
|
+
|
|
|
+ $url = 'https://code.davidawindham.com/david?tab=activity';
|
|
|
+ $html = file_get_html($url);
|
|
|
+ $i = 0;
|
|
|
+ foreach ($html->find('ul li a') as $li) {
|
|
|
+ if (!empty($html)) {
|
|
|
+ $str = array('href="/', 'light');
|
|
|
+ $replace = array('href="https://code.davidawindham.com/', '');
|
|
|
+ echo str_replace($str,$replace, date("y/m/d") . ' - ' . $li . '<br>');
|
|
|
+ if (++$i == 3) break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+function docs_code() {
|
|
|
+ require_once('lib/html_dom.php');
|
|
|
+
|
|
|
+ $url = 'https://code.davidawindham.com/david/til/src/main/docs';
|
|
|
+ $html = file_get_html($url);
|
|
|
+ $i = 0;
|
|
|
+ foreach ($html->find('table tr td') as $li) {
|
|
|
if (!empty($html)) {
|
|
|
- echo $li;
|
|
|
- if (++$i == 7) break;
|
|
|
+ //if($i++ == 1) continue;
|
|
|
+ echo str_replace('href="/', 'href="https://code.davidawindham.com/', $li);
|
|
|
+ if(!($i++ % 3)) {
|
|
|
+ echo '<br>';
|
|
|
+ }
|
|
|
+ if (++$i == 1) break;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-function watching() {
|
|
|
+
|
|
|
+function lists_code() {
|
|
|
require_once('lib/html_dom.php');
|
|
|
|
|
|
- $url = 'https://davidawindham.com/til/lists/now/watching';
|
|
|
+ $url = 'https://code.davidawindham.com/david/til/src/main/lists';
|
|
|
$html = file_get_html($url);
|
|
|
$i = 0;
|
|
|
- foreach ($html->find('.markdown ul li') as $li) {
|
|
|
+ foreach ($html->find('table tr td') as $li) {
|
|
|
if (!empty($html)) {
|
|
|
- echo $li;
|
|
|
- if (++$i == 7) break;
|
|
|
+ //if($i++ == 1) continue;
|
|
|
+ if (++$i == 2) break;
|
|
|
+ echo str_replace('href="/', 'href="https://code.davidawindham.com/', $li);
|
|
|
+ if(!($i++ % 3)) {
|
|
|
+ echo '<br>';
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+function photo() {
|
|
|
+ require_once('lib/html_dom.php');
|
|
|
+
|
|
|
+ $url = 'https://photo.davidwindham.com/#16734437965516';
|
|
|
+ $html = file_get_html($url);
|
|
|
+ $i = 0;
|
|
|
+ foreach ($html->find('.photo .overlay h1') as $li) {
|
|
|
+ if (!empty($html)) {
|
|
|
+ echo str_replace('href="/', 'href="https://photo.davidawindham.com/', $li . ' ');
|
|
|
+ if (++$i == 18) break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+//function mastodon() {
|
|
|
+// require_once('lib/html_dom.php');
|
|
|
+//
|
|
|
+// $url = 'https://universeodon.com/@windhamdavid/with_replies';
|
|
|
+// $html = file_get_html($url);
|
|
|
+// $i = 0;
|
|
|
+// foreach ($html->find('.status__content__text p') as $li) {
|
|
|
+// if (!empty($html)) {
|
|
|
+// echo str_replace('href="/', 'href="https://universeodon.com/', $li . ' ');
|
|
|
+// if (++$i == 18) break;
|
|
|
+// }
|
|
|
+// }
|
|
|
+//}
|
|
|
+
|
|
|
+
|
|
|
|