about summary refs log tree commit diff
path: root/tools
diff options
context:
space:
mode:
author"Vincent Ambo ext:(%22) <tazjin@me.com>2012-02-23T12·20+0100
committer"Vincent Ambo ext:(%22) <tazjin@me.com>2012-02-23T12·20+0100
commita4119e1cfd3f599cf67012535a5a55bcbf4800c6 (patch)
tree02a7723e4fe79f085f7668e6f511f23f3b5fb30e /tools
parent47dbfe900e57738dc44c4bfe06c624e725102a03 (diff)
* displaying blog entries
* changed convertDB for BlogLang JSON representation
Diffstat (limited to 'tools')
-rw-r--r--tools/convertdb/convertdb.go15
1 files changed, 5 insertions, 10 deletions
diff --git a/tools/convertdb/convertdb.go b/tools/convertdb/convertdb.go
index adef31910bf1..f7b94176b422 100644
--- a/tools/convertdb/convertdb.go
+++ b/tools/convertdb/convertdb.go
@@ -26,7 +26,7 @@ type OldEntry struct {
 	Comments []OldComment
 }
 
-//new
+//old
 type Comment struct {
 	Author string 	`json:"cauthor"`
 	Text   string 	`json:"ctext"`
@@ -37,7 +37,7 @@ type Entry struct {
 	Id       string `json:"_id"`
 	Year     int    `json:"year"`
 	Month    int    `json:"month"`
-	Day		 int
+	Day      int    `json:"day"`
 	Lang     string `json:"lang"`
 	Title    string `json:"title"`
 	Author   string `json:"author"`
@@ -100,17 +100,12 @@ func convertEntry(oEntry OldEntry, p string) Entry{
 	nEntry.Mtext 	= oEntry.Mtext
 	nEntry.Text 	= oEntry.Text
 	nEntry.Comments = nComments
-	nEntry.Lang 	= "de"
+	nEntry.Lang 	= "DE"
 
 	return nEntry
 }
 
-//http://tazj.in/2012/02/10.155234
-func parseEntryTime(year, month, day int, ids string) string {
-	x := fmt.Sprintf()
-}
-
-func parseDumbTime(Year, Month, Day int, ) int64 {
+func parseDumbTime(ct string) int64 {
 	x, err := time.Parse("[Am 02.01.2006 um 15:04 Uhr]", ct)
 	if err != nil {
 		fmt.Println(err.String())
@@ -118,4 +113,4 @@ func parseDumbTime(Year, Month, Day int, ) int64 {
 	}
 
 	return x.Seconds()
-}
+}
\ No newline at end of file