Skip to main content

Turn your handwritten pdf sheets to Anki deck.

Project description

Nanugo

PyPI - Downloads PyPI - License PyPI - Python Version

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

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 Anki Screenshot

  • 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

You can install nanugo with pip

$ 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 make multiple set of cards from single page too.

$ nanugo --rows 5 multiple_rows_pkg /path/to/pdf/file.pdf

# For further help, 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. Read (not that good but better than nothing) documentation for all the arguments and stuff.

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)

Changelog

v1.0.3

  • Fixed a cli error occurred when no scale value was provided.
  • Some docstring changes

v1.0.2

  • Fixed rows option having issues with conflicting media file names.
  • You can now use scale and width options. scale option might help image quality of cards created with multiple rows feature.
  • Some docstring changes and refactors here and there.

v1.0.1

  • You can now create multiple cards from a single page of pdf with rows option. 5 rows template is also provided. Broken. Use v1.0.2 instead.
  • All images are now centered with text-align: center; css snippet by default.

Author

Contributing

Contributions are always welcome. See CONTRIBUTING.md

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nanugo-1.0.3.tar.gz (21.4 kB view details)

Uploaded Source

Built Distribution

nanugo-1.0.3-py3-none-any.whl (23.2 kB view details)

Uploaded Python 3

File details

Details for the file nanugo-1.0.3.tar.gz.

File metadata

  • Download URL: nanugo-1.0.3.tar.gz
  • Upload date:
  • Size: 21.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.0 Linux/6.2.0-1018-azure

File hashes

Hashes for nanugo-1.0.3.tar.gz
Algorithm Hash digest
SHA256 5ddda1ad2187b86423cb4850605ff846dea415c4d82f6afe52f2a60f9b4dac33
MD5 8cd90f409e94c7ab894899920f3b43ae
BLAKE2b-256 2878b6a1639205ec6f351ef6cc2016832ed863fce3c5f3f2be50304c64dc241f

See more details on using hashes here.

File details

Details for the file nanugo-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: nanugo-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 23.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.0 Linux/6.2.0-1018-azure

File hashes

Hashes for nanugo-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 345719ac4fe23ec776b9e6acf71b0bc5bfec67f548cbea5c978b14ced32d4484
MD5 fac7fe653d2095a80111e4ff80f219fc
BLAKE2b-256 fb8067d97bcae98f08ad99c88e2843f41f51446f8737d34673aecc4e6fa2e9cb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page