An update on new features for Lynx. #155
Pinned
JackBailey
announced in
Announcements
Replies: 1 comment
-
I've started using Kutt now as the analytics seem nice and it allows unique domains on one installation. (Although doesn't have a few features I like with Lynx - as of v2 at least). Here's the migration script I used / edited from ChatGPT if anyone needs it. #!/bin/bash
# Set your Kutt API key
KUTT_API_KEY="APIKEY"
# Set the input file containing Lynx URLs.
# Assume it's a CSV with columns: "id,slug,destination,author,creationDate,modifiedDate,visits,account"
INPUT_FILE="lynx.csv" # replace with your exported-****csv
# Function to create a short URL in Kutt
create_kutt_url() {
local destination=$1
local slug=$2
local domain="DOMAIN"
destination=$(echo "$destination" | sed 's/^"//;s/"$//')
slug=$(echo "$slug" | sed 's/^"//;s/"$//')
# Construct the JSON payload using printf to ensure correct formatting
json_payload=$(printf '{"target":"%s","customurl":"%s", "domain":"%s", "description": "Imported from lynx"}' "$destination" "$slug" "$domain")
echo $json_payload
# API request to create the URL in Kutt
response=$(curl -s -X POST "https://$domain/api/v2/links" \
-H "Content-Type: application/json" \
-H "X-API-Key: $KUTT_API_KEY" \
-d "$json_payload") # Check if the creation was successful
if echo "$response" | jq -e '.error' > /dev/null; then
echo "Failed to create Kutt URL for $destination: $(echo $response | jq -r '.error')"
else
echo "Successfully created Kutt URL: $(echo $response | jq -r '.link')"
fi
}
# Loop through the CSV file and create each URL in Kutt
while IFS=, read -r id slug destination author creationDate modifiedDate visits account
do
if [[ $id != "id" ]]; then
# Call the function to create Kutt URL
create_kutt_url "$destination" "$slug"
fi
done < "$INPUT_FILE" |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I bear the unfortunate news that I won't be adding any more features to Lynx. I'm proud of it and have enjoyed working on it in the past, but I don't have the time or motivation to add any new features to it. I also don't really use Lynx - I don't have much of a need for a shortener anymore.
My most recent URLs
I do enjoy coding outside of my job as a developer, but Lynx has felt like a bit of a burden for the past year, I'd much rather contribute to other projects that I enjoy.
Lynx seems pretty stable, so it should continue to work. If any security issues or major bugs arise soon, I'll try to fix them (a maintenance mode if you will).
If you'd like to work on Lynx, go ahead. If you maintain a good fork of it I'll link it from this repo and/or the website. I'll also hold onto the domain for a bit.
Beta Was this translation helpful? Give feedback.
All reactions