# dir-odt-to-pdf Dir ODT to PDF ## Convert source directory with **odt** files to target path with **pdf** files > [!NOTE] > Source files will be converted if are changed or not exist in target path ## Repository content
.
├── Cargo.lock
├── Cargo.toml                  Rust Cargo defs
├── justfile                    File defs for just command
├── linux                       Files to pack app for Linux
│   ├── install.sh              Installer command (app and bin)
│   └── README                  README for linux installation
├── macos
│   ├── dir-odt-to-pdf.scpt     Apple Script to build APP
│   ├── DirOdtToPdf.app         Apple app 
│   ├── install.command         DMG Installer command (app and bin)
│   └── README                  DMG README
├── packages                    Distribution Packages
│   └── DirOdtToPdf.dmg         DMG file
├── README.md
├── resources                  
│   ├── icon
│   ├── icon.psd
│   ├── ins_background.png
│   └── tools
├── run.sh                      Script model to run 
├── src
│   └── main.rs                 Rust source code
└── test                        Path to test with run.sh
    ├── documents               Target path PDFs files
    └── originals               Source path ODTs files
[dir-odt-to-pdf](dir-odt-to-pdf) is the [Cargo.toml](Cargo.toml) pakage name and it should be directory name for path where [just command](https://just.systems/) will be used with [justfile](justfile) commands and recipes . ## MacOS APP __DirOdtToPdf.app__ run **run-dir-odt-to-pdf.sh** located in /usr/local/bin **/usr/local/bin/run-dir-odt-to-pdf.sh** can be used as a sequence of several executions of **dir-odt-to-pdf** [justfile](justfile) settings: ```bash MACOS_APP_PATH := "DirOdtToPdf.app" ``` ## Terminal Commands [dir-odt-to-pdf](dir-odt-to-pdf) can be used via commands installed in BIN_APP_PATH(/usr/local/bin): | Command filename | Type | Descripción | Required parameters | |------------------|------|--------------|---------------------------------| | **dir-odt-to-pdf** | Binary | Executable that converts .odt files to .pdf.
Requires source and destination paths | SOURCE (for **.odt** files) DEST (for **.pdf** files) | | **run-dir-odt-to-pdf.sh** | Script bash | Script to executes **dir-odt-to-pdf** binary
with specific values ​​for **SOURCE** and **DEST**
To be used as model. | Does not require (defines them internally) | In MacOS [install.command](macos/install.command) copy above commands to BIN_APP_PATH(/usr/local/bin) [justfile](justfile) settings: ```bash APP_PACKAGE := "DirOdtToPdf" BIN_APP_PATH := "/usr/local/bin" ``` ## Just ### Recipes ```bash Available recipes: benchmark # [alias: be] build # [alias: b] buildall # [aliases: ba, ball] clean # [alias: cl] doc # [alias: d] expand # [alias: e] fmt # [alias: f] install # [alias: i] make-app # [alias: mkapp] package # [alias: p, pkg] run # [alias: ru] runtest # [alias: rt] test # [alias: t] ``` The following have different **recipes** for **macos** and **linux** - **buildall** - **make-run** - **make-app** - **make-package** - **install** ### Main Values ```bash APP_NAME := file_name(justfile_directory()) APP_PACKAGE := "DirOdtToPdf" APP_PACKAGES_PATH := justfile_directory() + "/packages/" APP_RESOURCES_PATH := justfile_directory() + "/resources/" MACOS_ROOT_PATH := justfile_directory() + "/macos/" MACOS_APP_PATH := "DirOdtToPdf.app" MACOS_APP_ICNS_PATH := justfile_directory() + "/resources/icon/app/macos/AppIcon.icns" SRC_MACOS := file_name(justfile_directory()) + ".scpt" RUN_SRC := "run.sh" BIN_APP_PATH := "/usr/local/bin" ``` ## For Development | Recipe | alias | Descripción | parameters | |--------|-------|--------------|--------------------| | **build** | b | run cargo | | | **buildall** | ba, ball | on MacOS:
on Linux: | | | **run** | ru | run cargo b -r | | | **expand** | e | run cargo expand | | | **fmt** | f | run cargo +nightly fmt | | | **clean** | cl | run cargo clean | | | **doc** | d | run cargo doc --open --no-deps | | | **benchmark** | be | run cargo bench | | | **test*** | be | run cargo t | | | **runtest** | rt | run [run.sh](run.sh) script using [test](test) directories for **SOURCE** and **DEST** parametets | | ## To work on app | Recipe | alias | Descripción | parameters | |--------|-------|--------------|--------------------| | **install** | i | on MacOS: on Linux: | | | **make-app** | mkapp | on MacOS: on Linux: | | | **make-run** | | on MacOS: on Linux: | | | **delete-run** | | Ask for replace **run-dir-odt-to-pdf.sh** created from [run.sh](run.sh) | | | **package** | | on MacOS: on Linux: | |