From 41b55f96c177266b7263c467bd7f9ef4b608c256 Mon Sep 17 00:00:00 2001 From: liphh Date: Fri, 2 Oct 2026 22:35:11 +0200 Subject: [PATCH] updated scripts --- arch-cleanup.sh | 263 ++++++++++++++++ aria.sh | 0 aria_1.sh | 91 ------ bluelight.sh | 87 ------ book_meta.sh | 29 ++ borg-backup.sh | 32 -- borg-mac.sh | 95 ------ borg-server.sh | 95 ------ borg.sh | 95 ------ br_blue.sh | 0 br_down.sh | 0 br_reset.sh | 0 br_up.sh | 0 bw-fzf.sh | 0 cleaner.sh | 0 email2vcf.sh | 5 - extraudio.sh | 0 fix-bitwarden.sh | 0 fix-bitwarden.sh~ | 17 - fzf-address.sh | 0 fzf-git.sh | 0 fzf_listoldfiles.sh | 0 kanata.sh | 0 keyboard-layer.sh | 0 latex.sh | 0 layer_notify.sh | 0 ledger/custom/1099-INT.tex | 120 ++++++++ ledger/custom/1099-MISC.tex | 128 ++++++++ ledger/custom/PNL.csv | 26 ++ ledger/custom/PNL.html | 376 ++++++++++++++++++++++ ledger/custom/PNL.tex | 112 +++++++ ledger/custom/ap_transaction.csv | 16 + ledger/custom/ap_transaction.html | 182 +++++++++++ ledger/custom/ap_transaction.tex | 138 +++++++++ ledger/custom/ar_transaction.csv | 16 + ledger/custom/ar_transaction.html | 182 +++++++++++ ledger/custom/ar_transaction.tex | 163 ++++++++++ ledger/custom/balance_sheet.csv | 26 ++ ledger/custom/balance_sheet.html | 411 +++++++++++++++++++++++++ ledger/custom/balance_sheet.tex | 136 ++++++++ ledger/custom/bin_list.html | 129 ++++++++ ledger/custom/bin_list.tex | 144 +++++++++ ledger/custom/check.tex | 44 +++ ledger/custom/check_base.tex | 80 +++++ ledger/custom/check_multiple.tex | 62 ++++ ledger/custom/display_report.csv | 62 ++++ ledger/custom/display_report.html | 167 ++++++++++ ledger/custom/display_report.odst | 91 ++++++ ledger/custom/display_report.tex | 135 ++++++++ ledger/custom/display_report.xlst | 91 ++++++ ledger/custom/envelope.tex | 37 +++ ledger/custom/invoice.894.edi | 24 ++ ledger/custom/invoice.html | 240 +++++++++++++++ ledger/custom/invoice.tex | 257 ++++++++++++++++ ledger/custom/letterhead.html | 59 ++++ ledger/custom/letterhead.tex | 54 ++++ ledger/custom/packing_list.html | 146 +++++++++ ledger/custom/packing_list.tex | 166 ++++++++++ ledger/custom/pick_list.html | 117 +++++++ ledger/custom/pick_list.tex | 134 ++++++++ ledger/custom/printPayment.html | 104 +++++++ ledger/custom/print_cash_transfer.html | 196 ++++++++++++ ledger/custom/print_journal_entry.html | 226 ++++++++++++++ ledger/custom/product_receipt.html | 186 +++++++++++ ledger/custom/product_receipt.tex | 180 +++++++++++ ledger/custom/purchase_order.html | 188 +++++++++++ ledger/custom/purchase_order.tex | 186 +++++++++++ ledger/custom/receipt.tex | 95 ++++++ ledger/custom/request_quotation.html | 144 +++++++++ ledger/custom/request_quotation.tex | 165 ++++++++++ ledger/custom/sales_order.html | 185 +++++++++++ ledger/custom/sales_order.tex | 196 ++++++++++++ ledger/custom/sales_quotation.html | 168 ++++++++++ ledger/custom/sales_quotation.tex | 163 ++++++++++ ledger/custom/shipping_label.tex | 45 +++ ledger/custom/statement.html | 114 +++++++ ledger/custom/statement.tex | 95 ++++++ ledger/custom/timecard.html | 131 ++++++++ ledger/custom/timecard.tex | 72 +++++ ledger/custom/work_order.html | 131 ++++++++ ledger/custom/work_order.tex | 168 ++++++++++ lxc-update.sh | 198 ++++++------ m3u8.sh | 0 mail | 0 maildir2vcf.sh | 0 move-trash.sh | 0 new-sync.sh | 0 newfile.vcf | 0 niri_br.sh | 0 nonum.sh | 0 nothumb.sh | 0 paperless_backup.sh | 52 ++++ ping-lxcupdate.sh | 23 ++ snapraid-ping.sh => ping-snapraid.sh | 0 ping_paperless_backup.sh | 23 ++ podman-update.sh | 0 pve_chmod.sh | 12 +- pve_chmod_nextcloud.sh | 10 + rename.sh | 50 +++ retag.sh | 0 sig-picker.sh | 0 split.sh | 0 start_adguard.sh | 25 ++ start_caddy.sh | 25 ++ start_immich.sh | 27 ++ start_netbird.sh | 25 ++ start_ollama.sh | 27 ++ start_second.sh | 60 ++++ start_servarr.sh | 84 +++++ sync-all-mail.sh | 0 sync-mail.sh | 0 thumb.sh | 0 tidal-mcp.sh | 11 - tidal.log | 2 - tmux-sessionizer.sh | 0 trash-message.sh | 0 yazi-picker.sh | 0 zoxide_openfiles_nvim.sh | 0 118 files changed, 8245 insertions(+), 627 deletions(-) create mode 100644 arch-cleanup.sh mode change 100755 => 100644 aria.sh delete mode 100755 aria_1.sh delete mode 100755 bluelight.sh create mode 100644 book_meta.sh delete mode 100755 borg-backup.sh delete mode 100755 borg-mac.sh delete mode 100755 borg-server.sh delete mode 100755 borg.sh mode change 100755 => 100644 br_blue.sh mode change 100755 => 100644 br_down.sh mode change 100755 => 100644 br_reset.sh mode change 100755 => 100644 br_up.sh mode change 100755 => 100644 bw-fzf.sh mode change 100755 => 100644 cleaner.sh delete mode 100755 email2vcf.sh mode change 100755 => 100644 extraudio.sh mode change 100755 => 100644 fix-bitwarden.sh delete mode 100755 fix-bitwarden.sh~ mode change 100755 => 100644 fzf-address.sh mode change 100755 => 100644 fzf-git.sh mode change 100755 => 100644 fzf_listoldfiles.sh mode change 100755 => 100644 kanata.sh mode change 100755 => 100644 keyboard-layer.sh mode change 100755 => 100644 latex.sh mode change 100755 => 100644 layer_notify.sh create mode 100644 ledger/custom/1099-INT.tex create mode 100644 ledger/custom/1099-MISC.tex create mode 100644 ledger/custom/PNL.csv create mode 100644 ledger/custom/PNL.html create mode 100644 ledger/custom/PNL.tex create mode 100644 ledger/custom/ap_transaction.csv create mode 100644 ledger/custom/ap_transaction.html create mode 100644 ledger/custom/ap_transaction.tex create mode 100644 ledger/custom/ar_transaction.csv create mode 100644 ledger/custom/ar_transaction.html create mode 100644 ledger/custom/ar_transaction.tex create mode 100644 ledger/custom/balance_sheet.csv create mode 100644 ledger/custom/balance_sheet.html create mode 100644 ledger/custom/balance_sheet.tex create mode 100644 ledger/custom/bin_list.html create mode 100644 ledger/custom/bin_list.tex create mode 100644 ledger/custom/check.tex create mode 100644 ledger/custom/check_base.tex create mode 100644 ledger/custom/check_multiple.tex create mode 100644 ledger/custom/display_report.csv create mode 100644 ledger/custom/display_report.html create mode 100644 ledger/custom/display_report.odst create mode 100644 ledger/custom/display_report.tex create mode 100644 ledger/custom/display_report.xlst create mode 100644 ledger/custom/envelope.tex create mode 100644 ledger/custom/invoice.894.edi create mode 100644 ledger/custom/invoice.html create mode 100644 ledger/custom/invoice.tex create mode 100644 ledger/custom/letterhead.html create mode 100644 ledger/custom/letterhead.tex create mode 100644 ledger/custom/packing_list.html create mode 100644 ledger/custom/packing_list.tex create mode 100644 ledger/custom/pick_list.html create mode 100644 ledger/custom/pick_list.tex create mode 100644 ledger/custom/printPayment.html create mode 100644 ledger/custom/print_cash_transfer.html create mode 100644 ledger/custom/print_journal_entry.html create mode 100644 ledger/custom/product_receipt.html create mode 100644 ledger/custom/product_receipt.tex create mode 100644 ledger/custom/purchase_order.html create mode 100644 ledger/custom/purchase_order.tex create mode 100644 ledger/custom/receipt.tex create mode 100644 ledger/custom/request_quotation.html create mode 100644 ledger/custom/request_quotation.tex create mode 100644 ledger/custom/sales_order.html create mode 100644 ledger/custom/sales_order.tex create mode 100644 ledger/custom/sales_quotation.html create mode 100644 ledger/custom/sales_quotation.tex create mode 100644 ledger/custom/shipping_label.tex create mode 100644 ledger/custom/statement.html create mode 100644 ledger/custom/statement.tex create mode 100644 ledger/custom/timecard.html create mode 100644 ledger/custom/timecard.tex create mode 100644 ledger/custom/work_order.html create mode 100644 ledger/custom/work_order.tex mode change 100755 => 100644 lxc-update.sh mode change 100755 => 100644 m3u8.sh mode change 100755 => 100644 mail mode change 100755 => 100644 maildir2vcf.sh mode change 100755 => 100644 move-trash.sh mode change 100755 => 100644 new-sync.sh mode change 100755 => 100644 newfile.vcf mode change 100755 => 100644 niri_br.sh mode change 100755 => 100644 nonum.sh mode change 100755 => 100644 nothumb.sh create mode 100644 paperless_backup.sh create mode 100644 ping-lxcupdate.sh rename snapraid-ping.sh => ping-snapraid.sh (100%) mode change 100755 => 100644 create mode 100644 ping_paperless_backup.sh mode change 100755 => 100644 podman-update.sh mode change 100755 => 100644 pve_chmod.sh create mode 100644 pve_chmod_nextcloud.sh create mode 100644 rename.sh mode change 100755 => 100644 retag.sh mode change 100755 => 100644 sig-picker.sh mode change 100755 => 100644 split.sh create mode 100644 start_adguard.sh create mode 100644 start_caddy.sh create mode 100644 start_immich.sh create mode 100644 start_netbird.sh create mode 100644 start_ollama.sh create mode 100644 start_second.sh create mode 100644 start_servarr.sh mode change 100755 => 100644 sync-all-mail.sh mode change 100755 => 100644 sync-mail.sh mode change 100755 => 100644 thumb.sh delete mode 100755 tidal-mcp.sh delete mode 100755 tidal.log mode change 100755 => 100644 tmux-sessionizer.sh mode change 100755 => 100644 trash-message.sh mode change 100755 => 100644 yazi-picker.sh mode change 100755 => 100644 zoxide_openfiles_nvim.sh diff --git a/arch-cleanup.sh b/arch-cleanup.sh new file mode 100644 index 0000000..4213d78 --- /dev/null +++ b/arch-cleanup.sh @@ -0,0 +1,263 @@ +#!/usr/bin/env bash +# Arch LXC Secure Cleanup & Audit Script +# Usage: sudo ./arch-cleanup.sh [--dry-run] + +set -euo pipefail + +# --------------------------------------------------------------------------- +# Safety check +# --------------------------------------------------------------------------- +if [[ $EUID -ne 0 ]]; then + echo "Error: Run this script with sudo: sudo $0 [--dry-run]" + exit 1 +fi + +# --------------------------------------------------------------------------- +# Config & User detection +# --------------------------------------------------------------------------- +DRY_RUN=false +if [[ "${1:-}" == "--dry-run" ]]; then + DRY_RUN=true + echo ">>> DRY-RUN MODE: No changes will be made <<<" + echo "" +fi + +TARGET_USER="${SUDO_USER:-$(logname 2>/dev/null || echo '')}" +TARGET_UID="" + +if [[ "$TARGET_USER" == "root" ]]; then + TARGET_USER="" +fi +if [[ -n "$TARGET_USER" ]]; then + TARGET_UID="$(id -u "$TARGET_USER" 2>/dev/null || echo '')" +fi + +# --------------------------------------------------------------------------- +# Helpers +# --------------------------------------------------------------------------- +RED=$'\e[31m' +GREEN=$'\e[32m' +YELLOW=$'\e[33m' +BLUE=$'\e[34m' +CYAN=$'\e[36m' +NC=$'\e[0m' + +log() { printf "${GREEN}[INFO]${NC} %s\n" "$*"; } +warn() { printf "${YELLOW}[WARN]${NC} %s\n" "$*"; } +err() { printf "${RED}[ERROR]${NC} %s\n" "$*"; } +section() { printf "\n${BLUE}=== %s ===${NC}\n" "$*"; } + +confirm() { + [[ "$DRY_RUN" == true ]] && return 0 + local r + read -r -p "$1 [y/N] " r + [[ "$r" =~ ^[Yy]$ ]] +} + +run() { + if [[ "$DRY_RUN" == true ]]; then + printf "${CYAN}[DRY-RUN]${NC} %s\n" "$*" + else + "$@" + fi +} + +# --------------------------------------------------------------------------- +# Phase 1 — Audit: Where is the 170 GB? +# --------------------------------------------------------------------------- +section "Disk Usage Summary" +df -hT / | grep -E 'Filesystem|/dev/' + +section "Suspect Directory Sizes" +suspects=( + /var/cache/pacman/pkg + /var/lib/containers + /var/log + /var/log/journal + /var/lib/systemd/coredump + /var/tmp + /tmp + /root +) + +for dir in "${suspects[@]}"; do + [[ -d "$dir" ]] || continue + sz=$(du -sh "$dir" 2>/dev/null | awk '{print $1}') + printf " %-40s %s\n" "$dir" "$sz" +done + +if [[ -n "$TARGET_USER" && -d "/home/$TARGET_USER" ]]; then + section "User '$TARGET_USER' Suspect Directories" + user_suspects=( + "/home/$TARGET_USER/.cache" + "/home/$TARGET_USER/.cache/paru" + "/home/$TARGET_USER/.cache/paru/clone" + "/home/$TARGET_USER/.cache/paru/pkg" + "/home/$TARGET_USER/.cache/yay" + "/home/$TARGET_USER/.local/share/containers" + ) + for dir in "${user_suspects[@]}"; do + [[ -e "$dir" ]] || continue + sz=$(du -sh "$dir" 2>/dev/null | awk '{print $1}') + printf " %-50s %s\n" "$dir" "$sz" + done +fi + +section "Large Individual Files (>1 GB)" +for search_root in /var /home /root /opt; do + [[ -d "$search_root" ]] || continue + find "$search_root" -xdev -maxdepth 5 -type f -size +1G -exec ls -lh {} + 2>/dev/null | head -n 20 +done + +echo "" +if ! confirm "Continue with cleanup?"; then + log "Aborted by user." + exit 0 +fi + +# --------------------------------------------------------------------------- +# Phase 2 — Cleanup +# --------------------------------------------------------------------------- + +# --- Pacman cache --- +section "Pacman Cache Cleanup" +if command -v paccache &>/dev/null; then + log "Removing cached packages for uninstalled software..." + run paccache -ruv + + log "Keeping last 2 versions of installed packages, removing older..." + run paccache -rvk2 +else + warn "'paccache' (pacman-contrib) not found." + if confirm "Install pacman-contrib now? (Recommended; needs a little free space)"; then + if [[ "$DRY_RUN" == true ]]; then + log "[DRY-RUN] Would install pacman-contrib and run paccache" + else + pacman -S --noconfirm --needed pacman-contrib + paccache -ruv + paccache -rvk2 + fi + else + if confirm "Run fallback 'pacman -Sc'? (Removes ALL uninstalled cached packages)"; then + run pacman -Sc --noconfirm + fi + fi +fi + +# --- Orphaned packages --- +section "Orphaned Packages" +orphans="$(pacman -Qdtq 2>/dev/null || true)" +if [[ -z "$orphans" ]]; then + log "No orphaned packages found." +else + warn "Orphaned packages found:" + echo "$orphans" + if confirm "Remove these orphaned packages?"; then + if [[ "$DRY_RUN" == true ]]; then + log "[DRY-RUN] Would remove: $orphans" + else + # shellcheck disable=SC2086 + pacman -Rns --noconfirm $orphans + fi + fi +fi + +# --- AUR Helpers (paru / yay) --- +section "AUR Helper Cache Cleanup" + +clean_aur() { + local helper=$1 + local binpath clone_dir pkg_dir sz + binpath="$(command -v "$helper" 2>/dev/null || true)" + + if [[ -z "$binpath" ]]; then + log "$helper not installed." + return + fi + + if [[ -z "$TARGET_USER" ]]; then + warn "Cannot determine non-root user for $helper cleanup." + return + fi + + log "Running safe cache clean for $helper..." + run sudo -u "$TARGET_USER" "$binpath" -Sc --noconfirm || warn "$helper -Sc finished with warnings" + + clone_dir="/home/$TARGET_USER/.cache/$helper/clone" + if [[ -d "$clone_dir" ]]; then + sz=$(du -sh "$clone_dir" 2>/dev/null | awk '{print $1}') + warn "$helper clone directory size: $sz" + if confirm "Delete $helper PKGBUILD clones? (They must be re-downloaded later)"; then + run rm -rf "${clone_dir:?}"/* + log "Cleaned $clone_dir" + fi + fi + + pkg_dir="/home/$TARGET_USER/.cache/$helper/pkg" + if [[ -d "$pkg_dir" ]] && command -v paccache &>/dev/null; then + log "Running paccache on $helper package dir..." + run paccache -ruv --cachedir "$pkg_dir" || true + fi +} + +clean_aur "paru" +clean_aur "yay" + +# --- Podman (rootful + rootless) --- +section "Podman Cleanup" + +if command -v podman &>/dev/null; then + log "Rootful Podman disk usage:" + run podman system df || true + + if confirm "Prune unused rootful Podman resources (containers, networks, images, build cache)?"; then + run podman system prune -a -f + fi +else + log "Podman (rootful) not installed." +fi + +if [[ -n "$TARGET_USER" && -n "$TARGET_UID" ]]; then + if sudo -u "$TARGET_USER" podman --version &>/dev/null; then + log "Rootless Podman disk usage for $TARGET_USER:" + run sudo -u "$TARGET_USER" podman system df || true + + if confirm "Prune unused rootless Podman resources for $TARGET_USER?"; then + run sudo -u "$TARGET_USER" \ + XDG_RUNTIME_DIR="/run/user/$TARGET_UID" \ + podman system prune -a -f || + run sudo -u "$TARGET_USER" podman system prune -a -f + fi + else + log "Rootless Podman not configured for $TARGET_USER." + fi +else + log "Skipping rootless Podman (no target user detected)." +fi + +# --- Logs --- +section "System Logs" +if [[ -d /var/log/journal ]] && command -v journalctl &>/dev/null; then + jsz=$(du -sh /var/log/journal 2>/dev/null | awk '{print $1}') + log "Persistent journal size: $jsz" + if confirm "Vacuum journal to max 500 MB?"; then + run journalctl --vacuum-size=500M + fi +else + log "No persistent systemd journal detected." +fi + +if find /var/log -maxdepth 2 -type f -size +500M 2>/dev/null | grep -q .; then + warn "Large uncompressed log files remain in /var/log. You may want to truncate them manually." +fi + +# --------------------------------------------------------------------------- +# Final Summary +# --------------------------------------------------------------------------- +section "Final Disk Usage" +df -hT / + +log "Cleanup complete. Review the output above to see how much was recovered." +if [[ "$DRY_RUN" == true ]]; then + log "This was a DRY RUN. Re-run without --dry-run to actually free space." +fi diff --git a/aria.sh b/aria.sh old mode 100755 new mode 100644 diff --git a/aria_1.sh b/aria_1.sh deleted file mode 100755 index ee597fe..0000000 --- a/aria_1.sh +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/bash - -# Fast Aria2 Download Script -# Usage: ./aria2-download.sh [output-filename] - -set -e - -# Colors for output -RED='\033[0;31m' -GREEN='\033[0;32m' -YELLOW='\033[1;33m' -NC='\033[0m' # No Color - -# Check if aria2c is installed -if ! command -v aria2c &> /dev/null; then - echo -e "${RED}aria2c is not installed!${NC}" - echo "Installing aria2..." - - if [[ "$OSTYPE" == "linux-gnu"* ]]; then - if command -v apt-get &> /dev/null; then - sudo apt-get update && sudo apt-get install -y aria2 - elif command -v yum &> /dev/null; then - sudo yum install -y aria2 - elif command -v pacman &> /dev/null; then - sudo pacman -S aria2 - else - echo -e "${RED}Please install aria2 manually${NC}" - exit 1 - fi - elif [[ "$OSTYPE" == "darwin"* ]]; then - if command -v brew &> /dev/null; then - brew install aria2 - else - echo -e "${RED}Please install Homebrew or aria2 manually${NC}" - exit 1 - fi - else - echo -e "${RED}Unsupported OS. Please install aria2 manually${NC}" - exit 1 - fi -fi - -# Check if URL is provided -if [ -z "$1" ]; then - echo -e "${RED}Error: No URL provided${NC}" - echo "Usage: $0 [output-filename]" - exit 1 -fi - -URL="$1" -OUTPUT_FILE="$2" - -# Build aria2c command with optimized settings -ARIA2_CMD="aria2c \ - --max-connection-per-server=16 \ - --split=16 \ - --min-split-size=1M \ - --max-concurrent-downloads=16 \ - --continue=true \ - --max-tries=5 \ - --retry-wait=3 \ - --timeout=60 \ - --connect-timeout=30 \ - --file-allocation=none \ - --summary-interval=0 \ - --console-log-level=notice" - -# Add output filename if provided -if [ -n "$OUTPUT_FILE" ]; then - ARIA2_CMD="$ARIA2_CMD --out=\"$OUTPUT_FILE\"" -fi - -# Add URL -ARIA2_CMD="$ARIA2_CMD \"$URL\"" - -echo -e "${GREEN}Starting download...${NC}" -echo -e "${YELLOW}URL: $URL${NC}" -if [ -n "$OUTPUT_FILE" ]; then - echo -e "${YELLOW}Output: $OUTPUT_FILE${NC}" -fi -echo "" - -# Execute download -eval $ARIA2_CMD - -if [ $? -eq 0 ]; then - echo -e "\n${GREEN}✓ Download completed successfully!${NC}" -else - echo -e "\n${RED}✗ Download failed!${NC}" - exit 1 -fi diff --git a/bluelight.sh b/bluelight.sh deleted file mode 100755 index 6341a3d..0000000 --- a/bluelight.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/bash - -SHADER_DIR="$HOME/.config/hypr/shaders" -SHADER_FILE="$SHADER_DIR/brightness.frag" - -# Ensure shader directory exists -mkdir -p "$SHADER_DIR" - -# Get screen brightness level -echo "Enter screen brightness level (0-10, where 10 = 100%):" -read -r LEVEL - -# Validate input -if ! [[ "$LEVEL" =~ ^[0-9]+$ ]] || [ "$LEVEL" -lt 0 ] || [ "$LEVEL" -gt 10 ]; then - echo "Invalid input. Please enter a number between 0 and 10." - exit 1 -fi - -# Convert to decimal (0-10 -> 0.0-1.0) -BRIGHTNESS=$(echo "scale=2; $LEVEL / 10" | bc) - -# Ask about keyboard backlight -echo "Adjust keyboard backlight? (y/n):" -read -r KBD_ADJUST - -if [[ "$KBD_ADJUST" == "y" || "$KBD_ADJUST" == "Y" ]]; then - echo "Enter keyboard backlight level (0-10, where 10 = 100%):" - read -r KBD_LEVEL - - # Validate keyboard input - if ! [[ "$KBD_LEVEL" =~ ^[0-9]+$ ]] || [ "$KBD_LEVEL" -lt 0 ] || [ "$KBD_LEVEL" -gt 10 ]; then - echo "Invalid input. Please enter a number between 0 and 10." - exit 1 - fi - - # Convert to percentage (0-10 -> 0-100) - KBD_PERCENT=$((KBD_LEVEL * 10)) - - # Set keyboard backlight - kbdlight set $KBD_PERCENT - echo "Keyboard backlight set to ${KBD_PERCENT}%" -fi - -# Ask about blue light filter -echo "Apply blue light filter? (y/n):" -read -r BLUELIGHT - -# Create shader based on choice -cat > "$SHADER_FILE" << EOF -#version 300 es - -precision mediump float; - -in vec2 v_texcoord; -out vec4 fragColor; -uniform sampler2D tex; - -void main() { - vec4 pixColor = texture(tex, v_texcoord); - -EOF - -if [[ "$BLUELIGHT" == "y" || "$BLUELIGHT" == "Y" ]]; then - cat >> "$SHADER_FILE" << EOF - // Reduce blue light - pixColor.r *= 1.0; - pixColor.g *= 0.85; - pixColor.b *= 0.65; - -EOF -fi - -cat >> "$SHADER_FILE" << EOF - // Adjust brightness - pixColor.rgb *= $BRIGHTNESS; - - fragColor = pixColor; -} -EOF - -# Apply shader -if [ -z "$HYPRLAND_INSTANCE_SIGNATURE" ]; then - export HYPRLAND_INSTANCE_SIGNATURE=$(ls -t /tmp/hypr/ 2>/dev/null | head -n1) -fi -/usr/bin/hyprctl keyword decoration:screen_shader "$SHADER_FILE" - -echo "Screen brightness set to ${LEVEL}0% $([ "$BLUELIGHT" == "y" ] || [ "$BLUELIGHT" == "Y" ] && echo "with blue light filter")" diff --git a/book_meta.sh b/book_meta.sh new file mode 100644 index 0000000..ccfec7e --- /dev/null +++ b/book_meta.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# 1. Choose the file +echo "Select the ebook file:" +select file in *.epub *.mobi *.pdf *.azw3; do + if [ -n "$file" ]; then + break + else + echo "Invalid selection." + fi +done + +# 2. Prompt for metadata +read -p "Enter Author: " author +read -p "Enter Book Title: " title +read -p "Enter ISBN-13: " isbn13 +read -p "Enter ASIN (optional): " asin +read -p "Enter Goodreads ID: " grid + +# 3. Apply metadata using ebook-meta +# Adding the goodreads identifier is the most reliable fix for Readarr [6] +ebook-meta "$file" \ + --authors "$author" \ + --title "$title" \ + --identifier "isbn:$isbn13" \ + --identifier "asin:$asin" \ + --identifier "goodreads:$grid" + +echo "Metadata updated with Goodreads ID: $grid" diff --git a/borg-backup.sh b/borg-backup.sh deleted file mode 100755 index 5f7f4d5..0000000 --- a/borg-backup.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -SOURCE_DIRS=("/home/liph/Documents" "/home/liph/Pictures" "/home/liph/Downloads") -REPO_DIR="/home/liph/borg-repo" -BORG_PASSPHRASE="1ChagearC" - -export BORG_PASSPHRASE - -for SOURCE_DIR in "${SOURCE_DIRS[@]}"; do - ARCHIVE_NAME="{hostname}-{user}-{now}" - - echo "Starting backup of ${SOURCE_DIR}..." - borg create --stats --progress \ - "${REPO_DIR}::${ARCHIVE_NAME}" \ - "${SOURCE_DIR}" - - if [ $? -eq 0 ]; then - echo "Backup of ${SOURCE_DIR} completed successfully!" - else - echo "Backup of ${SOURCE_DIR} failed!" - fi -done - -echo "Pruning old backups..." -borg prune --stats --progress \ - --keep-daily=7 \ - --keep-weekly=4 \ - --keep-monthly=6 \ - "${REPO_DIR}" - -echo "Backup and pruning completed!" - diff --git a/borg-mac.sh b/borg-mac.sh deleted file mode 100755 index 5175778..0000000 --- a/borg-mac.sh +++ /dev/null @@ -1,95 +0,0 @@ -#!/bin/sh - -# Setting this, so the repo does not need to be given on the commandline: -# export BORG_REPO=ssh://username@example.com:2022/~/backup/main -#export BORG_REPO=~/backup/ - -# See the section "Passphrase notes" for more infos. -#export BORG_PASSPHRASE='1ChagearC' - -export BORG_REPO="ssh://100.121.203.110:2222/./repo/borg-repo" -export BORG_PASSPHRASE="1ChagearC" # Encryption key -BACKUP_SOURCES=( - "/home/liph/Downloads/" - "/home/liph/dotfiles/" - "/home/liph/scripts" -) # What to back up -BACKUP_NAME="laptop-$(date +%Y-%m-%d)" # Dynamic backup name - -# some helpers and error handling: -info() { printf "\n%s %s\n\n" "$( date )" "$*" >&2; } -trap 'echo $( date ) Backup interrupted >&2; exit 2' INT TERM - -info "Starting backup" - -# Initialize Borg repo (if not exists) -borg init --encryption=repokey "$BORG_REPO" 2>/dev/null || true - -# Backup the most important directories into an archive named after -# the machine this script is currently running on: - -borg create \ - --verbose \ - --filter AME \ - --list \ - --stats \ - --show-rc \ - --progress \ - --compression lz4 \ - --exclude-caches \ - --exclude 'home/*/.cache/*' \ - --exclude 'var/tmp/*' \ - "$BORG_REPO::$BACKUP_NAME" \ - "${BACKUP_SOURCES[@]}" \ -# ::'{hostname}-{user}-{now}' \ -# /home/liph/Documents/ \ -# /home/liph/Pictures/ \ -# /home/liph/Downloads/ -# /etc \ -# /home \ -# /root \ -# /var -backup_exit=$? - -info "Pruning repository" - -# Use the `prune` subcommand to maintain 7 daily, 4 weekly and 6 monthly -# archives of THIS machine. The '{hostname}-*' matching is very important to -# limit prune's operation to this machine's archives and not apply to -# other machines' archives also: - -borg prune \ - --list \ - --glob-archives '{hostname}-*' \ - --show-rc \ - --keep-daily 7 \ - --keep-weekly 4 \ - --keep-monthly 6 - "$BORG_REPO" - -prune_exit=$? - -# actually free repo disk space by compacting segments - -info "Compacting repository" - -borg compact - -compact_exit=$? - -# use highest exit code as global exit code -global_exit=$(( backup_exit > prune_exit ? backup_exit : prune_exit )) -global_exit=$(( compact_exit > global_exit ? compact_exit : global_exit )) - -if [ ${global_exit} -eq 0 ]; then - info "Backup, Prune, and Compact finished successfully" -elif [ ${global_exit} -eq 1 ]; then - info "Backup, Prune, and/or Compact finished with warnings" -else - info "Backup, Prune, and/or Compact finished with errors" -fi - -exit ${global_exit} - -# Check backup integrity -borg check "$BORG_REPO" diff --git a/borg-server.sh b/borg-server.sh deleted file mode 100755 index 7b623ff..0000000 --- a/borg-server.sh +++ /dev/null @@ -1,95 +0,0 @@ -#!/bin/sh - -# Setting this, so the repo does not need to be given on the commandline: -# export BORG_REPO=ssh://username@example.com:2022/~/backup/main -#export BORG_REPO=~/backup/ - -# See the section "Passphrase notes" for more infos. -#export BORG_PASSPHRASE='1ChagearC' - -export BORG_REPO="ssh://100.121.203.110:2222/./repo/borg-repo" -export BORG_PASSPHRASE="1ChagearC" # Encryption key -BACKUP_SOURCES=( - "/home/liph/Documents" - "/home/liph/Pictures" - "/home/liph/scripts" -) # What to back up -BACKUP_NAME="server-$(date +%Y-%m-%d)" # Dynamic backup name - -# some helpers and error handling: -info() { printf "\n%s %s\n\n" "$( date )" "$*" >&2; } -trap 'echo $( date ) Backup interrupted >&2; exit 2' INT TERM - -info "Starting backup" - -# Initialize Borg repo (if not exists) -borg init --encryption=repokey "$BORG_REPO" 2>/dev/null || true - -# Backup the most important directories into an archive named after -# the machine this script is currently running on: - -borg create \ - --verbose \ - --filter AME \ - --list \ - --stats \ - --show-rc \ - --progress \ - --compression lz4 \ - --exclude-caches \ - --exclude 'home/*/.cache/*' \ - --exclude 'var/tmp/*' \ - "$BORG_REPO::$BACKUP_NAME" \ - "${BACKUP_SOURCES[@]}" \ -# ::'{hostname}-{user}-{now}' \ -# /home/liph/Documents/ \ -# /home/liph/Pictures/ \ -# /home/liph/Downloads/ -# /etc \ -# /home \ -# /root \ -# /var -backup_exit=$? - -info "Pruning repository" - -# Use the `prune` subcommand to maintain 7 daily, 4 weekly and 6 monthly -# archives of THIS machine. The '{hostname}-*' matching is very important to -# limit prune's operation to this machine's archives and not apply to -# other machines' archives also: - -borg prune \ - --list \ - --glob-archives '{hostname}-*' \ - --show-rc \ - --keep-daily 7 \ - --keep-weekly 4 \ - --keep-monthly 6 - "$BORG_REPO" - -prune_exit=$? - -# actually free repo disk space by compacting segments - -info "Compacting repository" - -borg compact - -compact_exit=$? - -# use highest exit code as global exit code -global_exit=$(( backup_exit > prune_exit ? backup_exit : prune_exit )) -global_exit=$(( compact_exit > global_exit ? compact_exit : global_exit )) - -if [ ${global_exit} -eq 0 ]; then - info "Backup, Prune, and Compact finished successfully" -elif [ ${global_exit} -eq 1 ]; then - info "Backup, Prune, and/or Compact finished with warnings" -else - info "Backup, Prune, and/or Compact finished with errors" -fi - -exit ${global_exit} - -# Check backup integrity -borg check "$BORG_REPO" diff --git a/borg.sh b/borg.sh deleted file mode 100755 index b6ea062..0000000 --- a/borg.sh +++ /dev/null @@ -1,95 +0,0 @@ -#!/bin/sh - -# Setting this, so the repo does not need to be given on the commandline: -# export BORG_REPO=ssh://username@example.com:2022/~/backup/main -#export BORG_REPO=~/backup/ - -# See the section "Passphrase notes" for more infos. -#export BORG_PASSPHRASE='1ChagearC' - -export BORG_REPO="ssh://100.121.203.110:2222/./repo/borg-repo" -export BORG_PASSPHRASE="1ChagearC" # Encryption key -BACKUP_SOURCES=( - "/home/liph/Documents" - "/home/liph/Pictures" - "/home/liph/scripts" -) # What to back up -BACKUP_NAME="laptop-$(date +%Y-%m-%d)" # Dynamic backup name - -# some helpers and error handling: -info() { printf "\n%s %s\n\n" "$( date )" "$*" >&2; } -trap 'echo $( date ) Backup interrupted >&2; exit 2' INT TERM - -info "Starting backup" - -# Initialize Borg repo (if not exists) -borg init --encryption=repokey "$BORG_REPO" 2>/dev/null || true - -# Backup the most important directories into an archive named after -# the machine this script is currently running on: - -borg create \ - --verbose \ - --filter AME \ - --list \ - --stats \ - --show-rc \ - --progress \ - --compression lz4 \ - --exclude-caches \ - --exclude 'home/*/.cache/*' \ - --exclude 'var/tmp/*' \ - "$BORG_REPO::$BACKUP_NAME" \ - "${BACKUP_SOURCES[@]}" \ -# ::'{hostname}-{user}-{now}' \ -# /home/liph/Documents/ \ -# /home/liph/Pictures/ \ -# /home/liph/Downloads/ -# /etc \ -# /home \ -# /root \ -# /var -backup_exit=$? - -info "Pruning repository" - -# Use the `prune` subcommand to maintain 7 daily, 4 weekly and 6 monthly -# archives of THIS machine. The '{hostname}-*' matching is very important to -# limit prune's operation to this machine's archives and not apply to -# other machines' archives also: - -borg prune \ - --list \ - --glob-archives '{hostname}-*' \ - --show-rc \ - --keep-daily 7 \ - --keep-weekly 4 \ - --keep-monthly 6 - "$BORG_REPO" - -prune_exit=$? - -# actually free repo disk space by compacting segments - -info "Compacting repository" - -borg compact - -compact_exit=$? - -# use highest exit code as global exit code -global_exit=$(( backup_exit > prune_exit ? backup_exit : prune_exit )) -global_exit=$(( compact_exit > global_exit ? compact_exit : global_exit )) - -if [ ${global_exit} -eq 0 ]; then - info "Backup, Prune, and Compact finished successfully" -elif [ ${global_exit} -eq 1 ]; then - info "Backup, Prune, and/or Compact finished with warnings" -else - info "Backup, Prune, and/or Compact finished with errors" -fi - -exit ${global_exit} - -# Check backup integrity -borg check "$BORG_REPO" diff --git a/br_blue.sh b/br_blue.sh old mode 100755 new mode 100644 diff --git a/br_down.sh b/br_down.sh old mode 100755 new mode 100644 diff --git a/br_reset.sh b/br_reset.sh old mode 100755 new mode 100644 diff --git a/br_up.sh b/br_up.sh old mode 100755 new mode 100644 diff --git a/bw-fzf.sh b/bw-fzf.sh old mode 100755 new mode 100644 diff --git a/cleaner.sh b/cleaner.sh old mode 100755 new mode 100644 diff --git a/email2vcf.sh b/email2vcf.sh deleted file mode 100755 index 70cf6a9..0000000 --- a/email2vcf.sh +++ /dev/null @@ -1,5 +0,0 @@ -# Convert your aerc/maildir to vCards -em2vcf /mnt/flash1/mail-server/mail/maildir/ \ - --output-folder ~/.contacts_mail/ \ - --no-duplicates \ - --overwrite diff --git a/extraudio.sh b/extraudio.sh old mode 100755 new mode 100644 diff --git a/fix-bitwarden.sh b/fix-bitwarden.sh old mode 100755 new mode 100644 diff --git a/fix-bitwarden.sh~ b/fix-bitwarden.sh~ deleted file mode 100755 index 59bd363..0000000 --- a/fix-bitwarden.sh~ +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -# Save as ~/.config/niri/scripts/fix-bitwarden.sh -# Make executable: chmod +x ~/.config/niri/scripts/fix-bitwarden.sh - -niri msg -j event-stream | jq --unbuffered -r ' - select(.WindowOpenedOrChanged) | - .WindowOpenedOrChanged.window | - select( - (.title? | match("Extension:.*LibreWolf")) and - .is_floating == false - ) | - .id -' | while read id; do - niri msg action toggle-window-floating --id="$id" - niri msg action set-window-height 50% - niri msg action set-window-width 20% -done diff --git a/fzf-address.sh b/fzf-address.sh old mode 100755 new mode 100644 diff --git a/fzf-git.sh b/fzf-git.sh old mode 100755 new mode 100644 diff --git a/fzf_listoldfiles.sh b/fzf_listoldfiles.sh old mode 100755 new mode 100644 diff --git a/kanata.sh b/kanata.sh old mode 100755 new mode 100644 diff --git a/keyboard-layer.sh b/keyboard-layer.sh old mode 100755 new mode 100644 diff --git a/latex.sh b/latex.sh old mode 100755 new mode 100644 diff --git a/layer_notify.sh b/layer_notify.sh old mode 100755 new mode 100644 diff --git a/ledger/custom/1099-INT.tex b/ledger/custom/1099-INT.tex new file mode 100644 index 0000000..b25f1b5 --- /dev/null +++ b/ledger/custom/1099-INT.tex @@ -0,0 +1,120 @@ + + + +\documentclass[usletter]{article} +\usepackage{textpos} +\usepackage[top=0.0in, bottom=0in, left=0in, right=0in]{geometry} +\setlength{\parindent}{0pt} +\setlength{\TPHorizModule}{1in} +\setlength{\TPVertModule}{1in} + + +\begin{textblock}{4}[0,1](1, 1.5) +\\ +\\ +Tel: +\end{textblock} + +\begin{textblock}{2}[0,1](1, 3.5) + +\end{textblock} + +\begin{textblock}{2}[0,1](3, 3.5) + +\end{textblock} + +\begin{textblock}{4}[0,1](1, 4) +\\ + +\\ +\\ +\\ + +No billing or physical address set \\ + +, +\end{textblock} + +\begin{textblock}{2}[0,1](4.5, 1.5) + +\end{textblock} + + + +\clearpage + +\clearpage + +\clearpage + +\clearpage + + +\begin{document} + + +\end{document} + + diff --git a/ledger/custom/1099-MISC.tex b/ledger/custom/1099-MISC.tex new file mode 100644 index 0000000..bb172b3 --- /dev/null +++ b/ledger/custom/1099-MISC.tex @@ -0,0 +1,128 @@ + + + +\documentclass[usletter]{article} +\usepackage{textpos} +\usepackage[top=0.0in, bottom=0in, left=0in, right=0in]{geometry} +\setlength{\parindent}{0pt} +\setlength{\TPHorizModule}{1in} +\setlength{\TPVertModule}{1in} + + +\begin{textblock}{4}[0,1](1, 1.5) +\\ +\\ +Tel: +\end{textblock} + +\begin{textblock}{2}[0,1](1, 3.5) + +\end{textblock} + +\begin{textblock}{2}[0,1](3, 3.5) + +\end{textblock} + +\begin{textblock}{4}[0,1](1, 4) +\\ + +\\ +\\ +\\ + +No billing or physical address set \\ + +, +\end{textblock} + +\begin{textblock}{2}[0,1](4.5, 4.5) + +\end{textblock} + + + + +\clearpage + +\clearpage + +\clearpage + +\clearpage + + + + +\begin{document} + +\end{document} + diff --git a/ledger/custom/PNL.csv b/ledger/custom/PNL.csv new file mode 100644 index 0000000..4a81e5e --- /dev/null +++ b/ledger/custom/PNL.csv @@ -0,0 +1,26 @@ + +account,description,is_heading,heading_account +,"" + +,"",YN, +, + diff --git a/ledger/custom/PNL.html b/ledger/custom/PNL.html new file mode 100644 index 0000000..fdfc916 --- /dev/null +++ b/ledger/custom/PNL.html @@ -0,0 +1,376 @@ + + + + + + <?lsmb title ?> + + + + +
+ +

