util

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareUsingEnglishCollation

func CompareUsingEnglishCollation(a, b string) int

func CreateFileWithAllParentDirectories

func CreateFileWithAllParentDirectories(file string) (f *os.File, err error)

func Diff

func Diff(path1 string, path2 string) (string, error)

func GetNormalizedTopicNameForSorting

func GetNormalizedTopicNameForSorting(topicName string) string

func GetOpenSquareStandardIdentifierForISBN added in v0.14.0

func GetOpenSquareStandardIdentifierForISBN(isbn string) string

The ISBNs used as EPUB identifiers in the TCT are now almost all obsolete -- see https://jira.nyu.edu/browse/NYUP-753. Rather than change all the ISBNs in the Postgres database and the cache files, for now we just provide this mapping function. This map will never change because re-mapping only needs to be done for EPUBs that were published to Open Square before we standardized on library ISBN as the Open Square identifier. For simplicity, therefore, we just hardcode it in this function.

func GetRelativeFilepathInLargeDirectoryTree

func GetRelativeFilepathInLargeDirectoryTree(prefix string, ID int, extension string) string

func GetTopicIDFromTopicPagePath

func GetTopicIDFromTopicPagePath(topicPagePath string) string

func IsNYUPress added in v0.14.0

func IsNYUPress(publisherName string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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