Git Product home page Git Product logo

Comments (28)

kutsan avatar kutsan commented on May 24, 2024 2

Or mal edit bebop would open an vim editor that you can edit from a file. Like git's interactive rebase editor.

from mal.

mparadinha avatar mparadinha commented on May 24, 2024 1

I'd like to switch the order of the command to be mal edit <regex> <section>.
Functionality for editing multiple attributes at once using comma separated values like mal edit bebop score=10,status=completed, would be a nice addition.
Also needs user input checking and some testing to make sure everything works, of course.

from mal.

ryukinix avatar ryukinix commented on May 24, 2024 1

@kutsan thanks for the nice idea! Maybe we should do that for default and then create additional flags to change without the editor (make scripting possible).

mal edit bebop # open editor, vim or emacs through the EDITOR env variable
mal edit bebop --score 10 # set score
mal edit bebop --status watching # set list section
mal edit bebop --tags futurist space sci-fi # set tags

from mal.

ryukinix avatar ryukinix commented on May 24, 2024 1

Yes, we should remove drop in future, but in the next version will be just deprecated. We should tag that on the mal help and maybe I can print a warning too about that when a user call mal drop. I do not expect that anyone have love about the drop command and neither even use that, but I cannot confirm, so then tagging as deprecated in v0.4 and removing on the next (maybe v0.5) should be good enough.

from mal.

ryukinix avatar ryukinix commented on May 24, 2024 1

So then problem solved :)

from mal.

mparadinha avatar mparadinha commented on May 24, 2024

How about an edit command where the user could change the score as well as the status and tags?

from mal.

ryukinix avatar ryukinix commented on May 24, 2024

Ok

from mal.

ryukinix avatar ryukinix commented on May 24, 2024

We have WIP on the branch edit-cmd. Help would be great.

from mal.

ryukinix avatar ryukinix commented on May 24, 2024

@mparadinha what is the state of your implementation of the edit command? Would be great your report about what is lacking to do.

from mal.

ryukinix avatar ryukinix commented on May 24, 2024

This seems pretty nice. I'll look into your branch in soon If I can do something to merge and release with our next milestone v0.4

from mal.

mparadinha avatar mparadinha commented on May 24, 2024

I like the idea.

from mal.

kutsan avatar kutsan commented on May 24, 2024

@ryukinix You are welcome! And I agree, flags would be useful for quick editing and scripting.

from mal.

kutsan avatar kutsan commented on May 24, 2024

@ryukinix please also include that, in some systems users can't have access to /tmp directory. I use mal under Termux on Android and creating temporary files under /tmp would potentially break the mal. If /tmp is not accessible, you should handle it.

Another directory under $HOME is okay though.

from mal.

ryukinix avatar ryukinix commented on May 24, 2024

Maybe after that we should set drop command as deprecated in the next version v0.4 and remove it in future. After all, the edit command will already accomplish that feature through mal edit bebop --status dropped. mal drop bebop is shortner, but I don't know if we should keep that for this reason. I created the drop sub-command just because I needed in some moment, but I not thought well about that.

from mal.

ryukinix avatar ryukinix commented on May 24, 2024

@kutsan good to know, I didn't thinking about that. In android or specifically we have any folder for temporary files? Naively, when a /tmp is not present or allowed to write/read, we can create the temporary file for edit on the directory which was be called and so then delete after the process finish. But we have a problem with it, if something crash this will leak a file on your filesystem and this is not very good. Using /tmp is not a problem because after a reboot all the files is gone.

You have some recommendation about this problem?

from mal.

ryukinix avatar ryukinix commented on May 24, 2024

We have a problem about flags name's collision here: --status and --score when created the short flags will be intuitively -s for both. We obviously can create another short-name for one of them (probably status), but -s (score) and -S (status) is not good, -s and -t neither, maybe -st (status) and -sc (score) can fix the ambiguity with more clarity, but using short flags with more than one character is very uncommon.

