Skip to main content

Advent of Code Optical Character Recognition (adventocr)

Some Advent of Code puzzles provide visual outputs which must be converted into text. This package is a helper to automate this task.

Installation

pip install adventocr

Usage

An example puzzle output may look something like

word = [
    '#', '#', '#', '#', ' ', '#', '#', '#', '#', ' ',
    '#', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ',
    '#', '#', '#', ' ', ' ', '#', '#', '#', ' ', ' ',
    '#', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ',
    '#', ' ', ' ', ' ', ' ', '#', ' ', ' ', ' ', ' ',
    '#', '#', '#', '#', ' ', '#', ' ', ' ', ' ', ' '
]

When tidied and printed, this appears to be

#### #### 
#    #    
###  ###  
#    #    
#    #    
#### #

This process can be automated through:

import adventocr
parsed = adventocr.word(word)
parsed
'EF' 

Metadata

Release files for adventocr 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for adventocr 0.1
File Size Uploaded Provenance
adventocr-0.1.tar.gz 2.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for adventocr 0.1
File Interpreter ABI Platform
adventocr-0.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.4 kB

Release files / adventocr-0.1.tar.gz

Download URL adventocr-0.1.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ddc785c64980fa635d7f0a02f5a82b7416b37faa4660507cb3b733667b625c38
BLAKE2b-256 checksum
How to use checksums
9e84507e392e20e89361a12fb4f7dcf5a3685924fbde5aa8c2e3e0f689dae064
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.5

Release files / adventocr-0.1-py3-none-any.whl

Download URL adventocr-0.1-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d108387e26779fde0b32dcfe7688dca189c8ce09f20eaa3ea04bc9fc0d1074c6
BLAKE2b-256 checksum
How to use checksums
f2b88261008bab9f06eba74741d2dda604a4e682e214a167368761d5cdbbe4d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.5

Security for adventocr 0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page