View on GitHub

Stoicmaxims.GitHub.io

Help Build A Stoic Maxims Directory.

We're all on the lookout for maxims to meditate on. Let's gather the largest community directory of them together. A directory that we can use for contemplation, applications, personal sites or anything else that can be dreamed up. Lets keep them as maxims, ie. short memorable snippets, distilled and bite sized. If you wish to add to it, submit a pull request, or send submissions in the below format to stoicmaxims@outlook.com and I'll do my best to get them added.

Currently they are in a tab delimited format for simplicity

format 1 per line: ID [tab] Maxim [tab] Whom

Using With Code

More data formats coming soon.

Python

import csv, urllib2
url = "https://raw.githubusercontent.com/stoicmaxims/stoicmaxims.github.io/master/list.tsv"
tsv = urllib2.urlopen(url)
for line in csv.reader(tsv, delimiter="\t"): 
  print line

PHP

<?php
$data = file_get_contents('https://raw.githubusercontent.com/stoicmaxims/stoicmaxims.github.io/master/list.tsv');
$lines = explode("\n",$data);
foreach($lines as $maxim){
  if(!empty($maxim)){
    $data_item = explode("\t",$maxim);
    print_r($data_item);
  }
}