소스 검색

Add script to export data to CSV

This can be imported by Libra for Android
master
Chris Smith 14 년 전
부모
커밋
79f2b94d1e
1개의 변경된 파일17개의 추가작업 그리고 0개의 파일을 삭제
  1. 17
    0
      export.php

+ 17
- 0
export.php 파일 보기

@@ -0,0 +1,17 @@
1
+<?PHP
2
+
3
+ require('user-data.php');
4
+
5
+ /* For format of user-data.php see comment in data.php.
6
+  *
7
+  * In addition, this script requires a START_DATE constant containing
8
+  * the unix timestamp of the first entry in the $data array.
9
+  */
10
+
11
+ foreach ($data as $week => $value) {
12
+  if ($value != -1) {
13
+   echo date('Y-m-d', strtotime('+' . $week . ' weeks', START_DATE)), ';', $value, "\n";
14
+  }
15
+ }
16
+
17
+?>

Loading…
취소
저장