vetbbedit

package module
v0.0.0-...-7c29cea Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2017 License: GPL-3.0 Imports: 0 Imported by: 0

README

Vetbbedit

Build Status

Web based page editor for veterinabb.sk using hugo. Runs in embedded webview.

Install

Tested on go 1.9+

go install github.com/jkusniar/vetbbedit/cmd/vetbbedit
  • On linux, requires libwebkitgtk-3.0-dev installed. Webkit has problems rendering supplied JavaScript
  • On osx, XCode needs to be installed.

Run

$ vetbbedit [flags]
MacOS Application bundle
  • navigate to cmd/vetbbedit and run macpack build (development dependency)
  • modify generated vetbbedit.app/Contents/Info.plist if needed (e.g. add custom environment variables):
	<key>LSEnvironment</key>
	<dict>
		<key>VETBB_REPO_BRANCH</key>
		<string>test</string>
		<key>VETBB_REPO_TOKEN</key>
		<string>MY_TOKEN</string>
	</dict>
  • copy vetbbedit.app to ~/Applications/
  • run from launchpad

Development

Requires make utility. Install build dependencies if building first time:

  • make build-deps
  • make

Tests

make test

License

The project license is specified in LICENSE

Vetbbedit is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Lara is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigService

type ConfigService interface {
	UpdateCopyrightYears() error
}

ConfigService updates hugo configuration data (config.json)

type DayDef

type DayDef struct {
	Day string `json:"day"`
	AM  string `json:"am"`
	PM  string `json:"pm"`
}

DayDef is JSON encoded day on opening hours

type GeneratorService

type GeneratorService interface {
	Generate() (string, error)
}

GeneratorService generates page from configuration data

type ItemData

type ItemData struct {
	Items []string `json:"items"`
}

ItemData JSON encoded list of strings used for various data lists (news, services, ...)

type NewsService

type NewsService interface {
	Save(i *ItemData) error
	Load() (*ItemData, error)
}

NewsService manges news data (custom data file, default: data/news.json)

type OpeningHours

type OpeningHours struct {
	Days      []DayDef `json:"days"`
	Footnotes []string `json:"footnotes"`
}

OpeningHours is JSON encoded opening hours data

type OpeningHoursService

type OpeningHoursService interface {
	Save(o *OpeningHours) error
	Load() (*OpeningHours, error)
}

OpeningHoursService manges opening hours data (custom data file, default: data/hours.json)

type RepositoryService

type RepositoryService interface {
	Pull() error
	Push() error
}

RepositoryService manages page sources in VCS

type ServicesService

type ServicesService interface {
	Save(i *ItemData) error
	Load() (*ItemData, error)
}

ServicesService manges services data (custom data file, default: data/services.json)

type UploaderService

type UploaderService interface {
	Upload(fromDir string) error
}

UploaderService uploads generated page to server

Directories

Path Synopsis
cmd
page

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL