Metadata-Version: 2.1
Name: nanugo
Version: 0.1.2
Summary: Turn your handwritten pdf sheets to Anki deck.
License: GPL-3.0-or-later
Author: Lewis Lee
Author-email: shlewislee@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: Pillow (>=10.0.0,<11.0.0)
Requires-Dist: genanki (>=0.13.0,<0.14.0)
Requires-Dist: pypdfium2 (>=4.18.0,<5.0.0)
Description-Content-Type: text/markdown

# Nanugo

`Nanugo(나누고)` means "cut, and-".

Convert your Handwritten(or any) PDF files to Anki decks.

I like to write stuff than to type stuff, especially when I'm studying. So I use my tablet for note-taking. But doing both writing and typing in Anki is just time consuming and... stupid. And I am not screen capturing, clicking a bunch of buttons for, like, an hour a day just to make an Anki deck from what I already spent a lot of time making. I'm also not using AI to further complicate stuff.

I JUST WANT MY HANDWRITINGS CONVERTED TO ANKIDECK.

Nanugo allows you to generate Anki decks from PDF files using both an easy-to-use CLI or as a Python module. You can think of it as creating a real-life flashcard—similar to folding (or, in this case, cutting) a piece of paper in half. How handy.


## Features
![PDF Screenshot](docs/images/1.png)
![Anki Screenshot](docs/images/2.png)

- Convert each pages in PDF file(s) into Anki deck(s) in seconds.
    - Convert bulk of files with one command line.
    - Fast conversions, even with larger files.
- Split PDFs into flashcards both vertically and horizontally, with custom ratio, for flexible content arrangement.
- Automate your workflow by using nanugo directly from your Python script.

## Installation
```
$ pip install nanugo
```

## Usage
### Using with CLI
nanugo can be used with cli without any compromises.

```
$ nanugo your_apkg_name /path/to/pdf/file.pdf

# You can also provide wildcard path or multiple paths.

$ nanugo your_apkg_name /path/with/pdf/files/*.pdf /path/with/single/file.pdf

# There are few options you can set.

$ nanugo --ratio 0.6 0.4 --vertical --inversed your_apkg_name /path/to/pdf/file.pdf

# You can read the source code or you can just ask for

$ nanugo --help

```

### Python Module
You can also use nanugo as a Python module to further suit your needs.
```
import nanugo

builder = nanugo.nanugo.Builder()
path = '/home/foobar/'

deck = builder.build_deck("foo", "./bar.pdf", vertical = True)
pkg = builder.build_pkg([deck]) # It can take multiple decks, ergo list should be provided.

pkg.write_to_file(path)
```

## Author
- [@lewisleedev](https://github.com/lewisleedev)

## Contributing
Contributions are always welcome. See [CONTRIBUTING.md](CONTRIBUTING.md)
