Anki 2.x: Startoptionen für Windows und Macintosh

Die Startoptionen von Anki sind im Handbuch [EN] beschrieben unter

https://apps.ankiweb.net/docs/manual.html#startup-options


Anki 2.x: Startup options for Windows and Macintosh

In the Anki manual link above is the description of Anki startup options in English.
The English translation of this documentation is below the German explanation.

Anki 2.x: Startoptionen Übersicht – Startup options summary

Schritt-für-Schritt-Anleitung (Betty Bossi-Style) – Step by Step introductions

Windows (W) Voraussetzungen für Startoptionen – Startup options, how to start

Macintosh (M) Voraussetzungen für Startoptionen – Startup options, how to start

M01 + W01 = -b → Ordner AnkiDaten verwenden – using specific folder AnkiDaten

M02 + W02 = -l → Die Sprache von Anki anpassen – change Anki language

M03 + W03 = -p Das Profil wählen – choose the profile

M04W04 = → Anki-Portabel: ab USB-Stick starten – Anki Portable: starting from Flash-Drive


Vorschläge, Erklärung zu Betty Bossi

Betty Bossi ist eine bekannte Kochbuchreihe in der Schweiz, http://de.wikipedia.org/wiki/Betty_Bossi. Ihre Rezepte bestehen aus Schritt-für-Schritt-Anleitungen und gelingen üblicherweise, wenn man sich an die Anleitung hält.
Gerne erhalte ich Feedback zu den Anki-Anleitungen bei Problemen, für Vorschlägen oder Vereinfachungen. Die E-Mail-Adresse befindet sich im Impressum, sie steht in den geschwungenen Klammern, mit Klammeraffe dazwischen tuts.

Suggestions, explanation about Betty Bossi
Betty Bossi is a famous cook book series in Switzerland which contains recipes which have been tested and work usually well, when following exactly the step by step instructions: http://en.wikipedia.org/wiki/Betty_Bossi.
If you have problems with writing command lines, or if you have suggestions or know easier ways to do it, please let me know. You'll find the e-mail under Impressum (about), remove the curly brackets and put the at sign in between.

 

zum Start


Startoptionen für Windows

Anki Eigenschaften

Die Startoptionen können im Anki-Icon auf dem Schreibtisch eingetragen werden. Am einfachsten wird das Icon kopiert. Maustaste Rechtsklick auf das Icon und Eigenschaften wählen. Die Startoptionen werden unter Ziel hinzugefügt.
Vor den Optionen steht je nach Windowsversion üblicherweise
32bit → "C:\Program Files\Anki\anki.exe"
64bit "C:\Program Files (x86)\Anki\anki.exe"
Wichtig
Die Beispiele basieren auf Windows-32bit. Wenn Windows-64bit benutzt wird, nur den bunten Teil hinzufügen oder (x86) hinzufügen.

In der Dokumentation stehen / (Slash) für Pfadangaben der Optionen. Das funktioniert mit den Windows-32bit Versionen oder Macintosh.
Windows-64bit benötigt jedoch die \ (Backslash), sonst stimmt der Pfad zum Backup-Ordner und zum Add-on-Ordner nicht.

zum Start

Startup options for Windows

The startup options can be added to the Anki icon on the desktop. A simple way is to copy the icon onto the desktop. Mouse rightclick on the icon to choose Properties. The startup options are added to Target.
In front of the startup options there is the Anki path depending of the version of Windows
32bit → "C:\Program Files\Anki\anki.exe"
64bit "C:\Program Files (x86)\Anki\anki.exe"
Important
The examples contain the instructions for Window-32bit version. Therefore, if you use Windows-64bit, only add the colored part or add (x86).

The manual shows / (slashes) to indicate the paths of the options. That works fine if you use Windows-32bit or Macintosh.
Windows-64bit needs \ (backslash) for the path, otherwise the backup folder and add-on folder doesn't open at the proper place.

