Giter VIP home page Giter VIP logo

Comments (4)

Gorialis avatar Gorialis commented on June 19, 2024

I'm... not actually sure how this would be implemented. I'm assuming that "changing the contents" of a file constitutes not entirely replacing it. It's hard to take any inspiration from existing text editors because most of them assume some form of context (in the form of cursor position), and Discord doesn't really have any.

A generally good yardstick for whether the implementation of a command makes any intuitive sense is whether it's painful to use on mobile. An implementation that is extremely awkward on mobile is generally just an awkward implementation in general - so with that in mind, creating an interface that would feel like it actually works on mobile seems close to an insurmountable task, with the amount of interactivity Discord gives you out of the gate.

It feels like a task that the newer bot integrations might be well suited to, but I have no personal interest in maintaining features that require verification (since it would mean it wouldn't be accessible to all users of Jishaku), and I doubt they will ever make their way into Jishaku by other means (because I don't plan on verifying and would be unable to personally audit them).

If you're just overwriting files, you could probably get away with jsk sh echo "..." > file or running jsk py to grab and download an attachment.

But if you're wanting some means to actually edit (not replace) files within Jishaku, then it'll require a lot more thought and discussion on how you're expecting such an interface to work.

from jishaku.

alf1e avatar alf1e commented on June 19, 2024

@Gorialis What you could do is a user dose cat and gets the content then dose a command and just edit the info from the cat. Then that info overwrites the file.

from jishaku.

pythonmcpi avatar pythonmcpi commented on June 19, 2024

This is probably a stupid idea but I might try implementing the ed editor as a Feature. I doubt that it'll be merged but I can post it as a gist and link to it.

Edit: Looks like I have ~3k lines of c code to recreate, although I can probably reuse stuff from python's standard library like re for regexes.

from jishaku.

Gorialis avatar Gorialis commented on June 19, 2024

There was an experiment I did at one point that would allow you to edit the contents of a file through a Modal. The character limit and usability concerns prevented it from really being useful in any serious context, though, so it never got in.

from jishaku.

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.