input

package
v0.0.0-...-087c9b4 Latest Latest
Warning

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

Go to latest
Published: May 25, 2026 License: MIT Imports: 15 Imported by: 0

README

Filename Standards of Arti

Last documented May 20, 2026

USFM

2 numeric char sequence number + 3 char book code + other data + (.SFM or .sfm)

USX

3 numeric char sequence number + 3 char book code + (.usx or .USX)

or

3 char book code + (.usx or .USX)

XLSX

The filename is not parsed, by Arti + (.xlsx or .XLSX)

Audio for USX or USFM

These are not parsed by char position, but split at an underscore char

{drama}{ios}{version}{seq}{book code}_{chapter}.mp3

drama is 01 for single speaker no music, 02 for multi speaker and music

iso is the language code

seq a sequence number to keep files sorted correctly, i.e. GEN chapter 3 is 003

Audio for XLSX

These are also split by underscore, and the second to the last position is 5 char long or longer.
This field is the script line number.

All of the other fields are filled in by data read in the script file.

Bible Brain Version 4

The files are parse by splitting on underscore

{mediaid}{A/B}{ordering}{book code}{chapter start}[{verse start}-{chapter stop}_{verse stop}].mp3|webm

The square brackets indicate optional parts of the filename

e.g. ENGESVN2DA_B001_MAT_001.mp3 (full chapter) IRUNLCP1DA_B013_1TH_001_001-001_010.mp3 (partial chapter, verses 1-10)

Bible Brain Version 2

These are parsed by precise character position

0 - A is OT, B is NT 1-3 is file sequence number

5-7 is chapter number

9-20 is book name (Note: book name, not book code)

21-end is Bible Brain MediaId

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadFile

func DownloadFile(ctx context.Context, s3Path string, filePath string) *log.Status

DownloadFile is used by Controller to download a database file

func EnsureDirectory

func EnsureDirectory(ctx context.Context, directory string) *log.Status

func UpdateIdent

func UpdateIdent(conn db.DBAdapter, ident *db.Ident, textFiles []InputFile, audioFiles []InputFile) *log.Status

Types

type InputFile

type InputFile struct {
	MediaId    string
	MediaType  request.MediaType
	Testament  string
	BookId     string // not used for text_plain
	BookSeq    string
	Chapter    int // only used for audio
	ChapterEnd int
	Verse      string // not sure how this is used but parseV4AudioFilename parses it.
	VerseEnd   string
	ScriptLine string
	Filename   string
	FileExt    string
	Directory  string
}

func AWSS3Input

func AWSS3Input(ctx context.Context, path string) ([]InputFile, *log.Status)

AWSS3Input is given a path prefix, that it uses to identify files. Saves each file found to disk, and returns an array of input files

func DBPDirectory

func DBPDirectory(ctx context.Context, bibleId string, fsType request.MediaType, otFileset string,
	ntFileset string) ([]InputFile, *log.Status)

DBPDirectory 1. Assign pattern for OT, NT. 2. Glob files. 3. Assign book/chapter & Prune

func Directory

func Directory(ctx context.Context, bibleId string, fsType request.MediaType, filesetId string, tType string) ([]InputFile, *log.Status)

func FileInput

func FileInput(ctx context.Context, path string) ([]InputFile, *log.Status)

func FillInputFile

func FillInputFile(ctx context.Context, testament request.Testament, files []InputFile) ([]InputFile, *log.Status)

func Glob

func Glob(ctx context.Context, search string) ([]InputFile, *log.Status)

func (*InputFile) FilePath

func (i *InputFile) FilePath() string

type PostFiles

type PostFiles struct {
	// contains filtered or unexported fields
}

func NewPostFiles

func NewPostFiles(ctx context.Context) PostFiles

func (*PostFiles) PostInput

func (p *PostFiles) PostInput(ftype string) ([]InputFile, *log.Status)

func (*PostFiles) ReadFile

func (p *PostFiles) ReadFile(ftype string, source io.Reader, filename string) *log.Status

func (*PostFiles) RemoveDir

func (p *PostFiles) RemoveDir()

Jump to

Keyboard shortcuts

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