Anki-Import
view release on metacpan or search on metacpan
lib/Anki/Import.pm view on Meta::CPAN
Anki::Import - Anki note generation made easy.
=head1 VERSION
version 0.030
=head1 OVERVIEW
Efficiently generate formatted Anki notes with your
text editor for easy import into Anki.
=head1 SYNOPSIS
# Step 1: Create the source file
# Step 2: Run the anki_import command
supplied by this module...
# ...from the command line
anki_import path/to/source_file.txt
lib/Anki/Import.pm view on Meta::CPAN
# ...from within a perl script
use Anki::Import;
anki_import('path/to/source_file.txt');
# Step 3: Import the resultant files into Anki
=head1 DESCRIPTION
Inputting notes into Anki can be a tedious chore. C<Anki::Import> lets you
you generate Anki notes with your favorite text editor (e.g. vim, BBEdit, Atom,
etc.) so you can enter formatted notes into Anki's database more efficiently.
At a minimum, you should have basic familiarity with using your computer's
command line terminal to make use of this program.
=head2 Steps for creating, processing and imorting new notes
=head3 Step 1: Generate the notes with your text editor
First, you create a specially formatted source file which
C<Anki::Import> will process. The source file is a simple text file with
basic formatting rules you must follow.
See the L</General description of the source file> section for details.
=head3 Step 2: Process the notes with C<Anki::Import>
Once the source file is created and saved, run the
lib/Anki/Import.pm view on Meta::CPAN
line by itself with blank lines before and after the line with the single
backtick.
See the L</Source file example> for more help.
=head3 Source file requirements and limitations
=head4 Use UTF-8 encoding
The source file should be a plain text file with UTF-8 encoding. UTF-8
is likely the default encoding method for your editor but check your editor's
settings and documentation for further details.
=head4 Avoid tabs
Since tab characters are used by Anki to split your fields, you should
avoid relying on tab characters in your source file. Any tabs found in your
source file will get converted to four spaces.
=head3 Assigning notes to note types
lib/Anki/Import.pm view on Meta::CPAN
add_this_tag_to_autotags # We add a new_tag to our autotag list
+ # with the '+' sign by itself on a new
# line.
=head3 Getting the most from C<Anki::Import>
By itself, C<Anki::Import> will make it easier for you to format and
input your notes especially if you do a lot of basic HTML formatting. However,
the huge productivity gains of C<Anki::Import> can only be unlocked by getting
proficient wih your text editor of choice.
For example, you can generate templates for each of the note types you use to
make data entry exceptionally painless. And with a text editor like vim, you
can automate the generation of the formatting codes used by C<Anki::Import>
and make Anki note creation joyful, or at least much less tedious.
Teaching you how to use and optimize your text editor for C<Anki::Import> is
well beyond the scope of this document. But if you take the time now and do the
up front work of learning your text editor and tweaking it for use with
C<Anki::Import>, you will save a lot of time in the long run.
In the future, vim configurations and plugins for use with C<Anki::Import>
may be released as they are developed to help you get going faster with vim.
Unfortunately, other text editors cannot be supported as there are far too many
and far too little time to get familiar with all their features.
=head1 USAGE
C<anki_import> can be run from the command line or from within another perl
script. It behaves the same way in both environments.
=head2 Command line usage
The C<Anki::Import> module installs the C<anki_import> command line command
( run in 0.449 second using v1.01-cache-2.11-cpan-de7293f3b23 )