zum Start

W01-DE Anki mit Nichtstandard-Anki-Ordner starten

Der Ordner AnkiDaten im Laufwerk Q: soll gewählt werden, deshalb Folgendes hinzufügen (siehe auch Bild)

"C:\Program Files\Anki\anki.exe" -b Q:\AnkiDaten

Speichern und testen.
Heissen Ordner oder der Pfad anders, bitte entsprechend anpassen.

zum Start

W01-EN Starting Anki from any folder

If the folder AnkiDaten on drive Q: should be chosen, please add (see the picture):

"C:\Program Files\Anki\anki.exe" -b Q:\AnkiDaten

Save and test it.
If the folder has a different name or the location is different, change it accordingly.

zum Start

W02-DE Anki-Menüsprache verändern

Standardmässig wird Anki mit der Sprache des Systems gestartet. Mit der Option -L EN z.B. wird die englische Version von Anki gestartet, mit FR die französische usw.

Beispiel 1: Anki aus Standard-Ordner starten in Englisch

"C:\Program Files\Anki\anki.exe" -L EN

Beispiel 2: Anki aus AnkiDaten starten in Englisch (siehe W01)

"C:\Program Files\Anki\anki.exe" -b Q:\AnkiDaten -L EN

zum Start

W02-EN Change the Anki Language

By default Anki is started by using the language of the running OS. When using the Option -L DE, e.g., the German version of Anki will be started.

Example 1: Anki is started in German by using the standard Anki folders

"C:\Program Files\Anki\anki.exe" -L DE

Example 2: start Anki from the folder AnkiDaten (see W01), the Anki language is German

"C:\Program Files\Anki\anki.exe" -b Q:\AnkiDaten -L DE

 

zum Start

W03-DE Anki-Profil wählen

Mit der Startoption -p "Profilname exakt geschrieben" kann automatisch das Profil gewählt werden. Für Profilnamen mit Leerzeichen braucht es die Hochkommas "...", sonst ist es fakultativ.

Es gibt zwei Profile, das eine heisst  TN 1, das andere Sonnenblume.
Für die beiden sehen die Kommandozeilen wie folgt aus

Beispiel 1: Anki aus Standardordner starten mit dem gewünschten Profil

"C:\Program Files\Anki\anki.exe" -p "Sonnenblume"
"C:\Program Files\Anki\anki.exe" -p "TN 1"

Beispiel 2: Anki aus AnkiDaten starten mit dem gewünschten Profil in Französisch (siehe W01, W02)

"C:\Program Files\Anki\anki.exe" -b Q:\Ankidaten -p "Sonnenblume" -L FR
"C:\Program Files\Anki\anki.exe" -b Q:\Ankidaten -p "TN 1" -L FR

zum Start

W03-EN Choose Anki profile

When using the startup option -p "Profile name exactly written", the chosen profile name is started. If the profile name contains spaces, the "..." are needed. It is ok to use it for all profile names.

There are two profiles available: TN 1 and Sonnenblume.

Example 1: Anki is started normally and the approriate profile name is chosen

"C:\Program Files\Anki\anki.exe" -p "Sonnenblume"
"C:\Program Files\Anki\anki.exe" -p "TN 1"

Example 2: Anki is started by using AnkiDaten with the appropriate profile in French (see w01, w02)

"C:\Program Files\Anki\anki.exe" -b Q:\Ankidaten -p "Sonnenblume" -L FR
"C:\Program Files\Anki\anki.exe" -b Q:\Ankidaten -p "TN 1" -L FR

zum Start

W04-DE Anki-Portabel: ab USB-Stick starten

