Add support for bookmark-of
parent
5ecada8f54
commit
102f555cbc
6
entry.go
6
entry.go
|
@ -102,6 +102,9 @@ func createEntryFromValueMap(values map[string][]string) (*Entry, error) {
|
||||||
if likeOf, ok := values["like-of"]; ok {
|
if likeOf, ok := values["like-of"]; ok {
|
||||||
entry.likeLink = likeOf[0]
|
entry.likeLink = likeOf[0]
|
||||||
}
|
}
|
||||||
|
if bookmarkOf, ok := values["bookmark-of"]; ok {
|
||||||
|
entry.link = bookmarkOf[0]
|
||||||
|
}
|
||||||
if syndicate, ok := values["mp-syndicate-to"]; ok {
|
if syndicate, ok := values["mp-syndicate-to"]; ok {
|
||||||
entry.syndicate = syndicate
|
entry.syndicate = syndicate
|
||||||
} else if syndicates, ok := values["mp-syndicate-to[]"]; ok {
|
} else if syndicates, ok := values["mp-syndicate-to[]"]; ok {
|
||||||
|
@ -144,6 +147,9 @@ func createEntryFromMicroformat(mfEntry *MicroformatItem) (*Entry, error) {
|
||||||
if len(mfEntry.Properties.LikeOf) == 1 {
|
if len(mfEntry.Properties.LikeOf) == 1 {
|
||||||
entry.likeLink = mfEntry.Properties.LikeOf[0]
|
entry.likeLink = mfEntry.Properties.LikeOf[0]
|
||||||
}
|
}
|
||||||
|
if len(mfEntry.Properties.BookmarkOf) == 1 {
|
||||||
|
entry.link = mfEntry.Properties.BookmarkOf[0]
|
||||||
|
}
|
||||||
if len(mfEntry.Properties.MpSyndicateTo) > 0 {
|
if len(mfEntry.Properties.MpSyndicateTo) > 0 {
|
||||||
entry.syndicate = mfEntry.Properties.MpSyndicateTo
|
entry.syndicate = mfEntry.Properties.MpSyndicateTo
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@ type MicroformatProperties struct {
|
||||||
Url []string `json:"url,omitempty"`
|
Url []string `json:"url,omitempty"`
|
||||||
InReplyTo []string `json:"in-reply-to,omitempty"`
|
InReplyTo []string `json:"in-reply-to,omitempty"`
|
||||||
LikeOf []string `json:"like-of,omitempty"`
|
LikeOf []string `json:"like-of,omitempty"`
|
||||||
|
BookmarkOf []string `json:"bookmark-of,omitempty"`
|
||||||
MpSlug []string `json:"mp-slug,omitempty"`
|
MpSlug []string `json:"mp-slug,omitempty"`
|
||||||
MpSyndicateTo []string `json:"mp-syndicate-to,omitempty"`
|
MpSyndicateTo []string `json:"mp-syndicate-to,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue