df2

command module
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: May 13, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

README

df2

Go

df2 is a command-line tool for managing plus optimising the files and database of defacto2.net. It is broken down into multiple parts.

approve all validated file records that are ready to go live.

clean discover and remove orphan files that exist on the server but have no matching database entries.

config adjust the default settings for this df2 tool.

demozoo interacts with the Demozoo.org API to synchronise data and fetch linked download files.

fix malformed data and generates missing assets from distinct sources.

lookup a website record URL by its database ID or UUID.

new checks Demozoo and #releaseproof submissions, fetches downloads, generate previews and repairs any malformed data.

output generates webpages for groups, peoples and the site map.

proof automates the parsing of files tagged as #releaseproof.

shrink moves old SQL backups and incoming uploads to the user home directory ready for download and removal.


A tool to optimise and manage defacto2.net
Copyright © 2020-21 Ben Garrett
https://github.com/Defacto2/df2

Usage:
  df2 [command]

Available Commands:
  approve     Approve the file records that are ready to go live
  clean       Discover or clean orphan files
  config      Configure the settings for this tool
  demozoo     Interact with Demozoo.org upload submissions
  fix         Fixes database entries and records
  help        Help about any command
  lookup      Lookup the file URL of a database ID or UUID
  new         Handler for files flagged as waiting to go live
  output      JSON, HTML, SQL and sitemap generator
  proof       Handler for files tagged as #releaseproof
  shrink      Reduces the space used in directories

Flags:
      --config string   config file (default is config.yaml)
  -h, --help            help for df2
  -q, --quiet           suspend feedback to the terminal

Use "df2 [command] --help" for more information about a command.

Install

Is built on Go v1.16 and is packaged for the Ubuntu Linux platform.

cd ~/downloads
wget https://github.com/Defacto2/df2/releases/latest/download/df2.deb
dpkg -i df2.deb # also works to update
df2 --version
Dependencies

The df2 fix text command requires the installation of AnsiLove/C in the system PATH.

WebP support image conversion needs libwebp. PNG image compression relies on pngquant.

Ubuntu installation
sudo apt install -y ansilove pngquant webp

Configuration

To view and test the database and directory configurations.

df2 config info

To change the configuration.

df2 config edit

Builds

Github Actions combined with GoReleaser handles the building process when new release tags are created.

All changes should be tested with the golangci-lint Go linters aggregator.

Documentation

Overview

Copyright © 2021 Ben Garrett <code.by.ben@gmail.com>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis
lib
archive
Package archive handles collections of files that are either packaged together or compressed.
Package archive handles collections of files that are either packaged together or compressed.
assets
Package assets handles the site resources such as file downloads, thumbnails and backups.
Package assets handles the site resources such as file downloads, thumbnails and backups.
cmd
nolint:gochecknoglobals nolint:gochecknoglobals nolint:gochecknoglobals nolint:gochecknoglobals nolint:gochecknoglobals nolint:gochecknoglobals nolint:gochecknoglobals nolint:gochecknoglobals nolint:gochecknoglobals nolint:gochecknoglobals Package cmd handles the commandline user interface and interactions.
nolint:gochecknoglobals nolint:gochecknoglobals nolint:gochecknoglobals nolint:gochecknoglobals nolint:gochecknoglobals nolint:gochecknoglobals nolint:gochecknoglobals nolint:gochecknoglobals nolint:gochecknoglobals nolint:gochecknoglobals Package cmd handles the commandline user interface and interactions.
config
Package config saves and fetches settings used by the df2 tool.
Package config saves and fetches settings used by the df2 tool.
database
Package database interacts with the MySQL 5.7 datastore of Defacto2.
Package database interacts with the MySQL 5.7 datastore of Defacto2.
demozoo
Package demozoo interacts with the demozoo.org API for data scraping and file downloads.
Package demozoo interacts with the demozoo.org API for data scraping and file downloads.
directories
Package directories interacts with the filepaths that hold files and assets.
Package directories interacts with the filepaths that hold files and assets.
download
Package download handles the fetching of remote files.
Package download handles the fetching of remote files.
groups
Package groups deals with group names and their initialisms.
Package groups deals with group names and their initialisms.
images
Package images generate thumbnails and converts between image formats.
Package images generate thumbnails and converts between image formats.
logs
Package logs handles errors and user feedback.
Package logs handles errors and user feedback.
people
Package people deals with people, person names, aliases and their roles.
Package people deals with people, person names, aliases and their roles.
prompt
Package prompt are functions that parse stardard input loops.
Package prompt are functions that parse stardard input loops.
proof
Package proof handles files that have the section tagged as releaseproof.
Package proof handles files that have the section tagged as releaseproof.
recent
Package recent is a work in progress JSON generator to display the most recent files on the file.
Package recent is a work in progress JSON generator to display the most recent files on the file.
sitemap
Package sitemap generates an list of pages of the website.
Package sitemap generates an list of pages of the website.
str
Package str are print to terminal display and colour functions.
Package str are print to terminal display and colour functions.
text
Package text generates images from text files using the Ansilove/C program.
Package text generates images from text files using the Ansilove/C program.

Jump to

Keyboard shortcuts

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