Aktualisierte Dateien
This commit is contained in:
parent
df1127b192
commit
fbbbf59a84
1 changed files with 35 additions and 13 deletions
48
README.md
48
README.md
|
|
@ -41,18 +41,15 @@ Dies ist mein erstes Programm in Rust. (Bitte seid gnädig.)
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
### Über Cargo
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cargo install NameToUnix
|
git clone https://github.com/jamulix/NameToUnix.git # Download repository
|
||||||
```
|
cd NameToUnix # Change to download directory
|
||||||
|
cargo build --release # Build binary
|
||||||
### Manueller Build
|
sudo cp target/release/NameToUnix /usr/local/bin/ # copy binary to local bin directory
|
||||||
|
sudo mkdir -p /etc/NameToUnix/ # Create global config directory for NameToUnix in /etc
|
||||||
```bash
|
sudo cp .NameToUnix.conf /etc/NameToUnix/config.toml # Copy config file to this global directory
|
||||||
git clone https://github.com/jamulix/NameToUnix.git
|
mkdir -p ~/.config/NameToUnix/ # Create a personal config directory for NameToUnix
|
||||||
cd NameToUnix
|
cp .NameToUnix.conf ~/.config/NameToUnix/config.toml # Copy config file to this personal directory
|
||||||
cargo build --release
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Die ausführbare Datei wird dann unter `target/release/NameToUnix` erstellt. Du solltest sie mit 'sudo cp target/release/NameToUnix /usr/local/bin/' kopieren. Sie ist dann für alle User verfügbar. Denke daran, die Konfiguationsdatei (s. u.) ebenfalls zu kopieren. Sie kann für jeden User individuell angepasst werden, wenn sie im home-Verzeichnis des Users liegt.
|
Die ausführbare Datei wird dann unter `target/release/NameToUnix` erstellt. Du solltest sie mit 'sudo cp target/release/NameToUnix /usr/local/bin/' kopieren. Sie ist dann für alle User verfügbar. Denke daran, die Konfiguationsdatei (s. u.) ebenfalls zu kopieren. Sie kann für jeden User individuell angepasst werden, wenn sie im home-Verzeichnis des Users liegt.
|
||||||
|
|
@ -105,12 +102,13 @@ NameToUnix --modify-root /pfad/zu/dateien
|
||||||
|
|
||||||
## Configuration File / Konfiguration
|
## Configuration File / Konfiguration
|
||||||
|
|
||||||
Erstelle eine Datei `.NameToUnix.conf` im Arbeitsverzeichnis z. B. mit folgendem Inhalt
|
Erstelle eine Datei `.NameToUnix.conf` im persönlichen Arbeitsverzeichnis z. B. mit folgendem Inhalt
|
||||||
(alternativ `~/.config/NameToUnix/config.toml`):
|
(alternativ `~/.config/NameToUnix/config.toml`):
|
||||||
|
|
||||||
Create a file `.NameToUnix.conf` in the working directory, e.g. with the following content
|
Create a file `.NameToUnix.conf` in your personal working directory, e.g. with the following content
|
||||||
(alternatively `~/.config/NameToUnix/config.toml`):
|
(alternatively `~/.config/NameToUnix/config.toml`):
|
||||||
|
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[replacements]
|
[replacements]
|
||||||
"foo" = "bar"
|
"foo" = "bar"
|
||||||
|
|
@ -129,6 +127,30 @@ Create a file `.NameToUnix.conf` in the working directory, e.g. with the followi
|
||||||
Dies ist eine Beispielkonfiguration. Du kannst Die Datei nach Belieben anpassen.
|
Dies ist eine Beispielkonfiguration. Du kannst Die Datei nach Belieben anpassen.
|
||||||
The above is an example configuration. You can customize the file as you wish.
|
The above is an example configuration. You can customize the file as you wish.
|
||||||
|
|
||||||
|
Erstelle eine Datei /etc/NameToUnix/config.toml im globalen Verzeichnis /etc z. B. mit folgendem Inhalt:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# /etc/NameToUnix/config.toml
|
||||||
|
# --------------------------------------------
|
||||||
|
# In dieser Datei können beliebige zusätzliche Schlüssel-Werte-Paare unter [replacements] hinterlegt werden,
|
||||||
|
# die im Dateistammnamen ersetzt werden. Zum Beispiel:
|
||||||
|
#
|
||||||
|
# [replacements]
|
||||||
|
# "foo" = "bar"
|
||||||
|
# "old" = "neu"
|
||||||
|
#
|
||||||
|
# Dadurch werden in den Dateinamen alle "foo" durch "bar" ersetzt, und "old" durch "neu".
|
||||||
|
# WICHTIG: Die hartcodierten Transformationen sind aber immer vorrangig und lassen sich auch nicht rückgängig machen.
|
||||||
|
# Die persönlichen Einstellungen überschreiben diese Einstellungen. (Be careful! First test with NameToUnix -n <path>)
|
||||||
|
|
||||||
|
[replacements]
|
||||||
|
".." = "."
|
||||||
|
"_·_" = "_-_"
|
||||||
|
".-_" = "_-_"
|
||||||
|
# "" = "" # bewirkt nichts / Dummy entry
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
### Verwendung von NameToUnix
|
### Verwendung von NameToUnix
|
||||||
|
|
||||||
Um die Verwendung von `NameToUnix` zu verstehen, kannst du die folgende Hilfe ausgeben:
|
Um die Verwendung von `NameToUnix` zu verstehen, kannst du die folgende Hilfe ausgeben:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue