Anki-Import

 view release on metacpan or  search on metacpan

lib/Anki/Import.pm  view on Meta::CPAN

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
for generating import files which is used as follow:

    anki_import source_file [parent_dir] [--verbosity_level]

    B<Example:> anki_import pop_quiz.txt /home/me --verbose

C<anki_import> processes the C<source_file> and generates files to be imported into
Anki, one file for each note type. These files are placed in a directory called
C<anki_import_files>. This directory is placed in the current working directory
by default.

Note that previously generated files already located in the C<anki_import_files>
directory the command is outputting to will will be overwritten without warning.
Add a unique (C<parent_dir> path to help prevent this.

B<C<parent_dir>> is an optional argument containing the path you want C<Anki::Import>
to save the files for output. You may use a C<~> (tilde) to represent the home
directory for the current user.

B<C<$verbosity>> options can be set to C<--verbose> or C<--vverbose>
(very verbose) or C<--quiet>. The verbosity options have aliases for your
typing convenience: C<-v>, C<-V> and C<-q>, respectively.

Use the C<--verbose> or C<--vverbose> option to help troubleshoot source file
processing issues. The (C<--quiet>) option suppresses the success
message printed upon successful processing of the source file.

=head2 From a script

Invoking the C<anki_import> function mirrors the arguments used from the
command line:

=head2 anki_import($source_file, [$parent_dir], [$verbosity]);

Usage in a script is the same as for the command line except that the arguments
must be enclosed in quotes.

    Example:

    anki_import('script_file.txt', '/home/me', '--verbose');

See the L</Command line usage> for more details on the optional arguments. By
default, the verbosity output from the function call is (C<--quiet>. If you
want the function call to output a success message, use (C<--no-quiet>);

=head1 INSTALLATION

C<Anki::Import> is written in the Perl programming langauge. Therefore, you must
have Perl installed on your system. MacOS and *nix machines will have
Perl already installed but the Windows operating system does not
come pre-installed with Perl and so you may have to install it first before you
can use C<Anki::Import>.

If you are unsure if you have Perl installed, open a command prompt and type in:

    perl -v

If Perl is installed, it will report the version of Perl on your machine and
other information. If Perl is not installed, you will get a "not recognized"
error on Windows.

=head2 Installing Strawberry Perl on Windows

If you are on Windows and you do not have Perl installed, you can download a
version of Perl called "Strawberry Perl" from the
L<Strawberry Perl website|http://strawberryperl.com/>. Be sure to install the
proper version (64 or 32 bit).

Once installed successfully, see the next section for downloading and installing
C<Anki::Import>.

=head2 Installing Anki::Import with C<cpanm>

C<Anki::Import> is easy to install if you have a Perl module called
L<App::cpanimus> installed. This module provides a command, C<cpanm>, to easily
downloading and installing modules from the Perl module repository called
B<CPAN>. Simply run this command from the command line to install
C<Anki::Import>:

    cpanm Anki::Import

Strawberry Perl for Windows has the C<cpanm> already installed.

=head2 Installing Anki::Import without C<cpanm>

If you do not have the C<cpan> command on your computer, you will need to use
either the older CPAN shell method of installation or, as a last resort, perform
manual installation. Refer to the
C<Anki::Import> L<INSTALL file|https://metacpan.org/source/STEVIED/Anki-Import-0.012/INSTALL>
for further details on these installation methods.

=head1 REQUIRES

=over 4

=item * L<Cwd|Cwd>

=item * L<Exporter|Exporter>

=item * L<Getopt::Args|Getopt::Args>

=item * L<Log::Log4perl::Shortcuts|Log::Log4perl::Shortcuts>

=item * L<strict|strict>

=item * L<warnings|warnings>

=back



( run in 1.454 second using v1.01-cache-2.11-cpan-39bf76dae61 )