1
0
mirror of https://github.com/tiyn/wiki.git synced 2026-08-25 17:51:37 +02:00

Compare commits

..

16 Commits

20 changed files with 683 additions and 67 deletions

View File

@@ -4,6 +4,14 @@
[Adobe](https://www.adobe.com/).
It is free.
## Setup
Adobe Acrobat is available for [Windows](/wiki/windows.md), macOS and [Linux](/wiki/linux.md) on the
[official website](https://get.adobe.com/reader/).
For some [Linux distributions](/wiki/linux.md#distributions) — like
[Arch Linux](/wiki/linux/arch-linux.md) there is also a package called `acroread-dc-wine`, which can
be used to set up Adobe Acrobat.
## Usage
This section addresses the usage of Adobe Acrobat.

View File

@@ -0,0 +1,13 @@
# Episteme Reader
[Episteme Reader](https://github.com/Aryan-Raj3112/episteme) is a free and open-source
[e-book](/wiki/e-book.md) reader for [Android](/wiki/android.md).
It supports annotations and OPDS catalogs and can handle large PDF files.
For looking up words while reading, an offline dictionary application such as
[OSS Dict](/wiki/android/oss_dict.md) can be used.
Episteme Reader also features using translation apps like [DeepL](/wiki/deepl.md).
## Setup
On [Android](/wiki/android.md) Episteme Reader is available on [F-Droid](/wiki/android/f-droid.md)
in a package called [Episteme Reader](https://f-droid.org/en/packages/com.aryan.reader.oss/).

View File

@@ -2,6 +2,8 @@
[F-Droid](https://f-droid.org) is an installable catalogue of free and open source
software for [Android](/wiki/android.md) systems.
Alternatively, [Neo Store](/wiki/android/neo_store.md) can be used as a modern F-Droid client and
alternative.
## Setup

10
wiki/android/neo_store.md Normal file
View File

@@ -0,0 +1,10 @@
# Neo Store
[Neo Store](https://github.com/NeoApplications/Neo-Store) is a free and open-source
[F-Droid](/wiki/android/f-droid.md) client and alternative for [Android](/wiki/android.md).
It can be used to browse, install and update applications from F-Droid and other repositories.
## Setup
On [Android](/wiki/android.md) Neo Store is available on [F-Droid](/wiki/android/f-droid.md) in a
package called [Neo Store](https://f-droid.org/packages/com.machiav3lli.fdroid/).

22
wiki/android/oss_dict.md Normal file
View File

@@ -0,0 +1,22 @@
# OSS Dict
[OSS Dict](https://github.com/fengdeyingzi/OSS-Dict) is a free and open-source offline dictionary
application for [Android](/wiki/android.md) and a fork of Aard 2.
The application can for example be used together with
[Episteme Reader](/wiki/android/episteme_reader.md) for looking up words while reading.
## Setup
On [Android](/wiki/android.md) OSS Dict is available on [F-Droid](/wiki/android/f-droid.md)
in a package called [OSS-Dict](https://f-droid.org/en/packages/com.akylas.aard2/).
## Usage
This section addresses the usage of OSS Dict.
### Installing Dictionaries
Dictionary files have to be downloaded separately and added to OSS Dict.
This is usually done by using `.slob` files.
A guide on where to find them can be found in the
[wiki of the slob Github page](https://github.com/itkach/slob/wiki/Dictionaries).

View File

@@ -6,23 +6,23 @@ depending on your needs.
This entry describes how to handle audio data.
Music and Audiobooks can be obtained by buying the digital files or by
[extracting them off of a CD](#extract-audio-files-from-cds).
Podcasts need a so called Podcatcher.
A Podcatcher is used to subscribe to podcasts and download them automatically.
Podcasts need a podcast client.
A podcast client is used to subscribe to podcasts and download them automatically.
For Linux specific music software navigate to the corresponding
[wiki entry](/wiki/linux/audio.md).
[wiki entry](/wiki/linux/audio_%28linux%29.md).
For voice based communication, social platforms or messengers navigate to the
[communication article](/wiki/communication.md) and the corresponding
[section](/wiki/communication.md#social-platforms-messengers-and-voip-services).
For headphones navigate to the [headphones article](/wiki/headphones.md):
And for headphones navigate to the [headphones article](/wiki/headphones.md):
## Speech Recognition and Synthesis
[Speech recognition and synthesis](/wiki/speech_recognition_and_synthesis.md) describe processes to
understand and convert spoken language to text aswell as the reverse process.
understand and convert spoken language to text as well as the reverse process.
## Technical Specifications
This section aswell as its subsections address all technical things about audio, like connections,
This section as well as its subsections address all technical things about audio, like connections,
cables and devices.
The most frequently used audio formats are also addressed.
@@ -30,13 +30,13 @@ The most frequently used audio formats are also addressed.
Unbalanced audio uses a wire for the positive signal for audio transmission and one for ground.
This is the most frequently used type of cable bound audio transmission.
Usually they are connected with jack connections like 3.5mm and 6.25mm.
Usually they are connected with jack connections like 3.5 mm and 6.25 mm.
Balanced audio uses one wire for the positive signal, one for negative and another one for the
ground.
Due to this extra cable a balanced connection can cancel out noise that entered the cable and
affected both the positive and the negative signal.
Balanced uses connectors like 4-pin XLR aswell as 2.5mm and 4.4mm jacks
Balanced uses connectors like 4-pin XLR as well as 2.5 mm and 4.4 mm jacks
### Audio Formats and Encoding
@@ -72,20 +72,20 @@ These can be created when the
Usually this appears together with a single file for the whole CD.
The audio file can then be split according to the `.cue` file.
For splitting of `.flac` files on a Linux system check the
[a flac (package) entry](/wiki/linux/flac_%28package%29.md#splitting-flac-file-according-to-cue-file)
for further informations.
[flac (package) entry](/wiki/linux/flac_%28package%29.md#splitting-flac-file-according-to-cue-file)
for further information.
## Media Software
If you want to keep your system clean of much data, you can use this kind of
setup.
There are differences depending on your preffered software interface.
There are differences depending on your preferred software interface.
### Import Playlist to Spotify
Importing a playlist to Spotify can be challenging.
An easy way to do it is using [Spotlistr](https://www.spotlistr.com/search/textbox) using the
Textbox function.
text box function.
A List of Songs can be input and after connecting to Spotify, it will be imported automatically.
### Digital Audio Workstations and Recording Software
@@ -101,20 +101,19 @@ produce audio files.
### Software for Music/Podcasts/Audiobooks
The following is a list of server software, that is featured in this wiki.
The corresponding client software is handled in the server softwares wiki entry.
The corresponding client software is handled in the server software wiki entry.
- [Subsonic](/wiki/subsonic.md) is a media streamer for music, podcasts and
- [Subsonic](/wiki/subsonic.md) is a media streamer for music, podcasts and
audiobooks.
Subsonic is self-hostable.
Subsonic that can be dockerized and has a web-interface aswell as several
It is self-hostable and can be dockerized and has a web-interface as well as several
clients that can be used.
There are also the free and open-source implementations that feature all the
same features and using its API named [Airsonic](/wiki/airsonic.md) (no longer
maintained) and its inofficial successor [Airsonic-advanced](/wiki/airsonic.md).
maintained) and its unofficial successor [Airsonic-Advanced](/wiki/airsonic.md).
### Software for Podcasts
- [Podgrab](/wiki/podgrab.md) is a free and open-source podcatcher that can also be
- [Podgrab](/wiki/podgrab.md) is a free and open-source podcast client that can also be
used to listen to them.
It is self-hostable and can be dockerized.
It has a web-interface and does not feature client software.
@@ -124,7 +123,7 @@ The corresponding client software is handled in the server softwares wiki entry.
[YouTube](/wiki/youtube.md) features a wide variety of uploaded music and audiobooks.
Using programs like [yt-dl](/wiki/youtube.md#downloading-youtube-videos) they can be downloaded.
[Audible](https://www.audible.de/) is a popular service that makes sells audibooks.
[Audible](https://www.audible.de/) is a popular service that makes sells audiobooks.
After purchasing an audiobook it can be downloaded directly from Audible after navigating to the
`Library` tab and selecting `Download`.
Another option is to use [OpenAudible](/wiki/openaudible.md).
@@ -137,24 +136,24 @@ An account on any of these services or any account at all is not require
## Digitalizing and Analyzing Physical Mediums
This section focusses on physical audio mediums like CDs, their digitalization to a digital audio
This section focuses on physical audio mediums like CDs, their digitalization to a digital audio
file of [specific format](#audio-formats-and-encoding) and conversions between them.
### Detect Bad Conversions
The bitrate, format and the sample rate can be usually checked with simple
The bit rate, format and the sample rate can be usually checked with simple
tools.
For Linux a simple software solution for this is the `file` command.
Running it will display these features of a given audio file.
This will however only display the format features.
Bad convserions as described in
Bad conversions as described in
[the previous section](#audio-formats-and-encoding) can not
be detected by this.
A spectral analysis can detect bad conversions.
For this a audio analyzer like
For this an audio analyzer like
[Sonic Visualizer](https://www.sonicvisualiser.org/) is needed.
Select a audio file and press `Add Spectogram` under `Layer`.
This will display a spectogram.
Select an audio file and press `Add Spectogram` under `Layer`.
This will display a spectogramm.
Music off of a retail CD and lossless songs have frequencies that extend up to
22kHz and can extend even further for hi-res music.
If the frequency extends up to at least 22kHz the file is lossless for sure.
@@ -168,9 +167,9 @@ This way you don't have to search for your CDs all the time.
- [Exact Audio Copy](https://www.exactaudiocopy.de) for windows can rip music
and automatically tag it with the help of a list of databases.
- [fre:ac](https://freac.org/downloads-mainmenu-33) is a free cross-platform
- [The fre:ac project](https://freac.org/downloads-mainmenu-33) is a free cross-platform
audio converter and CD ripper with support for various popular formats.
- [metaflac](/wiki/linux/flac_%28package%29.md) for [Linux](/wiki/linux.md) is a program to edit
- [The metaflac package](/wiki/linux/flac_%28package%29.md) for [Linux](/wiki/linux.md) is a program to edit
the tags of [flac](/wiki/flac_%28codec%29.md) files from the command line.
It is bundled in the `flac` package for [Debian](/wiki/linux/debian.md) and arch based systems.
- [MusicBrainz Picard](/wiki/picard.md) for [Linux](/wiki/linux.md) is a graphical user interface
@@ -180,12 +179,12 @@ This way you don't have to search for your CDs all the time.
While deciding on what version of an album is the best visit
[Dynamic Range DB](https://dr.loudness-war.info).
It shows dynamic range scorings of each version.
It shows dynamic range scores of each version.
### Get Additional Data to an Album/Single
If additional information for an album is needed, visit [Discogs](https://www.discogs.com).
Discogs has tracklists, dates and more information to nearly all versions of albums and singles.
Discogs has track lists, dates and more information to nearly all versions of albums and singles.
### Naming Convention
@@ -193,14 +192,14 @@ It is suggested to place the audio files in a directory named after the album th
These album directories are placed in directories named after the album artist.
Files can be named in the following scheme.
- music: `[<discnumber>.]<tracknumber>._<artist>_-_<title>`
- audiobooks: `[<discnumber>.]<tracknumber>._<artist>_-_<album>_<tracknumber>`
- Music: `[<discnumber>.]<tracknumber>._<artist>_-_<title>`
- Audiobooks: `[<discnumber>.]<tracknumber>._<artist>_-_<album>_<tracknumber>`
### Sheet Music
Music has moved more and more into the computer realm.
An easy and intuitive software that can be used for this is [MuseScore.org](https://musescore.org/)
which features notating music aswell as a wide catalogue of available sheet music.
which features notating music as well as a wide catalog of available sheet music.
MuseScore is free and open-source and is cross-platform.
On [Linux based systems](/wiki/linux.md) it is available on most distributions via the `musescore`
package or their [website](https://musescore.org/download) and can be run with the command `mscore`.
@@ -208,7 +207,7 @@ For Windows visit the [download section of the MuseScore website](https://musesc
Another option for music notation is [LilyPond](https://lilypond.org/).
It is free software and also features
[a plugin](https://github.com/martineausimon/nvim-lilypond-suite) for [NeoVIM](/wiki/linux/vim.md).
[a plugin](https://github.com/martineausimon/nvim-lilypond-suite) for [Neovim](/wiki/linux/vim.md).
From the `.ly` files typical for LilyPond `.midi` files can automatically be generated.
These can in turn be played using [FluidSynth](https://www.fluidsynth.org/).

View File

@@ -154,8 +154,42 @@ This section focuses on the basic usage of calibre's web version.
#### Problems Logging in With Reverse Proxy
It is [a known problem](https://github.com/janeczku/calibre-web/issues/2916?utm_source=chatgpt.com)
not being able to login when using a [reverse proxy](/wiki/reverse-proxy.md) like
[Nginx](/wiki/nginx.md) or [Traefik](/wiki/traefik.md).
It is [a known problem](https://github.com/janeczku/calibre-web/issues/2916) not being able to login
when using a [reverse proxy](/wiki/reverse-proxy.md) like [Nginx](/wiki/nginx.md) or
[Traefik](/wiki/traefik.md).
In this case a 504 error will be displayed.
According to various sources this can be fixed by trying previous sections until it works again.
#### `sqlite3.OperationalError: no such column: books.isbn`
When starting calibre's web version a `500 Internal Server Error` may be displayed.
The logs contain an error similar to the following.
```txt
sqlite3.OperationalError: no such column: books.isbn
```
This indicates that the `metadata.db` schema is missing the `isbn` and `flags` columns expected by
the installed web version.
As a temporary workaround the missing columns can be added manually using the following command.
The placeholder `<metadata>` is the path to calibre's `metadata.db`.
```sh
sqlite3 <metadata>
```
Afterwards run the following [SQL](/wiki/database.md) commands on the database.
```sql
ALTER TABLE books ADD COLUMN isbn TEXT;
ALTER TABLE books ADD COLUMN flags INTEGER NOT NULL DEFAULT 0;
```
After applying the changes restart the service.
The added columns are metadata fields.
Existing books will keep a `NULL` value for `isbn` and `0` for `flags`.
This workaround allows the web version to start again, however it is recommended to verify that the
library was created with a compatible calibre version and that the correct `metadata.db` is being
used.

14
wiki/deepl.md Normal file
View File

@@ -0,0 +1,14 @@
# DeepL
[DeepL](https://www.deepl.com) is an AI-based translation service for translating text and documents
between various languages.
## Setup
DeepL is a website that can be visited without additional setup needed.
On [Android](/wiki/android.md) DeepL is available on [F-Droid](/wiki/android/f-droid.md) in a
package called [DeepL](https://f-droid.org/en/packages/com.example.deeplviewer/).
Additionally, it is available on the [Google Play store](/wiki/android.md#app-store) in a package
called
[DeepL Translate](https://play.google.com/store/apps/details?id=com.deepl.mobiletranslator&hl=en-US).

View File

@@ -25,18 +25,18 @@ If the software is to be used by you check your local laws first.
## Tracking
Many e-book readers include a feature to keep track of read books.
However they do not track the time that was needed to finish them or the number of e-books read in
However they do not track the time that was needed to finish them or the number of e-books read in
a specific timeframe.
This can be done by using a special tracker like [Jelu](/wiki/jelu.md) which can be used to keep
track of e-books and normal books at the same time which is a feature no e-book reader has.
## E-Reader
## E-Reader
An e-reader is a device that is designed for reading digital e-books.
Some of them also feature [annotation tools](/wiki/note-taking.md).
- [Episteme Reader](https://github.com/Aryan-Raj3112/episteme) is a native
[Android](/wiki/android.md) [e-book](/wiki/e-book.md) reader, that is capable of annotations.
- [Episteme Reader](/wiki/android/episteme_reader.md) is a native [Android](/wiki/android.md)
e-book reader, that is capable of annotations.
In contrast to [Saber](/wiki/note-taking.md#software) it is able to handle large PDF-files.
Additionally it features the OPDS protocol for catalogs which can, for example, connect to
[the OPDS catalog of calibre's web version](/wiki/calibre.md#connect-via-opds).

30
wiki/eduroam.md Normal file
View File

@@ -0,0 +1,30 @@
# eduroam
eduroam, short for education roaming, is a wireless network available at many universities and
research institutions worldwide.
It allows users to connect using the credentials or certificates issued by their home institution.
## Android
The recommended [Android](/wiki/android.md) client is called [geteduroam](https://geteduroam.app/).
It is available on the [Google Play Store](/wiki/android.md#app-store) as well as on
[F-Droid](/wiki/android.md#app-store).
It supports both username/password authentication and certificate-based authentication (EAP-TLS).
Install the application, select your institution and follow the setup process.
The application should remain installed, as removing it also removes the eduroam configuration.
## Linux
Most [Linux](/wiki/linux.md) desktop environments support eduroam directly through
[NetworkManager](/wiki/linux/networkmanager.md).
For username/password authentication configure a new WPA2/WPA3 Enterprise connection using the
parameters provided by your institution.
If certificate-based authentication (EAP-TLS) is used, import the supplied client certificate and
configure the connection accordingly.
The certificate is usually provided by your institution.
Some institutions also provide an installer through the official
[eduroam Configuration Assistant Tool (CAT)](https://cat.eduroam.org).

View File

@@ -98,10 +98,10 @@ The following add-ons provide translation options.
add-on made by Mozilla itself that gives an option for marked text to display its translations
quickly from the extension menu but can also translate whole sites.
- [Simple Translate](https://addons.mozilla.org/en-US/firefox/addon/simple-translate) is an add-on
supporting both DeepL and Google Translate to translate marked text in various different ways that
can be automatically displayed.
supporting both [DeepL](/wiki/deepl.md) and Google Translate to translate marked text in various
different ways that can be automatically displayed.
- [To DeepL translation](https://addons.mozilla.org/en-US/firefox/addon/to-deepl/) gives an option
for marked text to display its translation in a pop-up window using DeepL.
for marked text to display its translation in a pop-up window using [DeepL](/wiki/deepl.md).
#### Shopping Add-ons

View File

@@ -1,4 +1,4 @@
# Git (Client)
# Git (Package)
This entry deals with the Git client used in [Linux-based systems](/wiki/linux.md).
For a basic overview and the server setup of git see the
@@ -25,8 +25,70 @@ This section addresses various use cases of git.
There is also an interactive
[fix-up guide by Seth Robertson](https://sethrobertson.github.io/GitFixUm/fixup.html).
Robertson also made guides on [post-production](https://github.com/SethRobertson/GitPostProduction)
and [best practices](http://sethrobertson.github.io/GitBestPractices).
It can help to find the command needed to correct a specific situation of a git repository.
Robertson also made guides on
[post-production](https://sethrobertson.github.io/GitPostProduction/gpp.html) and a guide on
[best practices](http://sethrobertson.github.io/GitBestPractices).
### Git Hooks
Git Hooks are scripts that are executed automatically when certain Git events occur.
They can be used to run checks, format code or generate files before or after operations such as
commits, merges or pushes.
Hooks are stored in the `.git/hooks` directory of a repository.
They are local to a repository and are not tracked by Git.
A hook has to be marked as executable before it is used.
Common hook names are:
* `applypatch-msg`
* `commit-msg`
* `fsmonitor-watchman`
* `post-applypatch`
* `post-checkout`
* `post-commit`
* `post-merge`
* `post-rewrite`
* `post-update`
* `pre-applypatch`
* `pre-auto-gc`
* `pre-commit`
* `pre-merge-commit`
* `pre-push`
* `pre-rebase`
* `pre-receive`
* `prepare-commit-msg`
* `push-to-checkout`
* `sendemail-validate`
* `update`
The following example prints a short message before every commit.
The script has to be stored in `.git/hooks/pre-commit` and marked as executable.
```sh
chmod +x .git/hooks/pre-commit
```
```sh
#!/bin/sh
echo "Running pre-commit hook..."
```
Other hooks function analog.
### Show Commit Information
To explicitly display all information corresponding to a given commit hash `<hash>` run the
following command.
```sh
git show --format=full <hash>
```
Apart from the diff it will also display the author including their mail, the complete commit hash
and the whole commit message.
### Modify a Commit Already Done
@@ -41,7 +103,7 @@ git commit --amend --no-edit
```
A graphic that visualizes the way amending works was made by
[jubb0bs in a Stackoverflow comment](https://stackoverflow.com/questions/26050327/how-does-git-commit-amend-work-exactly).
[jubb0bs in a StackOverflow comment](https://stackoverflow.com/questions/26050327/how-does-git-commit-amend-work-exactly).
After amending a normal `git push` will not work as a commit was removed.
In this case to [push it has to be done forcefully](#force-pushing).
@@ -99,11 +161,10 @@ git ls-files -v | grep "^S"
Authentication by default is done via a username and a password.
For some services such as GitHub.
it is not possible to use password as an authentication method.
It is not possible to use password as an authentication method.
The other possibility to authenticate to git is by using [SSH](/wiki/ssh.md).
The following sections assumes using a [Linux-based system](/wiki/linux.md) using
[OpenSSH](/wiki/linux/openssh.md).
The following sections assumes [Linux](/wiki/linux.md) is using [OpenSSH](/wiki/linux/openssh.md).
For this a
[SSH certificate has to be created](/wiki/linux/openssh.md#generate-new-keys) and
[added to the authentication agent](/wiki/linux/openssh.md#adding-keys-to-authentication-agent).
@@ -133,7 +194,7 @@ There are different possibilities to improve the diff of git.
One of them is [diff-so-fancy](#git-diff-diff-so-fancy) which allows word specific `git diff`.
A second and more modern option is [delta](#git-diff-delta) which additionally allows syntax
highlighting and a side-by-side view.
delta also improves the `git blame` command, which is another reason why it is widely more popular
Delta also improves the `git blame` command, which is another reason why it is widely more popular
then diff-so-fancy.
A more or less complete overview of the options was performed in an
@@ -166,8 +227,8 @@ Depending on the system settings and preferences the dark-mode (`dark`) and the
#### `git diff`: diff-so-fancy
[diff-so-fancy](https://github.com/so-fancy/diff-so-fancy) is a drop in replacement for the default
`git diff` look.
The package [diff-so-fancy](https://github.com/so-fancy/diff-so-fancy) is a drop-in replacement for
the default `git diff` look.
It can be installed via most [package managers](/wiki/linux/package_manager.md) using the
`diff-so-fancy` package.
Afterward the following lines need to be run to complete the configuration.

View File

@@ -9,7 +9,7 @@ for [LaTeX](/wiki/markup_language.md#latex) using the BibTeX format.
Papis can be installed on most [Linux](/wiki/linux.md) distributions by acquiring the `papis`
package.
On some distributions there may be problems installing this from the official repository.
Another option to install papis is to use [pip](/wiki/programming_language/python.md).
Another option to install Papis is to use [pip](/wiki/programming_language/python.md).
Alternatively it can be downloaded from [the GitHub page](https://github.com/papis/papis).
### Configuration
@@ -17,7 +17,7 @@ Alternatively it can be downloaded from [the GitHub page](https://github.com/pap
To use Papis a config file needs to be created.
The path of the global config file is `~/.config/papis/config`.
A minimal config can look like the following.
Make sure to change the path of the papers directory.
Make sure to change the path to the directory of the paper.
```txt
[papers]
@@ -128,8 +128,8 @@ Afterward the contents of the temporary database should be checked to be correct
papis -l tmp-db edit
```
Afterward the contents of the temporary library should be moved to the actualy directory where
papis stores its entries.
Afterward the contents of the temporary library should be moved to the actual directory where Papis
stores its entries.
The path for that can be found in the [config file](#configuration).
```sh
@@ -140,6 +140,13 @@ Finally, the cache needs to be cleared
[as described in the corresponding section](#clearing-the-cache) for Papis to display the new
entries correctly.
Alternatively the BibTeX file can instantly be imported using the following command where `<file>`
is a placeholder for the BibTeX file.
```sh
papis bibtex read <file> import --all
```
### Changing the Default Names of the Library
The changing of the default names is done by changing the [config file](#configuration).

View File

@@ -35,6 +35,44 @@ There are similar repositories and resources for functions that are outside the
shells.
Because of that and their issue regarding compatibility they will not be mentioned here.
### Shebangs
A shebang specifies which interpreter should execute a script.
It is written as the first line of the file and starts with `#!`.
For example, a [POSIX shell](#unix-shells) script typically begins with the following.
```sh
#!/bin/sh
```
A [Bash](#unix-shells) script commonly uses the following line.
```sh
#!/usr/bin/env bash
```
Using `/usr/bin/env` causes the interpreter to be resolved through the current `PATH` instead of
using a fixed path.
This makes scripts more portable and allows them to use interpreters provided by virtual
environments—for example
[Pythons virtual environments](/wiki/programming_language/python.md#using-virtual-environments)—or
other tools.
To execute a script directly, it first has to be marked as executable.
```sh
chmod +x <script>
```
It can then be started directly.
```sh
./<script>
```
The operating system will automatically invoke the interpreter specified by the shebang.
### Symbolic Links using `ln`
`ln` is a command to create links between files and folders.

View File

@@ -14,6 +14,45 @@ When using NextCloud with a specific nginx configuration you have to append
This section addresses various features of NextCloud.
### Clean Trash Bin
NextCloud uses a trash bin by default.
It can reach a quite large size quickly depending on the files that are deleted.
To completely delete the trash bin for a specific user `<user>` run the following command inside the
NextCloud console on the host system.
```sh
php occ trashbin:cleanup <user>
```
To empty the trash bin of all users run the following command.
```sh
php occ trashbin:cleanup --all-users
```
### Configure Trash Bin Retention
The trash bin by default handles the retention of the deleted data automatically.
This can be changed using the following command where `<value>` is the obligation value.
```sh
php occ config:system:set trashbin_retention_obligation --value="<value>"
```
The value `<value>` can be set to define minimum and maximum times to keep the data.
The following table shows various examples of possible configuration.
| Value | Behavior |
|---|---|
| `auto` | Automatic retention (default) |
| `30, auto` | Keep for at least 30 days |
| `auto, 30` | Delete after no more than 30 days |
| `30, 60` | Keep for 3060 days |
| `disabled` | Disable automatic deletion |
### WebDAV
You can access ownCloud via WebDAV with the link

View File

@@ -24,3 +24,7 @@ The following is a list of these tools.
Basic guides for this can be found on the pages of
[toromtomtom](https://www.toromtomtom.com/blog/2021/10/17/pdfpc.html) and
[Utah university](https://ctan.math.utah.edu/ctan/tex-archive/macros/latex/contrib/pdfpc/pdfpc-doc.pdf).
Most importantly the tab key opens the overview mode, `p` pauses, `f` freezes, `t` opens
clickable options, `g` opens the option to navigate to a specific page, `h` hides and `b` shows
`a` blank foil. After selecting a rectangular space with the pointer tool, `z` can be pressed to
zoom into it.

View File

@@ -29,8 +29,8 @@ to your `~/.profile`.
You can then set and install your preferred version of python globally with
`pyenv install <version>` and `pyenv global <version>`.
Analog to managing python versions, `pipenv` can manage
[pip](/wiki/programming_language/python/uv.md) and package versions.
Analog to managing python versions, `pipenv` can manage [pip](#pip) and
[package versions](#package-management).
A guide and description of the usage can be found on [gioele.io](https://gioele.io/pyenv-pipenv).
### Manual Installation
@@ -88,6 +88,23 @@ python3.9 --version
This section addresses the usage of Python.
### Executable Python Scripts
Python scripts can be made directly executable without explicitly calling the Python executable
itself every time.
For general information about shebangs, executable scripts and the `chmod +x` command, refer to the
corresponding section in the [Shell article](/wiki/linux/shell.md#shebangs).
For Python, it is recommended to use the following shebang.
```py
#!/usr/bin/env python
```
Using `/usr/bin/env python` makes the script compatible with
[virtual environments](#using-virtual-environments), [uv](/wiki/programming_language/python/uv.md)
projects and other Python environment managers.
### Convert `.ipynb` Files to `.py` Files and Back
Jupyter notebooks in the `.ipynb` format can easily be converted to normal Python files using
@@ -133,6 +150,7 @@ A more modern and arguably better approach is using
#### venv Virtual Environments
[venv](https://docs.python.org/3/library/venv.html) can be used to create a virtual environment.
It usually uses the standard [pip](#pip) manager for installing libraries.
```
python -m venv <project-path>
@@ -167,6 +185,61 @@ ln -s <local-venv> ~/.pyenv/versions/<venv-name>
Using this setup the python version will automatically change when navigating into the project
directory.
## Package Management
Python packages can be installed using package managers.
For new projects it is generally recommended to use [uv](#uv), while [pip](#pip) is available by
default in most Python installations and is supported by virtually all Python projects.
### pip
The `pip` package manager is the standard Python package manager and can be used to install, upgrade
and remove Python packages.
It is recommended to use `pip` inside a [virtual environment](#using-virtual-environments).
A package called `<package>` can be installed using
```sh
pip install <package>
```
To upgrade an already installed package run
```sh
pip install --upgrade <package>
```
Packages can be removed again using
```sh
pip uninstall <package>
```
To display all currently installed packages use
```sh
pip list
```
### uv
For new projects it is generally recommended to use [uv](/wiki/programming_language/python/uv.md),
which provides a modern replacement for [pip](#pip), [venv](#venv-virtual-environments) and several
other Python tools.
The corresponding article describes installation, virtual environments, dependency management and
further usage in detail.
## Modules
Python modules can be installed using package managers such as
[pip](/wiki/programming_language/python/pip.md) or
[uv](/wiki/programming_language/python/uv.md).
For most projects it is recommended to use a
[virtual environment](#using-virtual-environments).
For global installation the
[system package managers](/wiki/linux/package_manager.md) can be used.
## Modules
Python modules can be installed using package managers such as
@@ -205,10 +278,10 @@ Afterward all possible scikit-learn algorithms will run on the GPU instead of th
### PyTorch
This section addresses the [PyTorch module](https://pytorch.org/).
Pytorch is a machine learning resource which is often used for
PyTorch is a machine learning resource which is often used for
[neural networks](/wiki/neural_network.md).
#### Setup Pytorch with CUDA for GPU usage
#### Setup PyTorch with CUDA for GPU usage
CUDA is also only available for Nvidia GPUs.
For AMD GPUs refer to [the ROCm section](#setup-pytorch-with-rocm-for-gpu-usage).
@@ -308,7 +381,7 @@ can be referenced.
### TensorFlow
This section addresses the [TensorFlow module](https://www.tensorflow.org/).
Tensorflos is a machine learning resource which is often used for
TensorFlow is a machine learning resource which is often used for
[neural networks](/wiki/neural_network.md).
Apart from [package managers](/wiki/linux/package_manager.md) and
@@ -317,6 +390,88 @@ on [the official website](https://www.tensorflow.org/install/source).
This may especially be useful if specific configurations are needed such as vendor specific GPU
support.
#### Setup TensorFlow with CUDA in a uv Project
TensorFlow can install its required CUDA user-space libraries as optional dependencies on Linux.
The NVIDIA driver still has to be installed on the host system.
```sh
nvidia-smi
uv add 'tensorflow[and-cuda]'
```
Verify whether TensorFlow was built with CUDA support and detects the GPU.
```sh
uv run python -c 'import tensorflow as tf; print("CUDA build:", tf.test.is_built_with_cuda()); print(tf.config.list_physical_devices("GPU"))'
```
If `CUDA build` is `True` but no GPU is listed and TensorFlow reports that it cannot load GPU
libraries, the dynamic linker may not find the NVIDIA libraries installed inside the virtual
environment.
The following command temporarily adds all library directories from the installed `nvidia-*`
packages.
```sh
SITE_PACKAGES=$(uv run python -c 'import site; print(site.getsitepackages()[0])')
CUDA_LIBS=$(find "$SITE_PACKAGES/nvidia" -type d -name lib -printf '%p:')
LD_LIBRARY_PATH="${CUDA_LIBS}/usr/lib" uv run python -c \
'import tensorflow as tf; print(tf.config.list_physical_devices("GPU"))'
```
If the test succeeds, store the path in a machine-specific dotenv file.
```sh
printf 'LD_LIBRARY_PATH=%s/usr/lib\n' "$CUDA_LIBS" > .env.cuda
printf '.env.cuda\n' >> .gitignore
```
Run the project with the file explicitly.
```sh
uv run --env-file .env.cuda python <script>.py
```
To load it automatically, create a `.envrc` file and use
[direnv](https://direnv.net/).
```sh
printf 'export UV_ENV_FILE="$PWD/.env.cuda"\n' > .envrc
eval "$(direnv hook zsh)"
direnv allow
```
For more information about dotenv files in uv, refer to the
[uv environment variable section](/wiki/programming_language/python/uv.md#loading-environment-variables).
Some recent GPUs may require CUDA kernels to be compiled from PTX on the first run because the
TensorFlow wheel does not yet contain native kernel binaries for their compute capability.
For example, TensorFlow 2.21 reports this for an RTX 5060 Ti with compute capability `12.0a`.
According to NVIDIA's
[explanation of PTX compatibility](https://developer.nvidia.com/blog/understanding-ptx-the-assembly-language-of-cuda-gpu-computing/),
embedded PTX can be compiled for newer GPU generations at runtime.
The first start can therefore take considerably longer, while the resulting binary is normally
cached for subsequent runs.
Make sure the `ptxas` executable installed by the CUDA dependency is available in the virtual
environment.
```sh
VENV_DIR=$(uv run python -c 'import sys; print(sys.prefix)')
PTXAS=$(find "$VENV_DIR" -type f -name ptxas -print -quit)
ln -sf "$PTXAS" "$VENV_DIR/bin/ptxas"
```
The library lookup problem is not caused by the GPU being new; it is an environment configuration
issue.
The new GPU generation only explains why TensorFlow falls back to PTX JIT compilation after the
libraries have been found.
Refer to the
[official TensorFlow installation guide](https://www.tensorflow.org/install/pip) for the current
CUDA installation and troubleshooting steps.
#### Basic Usage of TensorFlow
The basic usage of TensorFlow is described in
@@ -341,3 +496,31 @@ A simple example for the combination of two models (`model1` and `model2`) into
output = model2(model1.output)
combined_model = tf.keras.models.Model(inputs=model1.input, outputs=output)
```
### matplotlib
The [matplotlib](https://matplotlib.org/) module is a plotting library for Python.
#### Qt Backend Not Found
When using [Wayland](/wiki/linux/wayland.md), matplotlib may fail with an error similar to the
following.
```txt
ImportError: Failed to import any of the following Qt binding modules:
PyQt6, PySide6, PyQt5, PySide2
```
This happens because matplotlib uses the Qt backend (`QtAgg`) for displaying interactive windows,
but no Qt Python bindings are installed.
To fix the issue simply install `PyQt6` inside the current
[Python environment](#using-virtual-environments).
This may look like the following example where [uv](/wiki/programming_language/python/uv.md) is
used but other environments such as [pip](#pip) can also be used.
```sh
uv add PyQt6
```
After installing `PyQt6`, interactive matplotlib windows should work correctly under Wayland.

View File

@@ -8,12 +8,70 @@ dependencies.
## Setup
Refer to the [official installation guide](https://docs.astral.sh/uv/getting-started/installation/)
to install `uv` on your operating system.
to install uv on your operating system.
## Usage
This section addresses the usage of uv.
### Automatically Updating `requirements.txt`
Projects that still require a `requirements.txt` file can regenerate it automatically by using a Git
`pre-commit` hook.
The hook is executed before every commit and can export the current project dependencies before the
changes are committed.
For the export command see the
[`requirements.txt` export section](#exporting-requirementstxt).
For a general explanation of Git hooks refer to the
[Git Hooks section](/wiki/linux/git_%28package%29.md#git-hooks) in the
[Git package entry](/wiki/linux/git_%28package%29.md).
### Exporting `requirements.txt`
Although `uv` primarily manages dependencies through `pyproject.toml` and `uv.lock`, some tools like
[pip](/wiki/programming_language/python.md#pip) and other
[virtual environments](/wiki/programming_language/python.md#using-virtual-environments) still expect
a `requirements.txt` file.
The recommended way to generate it is by exporting the locked project dependencies.
```sh
uv export --format requirements-txt -o requirements.txt
```
This creates a reproducible `requirements.txt` based on the project's lock file.
Alternatively, the packages currently installed in the active virtual environment can be exported.
```sh
uv pip freeze > requirements.txt
```
Unlike `uv export`, this command only lists the packages that are currently installed and therefore
depends on the state of the active environment.
If a `requirements.txt` file should always stay in sync with the project dependencies, it can be
automatically regenerated using a Git `pre-commit` hook.
For more information refer to the
[Git Hooks section](/wiki/linux/git_%28package%29.md#git-hooks) in
[Linux' entry about Git](/wiki/linux/git_%28package%29.md).
### Executable Scripts
uv fully supports Python scripts that use the standard Python shebang.
```py
#!/usr/bin/env python
```
This allows scripts to automatically use the Python interpreter provided by the current uv project
or [virtual environment](/wiki/programming_language/python.md#using-virtual-environments).
For a general explanation of shebangs and executable scripts, refer to the
[Shell article](/wiki/linux/shell.md#shebangs).
### Managing Python Versions
Python versions can be installed and pinned for the current project by replacing
@@ -55,6 +113,44 @@ desired package.
uv add <package>
```
### Loading Environment Variables
[`uv run`](https://docs.astral.sh/uv/concepts/configuration-files/#environment-variable-files) can
load environment variables from dotenv files.
Use `--env-file` to load a file for one command.
```sh
uv run --env-file .env.local python <script>.py
```
Alternatively, set `UV_ENV_FILE` to use the same file for subsequent `uv run` commands in the
current shell.
```sh
export UV_ENV_FILE="$PWD/.env.local"
uv run python <script>.py
```
For project-local automation, [direnv](https://direnv.net/) can set `UV_ENV_FILE` whenever the
project directory is entered.
Create `.envrc` in the project root with the following content.
```sh
export UV_ENV_FILE="$PWD/.env.local"
```
Enable the shell hook, then approve the file.
The example uses Zsh.
```sh
eval "$(direnv hook zsh)"
direnv allow
```
The shell hook should be added to `~/.zshrc` to enable it in new shells.
`direnv allow` always expects a `.envrc`; it does not load `.env.local` directly.
Machine-specific dotenv files should usually be added to `.gitignore`.
### Installing CLI Tools
Besides managing projects and virtual environments, `uv` can also install

View File

@@ -13,7 +13,7 @@ configuration.
### Installation
[QMapShack](https://github.com/Maproom/qmapshack) can either be installed from source as described
[QMapShack](https://github.com/Maproom/qmapshack) can either be installed from source as described
on the [official GitHub page](https://github.com/Maproom/qmapshack) or through the
[package manager](/wiki/linux/package_manager.md) of many Linux distributions where it is often
packaged under the name `qmapshack`.
@@ -25,7 +25,7 @@ Additionally, it is recommended to configure digital elevation models and a rout
#### Maps
Garmin-compatible [OpenStreetMap](https://www.openstreetmap.org/) vector maps work well with
Garmin-compatible [OpenStreetMap](https://www.openstreetmap.org/) vector maps work well with
[QMapShack](https://github.com/Maproom/qmapshack).
The maps provided by [Freizeitkarte](https://freizeitkarte-osm.de/) are recommended.
They can be found on their [website](https://download.freizeitkarte-osm.de/garmin/latest/).
@@ -39,7 +39,7 @@ To do that select `Setup Map Paths` under `File`.
Digital elevation models are used to display altitude information, elevation profiles and
ascent/descent statistics.
SRTM height data can be downloaded from
[Viewfinder Panoramas](https://www.viewfinderpanoramas.org/) and their
[Viewfinder Panoramas](https://www.viewfinderpanoramas.org/) and their
[interactive map](https://viewfinderpanoramas.org/Coverage%20map%20viewfinderpanoramas_org1.htm).
Extract all the downloaded `.zip` files into a common directory.
@@ -59,7 +59,7 @@ The routing database can be downloaded from [Geofabrik](https://download.geofabr
Since the creation of the routing is pretty time and memory intensive, it is recommended to download
only needed regions.
After downloading the desired region configure Routino in the routing settings of QMapShack and
After downloading the desired region configure Routino in the routing settings of QMapShack and
create a database with `Create Routino Database` under `Tool`.
## Usage
@@ -87,3 +87,14 @@ Projects, routes and tracks can be exported as [GPX](/wiki/navigation.md#gpx).
Select the corresponding object and export it after right-clicking it as a `.gpx` file.
The resulting file can be imported into
[mobile navigation applications](/wiki/navigation.md#mobile-navigation).
### Manual and Automatic Routing
QMapShack supports both automatic and manual route creation.
These options are dependent on the [routing engine](#routing-engine).
Automatic routing follows the configured routing engine and can be enabled with `Ctrl+A` or disabled
by pressing the shortcut again.
Manual routing places route segments exactly as clicked without automatic path calculation and can
be toggled with `Ctrl+M`.
Both modes are independent and can be switched on or off at any time using their respective keyboard
shortcuts.

45
wiki/rembg.md Normal file
View File

@@ -0,0 +1,45 @@
# rembg
[rembg](https://github.com/danielgatis/rembg) is a [command line](/wiki/linux/shell.md) tool and
Python library for removing image backgrounds using pretrained
[neural networks](/wiki/neural_network.md) executed through ONNX Runtime.
## Setup
rembg can be installed from source as described on the
[official GitHub repository](https://github.com/danielgatis/rembg).
Alternatively a [Python package manager](/wiki/programming_language/python.md#package-management)
can be used to install rembg.
For the backend one must select CPU or GPU usage.
For command line usage an extra package has to be installed in addition to the inference backend.
Depending on that choice the name of the package will be `"rembg[cpu,cli]"` or `rembg[gpu,cli]`.
## Usage
This section addresses the usage of rembg.
### Remove Background
The following command removes the background from an image using a specific `<model>`.
In this case `<input>` is a placeholder for the input image path and `<output>` for the output image
path.
```sh
rembg i -m <model> <input> <output>
```
Depending on the use-case other models may also be used.
`u2net` is a general purpose model and most of the time a good default.
`u2net_human_seg` is optimized for human subjects.
`isnet-general-use` is an alternative general-purpose model.
The quality depends on the selected model and the input image.
For portraits with complex backgrounds such as bushes or trees, `u2net` often produces the best
overall results, while other models may perform better on different types of images.
Additionally, alpha matting can improve difficult edges such as hair.
```sh
rembg i -m <model> -a <input> <output>
```