DarrenOfficial / dpaste

The Django project driving dpaste.org
https://dpaste.org
MIT License
532 stars 123 forks source link

url path for custom lexer #247

Closed ShalokShalom closed 1 week ago

ShalokShalom commented 4 months ago

Hi there 👍🏻

I find dpaste interesting, cause it provides an API to upload stuff from the command line.

I am puzzled, why you would default to the Python lexer, as I think this prevents adoption. (I know it is defaulting to whatever you used last, and this is not really going to help. I work with a lot of newbies, and for them its a an extra step, that may confuse them.)

May I suggest to have something like dpaste.org/plain to differentiate via a link?

DarrenOfficial commented 4 months ago

Hello there 👋,

I am puzzled, why you would default to the Python lexer, as I think this prevents adoption.

Because it has been that way since 2009- on a serious note dpaste is used primarily by python/django dev's hence the default being Python.

https://paste.mozilla.org/ for example, 2nd largest public installation uses JavaScript as the default

May I suggest to have something like dpaste.org/plain to differentiate via a link?

Actually might be better if there is text.dpaste.org defaulting to Plain Text, it will use the same database as the primary dpaste.org instance. (That way text.dpaste.org/abcd will show the exact same content as dpaste.org/abcd)

Let me know what you think 🙂

ShalokShalom commented 4 months ago

Yeah, I actually suggested this at first, and then edited it cause I thought its a stupid idea for some reason 😄

DarrenOfficial commented 4 months ago

👍🏼 https://text.dpaste.org

ShalokShalom commented 4 months ago

Thanks a lot

Did you think, how this is optimally exposed to the user?

Maybe on the homepage directly?

ShalokShalom commented 4 months ago

And I just noticed, the drop down menu on that subdomain has none of the other syntaxhighlighter now.

The coding highlighters are all gone.

ShalokShalom commented 1 week ago

Now its broken completely.

DarrenOfficial commented 1 week ago

Sorry, the configuration was gone; https://status.darrennathanael.com/incidents/n79sdqq5pp2n

I'll re-configure it today

DarrenOfficial commented 1 week ago

And I just noticed, the drop down menu on that subdomain has none of the other syntaxhighlighter now.

The coding highlighters are all gone.

I've fix this issue as well, https://text.dpaste.org/

ShalokShalom commented 1 week ago

Thanks a ton, solved.

ShalokShalom commented 1 week ago

Sorry, it doesnt work with the API:

curl -F 'format=url' -F 'content=<-' https://text.dpaste.org/api/

Invalid lexer choice "Plain Code" given. Valid lexer values are: _text, _markdown, _rst, _code, applescript, arduino, bash, bat, c, clojure, cmake, coffee-script,common-lisp, console, cpp, cpp-objdump, csharp, css, cuda, d, dart, delphi, diff, django, docker, elixir, erlang, go, handlebars, haskell, html, html+django, ini, ipythonconsole, irc, java, js, json, jsx, kotlin, less, lua, make, matlab, nginx, numpy, objective-c, perl, php, postgresql, python, rb, rst, rust, sass, scss, sol, sql, swift, tex, typoscript, vim, xml, xslt, yaml⏎                                                                                                          
DarrenOfficial commented 1 week ago

image resolved.

ShalokShalom commented 1 week ago

Do you know, why this aligns on the left now?

Should I open a new issue? https://dpaste.org/JP32d

DarrenOfficial commented 1 week ago

Better open a new issue :-)