Any suggestion is welcome.

from mal.

kutsan avatar kutsan commented on May 24, 2024

Termux uses its own rules. So, if you are asking about Termux, you can use $PREFIX/tmp which is the same as /tmp on normal systems. I don't know any other terminal emulator that you can use pip under it, to install mal. But, let's assume there are other ones, they probably not gonna have /tmp or $PREFIX/tmp either. So, if you want to support them, probably ~/.config/mal/cache/ directory is the only option IMO. At least, users can see the cache itself and delete it if necessary.

About other thing you just said. I think you are right and you should remove it. Since drop one isn't that shorter I think: mal edit bebop -st dropped, mal drop bebop. And drop command will only make things complicated.

from mal.

kutsan avatar kutsan commented on May 24, 2024

@ryukinix Just saying but -s option may will determinate what user asked for. For example, -s 6 would expand --score 6 and -s dropped would expand --status dropped depending on the context. It may not be good though.

from mal.

ryukinix avatar ryukinix commented on May 24, 2024

This is clever, but anyone will expect this? At least me, I always expect one short flag for each extended flag. Merging both in one can be very tricky until the user understand that. I think we should avoid it.

from mal.

kutsan avatar kutsan commented on May 24, 2024

Yeah... I wouldn't even expect either.

from mal.

ryukinix avatar ryukinix commented on May 24, 2024

Termux uses its own rules. So, if you are asking about Termux, you can use $PREFIX/tmp which is the same as /tmp on normal systems. I don't know any other terminal emulator that you can use pip under it, to install mal. But, let's assume there are other ones, they probably not gonna have /tmp or $PREFIX/tmp either. So, if you want to support them, probably ~/.config/mal/cache/ directory is the only option IMO. At least, users can see the cache itself and delete it if necessary.

Yes, definitely. We can give partial support for termux for now and set as $PREFIX/tmp when a user call mal through the termux. But, just for ask, using the standard-library tempdir will not return the correct temporary folder on termux? Try later execute this on termux (I don't have any phone with me):

import tempfile
tempfile.gettempdir()

This apply too when we have a strange environment, like Windows and the correct folder is used: %USER%\AppData\Local\Temp\.

from mal.

kutsan avatar kutsan commented on May 24, 2024

It actually works.

from mal.

ryukinix avatar ryukinix commented on May 24, 2024

implemented at #78, closing this issue.

from mal.

kutsan avatar kutsan commented on May 24, 2024

@ryukinix It's great to see this. But one thing, I don't know about MyAnimeList API but in official website, when editing an anime, there are tons of options, such as start date, finish date, priority, storage, total times re-watched, rewatch value, comments, etc.. Are you going to implement those of them too? Although, I don't use them much but still useful in some cases.

from mal.

ryukinix avatar ryukinix commented on May 24, 2024

Well, this is indeed is not priority, but we can implement further yes. But on v0.4.0 we don't have plans to add that, since the most important is what we have now. Are you ok with that? I have priority to implement the torrent command and write the docs for the manpage to delivery the v0.4.0 version of mal.

BTW, this is the values that you can edit through the MAL API:

image

from mal.

kutsan avatar kutsan commented on May 24, 2024

Thanks! I am okay with everything. I think this project still by far the best MAL CLI client even with current features. I also think too the torrent feature is more prior.

By the way, care to share your MyAnimeList account?

from mal.

ryukinix avatar ryukinix commented on May 24, 2024

Thanks! I am okay with everything. I think this project still by far the best MAL CLI client even with current features. I also think too the torrent feature is more prior.

This is a nice feedback. Thanks. Feedback, positive or negative, is always welcome.

By the way, care to share your MyAnimeList account?

Not at all, I can share with you. I sent a email with my profile.

from mal.

kutsan avatar kutsan commented on May 24, 2024

Thanks, received!

from mal.

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.