+
+ +
+
+ +
+ + + '; + i = i + 1; + END; + ?> + + + '; + i = i + 1; + END; + ?> + + + + + + + + + + " onclick="toggle('', 'sub-')" > + + 0 ?> + + + + + + + + + + + + +
+
  > + > + + + +
+
+

Click on the headings to collapse sections.

+ + + diff --git a/ledger/custom/PNL.tex b/ledger/custom/PNL.tex new file mode 100644 index 0000000..4c67342 --- /dev/null +++ b/ledger/custom/PNL.tex @@ -0,0 +1,112 @@ + + + + + +\documentclass[10pt]{article} +\usepackage{longtable} +\usepackage[paper,top=2cm,bottom=1.5cm,left=1.1cm,right=1.5cm]{geometry} +\begin{document} +\renewcommand\baselinestretch{1.2}\selectfont +\begin{center} +\Huge{} + +\small{ +\texttt{} + + +\texttt{} +} +\end{center} + + +\begin{longtable}{@{\extracolsep{'0pt}}p{2cm}} +\\ +\multicolumn{}{l}{} &% + \\ +\\ +% +% + + 1 -?> +\multicolumn{}{l}{}% + + + +% + & % + +% +\\ +% + + +\cline{-} +\noalign{\vskip 2pt} +\cline{-} + +\\ + + + + + +\end{longtable} +\end{document} + + diff --git a/ledger/custom/ap_transaction.csv b/ledger/custom/ap_transaction.csv new file mode 100644 index 0000000..647fbb2 --- /dev/null +++ b/ledger/custom/ap_transaction.csv @@ -0,0 +1,16 @@ + +account,amount,description,project +,,,, + +,,, + diff --git a/ledger/custom/ap_transaction.html b/ledger/custom/ap_transaction.html new file mode 100644 index 0000000..4ea3288 --- /dev/null +++ b/ledger/custom/ap_transaction.html @@ -0,0 +1,182 @@ + + + + + + <?lsmb text('AP Transaction') ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+
+ + + + + +
+
+
+
+ , +
+
+
+
+
+
+
+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
 
 
 
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
") ?>
+ ") ?>@ + %
+
***** /100
+ +

+
  + + + + + + + + + + +
+
+
+ + + + + + + + + + + + + + + +
 
+
+
+ + diff --git a/ledger/custom/ap_transaction.tex b/ledger/custom/ap_transaction.tex new file mode 100644 index 0000000..b06dae2 --- /dev/null +++ b/ledger/custom/ap_transaction.tex @@ -0,0 +1,138 @@ + + Defaults; + # The value should be without the 'paper' suffix. E.g. "a4" for "a4paper" + # SETTINGS.papersize = ""; + INCLUDE "preamble.tex"; -?> + +\begin{document} + +\pagestyle{myheadings} +\thispagestyle{empty} + +\ifpdftex + %% (pdf)latex + \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont +\fi + + + +\centerline{\MakeUppercase{\textbf{}}} + +\vspace*{0.5cm} + +\parbox[t]{.5\textwidth}{ + + + + + + + + +\hspace{-0.1cm}, + + + + +\vspace{0.3cm} + + + +\vspace{0.2cm} + + + +Tel: + + + +Fax: + + + + + +Tax Number: + +} +\hfill +\begin{tabular}[t]{ll} + \textbf{} & \\ + \textbf{} & \\ + \textbf{} & \\ + + \textbf{} & \\ + + + \textbf{} & \\ + + \textbf{} & \\ +\end{tabular} + +\vspace{1cm} + +\begin{tabularx}{\textwidth}[t]{@{}llrX@{\hspace{1cm}}l@{}} + + + & + & + & + & + \\ + + + \multicolumn{2}{r}{\textbf{Subtotal}} & & \\ + + + \multicolumn{2}{r}{\textbf{ @ \%}} & & \\ + + + \multicolumn{2}{r}{\textbf{Total}} & & \\ + +\end{tabularx} + +\vspace{0.3cm} + + ***** /100 + + +\vspace{0.3cm} + +\medskip + + + + +\vspace{0.3cm} + + +\begin{tabular}{@{}llllr@{}} + \multicolumn{5}{c}{\textbf{}} \\ + \hline + \textbf{} & & \textbf{} & \textbf{} & \textbf{} \\ + + + + & & & & \\ + + +\end{tabular} + + +\end{document} + diff --git a/ledger/custom/ar_transaction.csv b/ledger/custom/ar_transaction.csv new file mode 100644 index 0000000..b0d9ca0 --- /dev/null +++ b/ledger/custom/ar_transaction.csv @@ -0,0 +1,16 @@ + +account,description,amount,memo,project +,,,, + +,,,,, + diff --git a/ledger/custom/ar_transaction.html b/ledger/custom/ar_transaction.html new file mode 100644 index 0000000..6b187a1 --- /dev/null +++ b/ledger/custom/ar_transaction.html @@ -0,0 +1,182 @@ + + + + + + <?lsmb text('AR Transaction') ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+
+ + + + + +

+
+
+ , +
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
 
 
 
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  ") ?> 
  
+ ") ?>@ + % 
 
+
***** /100
+ +

+
+ + + + + + + + + + +
+
+
+ + + + + + + + + + + + + +
 
+
+
") ?> +
+ + diff --git a/ledger/custom/ar_transaction.tex b/ledger/custom/ar_transaction.tex new file mode 100644 index 0000000..438cb56 --- /dev/null +++ b/ledger/custom/ar_transaction.tex @@ -0,0 +1,163 @@ + + Defaults; + # The value should be without the 'paper' suffix. E.g. "a4" for "a4paper" + # SETTINGS.papersize = ""; + INCLUDE "preamble.tex"; -?> + +\begin{document} + +\pagestyle{empty} + +\ifpdftex + %% (pdf)latex + \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont +\fi + +\parbox{\textwidth}{% + \parbox[b]{.42\textwidth}{% + + + + } + %\parbox[b]{.2\textwidth}{ + %\includegraphics[scale=0.3]{ledger-smb} + %} + \hfill + \begin{tabular}[b]{rr@{}} + & \\ + & + \end{tabular} + + \rule[1.5em]{\textwidth}{0.5pt} +} + +\centerline{\MakeUppercase{}} + +\vspace*{0.5cm} + +\parbox[t]{.5\textwidth}{ + + + + + + + + +, + + + + + +\vspace{0.3cm} + + + + + +\vspace{0.2cm} + + + + + + + + + + + + + + +} +\hfill +\begin{tabular}[t]{ll} + \textbf{} & \\ + \textbf{} & \\ + \textbf{} & \\ + + \textbf{PO \#} & \\ + + + \textbf{} & \\ + + \textbf{} & \\ +\end{tabular} + +\vspace{1cm} + +\begin{tabularx}{\textwidth}[t]{@{}llrX@{\hspace{1cm}}l@{}} + + + & + & + & + & + \\ + + + \multicolumn{2}{r}{\textbf{Subtotal}} & & \\ + + + \multicolumn{2}{r}{\textbf{ @ \%}} & & \\ + + + \multicolumn{2}{r}{\textbf{Total}} & & \\ + +\end{tabularx} + +\vspace{0.3cm} + + ***** /100 + + +\vspace{0.3cm} + +\medskip + + + + +\vspace{0.3cm} + + +\begin{tabular}{@{}lllr@{}} + \multicolumn{5}{c}{\textbf{}} \\ + \hline + \textbf{} & & \textbf{} & + \textbf{} \\ + + + + & & & \\ + + +\end{tabular} + + +\vspace{0.5cm} + + + +\textbf{\scriptsize } \\ + + +\end{document} + diff --git a/ledger/custom/balance_sheet.csv b/ledger/custom/balance_sheet.csv new file mode 100644 index 0000000..3b896d4 --- /dev/null +++ b/ledger/custom/balance_sheet.csv @@ -0,0 +1,26 @@ + +account,description,is_heading,heading_account +,"" + +,"",YN, +, + diff --git a/ledger/custom/balance_sheet.html b/ledger/custom/balance_sheet.html new file mode 100644 index 0000000..0a869bf --- /dev/null +++ b/ledger/custom/balance_sheet.html @@ -0,0 +1,411 @@ + + + + + + <?lsmb title ?> + + + + +
+ +

+

+
+ +
+
+ +
+ + + '; + i = i + 1; + END; + ?> + + + '; + i = i + 1; + END; + ?> + + + + + + + + + + + + + + " onclick="toggle('', 'sub-')" > + + 0 ?> + + + + + + + + + + + + +
  > + > + + + +
+
+

Click on the headings to collapse sections.

+ + + diff --git a/ledger/custom/balance_sheet.tex b/ledger/custom/balance_sheet.tex new file mode 100644 index 0000000..efe18e5 --- /dev/null +++ b/ledger/custom/balance_sheet.tex @@ -0,0 +1,136 @@ + + + + + +\documentclass[10pt]{article} +\usepackage{longtable} +\usepackage{multirow} +\usepackage[paper,top=2cm,bottom=1.5cm,left=1.1cm,right=1.5cm]{geometry} +\begin{document} +\renewcommand\baselinestretch{1.2}\selectfont +\begin{center} +\Huge{} + + + +\small{ +\texttt{} + + +\texttt{} +} +\end{center} + + +\begin{longtable}{@{\extracolsep{10pt}}p{2cm}} +\\ + +\multicolumn{}{l}{} &% + report.cheads.ids.$col.path.size ; + ' & '; + END; + END; + ?> \\ + +\\ +% + + 1 -?> +\multicolumn{}{l}{}% + + + +% +& % + +% +\\ +% + + +\cline{-} +\noalign{\vskip 2pt} +\cline{-} + +\\ + + + + + +\end{longtable} + +\end{document} + diff --git a/ledger/custom/bin_list.html b/ledger/custom/bin_list.html new file mode 100644 index 0000000..7abf55e --- /dev/null +++ b/ledger/custom/bin_list.html @@ -0,0 +1,129 @@ + + + + + + <?lsmb text('Bin List') ?> + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+
  + + + + + + + + + +

+
+
+ , +
+
+
+
+
+

+
+
+ , + +
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + +
    
+
+ + + + + + + + + + + + + + + + + + + + + + + +
  
") ?>
+
+
+
+ + diff --git a/ledger/custom/bin_list.tex b/ledger/custom/bin_list.tex new file mode 100644 index 0000000..1991ff3 --- /dev/null +++ b/ledger/custom/bin_list.tex @@ -0,0 +1,144 @@ + + Defaults; + # The value should be without the 'paper' suffix. E.g. "a4" for "a4paper" + # SETTINGS.papersize = ""; + INCLUDE "preamble.tex"; -?> + +\begin{document} + +\pagestyle{myheadings} +\thispagestyle{empty} + +\ifpdftex + %% (pdf)latex + \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont +\fi + + + + +% Breaking old pagebreak directives +% +%\end{tabularx} +% +%\newpage +% +%\markboth{\hfill }{\hfill } +% +%\begin{tabularx}{\textwidth}{@{}rlXllrrll@{}} +% \textbf{Item} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Recd} & & \textbf{Bin} \\ +% + + +\vspace*{0.5cm} + +\parbox[t]{.5\textwidth}{ +\textbf{} +\vspace{0.3cm} + + + + + + + + + +\hspace{-0.1cm}, + + + + +} +\parbox[t]{.5\textwidth}{ +\textbf{} +\vspace{0.3cm} + + + + + + + + + +\hspace{-0.1cm}, + + + + +} +\hfill + +\vspace{1cm} + +\textbf{\MakeUppercase{}} +\hfill + +\vspace{1cm} + +\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline + \textbf{Order \#} & \textbf{Date} & \textbf{Contact} + + & \textbf{} + + & \textbf{} & \textbf{} \\ [0.5em] + \hline + + + + & + + + & + + & + + & + + & & \\ + \hline +\end{tabularx} + +\vspace{1cm} + +\begin{longtable}{@{\extracolsep{\fill}}rllllrrll@{}} + \textbf{} & \textbf{} + & \textbf{} & + \textbf{} & + & \textbf{} & \textbf{} & + & \textbf{} \\ + + + + & + & + & + & + & + & + & + & + \\ + +\end{longtable} + + +\rule{\textwidth}{2pt} + +\end{document} + diff --git a/ledger/custom/check.tex b/ledger/custom/check.tex new file mode 100644 index 0000000..d41a8cc --- /dev/null +++ b/ledger/custom/check.tex @@ -0,0 +1,44 @@ + + +\documentclass{scrartcl} +\usepackage{iftex} +\ifpdftex + %% (pdf)latex + \usepackage[T1]{fontenc} + \usepackage[utf8]{inputenc} +\else + \usepackage{fontspec} +\fi +\usepackage{tabularx} +\usepackage[paper,top=2cm,bottom=1.5cm,left=1.1cm,right=1.5cm]{geometry} +\usepackage{graphicx} + + + +\begin{document} + +\pagestyle{myheadings} +\thispagestyle{empty} + +\ifpdftex + %% (pdf)latex + \fontfamily{cmss}\fontsize{9pt}{9pt}\selectfont +\fi + + + +\end{document} + diff --git a/ledger/custom/check_base.tex b/ledger/custom/check_base.tex new file mode 100644 index 0000000..a2a4f2d --- /dev/null +++ b/ledger/custom/check_base.tex @@ -0,0 +1,80 @@ + + +\parbox[t]{12cm}{ + + + } +\hfill +\parbox[t]{6cm}{\hfill } + +\vspace*{0.6cm} + + \dotfill /100 \makebox[0.5cm]{\hfill} + +\vspace{0.5cm} + +\hfill \makebox[2cm]{\hfill} + +% different date format for datepaid +% + +\vspace{0.5cm} + + + + + + + + + +\hspace{-0.1cm}, + + + + + + +\vspace{1.8cm} + + + +\vspace{0.8cm} + + + +\vspace{0.5cm} + + \hfill \hfill + +\vspace{0.5cm} +\begin{tabularx}{\textwidth}{lXrr@{}} +\textbf{} & \textbf{} + & \textbf{} & \textbf{} \\ + + & \dotfill + & & \\ + +\end{tabularx} + +\vspace{1cm} + + + +\vfill + + diff --git a/ledger/custom/check_multiple.tex b/ledger/custom/check_multiple.tex new file mode 100644 index 0000000..9dbcdbb --- /dev/null +++ b/ledger/custom/check_multiple.tex @@ -0,0 +1,62 @@ + + +\documentclass{scrartcl} +\usepackage{iftex} +\ifpdftex + %% (pdf)latex + \usepackage[T1]{fontenc} + \usepackage[utf8]{inputenc} +\else + \usepackage{fontspec} +\fi +\usepackage{tabularx} +\usepackage{graphicx} +\usepackage[paper,top=2cm,bottom=1.5cm,left=1.1cm,right=1.5cm]{geometry} + + + +\begin{document} + +\pagestyle{myheadings} +\thispagestyle{empty} + +\ifpdftex + %% (pdf)latex + \fontfamily{cmss}\fontsize{9pt}{9pt}\selectfont +\fi + + + + +\clearpage + +\end{document} + diff --git a/ledger/custom/display_report.csv b/ledger/custom/display_report.csv new file mode 100644 index 0000000..f9e9143 --- /dev/null +++ b/ledger/custom/display_report.csv @@ -0,0 +1,62 @@ + + diff --git a/ledger/custom/display_report.html b/ledger/custom/display_report.html new file mode 100644 index 0000000..a5efe61 --- /dev/null +++ b/ledger/custom/display_report.html @@ -0,0 +1,167 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + 0 ?> + + + + + + + + +
+
> + + + +
  + + + +
+ + + + + + + + +
+
+ + +
+
+ + +
+
+ + +
+
+ + diff --git a/ledger/custom/display_report.odst b/ledger/custom/display_report.odst new file mode 100644 index 0000000..9a231b2 --- /dev/null +++ b/ledger/custom/display_report.odst @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ledger/custom/display_report.tex b/ledger/custom/display_report.tex new file mode 100644 index 0000000..6125439 --- /dev/null +++ b/ledger/custom/display_report.tex @@ -0,0 +1,135 @@ + + 0; + WIDTH_PER_P = TOTAL_WIDTH / DECLARED_WIDTH; + ELSE; + WIDTH_PER_P = 1; + END; + ?> +\begin{longtable}{} +\tabularnewline +\hline\hline +\endfirsthead +\tabularnewline +\hline\hline +\endhead +\begin{tabular}[t]{@{}l@{}}\end{tabular}\tabularnewline + +\end{longtable} + +\documentclass[paper]{article} +\usepackage{longtable} +\usepackage[margin=1cm]{geometry} +\begin{document} + +\begin{center} +\begin{tabular}{rl} + \textbf{}: & \\ + \textbf{}: & \\ + + \textbf{}: & \\ + +\end{tabular} +\end{center} + + +\end{document} + diff --git a/ledger/custom/display_report.xlst b/ledger/custom/display_report.xlst new file mode 100644 index 0000000..4771193 --- /dev/null +++ b/ledger/custom/display_report.xlst @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ledger/custom/envelope.tex b/ledger/custom/envelope.tex new file mode 100644 index 0000000..2102d55 --- /dev/null +++ b/ledger/custom/envelope.tex @@ -0,0 +1,37 @@ + + +\documentclass{scrartcl} +\usepackage{iftex} +\ifpdftex + %% (pdf)latex + \usepackage[T1]{fontenc} + \usepackage[utf8]{inputenc} +\else + \usepackage{fontspec} +\fi +\usepackage{tabularx} +\usepackage[paperheight=11cm, paperwidth=23cm,top=3.5cm,bottom=3cm,left=12cm,right=1cm]{geometry} +\begin{document} +\thispagestyle{empty} +\noindent \\ + \\ + + \\ + + +, \\ +\end{document} + diff --git a/ledger/custom/invoice.894.edi b/ledger/custom/invoice.894.edi new file mode 100644 index 0000000..333514e --- /dev/null +++ b/ledger/custom/invoice.894.edi @@ -0,0 +1,24 @@ + +ISA*00* *00* *12*XXXXXXXXXX *01*XXXXXXXXXX ***^*00501**0*P*>~ +GS*DX*7196333434*031958655***0001*X*005010~ +ST*894*~ +G82***0001*0000*~ + +LS*~ +G83***UC****~ +LE*~ + +G84**~ +SE**~ +GE*1*0001~ +IEA*1*~ diff --git a/ledger/custom/invoice.html b/ledger/custom/invoice.html new file mode 100644 index 0000000..973108e --- /dev/null +++ b/ledger/custom/invoice.html @@ -0,0 +1,240 @@ + + + + + + <?lsmb text('Invoice') ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+

+
+ + + + + + + + + +

+
+
+ , +
+
+
+
+
+
+
+

+
+
+
+ , +
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + +
    
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  
.") ?>
+
+
+ ") ?> on + @ %
-
  +
+
 
+
+ + + + + + + +
+ +

+
***** /100
+
+ + + + + + + + + + + + + + + + + + + +
+
+
+
+ + + + + +
+ + X +
+
+
") ?> +
+ + diff --git a/ledger/custom/invoice.tex b/ledger/custom/invoice.tex new file mode 100644 index 0000000..1871e52 --- /dev/null +++ b/ledger/custom/invoice.tex @@ -0,0 +1,257 @@ + accrue) +1.2 Merged xelatex targetting templates with those targetting pdflatex +1.3 Extended with 'shiptoattn' (at the attention of) + + +The "$FORMAT($PROCESSOR)" below evaluates to e.g. "pdf(pdflatex)". + +-?> + Defaults; + # The value should be without the 'paper' suffix. E.g. "a4" for "a4paper" + # SETTINGS.papersize = ""; + INCLUDE "preamble.tex"; -?> + +\setlength\LTleft{0pt} +\setlength\LTright{0pt} + +\begin{document} + +\pagestyle{myheadings} +\thispagestyle{empty} + +\ifpdftex + %% (pdf)latex + \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont +\fi + + +\begin{minipage}{2in} +\medskip +\raggedright + +\end{minipage} + + +\newsavebox{\ftr} +\sbox{\ftr}{ + \parbox{\textwidth}{ + \tiny + \rule[1.5em]{\textwidth}{0.5pt} + + + + } +} + + + +\markboth{\hfill }{\hfill } + +\vspace*{0.5cm} + +\parbox[t]{.5\textwidth}{ +\textbf{To} +\vspace{0.3cm} + + + + + + + + + +\hspace{-0.1cm}, + + + +\vspace{0.3cm} + + + +\vspace{0.2cm} + + + +Tel: + + + +Fax: + + + +} +\parbox[t]{.5\textwidth}{ +\textbf{} +\vspace{0.3cm} + + + + + + + + + + + + + +\hspace{-0.1cm}, + + + +\vspace{0.3cm} + + + +\vspace{0.2cm} + + + +Tel: + + + +Fax: + + + +} +\hfill + +\vspace{1cm} + +\textbf{\MakeUppercase{}} +\hfill + +\vspace{1cm} + +\begin{tabularx}{\textwidth}{*{7}{|X}|} \hline + \textbf{} & \textbf{} + & \textbf{} & \textbf{} + & \textbf{} + & \textbf{} + & \textbf{} \\ [0.5em] + \hline + & & & & + & & \\ + \hline +\end{tabularx} + +\vspace{1cm} + +\begin{longtable}{@{\extracolsep{\fill}}r|llcrlrr|r} + + \textbf{} + & \textbf{} + & \textbf{} + & \textbf{} + & \textbf{} + & \textbf{} + & \textbf{} + & \textbf{} + & \textbf{} \\ +\hline +\endhead + + + & + & + & + & + & + & + & + & + \\ + + +\hline \hline +\multicolumn{8}{r|}{} & \\* + + +\multicolumn{8}{r|}{ on } + & \\* + + +\hline \hline +\multicolumn{8}{r|}{} & \\* + + +\multicolumn{8}{r|}{ } & - \\* + \hline + \hline +\multicolumn{8}{r|}{} & \\ + + +\end{longtable} + + +\parbox{\textwidth}{ + +\vspace{0.2cm} + +\hfill + +\vspace{0.3cm} + + ***** /100 +\hfill + + +\vspace{12pt} + +\medskip + + +} + +\vfill + + +\begin{tabularx}{10cm}{@{}lXlr@{}} + \textbf{} & & & \\ + \hline + \textbf{} & & \textbf{} + & \textbf{} \\ + + + & & & \\ + +\end{tabularx} + + + +\includegraphics[scale=0.3]{} + + +\vspace{1cm} + +\centerline{\textbf{}} + +\rule{\textwidth}{0.5pt} + +\usebox{\ftr} + +\end{document} + diff --git a/ledger/custom/letterhead.html b/ledger/custom/letterhead.html new file mode 100644 index 0000000..0bdabe3 --- /dev/null +++ b/ledger/custom/letterhead.html @@ -0,0 +1,59 @@ + + + + + + + + 2. An image embedded in the invoice itself + This option has the downside that the invoice file will + be larger and the HTML source will be less readable, however, + it eliminates external dependencies, retaining the integrity + of the invoice, independent of what happens to publicly hosted + images + + + + Please note that this is dependent on having a file uploaded by + the name 'logo.png' under "System - Files". Also, when using this + option, please remove the hyphens from '<-?lsmb' and '?->'; they + are used to hide the text from the template processor. + + ?> + + + + + + +
+


+

+
+


+

+
+
+
+ + + diff --git a/ledger/custom/letterhead.tex b/ledger/custom/letterhead.tex new file mode 100644 index 0000000..3b5837d --- /dev/null +++ b/ledger/custom/letterhead.tex @@ -0,0 +1,54 @@ + +\parbox{\textwidth}{% + \parbox[b]{.42\textwidth}{% + + + + } + \parbox[b]{.2\textwidth}{ + + +% \includegraphics[scale=0.3]{<%?lsmb dbfile_path('logo.png') ?%>} + + + }\hfill + \begin{tabular}[b]{rr@{}} + & \\ + & + \end{tabular} + + \rule[1.5em]{\textwidth}{0.5pt} +} + diff --git a/ledger/custom/packing_list.html b/ledger/custom/packing_list.html new file mode 100644 index 0000000..d6f40a0 --- /dev/null +++ b/ledger/custom/packing_list.html @@ -0,0 +1,146 @@ + + + + + + <?lsmb text('Packing List') ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+
+ + + + + + + + + +
 

+
+
+ , +
+

+
+
+
+
+ + + + + + + + + + + + + + + + + + + + +
      
+
+ + + + + + + + + + + + + + + + + + + + + +
  
") ?>
+
+
+
+ + + + + +
Notes + +

+
+
+ + + + + +
+ X +
+
+
+ + diff --git a/ledger/custom/packing_list.tex b/ledger/custom/packing_list.tex new file mode 100644 index 0000000..e852b63 --- /dev/null +++ b/ledger/custom/packing_list.tex @@ -0,0 +1,166 @@ + + Defaults; + # The value should be without the 'paper' suffix. E.g. "a4" for "a4paper" + # SETTINGS.papersize = ""; + INCLUDE "preamble.tex"; -?> + +\begin{document} + +\pagestyle{myheadings} +\thispagestyle{empty} + +\ifpdftex + %% (pdf)latex + \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont +\fi + +\newsavebox{\ftr} +\sbox{\ftr}{ + \parbox{\textwidth}{ + \tiny + \rule[1.5em]{\textwidth}{0.5pt} + + + } +} + + + +% Breaking old pagebreak directive +% +%\end{tabularx} +% +%\newpage +% +%\markboth{\hfill }{\hfill } +% +%\begin{tabularx}{\textwidth}{@{}rlXllrrl@{}} +% \textbf{Item} & \textbf{Number} & \textbf{Description} & \textbf{Serial Number} & & \textbf{Qty} & \textbf{Ship} & \\ +% + + +\vspace*{0.5cm} + +\parbox[t]{.5\textwidth}{ +\textbf{Ship To}} \hfill + +\vspace{0.3cm} + +\parbox[t]{.5\textwidth}{ + + + + + + + + + +\hspace{-0.1cm}, + + + + +} +\parbox[t]{.5\textwidth}{ + + + + Tel: + + + + Fax: + + + +} +\hfill + +\vspace{1cm} + +\textbf{\MakeUppercase{}} +\hfill + +\vspace{1cm} + +\begin{tabularx}{\textwidth}{*{7}{|X}|} \hline + \textbf{} & \textbf{} + & \textbf{} & \textbf{} + + & \textbf{} + + & \textbf{} + & \textbf{} \\ [0.5em] + \hline + + & + + & + + & + + & + + & + + & & \\ + \hline +\end{tabularx} + +\vspace{1cm} + +\begin{longtable}{@{\extracolsep{\fill}}rllllrrl@{}} + \textbf{} & \textbf{} + & \textbf{} + & \textbf{} & + & \textbf{} & \textbf{} & \\ + + + + & + & + & + & + & + & + & + \\ + +\end{longtable} + + +\parbox{\textwidth}{ +\rule{\textwidth}{2pt} + +\vspace{12pt} + + +\medskip + + + +} + +\vfill + +\rule{\textwidth}{0.5pt} + +\usebox{\ftr} + +\end{document} + diff --git a/ledger/custom/pick_list.html b/ledger/custom/pick_list.html new file mode 100644 index 0000000..978dd55 --- /dev/null +++ b/ledger/custom/pick_list.html @@ -0,0 +1,117 @@ + + + + + + <?lsmb text('Pick List') ?> + + + + + + + + + + + + + + + + + + + + + + + + +
+

+
+ + + + + + + + + +
 

+
+
+ , +
+

+
+
+
+
+ + + + + + + + + + + + + + + + + + + + +
      
+
+ + + + + + + + + + + + + + + + + + + +
 
") ?>[      ]
+
+
+
+ + diff --git a/ledger/custom/pick_list.tex b/ledger/custom/pick_list.tex new file mode 100644 index 0000000..dd3f859 --- /dev/null +++ b/ledger/custom/pick_list.tex @@ -0,0 +1,134 @@ + + Defaults; + # The value should be without the 'paper' suffix. E.g. "a4" for "a4paper" + # SETTINGS.papersize = ""; + INCLUDE "preamble.tex"; -?> + +\begin{document} + +\pagestyle{myheadings} +\thispagestyle{empty} + +\ifpdftex + %% (pdf)latex + \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont +\fi + + + + +% Breaking old pagebreak directive +% +%\end{tabularx} +% +%\newpage +% +%\markboth{\hfill }{\hfill } +% +%\begin{tabularx}{\textwidth}{@{}rlXrcll@{}} +% \textbf{Item} & \textbf{Number} & \textbf{Description} & +% \textbf{Qty} & \textbf{Ship} & & \textbf{Bin} \\ +% +% + +\vspace*{0.5cm} + +\parbox[t]{.5\textwidth}{ + \textbf{Ship To} +} \hfill + +\vspace{0.3cm} + +\parbox[t]{.5\textwidth}{ + + + + + + + + + +\hspace{-0.1cm}, + + + + +} +\parbox[t]{.5\textwidth}{ + + + + Tel: + + + + Fax: + + + +} +\hfill + +\vspace{1cm} + +\textbf{\MakeUppercase{}} +\hfill + +\vspace{1cm} + +\begin{tabularx}{\textwidth}{*{7}{|X}|} \hline + \textbf{} & \textbf{} + & \textbf{} & \textbf{} + & \textbf{} + & \textbf{} + & \textbf{} \\ [0.5em] + \hline + & + + & + + & + + & & & & \\ + \hline +\end{tabularx} + +\vspace{1cm} + +\begin{longtable}{@{\extracolsep{\fill}}rllrcll@{}} + \textbf{} & \textbf{} + & \textbf{} & + \textbf{} & \textbf{} & + & \textbf{} \\ + + + & + & + & + & [\hspace{1cm}] & + & \\ + +\end{longtable} + + +\parbox{\textwidth}{ +\rule{\textwidth}{2pt} +} + +\end{document} + diff --git a/ledger/custom/printPayment.html b/ledger/custom/printPayment.html new file mode 100644 index 0000000..2829334 --- /dev/null +++ b/ledger/custom/printPayment.html @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + +
+
LOGO AREA
+
+
+
+

+
+ + + + + + + + + + + + + + + + + + + +
 
--
 
+ + + + + + + + + + + + + + + + + + + + + +
: + : +
+
+
+
+
+
+
+ ___________________________________________
+
: +
: +
: 
: + ____________________________
: +
+ + diff --git a/ledger/custom/print_cash_transfer.html b/ledger/custom/print_cash_transfer.html new file mode 100644 index 0000000..a81a15c --- /dev/null +++ b/ledger/custom/print_cash_transfer.html @@ -0,0 +1,196 @@ + + + + + + <?lsmb form.print_title ?> + + + + +
+ +
+

+ + Ph: +
+
+

+
+
+
+
+
+ + + + + + + +
+
+ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ + + + + ONLY + +
+
+
+
+ + +
+
+ + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
Approved ByReceived ByPaid By
Signature
Signature
Signature
Name
Name
Name
+
+ + diff --git a/ledger/custom/print_journal_entry.html b/ledger/custom/print_journal_entry.html new file mode 100644 index 0000000..f648fa1 --- /dev/null +++ b/ledger/custom/print_journal_entry.html @@ -0,0 +1,226 @@ + + + + + + <?lsmb form.print_title ?> + + + + +
+ +
+

+ + Ph: +
+
+

+
+
+
+
+
+ + + +
+
+ + + +
+
+
+
+ +
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AccountCurrDebitCreditSourceMemo
+ +
  
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
Approved ByReceived ByPaid By
Signature
Signature
Signature
Name
Name
Name
+
+ + diff --git a/ledger/custom/product_receipt.html b/ledger/custom/product_receipt.html new file mode 100644 index 0000000..281f4c7 --- /dev/null +++ b/ledger/custom/product_receipt.html @@ -0,0 +1,186 @@ + + + + + + <?lsmb text('Product Receipt') ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+
+ + + + + + + + + +

+
+
+ , +
+
+
+
+
+

+
+
+ , +
+
+
+
+
+
+
+ + + + + + + + + + + + + + + +
  
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 %
.") ?>
+
+
+ ") ?>on + @ %
  +
+
 
+
+ + + + + +
+ +

+
+
+ + + + + +
  + X +
+
+
+ + diff --git a/ledger/custom/product_receipt.tex b/ledger/custom/product_receipt.tex new file mode 100644 index 0000000..6a67df7 --- /dev/null +++ b/ledger/custom/product_receipt.tex @@ -0,0 +1,180 @@ + + Defaults; + # The value should be without the 'paper' suffix. E.g. "a4" for "a4paper" + # SETTINGS.papersize = ""; + INCLUDE "preamble.tex"; -?> + +\setlength\LTleft{0pt} +\setlength\LTright{0pt} + +\begin{document} + + +\pagestyle{myheadings} +\thispagestyle{empty} + +\ifpdftex + %% (pdf)latex + \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont +\fi + + + + +\markboth{\hfill }{\hfill } + +\vspace*{0.5cm} + +\parbox[t]{.5\textwidth}{ +\textbf{To} +\vspace{0.3cm} + + + + + + + + + +\hspace{-0.1cm}, + + + + + +\vspace{0.3cm} + + + +\vspace{0.2cm} + + + + + + + + + + + +} +\parbox[t]{.5\textwidth}{ +\textbf{Ship To} +\vspace{0.3cm} + + + + + + + + + +\hspace{-0.1cm}, + + + + + +\vspace{0.3cm} + + + +\vspace{0.2cm} + + + + +/ + + + + + + +} +\hfill + +\vspace{1cm} + +\textbf{\MakeUppercase{}} +\hfill + +\vspace{1cm} +\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline + \textbf{} & \textbf{} + & \textbf{} & \textbf{} + & \textbf{} + & \textbf{} \\ [0.5ex] + \hline + & & & & & \\ + \hline +\end{tabularx} + +\vspace{1cm} + +\begin{longtable}{@{\extracolsep{\fill}}llrlrr@{\extracolsep{0pt}}} + \textbf{} & \textbf{} + & \textbf{} & + \textbf{} & \textbf{} + & \textbf{} \\ +\endhead + + + & + & + & + & + & + \\ + +\end{longtable} + + +\parbox{\textwidth}{ +\rule{\textwidth}{2pt} + +\vspace{0.2cm} + +\hfill +\begin{tabularx}{7cm}{Xr@{\hspace{1cm}}r@{}} + & Total & \\ +\end{tabularx} + +\vspace{0.3cm} + +\hfill + + +\vspace{12pt} + + +\medskip + + + +} + + +%\renewcommand{\thefootnote}{\fnsymbol{footnote}} + +%\footnotetext[1]{\tiny } + +\end{document} + diff --git a/ledger/custom/purchase_order.html b/ledger/custom/purchase_order.html new file mode 100644 index 0000000..56eeed9 --- /dev/null +++ b/ledger/custom/purchase_order.html @@ -0,0 +1,188 @@ + + + + + + <?lsmb text('Purchase Order') ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+
+ + + + + + + + + +

+
+
+ , +
+
+
+
+
+

+
+
+ , +
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + +
  
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 %
.") ?>
+
+
+ ") ?>on + @ %
  +
+
 
+
+ + + + + +
+ +

+
+
+ + + + + +
  + X +
+
+
+ + diff --git a/ledger/custom/purchase_order.tex b/ledger/custom/purchase_order.tex new file mode 100644 index 0000000..209d0cd --- /dev/null +++ b/ledger/custom/purchase_order.tex @@ -0,0 +1,186 @@ + + Defaults; + # The value should be without the 'paper' suffix. E.g. "a4" for "a4paper" + # SETTINGS.papersize = ""; + INCLUDE "preamble.tex"; -?> + +\setlength\LTleft{0pt} +\setlength\LTright{0pt} + +\begin{document} + + +\pagestyle{myheadings} +\thispagestyle{empty} + +\ifpdftex + %% (pdf)latex + \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont +\fi + + + + +\markboth{\hfill }{\hfill } + +\vspace*{0.5cm} + +\parbox[t]{.5\textwidth}{ +\textbf{To} +\vspace{0.3cm} + + + + + + + + + +\hspace{-0.1cm}, + + + + + +\vspace{0.3cm} + + + +\vspace{0.2cm} + + + + + + + + + + + +} +\parbox[t]{.5\textwidth}{ +\textbf{Ship To} +\vspace{0.3cm} + + + + + + + + + +\hspace{-0.1cm}, + + + + + +\vspace{0.3cm} + + + +\vspace{0.2cm} + + + + +/ + + + + + + +} +\hfill + +\vspace{1cm} + +\textbf{\MakeUppercase{}} +\hfill + +\vspace{1cm} +\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline + \textbf{} & \textbf{} + & \textbf{} & \textbf{} + & \textbf{} + & \textbf{} \\ [0.5ex] + \hline + & & & & & \\ + \hline +\end{tabularx} + +\vspace{1cm} + +\begin{longtable}{@{\extracolsep{\fill}}llrlrr@{\extracolsep{0pt}}} + \textbf{} & \textbf{} + & \textbf{} & + \textbf{} & \textbf{} + & \textbf{} \\ +\endhead + + + & + & + & + & + & + \\ + +\end{longtable} + + +\parbox{\textwidth}{ +\rule{\textwidth}{2pt} + +\vspace{0.2cm} + +\hfill +\begin{tabularx}{7cm}{Xr@{\hspace{1cm}}r@{}} + & Subtotal & \\ + + + & on & \\ + + \hline + & Total & \\ +\end{tabularx} + +\vspace{0.3cm} + +\hfill + + +\vspace{12pt} + + +\medskip + + + +} + + +%\renewcommand{\thefootnote}{\fnsymbol{footnote}} + +%\footnotetext[1]{\tiny } + +\end{document} + diff --git a/ledger/custom/receipt.tex b/ledger/custom/receipt.tex new file mode 100644 index 0000000..895de73 --- /dev/null +++ b/ledger/custom/receipt.tex @@ -0,0 +1,95 @@ + + Defaults; + # The value should be without the 'paper' suffix. E.g. "a4" for "a4paper" + # SETTINGS.papersize = ""; + INCLUDE "preamble.tex"; -?> + +\begin{document} + +\pagestyle{myheadings} +\thispagestyle{empty} + +\ifpdftex + %% (pdf)latex + \fontfamily{cmss}\fontsize{9pt}{9pt}\selectfont +\fi + +\parbox[t]{12cm}{ + + + } +\hfill +\parbox[t]{6cm}{\hfill } + +\vspace*{0.6cm} + + \dotfill /100 \makebox[0.5cm]{\hfill} + +\vspace{0.5cm} + +\hfill \makebox[2cm]{\hfill} + +% different date format for datepaid +% + +\vspace{0.5cm} + + + + + + + + + +\hspace{-0.1cm}, + + + + + +\vspace{1.8cm} + + + +\vspace{0.8cm} + + + +\vspace{0.5cm} + + \hfill \hfill + +\vspace{0.5cm} +\begin{tabularx}{\textwidth}{lXrr@{}} +\textbf{} & \textbf{} + & \textbf{} & \textbf{} \\ + + + & \dotfill + & & \\ + +\end{tabularx} + +\vspace{1cm} + + + +\vfill + +\end{document} + diff --git a/ledger/custom/request_quotation.html b/ledger/custom/request_quotation.html new file mode 100644 index 0000000..5d55fef --- /dev/null +++ b/ledger/custom/request_quotation.html @@ -0,0 +1,144 @@ + + + + + + <?lsmb text('Request for Quotation') ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+
+ + + + + + + + + +

+
+
+ , +
+
+
+
+
+

+
+
+ , +
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + +
   
+
+ + + + + + + + + + + + + + + + + + + + + +
 
.") ?>
+
+
+
+ + + + + +
+ +

+
+
+ + diff --git a/ledger/custom/request_quotation.tex b/ledger/custom/request_quotation.tex new file mode 100644 index 0000000..eacdfc3 --- /dev/null +++ b/ledger/custom/request_quotation.tex @@ -0,0 +1,165 @@ + + Defaults; + # The value should be without the 'paper' suffix. E.g. "a4" for "a4paper" + # SETTINGS.papersize = ""; + INCLUDE "preamble.tex"; -?> + +\setlength\LTleft{0pt} +\setlength\LTright{0pt} + +\begin{document} + +\pagestyle{myheadings} +\thispagestyle{empty} + +\ifpdftex + %% (pdf)latex + \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont +\fi + + + + +\markboth{\hfill }{\hfill } + + +\vspace*{0.5cm} + +\parbox[t]{.5\textwidth}{ +\textbf{} +\vspace{0.3cm} + + + + + + + + + +\hspace{-0.1cm}, + + + + + +\vspace{0.3cm} + + + +\vspace{0.2cm} + + + + + + + + + + + +} +\parbox[t]{.5\textwidth}{ +\textbf{Ship To} +\vspace{0.3cm} + + + + + + + + + +\hspace{-0.1cm}, + + + + + +\vspace{0.3cm} + + + +\vspace{0.2cm} + + + + + + + + + + + +} +\hfill + +\vspace{1cm} + +\textbf{\MakeUppercase{}} +\hfill + +\vspace{1cm} + +\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline + \textbf{} & \textbf{} + & \textbf{} & \textbf{} + & \textbf{} + & \textbf{} \\ [0.5ex] + \hline + & & & & & \\ + \hline +\end{tabularx} + +\vspace{1cm} + + + +\vspace{1cm} + +\begin{longtable}{@{\extracolsep{\fill}}lcrllrr@{\extracolsep{\fill}}} + \textbf{} & \textbf{} + & \textbf{} & & \textbf{} + & \textbf{} & \textbf{} +\endhead + + + & + & + & + \\ + +\end{longtable} + + +\parbox{\textwidth}{ +\rule{\textwidth}{2pt} + +\hfill + + +\medskip + + + +} + +\end{document} + diff --git a/ledger/custom/sales_order.html b/ledger/custom/sales_order.html new file mode 100644 index 0000000..c7244bc --- /dev/null +++ b/ledger/custom/sales_order.html @@ -0,0 +1,185 @@ + + + + + + <?lsmb text('Sales Order') ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+
+ + + + + + + + + +

+
+
+ , +
+
+
+
+
+
+

+
+
+ , +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + +
  
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
.") ?>
+
+
+ ") ?>on + @ %
  +
+
***** /100
+
 
+
+ + + + + + + +
+ +

+
+
+ + + + + +
+ X +
+
+
+ + diff --git a/ledger/custom/sales_order.tex b/ledger/custom/sales_order.tex new file mode 100644 index 0000000..430f911 --- /dev/null +++ b/ledger/custom/sales_order.tex @@ -0,0 +1,196 @@ + + Defaults; + # The value should be without the 'paper' suffix. E.g. "a4" for "a4paper" + # SETTINGS.papersize = ""; + INCLUDE "preamble.tex"; -?> + +\setlength\LTleft{0pt} +\setlength\LTright{0pt} + +\begin{document} + +\pagestyle{myheadings} +\thispagestyle{empty} + +\ifpdftex + %% (pdf)latex + \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont +\fi + + + + +\markboth{\hfill }{\hfill } + +\vspace*{0.5cm} + +\parbox[t]{.5\textwidth}{ +\textbf{To} +\vspace{0.3cm} + + + + + + + + + +\hspace{-0.1cm}, + + + + + +\vspace{0.3cm} + + + +\vspace{0.2cm} + + + + + + + + + + + +} +\parbox[t]{.5\textwidth}{ +\textbf{Ship To} +\vspace{0.3cm} + + + + + + + + + +\hspace{-0.1cm}, + + + + + +\vspace{0.3cm} + + + +\vspace{0.2cm} + + + + + + + + + + + +} +\hfill + +\vspace{1cm} + +\textbf{\MakeUppercase{}} +\hfill + +\vspace{1cm} + +\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline + \textbf{} & \textbf{} + & \textbf{} + & \textbf{} + & \textbf{} + & \textbf{} \\ [0.5em] + \hline + & & & & & \\ + \hline +\end{tabularx} + +\vspace{1cm} + +\begin{longtable}{@{\extracolsep{\fill}}rlcrlrrr@{\extracolsep{0pt}}} + \textbf{} & \textbf{} + & \textbf{} & \textbf{} & + \textbf{} & \textbf{} + & \textbf{} + & \textbf{} +\endhead + + + & + & + & + & + & + & + & + \\ + +\end{longtable} + + +\parbox{\textwidth}{ +\rule{\textwidth}{2pt} + +\vspace{0.2cm} + +\hfill +\begin{tabularx}{7cm}{Xr@{\hspace{1cm}}r@{}} + & Subtotal & \\ + + + & on & \\ + + \hline + & Total & \\ +\end{tabularx} + +\vspace{0.3cm} + + ***** /100 +\hfill + + + + + + +\vspace{12pt} + + +\medskip + + + +} + +\vfill + +\centerline{\textbf{}} + +\rule{\textwidth}{0.5pt} + +\end{document} + diff --git a/ledger/custom/sales_quotation.html b/ledger/custom/sales_quotation.html new file mode 100644 index 0000000..7c1499f --- /dev/null +++ b/ledger/custom/sales_quotation.html @@ -0,0 +1,168 @@ + + + + + + <?lsmb text('Quotation') ?> + + + + + + + + + + + + + + + + + + + + + + + + +
+

+
+ + + + +

+
+
+ , +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + +
  
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
") ?>
+
+
+ ") ?>on + @ %
  +
+
  +
 
+
+ + + + + + + +
+ +

+
+
+ + + + + +
+ X +
+
+
+ + diff --git a/ledger/custom/sales_quotation.tex b/ledger/custom/sales_quotation.tex new file mode 100644 index 0000000..72834e4 --- /dev/null +++ b/ledger/custom/sales_quotation.tex @@ -0,0 +1,163 @@ + + Defaults; + # The value should be without the 'paper' suffix. E.g. "a4" for "a4paper" + # SETTINGS.papersize = ""; + INCLUDE "preamble.tex"; -?> + +\setlength\LTleft{0pt} +\setlength\LTright{0pt} + +\begin{document} + +\pagestyle{myheadings} +\thispagestyle{empty} + +\ifpdftex + %% (pdf)latex + \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont +\fi + +\newsavebox{\ftr} +\sbox{\ftr}{ + \parbox{\textwidth}{ + \tiny + \rule[1.5em]{\textwidth}{0.5pt} + + } +} + + + + +\markboth{\hfill }{\hfill } + +\vspace*{0.5cm} + +\parbox[t]{.5\textwidth}{ + + + + + + + + +\hspace{-0.1cm}, + + + + + +\vspace{0.3cm} + + + +\vspace{0.2cm} + + + + ?> + + + + + + + +} + +\vspace{1cm} + +\textbf{\MakeUppercase{}} +\hfill + +\vspace{1cm} + +\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline + \textbf{} & \textbf{} + & \textbf{} & \textbf{} + & \textbf{} + & \textbf{} \\ [0.5ex] + \hline + & & & & & \\ + \hline +\end{tabularx} + +\vspace{1cm} + +\begin{longtable}{@{\extracolsep{\fill}}llrlrrr@{\extracolsep{0pt}}} + \textbf{} & \textbf{} + & \textbf{} & \textbf{} + & \textbf{} & \textbf{} + & \textbf{} +\endhead + + + & +\begin{minipage}{2in} +\raggedright + +\end{minipage}& + & + & + & + & + \\ + +\hline \hline +\multicolumn{6}{r}{} & \\* + + +\multicolumn{6}{r}{ on } + & \\* + +\multicolumn{6}{r}{ } & \\* +\end{longtable} + + +\parbox{\textwidth}{ +\rule{\textwidth}{2pt} + +\vspace{0.2cm} + +\hfill + + + + + + +\vspace{12pt} + + +\medskip + + + +} + +\vfill + +\hfill \parbox{7cm}{X \rule{6.5cm}{0.5pt}} + +\rule{\textwidth}{0.5pt} + +\usebox{\ftr} + +\end{document} + diff --git a/ledger/custom/shipping_label.tex b/ledger/custom/shipping_label.tex new file mode 100644 index 0000000..c4fb3d6 --- /dev/null +++ b/ledger/custom/shipping_label.tex @@ -0,0 +1,45 @@ + + +\documentclass{scrartcl} +\usepackage{iftex} +\ifpdftex + %% (pdf)latex + \usepackage[T1]{fontenc} + \usepackage[utf8]{inputenc} +\else + \usepackage{fontspec} +\fi +\usepackage{tabularx} +\usepackage[paperheight=10.5cm, paperwidth=16.2cm,top=1cm,bottom=1.5cm,left=2cm,right=2cm]{geometry} +\begin{document} + +\noindent \\ +\\ +\\ + + +\hspace{-0.1cm}, \\ + + +\noindent \\ + \\ + \\ + +, \\ + + +\end{document} + diff --git a/ledger/custom/statement.html b/ledger/custom/statement.html new file mode 100644 index 0000000..24a4f6f --- /dev/null +++ b/ledger/custom/statement.html @@ -0,0 +1,114 @@ + + + + + + <?lsmb text('Statement') ?> + + + + + + + + + + + + + + + + + + + + + + +
+

+
+ + + + +

+
+
+ , + +
+
+ + + + + + + + + + + + + + + + + + > + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+
+ + diff --git a/ledger/custom/statement.tex b/ledger/custom/statement.tex new file mode 100644 index 0000000..1d4eb66 --- /dev/null +++ b/ledger/custom/statement.tex @@ -0,0 +1,95 @@ + + Defaults; + # The value should be without the 'paper' suffix. E.g. "a4" for "a4paper" + # SETTINGS.papersize = ""; + INCLUDE "preamble.tex"; -?> + +\begin{document} + + +\pagestyle{myheadings} +\thispagestyle{empty} + +\ifpdftex + %% (pdf)latex + \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont +\fi + + + +\parbox[t]{.5\textwidth}{ + + + + + +} +\hfill + +\vspace{1cm} + +\textbf{\MakeUppercase{}} \hfill +\textbf{} + +\vspace{2cm} + +\begin{tabular*}{\textwidth}{|ll@{\extracolsep\fill}ccrrrrrl|} + \hline + \textbf{} & \textbf{} + & \textbf{} & \textbf{} & + \textbf{} & \textbf{30} & \textbf{60} & \textbf{90} & + \textbf{} & \textbf{} \\ + \hline + + + % \hline + \textbf{} & + & & & + \textbf{} & + \textbf{} & + \textbf{} & + \textbf{} & + \textbf{} & + \textbf{} \\ + + & + & + & + & + & + & + & + & + & + \\ + + + \hline + + +\end{tabular*} + +\vspace{0.5cm} + +\hfill +\pagebreak + +\end{document} + diff --git a/ledger/custom/timecard.html b/ledger/custom/timecard.html new file mode 100644 index 0000000..416eb32 --- /dev/null +++ b/ledger/custom/timecard.html @@ -0,0 +1,131 @@ + + + + + + <?lsmb text('Time Card') ?> + + + + + + + + + + + + + + + + + + + + + + + + +
+

+
+ + + + + +
+ + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + +
+
+
+ +

+
+ + diff --git a/ledger/custom/timecard.tex b/ledger/custom/timecard.tex new file mode 100644 index 0000000..2100595 --- /dev/null +++ b/ledger/custom/timecard.tex @@ -0,0 +1,72 @@ + + Defaults; + # The value should be without the 'paper' suffix. E.g. "a4" for "a4paper" + # SETTINGS.papersize = ""; + INCLUDE "preamble.tex"; -?> + +\begin{document} + +\pagestyle{myheadings} +\thispagestyle{empty} + +\ifpdftex + %% (pdf)latex + \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont +\fi + + + +\centerline{\textbf{\MakeUppercase{}}} + +\vspace*{0.5cm} + +\begin{tabular}[t]{ll} + \textbf{} & \\ + \textbf{} & \\ +\end{tabular} +\hfill +\begin{tabular}[t]{ll} + \textbf{} & \\ + \textbf{} & \\ + \textbf{} & \\ + \textbf{} & \\ + \textbf{} & \\ +\end{tabular} + +\vspace{1cm} + +\begin{tabular}[b]{ll} + \textbf{} & \\ + \textbf{} & \\ + \textbf{} & \\ + \textbf{} & \\ +\end{tabular} +\hfill +\begin{tabular}[b]{lr} + \textbf{} & \\ + \textbf{} & \\ +\end{tabular} + +\vspace{0.3cm} + + +\medskip + + + +\end{document} + diff --git a/ledger/custom/work_order.html b/ledger/custom/work_order.html new file mode 100644 index 0000000..927b15e --- /dev/null +++ b/ledger/custom/work_order.html @@ -0,0 +1,131 @@ + + + + + + <?lsmb text('Work Order') ?> + + + + + + + + + + + + + + + + + + + + + + + + +
+

+
+ + + + + + + + + +

+
+
+ , +
+
+
+
+
+
+

+
+
+ , +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + +
  
+
+ + + + + + + + + + + + + + + + + + + + + + +
 
.") ?>
+
+
+
+ +

+
+ + diff --git a/ledger/custom/work_order.tex b/ledger/custom/work_order.tex new file mode 100644 index 0000000..1481125 --- /dev/null +++ b/ledger/custom/work_order.tex @@ -0,0 +1,168 @@ + + Defaults; + # The value should be without the 'paper' suffix. E.g. "a4" for "a4paper" + # SETTINGS.papersize = ""; + INCLUDE "preamble.tex"; -?> + +\begin{document} + +\pagestyle{myheadings} +\thispagestyle{empty} + +\ifpdftex + %% (pdf)latex + \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont +\fi + + + + +% Break old pagebreak directive +% +%\end{tabularx} +% +%\newpage +% +%\markboth{\hfill }{\hfill } +% +%\begin{tabularx}{\textwidth}{@{}rlXrll@{}} +% \textbf{Item} & \textbf{Number} & \textbf{Description} & \textbf{Qt'y} & +% & \textbf{Serial Number} \\ +% + + +\vspace*{0.5cm} + +\parbox[t]{.5\textwidth}{ +\textbf{To} +\vspace{0.3cm} + + + + + + + + + +\hspace{-0.1cm}, + + + + + +\vspace{0.3cm} + + + +\vspace{0.2cm} + + + + + + + + + + + +} +\parbox[t]{.5\textwidth}{ +\textbf{Ship To} +\vspace{0.3cm} + + + + + + + + + +\hspace{-0.1cm}, + + + + + +\vspace{0.3cm} + + + +\vspace{0.2cm} + + + + + + + + + + + +} +\hfill + +\vspace{1cm} + +\textbf{\MakeUppercase{}} +\hfill + +\vspace{1cm} + +\begin{tabularx}{\textwidth}{*{6}{|X}|} \hline + \textbf{Order \#} & \textbf{Order Date} & \textbf{Required by} & \textbf{Salesperson} & \textbf{Shipping Point} & \textbf{Ship Via} \\ [0.5em] + \hline + & & & & & \\ + \hline +\end{tabularx} + +\vspace{1cm} + +\begin{longtable}{@{\extracolsep{\fill}}rllrll@{}} + \textbf{} & \textbf{} + & \textbf{} & \textbf{} & + & \textbf{} \\ + + + & + & + & + & + & + \\ + +\end{longtable} + + +\parbox{\textwidth}{ +\rule{\textwidth}{2pt} + +\vspace{12pt} + + +\medskip + + +} + +\vfill + +\end{document} + diff --git a/lxc-update.sh b/lxc-update.sh old mode 100755 new mode 100644 index 1cb6f04..cce6413 --- a/lxc-update.sh +++ b/lxc-update.sh @@ -1,4 +1,5 @@ #!/bin/bash +export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" set -euo pipefail # --- CONFIGURATION --- @@ -10,122 +11,141 @@ EXCLUDE_LIST=(120 121 150 151 152) declare -A CONTAINER_MAP CONTAINER_MAP[100]="/mnt/flash1/podman/lxc_servarr/" CONTAINER_MAP[101]="/mnt/flash1/podman/lxc_second/" +CONTAINER_MAP[102]="/mnt/flash1/podman/lxc_bird/" CONTAINER_MAP[108]="/mnt/flash1/podman/lxc_dns/" # Multiple paths allowed CONTAINER_MAP[109]="/mnt/flash1/podman/lxc_immich/" CONTAINER_MAP[111]="/mnt/flash1/podman/lxc_ollama/" # --- UTILS --- log() { - echo "[$(date +'%Y-%m-%d %H:%M:%S')] $1" + echo "[$(date +'%Y-%m-%d %H:%M:%S')] $*" } # Wrapper for commands that modify state run_pct() { - if [[ "${DRY_RUN:-0}" == "1" ]]; then - log "[DRY-RUN] pct $*" - else - pct "$@" - fi + if [[ "${DRY_RUN:-0}" == "1" ]]; then + log "[DRY-RUN] pct $*" + else + pct "$@" + fi +} + +cleanup_sudoers() { + local ctid="${1:-}" + [ -z "$ctid" ] && return 0 + pct exec "$ctid" -- rm -f /etc/sudoers.d/99-paru-nopass >/dev/null 2>&1 || true } ALL_CTIDS=$(pct list | awk 'NR>1 {print $1}') for CTID in $ALL_CTIDS; do - # Check if CTID is in EXCLUDE_LIST - IS_EXCLUDED=false - for EXCLUDE in "${EXCLUDE_LIST[@]}"; do - if [[ "$CTID" == "$EXCLUDE" ]]; then - IS_EXCLUDED=true - break - fi - done - if [ "$IS_EXCLUDED" = true ]; then continue; fi + # Check if CTID is in EXCLUDE_LIST + if [[ " ${EXCLUDE_LIST[*]} " =~ " $CTID " ]]; then continue; fi - if pct config "$CTID" | grep -q "template: 1"; then continue; fi + if pct config "$CTID" | grep -q "template: 1"; then continue; fi - NAME=$(pct config "$CTID" | grep "hostname:" | awk '{print $2}') - STATUS=$(pct status "$CTID" | awk '{print $2}') + NAME=$(pct config "$CTID" | grep "hostname:" | awk '{print $2}') + STATUS=$(pct status "$CTID" | awk '{print $2}') - echo "=======================================================" - log "PROCESSING LXC: $NAME (ID: $CTID)" - echo "=======================================================" + echo "=======================================================" + log "PROCESSING LXC: $NAME (ID: $CTID)" + echo "=======================================================" - WAS_STOPPED=false - if [ "$STATUS" == "stopped" ]; then - run_pct start "$CTID" - [[ "${DRY_RUN:-0}" == "0" ]] && sleep 10 - WAS_STOPPED=true - fi + WAS_STOPPED=false + if [ "$STATUS" == "stopped" ]; then + run_pct start "$CTID" + [[ "${DRY_RUN:-0}" == "0" ]] && sleep 10 + WAS_STOPPED=true + fi - # --- 1. SETUP PASSWORDLESS FOR PARU --- - # Paru MUST run as a user, so we keep this sudoers rule for pacman. - log "[+] Configuring temporary sudoers for $AUR_USER..." - run_pct exec "$CTID" -- bash -c "echo '$AUR_USER ALL=(ALL) NOPASSWD: /usr/bin/pacman' > /etc/sudoers.d/99-paru-nopass" - run_pct exec "$CTID" -- chmod 440 /etc/sudoers.d/99-paru-nopass + # --- 1. SETUP PASSWORDLESS FOR PARU --- + # Paru MUST run as a user, so we keep this sudoers rule for pacman. + log "[+] Configuring temporary sudoers for $AUR_USER..." + run_pct exec "$CTID" -- bash -c "echo '$AUR_USER ALL=(root) NOPASSWD: /usr/bin/pacman' > /etc/sudoers.d/99-paru-nopass" + run_pct exec "$CTID" -- chmod 440 /etc/sudoers.d/99-paru-nopass + trap 'cleanup_sudoers "$CTID"' EXIT - # --- 2. OS UPDATER (User Context) --- - log "[+] Updating Arch packages (as $AUR_USER)..." - run_pct exec "$CTID" -- sudo -u "$AUR_USER" paru -Syu --noconfirm --cleanafter + # --- 2. OS UPDATER (User Context) --- + log "[+] Updating Arch packages (as $AUR_USER)..." + run_pct exec "$CTID" -- sudo -u "$AUR_USER" paru -Syu --noconfirm --cleanafter || log "[WARN] Package update failed for CT $CTID" - # --- 3. PODMAN SCAN (Root Context) --- - if [[ -n "${CONTAINER_MAP[$CTID]:-}" ]]; then - # Check Storage Driver (Diagnostic) - DRIVER=$(pct exec "$CTID" -- podman info --format '{{.Store.GraphDriverName}}' 2>/dev/null || echo "unknown") - if [[ "$DRIVER" == "vfs" ]]; then - log "[WARN] Storage driver is 'vfs'. Image operations will be slow." - fi + # --- 3. PODMAN SCAN (Root Context) --- + if [[ -n "${CONTAINER_MAP[$CTID]:-}" ]]; then + # Check Storage Driver (Diagnostic) + DRIVER=$(pct exec "$CTID" -- podman info --format '{{.Store.GraphDriverName}}' 2>/dev/null || echo "unknown") + if [[ "$DRIVER" == "vfs" ]]; then + log "[WARN] Storage driver is 'vfs'. Image operations will be slow." + fi - # Support multiple paths - ROOT_DIRS=${CONTAINER_MAP[$CTID]} - for ROOT_DIR in $ROOT_DIRS; do - log "[+] Scanning for compose files in: $ROOT_DIR" + # Determine compose command once per container + FINAL_CMD="" + if pct exec "$CTID" -- podman compose version >/dev/null 2>&1; then + FINAL_CMD="podman compose" + elif pct exec "$CTID" -- podman-compose version >/dev/null 2>&1; then + FINAL_CMD="podman-compose" + elif pct exec "$CTID" -- docker-compose version >/dev/null 2>&1; then + FINAL_CMD="docker-compose" + fi - # Determine Command - if pct exec "$CTID" -- podman compose version >/dev/null 2>&1; then - FINAL_CMD="podman compose" - elif pct exec "$CTID" -- podman-compose version >/dev/null 2>&1; then - FINAL_CMD="podman-compose" - elif pct exec "$CTID" -- docker-compose version >/dev/null 2>&1; then - FINAL_CMD="docker-compose" - else FINAL_CMD=""; fi + if [ -z "$FINAL_CMD" ]; then + log "[WARN] No compose tool found in CT $CTID (tried: podman compose, podman-compose, docker-compose)" + else + log "[+] Using compose tool: $FINAL_CMD" - if [ -n "$FINAL_CMD" ]; then - # Scan for files - if pct exec "$CTID" -- [ -d "$ROOT_DIR" ]; then - pct exec "$CTID" -- find "$ROOT_DIR" -maxdepth 2 -name "docker-compose.y*ml" | while read -r FILE; do - [ -z "$FILE" ] && continue - DIR=$(dirname "$FILE") - log " -> Updating Project: $DIR" + # Support multiple paths + ROOT_DIRS=${CONTAINER_MAP[$CTID]} + for ROOT_DIR in $ROOT_DIRS; do + log "[+] Scanning for compose files in: $ROOT_DIR" - log " -> Pulling new images (this may take a while)..." - run_pct exec "$CTID" -- bash -c "cd \"$DIR\" && $FINAL_CMD pull" + # Scan for files + if pct exec "$CTID" -- [ -d "$ROOT_DIR" ]; then + COMPOSE_FILES=$(pct exec "$CTID" -- find "$ROOT_DIR" -maxdepth 2 -name "docker-compose.y*ml" 2>/dev/null || true) + if [ -n "$COMPOSE_FILES" ]; then + echo "$COMPOSE_FILES" | while read -r FILE; do + [ -z "$FILE" ] && continue + DIR=$(dirname "$FILE") + log " -> Updating Project: $DIR" - if [ "$WAS_STOPPED" = true ]; then - log " -> Recreating stopped container (up --no-start)..." - run_pct exec "$CTID" -- bash -c "cd \"$DIR\" && $FINAL_CMD up --no-start" || - log " [WARN] Failed to recreate stopped container. Old images may not be pruned." - else - log " -> Applying updates (up -d --force-recreate)..." - run_pct exec "$CTID" -- bash -c "cd \"$DIR\" && $FINAL_CMD up -d --force-recreate" - fi - done - else - log " [WARN] Root directory not found: $ROOT_DIR" - fi - fi - done - log "[+] Pruning all unused images to save space..." - run_pct exec "$CTID" -- podman image prune -a -f - fi + log " -> Pulling new images (this may take a while)..." + run_pct exec "$CTID" -- bash -c "cd \"$DIR\" && $FINAL_CMD pull" || { + log " [WARN] Image pull failed for $DIR" + } - # --- 4. MAINTENANCE --- - log "[+] Running maintenance tasks (journal, orphans)..." - run_pct exec "$CTID" -- journalctl --rotate - run_pct exec "$CTID" -- journalctl --vacuum-time=7d - run_pct exec "$CTID" -- bash -c "orphans=\$(pacman -Qtdq); if [ -n \"\$orphans\" ]; then echo \" -> Removing orphans: \$orphans\"; pacman -Rns \$orphans --noconfirm; fi" + if [ "$WAS_STOPPED" = true ]; then + log " -> Recreating stopped container (up --no-start)..." + run_pct exec "$CTID" -- bash -c "cd \"$DIR\" && $FINAL_CMD up --no-start" || { + log " [WARN] Failed to recreate stopped container in $DIR" + } + else + log " -> Applying updates (up -d --force-recreate)..." + run_pct exec "$CTID" -- bash -c "cd \"$DIR\" && $FINAL_CMD up -d --force-recreate" || { + log " [WARN] Compose up failed for $DIR (exit: $?)" + } + fi + done + fi + else + log " [WARN] Root directory not found: $ROOT_DIR" + fi + done + fi - if [ "$WAS_STOPPED" = true ]; then - log "[+] Shutting down container (was previously stopped)..." - run_pct shutdown "$CTID" - fi + log "[+] Pruning all unused images to save space..." + run_pct exec "$CTID" -- podman image prune -a -f || log "[WARN] Image prune failed for CT $CTID" + fi + + # --- 4. MAINTENANCE --- + log "[+] Running maintenance tasks (journal, orphans)..." + run_pct exec "$CTID" -- journalctl --rotate || log "[WARN] journalctl rotate failed" + run_pct exec "$CTID" -- journalctl --vacuum-time=7d || log "[WARN] journalctl vacuum failed" + run_pct exec "$CTID" -- bash -c "orphans=\$(pacman -Qtdq); if [ -n \"\$orphans\" ]; then echo \" -> Removing orphans: \$orphans\"; pacman -Rns \$orphans --noconfirm; fi" || log "[WARN] Orphan removal failed" + + # Cleanup temporary sudoers before possible shutdown + cleanup_sudoers "$CTID" + trap - EXIT + + if [ "$WAS_STOPPED" = true ]; then + log "[+] Shutting down container (was previously stopped)..." + run_pct shutdown "$CTID" + fi done diff --git a/m3u8.sh b/m3u8.sh old mode 100755 new mode 100644 diff --git a/mail b/mail old mode 100755 new mode 100644 diff --git a/maildir2vcf.sh b/maildir2vcf.sh old mode 100755 new mode 100644 diff --git a/move-trash.sh b/move-trash.sh old mode 100755 new mode 100644 diff --git a/new-sync.sh b/new-sync.sh old mode 100755 new mode 100644 diff --git a/newfile.vcf b/newfile.vcf old mode 100755 new mode 100644 diff --git a/niri_br.sh b/niri_br.sh old mode 100755 new mode 100644 diff --git a/nonum.sh b/nonum.sh old mode 100755 new mode 100644 diff --git a/nothumb.sh b/nothumb.sh old mode 100755 new mode 100644 diff --git a/paperless_backup.sh b/paperless_backup.sh new file mode 100644 index 0000000..97ca763 --- /dev/null +++ b/paperless_backup.sh @@ -0,0 +1,52 @@ +#!/bin/bash + +# --- Configuration --- +BACKUP_DIR="$HOME/paperless-backups" +PAPERLESS_DATA_DIR="/mnt/flash1/podman/lxc_servarr/browser/data" +DATEStamp=$(date +%F-%H%M) +DB_BACKUP="$BACKUP_DIR/paperless-db-backup-$DATEStamp.sql.gz" +FILES_BACKUP="$BACKUP_DIR/paperless-files-backup-$DATEStamp.tar.gz" + +# --- Prepare --- +mkdir -p "$BACKUP_DIR" + +# --- Step 1: Backup Database --- +echo "[$(date)] Starting database backup..." +sudo podman exec paperless-db pg_dump -U paperless paperless | gzip >"$DB_BACKUP" + +if [ -s "$DB_BACKUP" ]; then + echo "[$(date)] ✅ Database backup created: $DB_BACKUP" +else + echo "[$(date)] ❌ Database backup failed" + rm -f "$DB_BACKUP" + exit 1 +fi + +# --- Step 2: Backup Disk Folders --- +echo "[$(date)] Starting files backup..." + +tar czf "$FILES_BACKUP" \ + "$PAPERLESS_DATA_DIR/paperless/media" \ + "$PAPERLESS_DATA_DIR/paperless/data" \ + "$PAPERLESS_DATA_DIR/paperless/export" \ + "$PAPERLESS_DATA_DIR/.consume" \ + 2>/dev/null + +if [ -s "$FILES_BACKUP" ]; then + echo "[$(date)] ✅ Files backup created: $FILES_BACKUP" +else + echo "[$(date)] ❌ Files backup failed" + rm -f "$FILES_BACKUP" + exit 1 +fi + +# --- Step 3: Verify --- +echo "" +echo "=== Backup Summary ===" +ls -lh "$DB_BACKUP" "$FILES_BACKUP" + +# --- Step 4: Cleanup old backups (keep 14 days) --- +find "$BACKUP_DIR" -name "paperless-db-backup-*.sql.gz" -mtime +14 -delete +find "$BACKUP_DIR" -name "paperless-files-backup-*.tar.gz" -mtime +14 -delete + +echo "[$(date)] ✅ Backup complete. Old backups older than 14 days removed." diff --git a/ping-lxcupdate.sh b/ping-lxcupdate.sh new file mode 100644 index 0000000..c489638 --- /dev/null +++ b/ping-lxcupdate.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# --- CONFIGURATION --- +# Replace with the actual path to your update script +UPDATE_SCRIPT="/mnt/tank/scripts/lxc-update.sh" +# Replace with your specific Uptime Kuma Push URL +KUMA_URL="https://uptime.liphlink.xyz/api/push/2H3mltg79B?status=up&msg=OK&ping=" + +# --- EXECUTION --- +# Run the LXC update script +# The script will process LXCs, run paru/pacman updates, and handle maintenance [1] +bash "$UPDATE_SCRIPT" +EXIT_CODE=$? + +# --- PING LOGIC --- +if [ $EXIT_CODE -eq 0 ]; then + # If the script finishes the entire loop and maintenance tasks successfully [1] + /usr/bin/curl -fsS --retry 3 "${KUMA_URL}?status=up&msg=LXC_Updates_Successful" +else + # If any part of the script fails (due to set -e), send a 'down' status [1] + /usr/bin/curl -fsS --retry 3 "${KUMA_URL}?status=down&msg=LXC_Update_Failed_Exit_$EXIT_CODE" + +fi diff --git a/snapraid-ping.sh b/ping-snapraid.sh old mode 100755 new mode 100644 similarity index 100% rename from snapraid-ping.sh rename to ping-snapraid.sh diff --git a/ping_paperless_backup.sh b/ping_paperless_backup.sh new file mode 100644 index 0000000..1004b9c --- /dev/null +++ b/ping_paperless_backup.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# --- CONFIGURATION --- +# Replace with the actual path to your update script +UPDATE_SCRIPT="/mnt/tank/scripts/paperless_backup.sh" +# Replace with your specific Uptime Kuma Push URL +KUMA_URL="https://uptime.liphlink.xyz/api/push/LW7OZFTXSa?status=up&msg=OK&ping=" + +# --- EXECUTION --- +# Run the LXC update script +# The script will process LXCs, run paru/pacman updates, and handle maintenance [1] +bash "$UPDATE_SCRIPT" +EXIT_CODE=$? + +# --- PING LOGIC --- +if [ $EXIT_CODE -eq 0 ]; then + # If the script finishes the entire loop and maintenance tasks successfully [1] + /usr/bin/curl -fsS --retry 3 "${KUMA_URL}?status=up&msg=LXC_Updates_Successful" +else + # If any part of the script fails (due to set -e), send a 'down' status [1] + /usr/bin/curl -fsS --retry 3 "${KUMA_URL}?status=down&msg=LXC_Update_Failed_Exit_$EXIT_CODE" + +fi diff --git a/podman-update.sh b/podman-update.sh old mode 100755 new mode 100644 diff --git a/pve_chmod.sh b/pve_chmod.sh old mode 100755 new mode 100644 index d015056..6ef40c9 --- a/pve_chmod.sh +++ b/pve_chmod.sh @@ -1,17 +1,13 @@ #!/bin/bash -sudo chown -R 101000:100033 /mnt/{hdd1,hdd2,hdd3,hdd4,hdd5,ssd1,ssd2} +sudo chown -R 101000:101000 /mnt/tank/{audio,movies,series,shows,tutorial,documentaries,sports} +sudo chmod -R 777 /mnt/tank/{audio,movies,series,shows,tutorial,documentaries,sports} -sudo chmod -R 775 /mnt/{hdd1,hdd2,hdd3,hdd4,hdd5,ssd1,ssd2} - -sudo chown -R 101000:101000 /mnt/tank/audio -sudo chmod -R 777 /mnt/tank/audio +sudo chown -R 101000:101000 /mnt/flash1/downloads/torrent/ +sudo chmod -R 777 /mnt/flash1/downloads/torrent sudo chown -R 101000:101000 /mnt/flash1/downloads/music sudo chmod -R 755 /mnt/flash1/downloads/music -sudo chown -R 100033:101000 /mnt/ssd2/cloud_phil /mnt/flash1/podman/lxc_servarr/browser/data/.consume -sudo chmod -R 775 /mnt/ssd2/cloud_phil /mnt/flash1/podman/lxc_servarr/browser/data/.consume - sudo chown -R 101000:101000 /mnt/flash1/podman/lxc_servarr/nextcloud/config/obsidian/vaults sudo chmod -R 755 /mnt/flash1/podman/lxc_servarr/nextcloud/config/obsidian/vaults diff --git a/pve_chmod_nextcloud.sh b/pve_chmod_nextcloud.sh new file mode 100644 index 0000000..1fe59fc --- /dev/null +++ b/pve_chmod_nextcloud.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +sudo chown -R 101000:100033 /mnt/ssd2/{ebooks_phil,cloud_phil} +sudo chmod -R 775 /mnt/ssd2/{ebooks_phil,cloud_phil} + +# sudo chown -R 101000:100033 /mnt/{hdd1,hdd2,hdd3,hdd4,hdd5,ssd1,ssd2} +# sudo chmod -R 775 /mnt/{hdd1,hdd2,hdd3,hdd4,hdd5,ssd1,ssd2} + +sudo chown -R 100033:101000 /mnt/flash1/podman/lxc_servarr/browser/data/.consume +sudo chmod -R 775 /mnt/flash1/podman/lxc_servarr/browser/data/.consume diff --git a/rename.sh b/rename.sh new file mode 100644 index 0000000..1675ef2 --- /dev/null +++ b/rename.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +# Step 1: Prompt user for Year and Tag [7][9] +read -p "Enter Year: " user_year +read -p "Enter Tag: " user_tag + +# Process the first MP4 file found in the current directory +for file in *.mp4; do + if [ -f "$file" ]; then + # Extract Title and Resolution (Height) using ExifTool [4][5] + # -s3 returns just the value of the tag + title=$(exiftool -s3 -Title "$file") + + # If the internal Title tag is empty, fall back to the filename [5] + if [ -z "$title" ]; then + title="${file%.*}" + fi + + # Extracting image height for pixel count (e.g., 1080) [4] + height=$(exiftool -s3 -ImageHeight "$file") + if [ -n "$height" ]; then + pixel="${height}p" + else + pixel="UnknownRes" + fi + + # Construct the new base name (without extension) + new_base_name="${title} ${user_year} ${pixel} ${user_tag}" + + # Step 2: Rename the file [5][11] + new_file_name="${new_base_name}.mp4" + mv "$file" "$new_file_name" + + # Step 3: Rename the parent directory [1][2] + # Identify current directory info + current_dir_path=$(pwd) + parent_dir=$(dirname "$current_dir_path") + current_folder_name=$(basename "$current_dir_path") + + # Move to the parent directory to rename the 'root' folder + cd "$parent_dir" || exit + mv "$current_folder_name" "$new_base_name" + + echo "Successfully renamed file to: $new_file_name" + echo "Successfully renamed folder to: $new_base_name" + + # Exit after processing the first video file + break + fi +done diff --git a/retag.sh b/retag.sh old mode 100755 new mode 100644 diff --git a/sig-picker.sh b/sig-picker.sh old mode 100755 new mode 100644 diff --git a/split.sh b/split.sh old mode 100755 new mode 100644 diff --git a/start_adguard.sh b/start_adguard.sh new file mode 100644 index 0000000..9d1d1c7 --- /dev/null +++ b/start_adguard.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# 1. LIST YOUR NAMES HERE +LIST=( + ## adguard_stack + "adguard" + "uptime-kuma" + ## dozzle + "dozzle_adguard" + "beszel-agent-adguard" + "hawser-adguard" +) + +echo "--- Workflow Container Manager ---" + +for NAME in "${LIST[@]}"; do + # 'podman start' is safe to run even if the container is already up. + if sudo podman start "$NAME" >/dev/null 2>&1; then + echo "[ UP ] $NAME" + else + echo "[ FAIL ] $NAME (Check 'sudo podman ps -a' to see if it exists)" + fi +done + +echo "----------------------------------" diff --git a/start_caddy.sh b/start_caddy.sh new file mode 100644 index 0000000..7608652 --- /dev/null +++ b/start_caddy.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# 1. LIST YOUR NAMES HERE +LIST=( + # security_stack + "authentik_db" + "authentik_redis" + "authentik_server" + "authentik_worker" + # "authentik_outpost_servarr" + # "authentik_outpost_second" +) + +echo "--- Workflow Container Manager ---" + +for NAME in "${LIST[@]}"; do + # 'podman start' is safe to aalhkrun even if the container is already up. + if sudo podman start "$NAME" >/dev/null 2>&1; then + echo "[ UP ] $NAME" + else + echo "[ FAIL ] $NAME (Check 'sudo podman ps -a' to see if it exists)" + fi +done + +echo "----------------------------------" diff --git a/start_immich.sh b/start_immich.sh new file mode 100644 index 0000000..f1cadc6 --- /dev/null +++ b/start_immich.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# 1. LIST YOUR NAMES HERE +LIST=( + ## immich_stack + "immich_server" + "immich_machine_learning" + "immich_redis" + "immich_postgres" + ## dozzle + "dozzle_immich" + "beszel-agent-immich" + "hawser-immich" +) + +echo "--- Workflow Container Manager ---" + +for NAME in "${LIST[@]}"; do + # 'podman start' is safe to run even if the container is already up. + if sudo podman start "$NAME" >/dev/null 2>&1; then + echo "[ UP ] $NAME" + else + echo "[ FAIL ] $NAME (Check 'sudo podman ps -a' to see if it exists)" + fi +done + +echo "----------------------------------" diff --git a/start_netbird.sh b/start_netbird.sh new file mode 100644 index 0000000..4c803c0 --- /dev/null +++ b/start_netbird.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# 1. LIST YOUR NAMES HERE +LIST=( + ## netbird_stack + "netbird-dashboard" + "netbird-server" + ## dozzle + "dozzle_netbird" + "beszel-agent-netbird" + "hawser-netbird" +) + +echo "--- Workflow Container Manager ---" + +for NAME in "${LIST[@]}"; do + # 'podman start' is safe to run even if the container is already up. + if sudo podman start "$NAME" >/dev/null 2>&1; then + echo "[ UP ] $NAME" + else + echo "[ FAIL ] $NAME (Check 'sudo podman ps -a' to see if it exists)" + fi +done + +echo "----------------------------------" diff --git a/start_ollama.sh b/start_ollama.sh new file mode 100644 index 0000000..9990740 --- /dev/null +++ b/start_ollama.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# 1. LIST YOUR NAMES HERE +LIST=( + ## ai_stack + "ollama" + "openwebui" + "mcpo" + "n8n" + ## dozzle + "dozzle_ollama" + "beszel-agent-ollama" + "hawser-ollama" +) + +echo "--- Workflow Container Manager ---" + +for NAME in "${LIST[@]}"; do + # 'podman start' is safe to run even if the container is already up. + if sudo podman start "$NAME" >/dev/null 2>&1; then + echo "[ UP ] $NAME" + else + echo "[ FAIL ] $NAME (Check 'sudo podman ps -a' to see if it exists)" + fi +done + +echo "----------------------------------" diff --git a/start_second.sh b/start_second.sh new file mode 100644 index 0000000..624fefc --- /dev/null +++ b/start_second.sh @@ -0,0 +1,60 @@ +#!/bin/bash + +# 1. LIST YOUR NAMES HERE +LIST=( + ## security_stack + # "authentik_db" + # "authentik_redis" + # "authentik_server" + # # "authentik_worker" + # "authentik_outpost_servarr" + # "authentik_outpost_second" + ## books + "bookorbit-app" + "freshrss" + "audiobookshelf" + "bookorbit-db" + ## bbs + "bbs" + ## invidious + "invidious_web" + "invidious_db" + "invidious_comp" + ## misc_stack + "it-tools" + "karakeep" + "karakeep-chrome" + "karakeep-db" + "meilisearch" + ## search_stack + "speedtest-db" + "speedtest-tracker" + "searxng" + # "searxng-tor" + "redis" + "hister" + ## budget_stack + "wallos" + ## dozzle + "dozzle_second" + "beszel-agent-second" + "hawser-second" + ## fitness + "sparky-db" + "sparky-server" + "sparky-front" + "sparky-garmin" +) + +echo "--- Workflow Container Manager ---" + +for NAME in "${LIST[@]}"; do + # 'podman start' is safe to aalhkrun even if the container is already up. + if sudo podman start "$NAME" >/dev/null 2>&1; then + echo "[ UP ] $NAME" + else + echo "[ FAIL ] $NAME (Check 'sudo podman ps -a' to see if it exists)" + fi +done + +echo "----------------------------------" diff --git a/start_servarr.sh b/start_servarr.sh new file mode 100644 index 0000000..7911096 --- /dev/null +++ b/start_servarr.sh @@ -0,0 +1,84 @@ +#!/bin/bash + +# 1. LIST YOUR NAMES HERE +LIST=( + ## auio_stack + "navidrome-music" + "navidrome-meditation" + "navidrome-playlists" + ## browser_stack + # "calibre-phil" + # "calibre-miri" + "mealie" + "paperless-broker" + "paperless-db" + "paperless" + # "freshrss" + # "kavita" + # "kosync" + ## essential_stack + "homepage" + "dockhand" + "vaultwarden" + "homarr" + ## homeasstant_stack + "homeassistant" + "zigbee2mqtt" + "mosquitto" + ## media_stack + "jellyfin" + "seerr" + "tracearr" + "jellystat-db" + "jellystat" + "jellyglance" + "jellyglance-db" + ## monitoring_stack + "glances" + "dozzle" + "beszel" + "beszel-agent" + ## network_stack + "syncthing" + ## next_stack + "next-db" + "next" + "euro-office" + "obsidian-phil" + "obsidian-miri" + ## programming_stack + "gitea" + ## servarr_stacl + "listenarr" + "calibre" + "gluetun" + "qbit" + "qui" + "gluetun-qbt-watchdog" + "profilarr" + "sonarr" + "radarr" + "prowlarr" + "flaresolverr" + "newtarr" + "readarr" + "lidarr" + "tidarr" + "rreading-glasses" + "rreading-glasses-db" + "jackett" + "calibre" +) + +echo "--- Workflow Container Manager ---" + +for NAME in "${LIST[@]}"; do + # 'podman start' is safe to run even if the container is already up. + if sudo podman start "$NAME" >/dev/null 2>&1; then + echo "[ UP ] $NAME" + else + echo "[ FAIL ] $NAME (Check 'sudo podman ps -a' to see if it exists)" + fi +done + +echo "----------------------------------" diff --git a/sync-all-mail.sh b/sync-all-mail.sh old mode 100755 new mode 100644 diff --git a/sync-mail.sh b/sync-mail.sh old mode 100755 new mode 100644 diff --git a/thumb.sh b/thumb.sh old mode 100755 new mode 100644 diff --git a/tidal-mcp.sh b/tidal-mcp.sh deleted file mode 100755 index e94a51d..0000000 --- a/tidal-mcp.sh +++ /dev/null @@ -1,11 +0,0 @@ -cd ~/mcp/tidal-mcp/ - -uv venv --clear -source .venv/bin/activate - -uv pip install --editable . - -cd ~/mcp/tidal-mcp/tidal_api/ -uv pip install flask tidalapi - -nohup python app.py > tidal.log 2>&1 & diff --git a/tidal.log b/tidal.log deleted file mode 100755 index 9b7c006..0000000 --- a/tidal.log +++ /dev/null @@ -1,2 +0,0 @@ -nohup: ignoring input -/usr/bin/python: can't open file '/home/liph/dotfiles/scripts/scripts/app.py': [Errno 2] No such file or directory diff --git a/tmux-sessionizer.sh b/tmux-sessionizer.sh old mode 100755 new mode 100644 diff --git a/trash-message.sh b/trash-message.sh old mode 100755 new mode 100644 diff --git a/yazi-picker.sh b/yazi-picker.sh old mode 100755 new mode 100644 diff --git a/zoxide_openfiles_nvim.sh b/zoxide_openfiles_nvim.sh old mode 100755 new mode 100644