Discuss Scratch

ajskateboarder
Scratcher
1000+ posts

Integrating Git with the Scratch editor

You can find it here along with a demo video. This is meant for Turbowarp, and isn't completely finished either

Note that this is just a silly dumb side project so I'm probably going to give it up in a few months because I'm busy :| haha just kidding

It's very satisfying though. All you have to do to commit changes is click the Save button. I'm trying to make it as integrated, simple, and feature-rich as possible

Last edited by ajskateboarder (Jan. 7, 2024 22:54:34)

MagicCrayon9342
Scratcher
1000+ posts

Integrating Git with the Scratch editor

It is literally impossible for a program to only work on Debian.

ajskateboarder
Scratcher
1000+ posts

Integrating Git with the Scratch editor

MagicCrayon9342 wrote:

It is literally impossible for a program to only work on Debian.
I would say it works on all Linux distros if it actually could

Some of the functions here use paths for the Debian version of TurboWarp Desktop. Those functions would break elsewhere since TurboWarp wouldn't use those paths
MagicCrayon9342
Scratcher
1000+ posts

Integrating Git with the Scratch editor

ajskateboarder wrote:

MagicCrayon9342 wrote:

It is literally impossible for a program to only work on Debian.
I would say it works on all Linux distros if it actually could

Some of the functions here use paths for the Debian version of TurboWarp Desktop. Those functions would break elsewhere since TurboWarp wouldn't use those paths
That's why you you make the script find the path of turbowarp (or ask for it).

ajskateboarder
Scratcher
1000+ posts

Integrating Git with the Scratch editor

MagicCrayon9342 wrote:

ajskateboarder wrote:

Those functions would break elsewhere since TurboWarp wouldn't use those paths
That's why you you make the script find the path of turbowarp (or ask for it).
You could've read the function to understand why I use a manual path. `turbowarp` is not globally available. Plus, this is in more of a proof-of-concept stage, so I don't really care about compatibility right now.

I was expecting some feedback or something, not something super minute lol
MagicCrayon9342
Scratcher
1000+ posts

Integrating Git with the Scratch editor

ajskateboarder wrote:

MagicCrayon9342 wrote:

ajskateboarder wrote:

Those functions would break elsewhere since TurboWarp wouldn't use those paths
That's why you you make the script find the path of turbowarp (or ask for it).
You could've read the function to understand why I use a manual path. `turbowarp` is not globally available. Plus, this is in more of a proof-of-concept stage, so I don't really care about compatibility right now.

I was expecting some feedback or something, not something super minute lol
is the turbowarp binary placed in a directory in the PATH variable when installed?

davidtheplatform
Scratcher
500+ posts

Integrating Git with the Scratch editor

MagicCrayon9342 wrote:

It is literally impossible for a program to only work on Debian.
import subprocess
if subprocess.run(['lsb_release', '-is'], stdout=subprocess.PIPE).stdout != b'Debian\n':
    raise Exception('Wrong OS!')
print('Hello world!')

Generation 4: the first time you see this copy and paste it on top of your sig in the scratch forums and increase generation by 1. Social experiment.
bigspeedfpv
Scratcher
500+ posts

Integrating Git with the Scratch editor

doesnt turbowarp just use $XDG_CONFIG_HOME? why is it os specific

cat throwing brick at camera transparent dot gif
https://bigspeed.me
ajskateboarder
Scratcher
1000+ posts

Integrating Git with the Scratch editor

bigspeedfpv wrote:

doesnt turbowarp just use $XDG_CONFIG_HOME? why is it os specific
Yeah I could use that for the config directory, that's not a hard fix

I'm pretty sure TurboWarp itself is installed in different places though. On Debian, it's located in /opt/TurboWarp
ajskateboarder
Scratcher
1000+ posts

Integrating Git with the Scratch editor

bump
MagicCrayon9342
Scratcher
1000+ posts

Integrating Git with the Scratch editor

ajskateboarder wrote:

bigspeedfpv wrote:

doesnt turbowarp just use $XDG_CONFIG_HOME? why is it os specific
Yeah I could use that for the config directory, that's not a hard fix

I'm pretty sure TurboWarp itself is installed in different places though. On Debian, it's located in /opt/TurboWarp
If TurboWarp actually followed standards it would install to /usr/bin, /usr/share, or /usr/local/bin.

ajskateboarder
Scratcher
1000+ posts

Integrating Git with the Scratch editor

Bump

I've been working on adding commit generation and code committing/ pushing. What do you guys think of a merge editor for TurboWarp?
ajskateboarder
Scratcher
1000+ posts

Integrating Git with the Scratch editor

Bump.

I made a demo of scratch-git on the repository. Go check it out!
applejuiceproduc
Scratcher
1000+ posts

Integrating Git with the Scratch editor

ajskateboarder wrote:

Bump.

I made a demo of scratch-git on the repository. Go check it out!
Oh that's cool. I might use it at some point.

A signature
ajskateboarder
Scratcher
1000+ posts

Integrating Git with the Scratch editor

Making a Git Blame-like viewer

ajskateboarder
Scratcher
1000+ posts

Integrating Git with the Scratch editor



Extra stylization

The blame viewer doesn't seem to work when you add extra scripts atm

Last edited by ajskateboarder (Aug. 24, 2023 00:23:33)

applejuiceproduc
Scratcher
1000+ posts

Integrating Git with the Scratch editor

Puts "Git integration for Scratch (TurboWarp) that just works" in the description of the project.

Is so unsure if it works that the pop-up says “I think it worked now?”

Last edited by applejuiceproduc (Aug. 24, 2023 15:01:27)


A signature
ajskateboarder
Scratcher
1000+ posts

Integrating Git with the Scratch editor

applejuiceproduc wrote:

Is so unsure if it works that the pop-up says “I think it worked now?”
I'll remove it later

Now this can show scripts that have been added/removed and have icons similar to GitHub's




(+ is added, - is modified, and x is deleted)
Although the styling options don't work now Writing 100s of lines of plain JS for a UI can do a lot to somebody

Last edited by ajskateboarder (Aug. 24, 2023 18:53:56)

ajskateboarder
Scratcher
1000+ posts

Integrating Git with the Scratch editor

Dark mode

DifferentDance8
Scratcher
1000+ posts

Integrating Git with the Scratch editor

You do realize advertising userscripts is against the rules right?

R.I.P Zydrolic, 2023-2024

Powered by DjangoBB