Anki lässt sich auch vom USB-Stick aus starten. Dazu wird ein Ordner Anki-Win auf dem USB-Stick erstellt, um darin die beiden Ordner AnkiProgramm und AnkiDaten zu speichern.
Anki muss zumindest auf einem Gerät installiert werden, damit sämtliche Anki-Programmdateien in den Ordner AnkiProgramm unter Anki-Win kopiert werden können auf dem USB-Stick.
Schritt 1
Der Ordner Anki-Win wird auf dem USB-Stick erstellt.
Schritt 2
Der Unterordner AnkiProgramm wird darin erstellt.
Sämtliche Dateien aus \Program Files\Anki werden nach AnkiProgramm kopiert.
Schritt 3
Der Ordner AnkiDaten wird auch nach Anki-Win kopiert.
Check
Der Ordner Anki-Win beinhaltet nun die beiden Ordner AnkiProgramm und AnkiDaten.

Zum Starten dieses Anki braucht es ein Batch-File. Ein Batch-File kann mit einem Editor erstellt werden, z.B. Notepad oder Notepad++ (siehe Hauptseite), und wird gespeichert. Die Endung wird angepasst zu cmd oder bat. Windows bemerkt, dass die Dateiendung verändert wird, was bejaht wird.
Das Kommando start /b bewirkt, dass das schwarze Kommandozeilenfenster gleich wieder verschwindet.

Bezüglich Nutzung der Batch-Datei gibt es zwei Konzepte. Je nach gewünschter Funktionalität das Gewünschte wählen:

Konzept 1
Der Ordner Anki-Win bleibt fix am Ort und die Batch-Datei kann sich irgendwo auf dem gleichen Datenträger befinden (wie im Handbuch beschrieben):

start /b \Anki-Win\AnkiProgramm\anki.exe -b "\Anki-Win\AnkiDaten"


Konzept 2

Der Ordner Anki-Win kann beliebig auf Datenträgern verschoben werden, solange die Ordnernamen darin nicht verändert werden:

start /b .\AnkiProgramm\anki.exe -b "%CD%\Ankidaten"
oder
start /b .\AnkiProgramm\anki.exe -b "%~dp0Ankidaten"

Von der Batch-Datei kann eine Verknüpfung erstellt werden für den einfacheren Zugriff. Nach jedem Verschieben des Anki-Paketes muss die Verknüpfung neu erstellt werden.

Wenn man das Verzeichnis nutzen will, in dem die Batch-Datei ist, wird das mit %~dp0 bezeichnet (ohne \ zum Pfad), nur für das aktuelle Verzeichnis, kann %CD% genutzt werden.
Der übliche Punkt (.) funktioniert für den Datenpfad nicht richtig, die Add-Ons werden am falschen Ort gespeichert.
Zum Überprüfen den Erweiterungs-Ordner mit den Add-Ons aus Anki öffnen. Die zweite Prüfmöglichkeit aus Anki ist der Backup-Ordner.

zum Start

W04-EN Starting Anki from USB-Drive: Anki Portable

Anki can also be started from a flash-drive or from somewhere on the hard drive. To do this, a folder named Anki-Win is created on the flash-drive. Inside this folders, there are the two folders called AnkiProgramm and AnkiDaten.
In order to get the program files of Anki, you have to install it on a computer.
Step 1
Create a folder named Anki-Win on your USB-Drive
Step 2
Inside Anki-Win create a folder named AnkiProgramm.
Copy all files of the Anki program installation into AnkiProgramm on the flash-drive.
Step 3
The folder AnkiDaten is also copied into Anki-Win.
Check
Eventually, Anki-Win contains the two folders AnkiProgramm and AnkiDaten.

To start this Anki on the flash-drive a batch file is needed. A batch file can be created by using e.g. notepad.exe. After saving the batch file, the suffix has to be changed to cmd or bat.
The command start /b makes the black command windows disappear right after the start.

There are two concepts to use batch files. Check the concepts and choose the appropriate one:

Concept 1
The folder Anki-Win always stays at the same place. The batch file can be at any place on the same drive (this is described in the manual):

start /b \Anki-Win\AnkiProgramm\anki.exe -b "\Anki-Win\AnkiDaten"


