Skip to content
← Back to Community
Linkless: A link shortner
Profile icon
CodeLongAndPros

Have you ever wanted to shorten a link, but didn't have a web browser ready?

Well, I am happy to introduce:

Linkless

You get more link, for less work.

Right now, there is no web interface, just a D cli, right here.

It supports three modes:

  • Add mode (default)
  • Dereference mode
  • Delete mode

Add mode

Invoke with ./linkless
You pass these two arguments:
name and url.
Name is the shortened name.

So if we run linkless goog https://google.com, https://Lesslink.codelongandpros.repl.co/goog points to https://google.com

However, you should always use --as. Else, anyone can delete your link.

So if I want to link https://bing.com to b, as the user linus:
linkless b https://bing.com --as linus

Dereference mode

This uses the command line switch -d, or --decode.

This takes one argument, the name

So assuming the above example with google, linkless -d goog will print
goog -> https://google.com

This ignores --as

If you get something like:
badlink -> /dev/null, that means that there is no url for that name.

Delete mode

This uses the flag --delete.

To delete a link without a user system:

linkless --delete goog.

Right now, this will print Server resonded with error -1 (unknown reason).
All this means is access denied (better messages coming soon)

To delete a link made by a user, use --as.

So to delete goog, we have to say we are Linus:

linkless --delete goog --as linus

If you are creating a link and it's slow, try running the btw repl (I forgot my uptimerobot password oof).

Anyways, fun linking!

Voters
Profile icon
programmeruser
Profile icon
YuvanVighnesh
Profile icon
HahaYes
Profile icon
CodeLongAndPros
Comments
hotnewtop
Profile icon
[deleted]

How long did it take u to type all this? My fingers would be dead by this point

Profile icon
CodeLongAndPros

@MemeDriod The docs? 30m The code? 2h

Profile icon
[deleted]

ave you ever wanted to shorten a link, but didn't have a web browser ready?

Well, I am happy to introduce:

Linkless

You get more link, for less work.

Right now, there is no web interface, just a D cli, right here.

It supports three modes:

Add mode (default)
Dereference mode
Delete mode
Add mode

Invoke with ./linkless
You pass these two arguments:
name and url.
Name is the shortened name.

So if we run linkless goog https://google.com, https://Lesslink.codelongandpros.repl.co/goog points to https://google.com

However, you should always use --as. Else, anyone can delete your link.

So if I want to link https://bing.com to b, as the user linus:
linkless b https://bing.com --as linus

Dereference mode

This uses the command line switch -d, or --decode.

This takes one argument, the name

So assuming the above example with google, linkless -d goog will print
goog -> https://google.com

This ignores --as

If you get something like:
badlink -> /dev/null, that means that there is no url for that name.

Delete mode

This uses the flag --delete.

To delete a link without a user system:

linkless --delete goog.

Right now, this will print Server resonded with error -1 (unknown reason).
All this means is access denied (better messages coming soon)

To delete a link made by a user, use --as.

So to delete goog, we have to say we are Linus:

linkless --delete goog --as linus

If you are creating a link and it's slow, try running the btw repl (I forgot my uptimerobot password oof).

Anyways, fun [email protected]

Profile icon
[deleted]
Profile icon
[deleted]
Profile icon
CodeLongAndPros

@MemeDriod A keyboard.

Profile icon
[deleted]
Profile icon
[deleted]

Hey everyone how reads this write in the comments ur typing speed :[email protected]

Profile icon
[deleted]

Mine is 70 wpm @CodeLongAndPros

Profile icon
CodeLongAndPros

@MemeDriod Uh. Mine is terrible.

Profile icon
[deleted]

Well that depends how old r u if ur in ur teens ur hand are like lightning but if ur like in ur 40s ur hand are kinda slow and if ur a little kid ur useing one finger most of the [email protected]

Profile icon
CodeLongAndPros

@MemeDriod And ofc the kb matters too

Profile icon
[deleted]
Profile icon
[deleted]
Profile icon
CodeLongAndPros

@MemeDriod Why yes
image

Profile icon
[deleted]

The guy in the picture is bald 😂@CodeLongAndPros

Profile icon
CodeLongAndPros
Profile icon
[deleted]

Oof r u the guy in the picture or is that Mr.Howie😂😂😂@CodeLongAndPros

Profile icon
CodeLongAndPros

@MemeDriod can verify I have hair

Profile icon
[deleted]
Profile icon
firefish

GitHub is better than GitLab
imáge

Profile icon
CodeLongAndPros

@firefish I like it more.

Profile icon
firefish

@CodeLongAndPros We did discuss this under that ANCIENT issue on Night, didn't we?

Profile icon
CodeLongAndPros

@firefish Yes and I prefer Gitlab.

Profile icon
RahulChoubey1

What's with the /add?

Profile icon
CodeLongAndPros

@RahulChoubey1 That's how you'll add a link to the shortener...
But you should use the D client.

Profile icon
HahaYes

whoa this is so cool

Profile icon
CodeLongAndPros

@HahaYes Thanks!

Profile icon
HahaYes

@CodeLongAndPros this is really cool ngl

Profile icon
CodeLongAndPros
Profile icon
HahaYes

@CodeLongAndPros so how does this work?

Profile icon
HahaYes

@CodeLongAndPros I saw btw so I assume arch

Profile icon
HahaYes
Profile icon
CodeLongAndPros

@HahaYes Ok so
There's a repl.it db entry with some json
{name:, url, owner,)
And then some api routes to get it.

Profile icon
HahaYes

@CodeLongAndPros cool how do I make a url

Profile icon
CodeLongAndPros

@HahaYes Run the given repl https://repl.it/@CodeLongAndPros/linkless-d#main.d

it should give a bash shell.

Type ./linkless btw https://archlinux.org --as hahayes or something like that.

Profile icon
HahaYes

@CodeLongAndPros oh wow thats really cool. Can I fork it?

Profile icon
CodeLongAndPros

@HahaYes Uh the client? Merge requests are better
(https://gitlab.com/CodeLongAndProsper90/linkless-d-client)

Profile icon
CodeLongAndPros

@HahaYes But yeah. The client's just what I made.

Profile icon
firefish

@HahaYes Also, stop imposing ASCII Art easter eggs on every man and his dog's language