Giter Club home page Giter Club logo

Comments (12)

PJ-Finlay avatar PJ-Finlay commented on August 11, 2024 4
$ argos-translate-cli --from-lang en --to-lang es "Hello World"
Hola Mundo

$ echo "Text to translate" | argos-translate-cli --from-lang en --to-lang es
Texto para traducir

from argos-translate.

PJ-Finlay avatar PJ-Finlay commented on August 11, 2024 2

@v217 thanks for the input, I'll push a new version with the current code. There's currently a lot of incoming traffic from Hacker News (Github stars have almost doubled in the last 6 hours) so I'm going to wait a day or so to avoid the risk of accidentally pushing a breaking change.

from argos-translate.

v217 avatar v217 commented on August 11, 2024 1

A cli UI would also make a pipx installation meaningful - the easiest, most user friendly way to manage python packages.

from argos-translate.

v217 avatar v217 commented on August 11, 2024 1

@PJ-Finlay Great Thanks!

from argos-translate.

PJ-Finlay avatar PJ-Finlay commented on August 11, 2024 1

We're live! I realized Snapcraft was a little more involved so I'm waiting on it for now but live on PyPI.

0ae69e0

from argos-translate.

v217 avatar v217 commented on August 11, 2024 1

Works great with pipx! Thanks!

from argos-translate.

************ avatar ************ commented on August 11, 2024 1

It would be really good to add input from a file BTW as proposed by OP:

argos-translate-cli -file Novel.txt -from en -to de

Pasting long text on the CLI is too error prone as mentioned at: https://askubuntu.com/questions/380847/is-it-possible-to-translate-words-via-terminal/1309774#1309774

from argos-translate.

PJ-Finlay avatar PJ-Finlay commented on August 11, 2024

Thanks for the issue, this is something I've been meaning to add for a while and I just pushed a basic cli.

Usage:
$ argos-translate-cli --from-lang en --to-lang es "Hello World"
Hola Mundo

I'm going to wait a bit before before pushing this to PyPI or the Snap Store so for now if you want to use it you'll need to install from source. Before pushing there should also be the ability to read text from standard input and install packages.

Any feedback on the API before it's too set in stone is also appreciated.

from argos-translate.

PJ-Finlay avatar PJ-Finlay commented on August 11, 2024

@v217 I agree the plan is to push this to PyPI. I already added the CLI executable as a script in setup.py so pushing to PyPI wouldn't require a code change. I've just been waiting until the CLI was more complete and stable but if someone needs the CLI from PyPI I could push it sooner. You can also install the bleeding edge version from the Github repo with pip in one line:

pip3 install git+https://github.com/argosopentech/argos-translate

Maybe the documentation should be updates to show this instead of the more verbose example that is currently there. However, if someones new to the command line has the one command version fail they may have an easier time debugging the existing version.

from argos-translate.

v217 avatar v217 commented on August 11, 2024

@PJ-Finlay Great! For me only the funcionality in the example would be very useful and I don't mind if the cli interface changes. I think, people who use argos-translate in their scripts use the library, and for interactive use cli interface changes don't matter.

from argos-translate.

Mkishore1 avatar Mkishore1 commented on August 11, 2024

Hello everyone when i try o run the command
$argos-translate-cli --from-lang en --to-lang es "Hello World"
I receive an error

Traceback (most recent call last):
File "/home/aimscs/.local/bin/argos-translate-cli", line 5, in
cli.main()
File "/home/aimscs/.local/lib/python3.6/site-packages/argostranslate/cli.py", line 38, in main
from_lang = installed_languages[from_lang_index]
TypeError: list indices must be integers or slices, not NoneType

how to resolve this

from argos-translate.

PJ-Finlay avatar PJ-Finlay commented on August 11, 2024

Do you have the English and Spanish models installed? We should probably add a more helpful error message for when this happens.

from argos-translate.

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.