Concept 2

The folder Anki-Win can be somewhere on the drive, as long as the folder names inside doesn't change. The batch file has to be inside Anki-Win:

start /b .\AnkiProgramm\anki.exe -b "%CD%\Ankidaten"
or
start /b .\AnkiProgramm\anki.exe -b "%~dp0Ankidaten"

Of course, a shortcut can be used to access the batch file easily.
After moving the folder Anki-Win to a new location, the shortcut has to be created again.

If you want to use the directory in which your your batch file is located, use %~dp0, if you want the current directory, use %CD%.
The dot (.) doesn't work out for the data path, since Add-Ons won't be saved at the right place. Check the Add-On folder in Anki to verify if everything is where it is supposed to be. To check the Backup folder is another way to check if paths are matching.

zum Start

Startoptionen für Macintosh

Generell
Unter Macintosh braucht es Automator oder AppleScript, um das Programm mit Optionen zu starten.

Voraussetzungen
Anki 2.x ist unter Programme installiert.
Der Ordner AnkiDaten wird unter Dokumente kopiert. In AnkiDaten befinden sich die Ankidaten, d.h., die Anki-Stapel.

Programmeinstellungen
Programm Automator starten mit deutschem Betriebssystem

→Programm auswählen
→Dienstprogramme klicken
→Shell-Skript doppelklicken

und in der Box die angegebenen Informationen einfüllen. Das «&» nicht vergessen.
Je nach OS-Sprache verändern sich die Begriffe entsprechend, siehe Beispiel im englischen Text.

zum Start

Startup options for Macintosh

General
In order to use startup options using a Macintosh, you need Automator or Applescript.

Prerequisites
Anki 2.x is installed in the regular folder programs.
The folder AnkiDaten is copied to the folder Documents. In the folder AnkiDaten are all anki-decks etc.

Using Automator
Start the program Automator using an English OS

→choose Application
→click System Utility Programs (or tools?)
→doublclick Run Shell-Script

Type the line into the box, don't forget the «&», otherwise it won't work.
If your are using an OS in another language, translate the expressions in your OS-language to get to the Shell-Script command.

zum Start

M01-DE Anki mit Nichtstandard-Anki-Ordner starten

Damit der Ordner AnkiDaten unter Dokumente gewählt wird, Folgendes hinzufügen

/Applications/Anki.app/Contents/MacOS/Anki -b ~/Documents/AnkiDaten &

Das Script speichern und testen.
Heisst der Ordner mit den Anki-Daten drin anders als AnkiDaten, den Namen entsprechend anpassen.

zum Start

M01-EN Starting Anki from any folder

In order for the folder AnkiDaten on Documents to be be chosen, please add:

/Applications/Anki.app/Contents/MacOS/Anki -b ~/Documents/AnkiDaten &

Save the script and test it.
If the folder holding all Anki data has a different name than AnkiDaten, change it appropriately.

zum Start

M02-DE Anki-Menüsprache verändern

Standardmässig wird Anki mit der Sprache des Systems gestartet. Mit der Option -L EN z.B. wird die englische Version von Anki gestartet, mit FR die französische usw.

Beispiel 1: Anki aus Standardordner starten in Englisch

/Applications/Anki.app/Contents/MacOS/Anki -L EN &

Beispiel 2: Anki aus AnkiDaten starten in Englisch (siehe M01)

/Applications/Anki.app/Contents/MacOS/Anki -b ~/Documents/AnkiDaten -L EN &

zum Start

M02-EN Change the Anki Language

By default Anki is started using the language of the running OS. When using the Option -L DE, e.g., the German version of Anki will be started.

Example 1: Anki is started in German using the standard Anki folders

/Applications/Anki.app/Contents/MacOS/Anki -L DE &

Example 2: Anki is using the folder AnkiDaten (see M01) in German

