Publish HTML quickly. https://html.house
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

36 lines
626 B

  1. package htmlhouse
  2. import (
  3. "fmt"
  4. "time"
  5. )
  6. type (
  7. PublicHouse struct {
  8. ID string `json:"id"`
  9. Title string `json:"title"`
  10. URL string `json:"url"`
  11. ThumbURL string `json:"thumb_url"`
  12. Created time.Time `json:"created"`
  13. Updated time.Time `json:"updated"`
  14. Views int `json:"views"`
  15. }
  16. HouseStats struct {
  17. ID string
  18. Stats []Stat
  19. }
  20. Stat struct {
  21. Data string
  22. Label string
  23. }
  24. )
  25. func (h *PublicHouse) process(app *app) {
  26. h.URL = fmt.Sprintf("%s/%s.html", app.cfg.HostName, h.ID)
  27. if h.ThumbURL != "" {
  28. h.ThumbURL = "https://peeper.html.house/" + h.ThumbURL
  29. }
  30. }