modulepackage
0.0.0-20240805234140-9e48a974f660
Repository: https://github.com/byte-cats/filechick.git
Documentation: pkg.go.dev
# README
🐣 filechick: Your File-Handling Sidekick! 🐣
🕵️♀️ Mission: Useful Functions to Do "Stuff" with Files! 🕵️♀️
🗂️ Stuff:
🔍 Checking
- Get a list of filenames in a directory (because intel is key!)
🛠️ Creating
- Create a file (your secret documents await!)
- Name a file (give it a cool codename!)
- Delete a file (oops, time to erase the evidence!)
- Create a directory (build your secret lair!)
- Name a directory (make it sound mysterious!)
🌐 URL to Local File
- Download results of an HTTP/S GET to URL (fetching intel!)
- Write URL response to a file (saving the mission report!)
❌ Deleting
- Delete files by name (no traces left behind!)
- Delete directories by name (cleaning up the scene!)
✏️ Renaming
- Rename a file (time for a makeover!)
📦 Moving
- Move a file from one location to another (relocating assets!)
📄 Copying
- Copy a file from one location to another (double the fun!)
- Copy all files from one directory to another (mission accomplished!)
Powered by
Written in
# Functions
ApplyUserAgent applies the user agent to an HTTP request.
BreakUpString breaks up a string into lines of a given length.
CopyDirectory copies all files from srcDir to dstDir.
CopyFile copies a file from the source to the destination.
CreateEmptyFile creates an empty file.
CreateFile creates a file.
CustomRequest makes an HTTP GET request with a randomized user agent.
DeleteFile deletes the specified file.
ExitIfExists exits the program if the file already exists.
FileOrDirExists checks if a file or directory exists.
GenerateLotteryNumbers generates a slice of unique integers from 1 to num.
GenerateName generates a random business name with the specified length and set of allowed characters.
GeneratePassword generates a random password with the specified length and set of allowed characters.
GenerateQRCode generates a QR code with the specified configuration.
GetFileNames returns a slice of strings containing all the file names in a directory.
GetInput Function to get user input from the command line.
IntToString converts an int to a string.
ListFiles lists all files in the specified directory.
LoadHtml loads HTML content from a file to a string.
MakeBarChart creates a simple bar chart with the given data and renders it to the given file.
MoveFile moves a file from src to dst.
NewDir creates a new directory.
PrintCharMessage prints a given string character by character with a given delay time between each character.
RandomizeUserAgent randomizes the user agent.
ReadFileLineByLine reads a file line by line.
RemoveIfExists removes a file if it exists.
RemovePunctuation removes punctuation from a string.
RemoveWhitespace removes whitespace from a string.
RemoveWords removes words from a string.
RenameFile renames a file from oldName to newName.
ReplaceWhitespaceWithHyphen replaces whitespace with hyphens in a string.
ReverseString reverses a string.
SaveHtml saves HTML content from a URL to a specified file.
SaveImage saves an image from a URL to a file.
StringToInt converts a string to an int.
TitleToDirName converts a title to a directory name.
TruncateString truncates a string to a given length.
VippyEnv gets an environment variable value using viper.
# Variables
No description provided by the author
UserAgents is a list of user agents that can be used.