/Applications/Anki.app/Contents/MacOS/Anki -b ~/Documents/AnkiDaten -L DE &

 

zum Start

M03-DE Anki-Profil wählen

Mit der Startoption -p "Profilname exakt geschrieben" kann automatisch das gewünschte Profil gewählt werden. Für Profilnamen mit Leerzeichen braucht es die Hochkommas "...", für anderes ist es fakultativ.

Es gibt zwei Profile, das eine heisst  TN 1, das andere Sonnenblume.
Für die beiden sehen die Kommandozeilen wie folgt aus

Beispiel 1: Anki aus Standard-Ordner starten mit dem gewünschten Profil

/Applications/Anki.app/Contents/MacOS/Anki -p "Sonnenblume" &
/Applications/Anki.app/Contents/MacOS/Anki -p "TN 1" &

Beispiel 2: Anki aus AnkiDaten starten mit dem gewünschten Profil in Französisch

/Applications/Anki.app/Contents/MacOS/Anki -b ~/Documents/AnkiDaten -p "Sonnenblume" -L FR &
/Applications/Anki.app/Contents/MacOS/Anki -b ~/Documents/AnkiDaten -p "TN 1" -L FR &

zum Start

M03-EN Choose Anki profile

With the startup option -p "Profile name exactly written" the chosen profile name will be started. If the profile name contains spaces, the "..." are needed. It is ok to use it for all profile names.

There are two profiles available: TN 1 and Sonnenblume.

Example 1: Anki is started normally and the approriate profile name is chosen

/Applications/Anki.app/Contents/MacOS/Anki -p "Sonnenblume" &
/Applications/Anki.app/Contents/MacOS/Anki -p "TN 1" &

Example 2: Anki is started using AnkiDaten, the profile ist the appropriate and the language is French

/Applications/Anki.app/Contents/MacOS/Anki -b ~/Documents/AnkiDaten -p "Sonnenblume" -l FR &
/Applications/Anki.app/Contents/MacOS/Anki -b ~/Documents/AnkiDaten -p "TN 1" -l FR &

 

zum Start

M04-DE Anki ab USB-Stick starten: Anki-Portabel

Anki lässt sich auch vom USB-Stick aus starten. Dazu wird ein Ordner Anki-Mac auf dem USB-Stick erstellt, um darin die beiden Ordner Anki (Programm) und AnkiDaten zu speichern.
Das Programm Anki wird heruntergeladen und auf den USB-Stick in den Ordner Anki-Mac kopiert.
Der Ordner AnkiDaten wird auch unter Anki-Mac kopiert.
Der Ordner Anki-Mac beinhaltet nun die beiden Ordner Anki (mit dem Programm) und AnkiDaten sowie die Startdatei erzeugt mit Automator:

/Volumes/*/Anki-Mac/Anki.app/Contents/MacOS/Anki -b /Volumes/*/Anki-Mac/AnkiDaten

Diese Zeile funktioniert sowohl für den Ordner Anki-Mac auf dem USB-Stick wie auch auf dem Schreibtisch von Mac OS X.

zum Start

M04-EN Starting Anki from USB-Drive: Anki Portable

Anki can be started from a flash-drive or from somewhere on the hard drive. To do this, a folder named Anki-Mac is created on the flash-drive. Inside this folders, there are the two folders called Anki (the program files) and AnkiDaten.
In order to get the program files of Anki, it has to be downloaded and copied into the folder Anki-Mac.
The folder AnkiDaten is also copied to Anki-Mac.
Eventually, Anki-Mac contains the two folders Anki (the program), AnkiDaten as well as the automator file:

/Volumes/*/Anki-Mac/Anki.app/Contents/MacOS/Anki -b /Volumes/*/Anki-Mac/AnkiDaten

This works for a flash-drive as well as for the Desktop using Mac OS X.

 


Zuletzt geändert: Donnerstag, 24. Mai 2018, 08:46