Code Monkey home page Code Monkey logo

Comments (5)

adam-huganir avatar adam-huganir commented on June 16, 2024 1

As to the last one, I have a decent amount of experience writing CLIs, so that would be quick for me to implement (you may also have experience I just don't know). My primary use case for pypdfium currently as a drop in pdftoppm replacement, so this would be very useful for me to sketch this out with a similar interface.

I think the main caution with the project as a whole is defining our scope. Are we writing a simple interface to the pdfium API, are we writing a smaller scoped group of functions (or both of these), or are we writing a full pythonic pdfium interface library.

The latter would be a pretty large undertaking, and I feel like at least starting with a smaller use-case by use-case scope driven by whatever we want to take on and user requests would be the simplest path forward.

What was your intention going into this?

from pypdfium2.

mara004 avatar mara004 commented on June 16, 2024 1

I think the main caution with the project as a whole is defining our scope.

Yeah, this is why I opened this thread, to disucss the scope of the project :)

I think it might be a good idea to only add support code on a use-case driven basis, as you said. It will probably crystallise over time what additional code we need or don't need - we can take our time with this.
I personally would prefer to keep the amount of additional code rather small to reduce maintenance work, considering that the main purpose of this project for me is to rasterise PDFs.

As to the last one, I have a decent amount of experience writing CLIs, so that would be quick for me to implement (you may also have experience I just don't know). My primary use case for pypdfium currently as a drop in pdftoppm replacement, so this would be very useful for me to sketch this out with a similar interface.

Actually I only meant function arguments and not a command-line interface in the last passage, but if you're interested in adding a such, that's fine. I had initially created an empty __main__.py file for this purpose, but then removed it again in 18f7a39 because I was focusing on packaging. I guess you were thinking about using argparse for the CLI?

from pypdfium2.

adam-huganir avatar adam-huganir commented on June 16, 2024

Yeah, argparse just makes dependencies easier, though if you ever need to write something more intense I highly recommend typer (https://typer.tiangolo.com) very cool stuff

from pypdfium2.

mara004 avatar mara004 commented on June 16, 2024

typer looks amazing! Thanks for pointing me at this.

from pypdfium2.

mara004 avatar mara004 commented on June 16, 2024

I've just added a CLI (using argparse, though), see #7.

from pypdfium2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.