{{ $ver := ($.Site.Data.api.vk.version) }} {{ $token := ($.Site.Data.api.vk.token | base64Decode) }} {{ $fields := ("sex,bdate,city,country,photo_400,contacts,site,followers_count,connections,activities,interests,music,movies,tv,books,games,about,quotes") }} {{ $url := ("https://api.vk.com") }} {{ $users := (split (.Get 0) "|") }}
{{ range $users }} {{ $user := (getJSON $url "/method/users.get?user_ids=" . "&v=" $ver "&access_token=" $token "&fields=" $fields) }} {{ range $user.response }} {{ $profile := (printf "https://vk.com/id%d" (.id | int)) }} {{ $id := (delimit (shuffle (seq 999)) "" | md5) }}
    {{ if (.followers_count) }}
  • {{ .followers_count }}
  • {{ end }} {{ if (.sex) }}
  • {{ $gender := "" }} {{ if (eq (.sex | int) 1) }}{{ $gender = "venus" }}{{ end }} {{ if (eq (.sex | int) 2) }}{{ $gender = "mars" }}{{ end }}
  • {{ end }} {{ if (.skype) }}
  • {{ end }} {{ if (.site) }}
  • {{ $url := urls.Parse .site }} {{ $scheme := "http://" }} {{ if ($url.Scheme) }}{{ $scheme = "" }}{{ end }}
  • {{ end }} {{ if (.country.title) }} {{ $location := (printf "%s %s" (.city.title) (.country.title)) }}
  • {{ end }} {{ if (or (.activities) (.interests) (.music) (.movies) (.tv) (.books) (.games) (.quotes)) }}
  • {{ end }}
    {{ if (.activities) }}
  • {{ .activities }}
  • {{ end }} {{ if (.interests) }}
  • {{ .interests }}
  • {{ end }} {{ if (.music) }}
  • {{ .music }}
  • {{ end }} {{ if (.movies) }}
  • {{ .movies }}
  • {{ end }} {{ if (.tv) }}
  • {{ .tv }}
  • {{ end }} {{ if (.books) }}
  • {{ .books }}
  • {{ end }} {{ if (.games) }}
  • {{ .games }}
  • {{ end }} {{ if (.quotes) }}
  • {{ .quotes }}
  • {{ end }}
{{ end }} {{ end }}