Success!
27 |Your short link has been generated:
31 |├── .python-version ├── static └── images │ ├── logo.png │ └── prof_pic.jpg ├── .gitignore ├── pyproject.toml ├── utils ├── init_db.py └── validation.py ├── templates ├── preview.html ├── success.html ├── index.html └── interface.html ├── LICENSE ├── README.md ├── app.py └── uv.lock /.python-version: -------------------------------------------------------------------------------- 1 | 3.12.0 2 | -------------------------------------------------------------------------------- /static/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nizarhaider/shrlnk/HEAD/static/images/logo.png -------------------------------------------------------------------------------- /static/images/prof_pic.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nizarhaider/shrlnk/HEAD/static/images/prof_pic.jpg -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Python-generated files 2 | __pycache__/ 3 | *.py[oc] 4 | build/ 5 | dist/ 6 | wheels/ 7 | *.egg-info 8 | 9 | # Virtual environments 10 | .venv 11 | .DS_Store 12 | 13 | # Database 14 | *.db 15 | 16 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [project] 2 | name = "shrlnk" 3 | version = "0.1.0" 4 | description = "Add your description here" 5 | readme = "README.md" 6 | requires-python = ">=3.11.9" 7 | dependencies = [ 8 | "beautifulsoup4>=4.12.3", 9 | "flask>=3.1.0", 10 | "flask-limiter>=3.9.2", 11 | "pillow>=11.0.0", 12 | "requests>=2.32.3", 13 | ] 14 | -------------------------------------------------------------------------------- /utils/init_db.py: -------------------------------------------------------------------------------- 1 | import sqlite3 2 | 3 | 4 | def init_db(DATABASE): 5 | """Initialize the database with necessary tables.""" 6 | conn = sqlite3.connect(DATABASE) 7 | c = conn.cursor() 8 | c.execute('''CREATE TABLE IF NOT EXISTS links 9 | (short_link TEXT PRIMARY KEY, 10 | original_url TEXT, 11 | image_url TEXT, 12 | og_title TEXT, 13 | og_description TEXT, 14 | created_at DATETIME DEFAULT CURRENT_TIMESTAMP)''') 15 | conn.commit() 16 | conn.close() 17 | 18 | if __name__ == "__main__": 19 | init_db() -------------------------------------------------------------------------------- /templates/preview.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 |Your short link has been generated:
31 |51 | Create custom, trackable short links with stunning previews that capture attention and drive engagement. 52 |
53 |Create memorable, branded short links that reflect your identity.
86 |Add custom images and descriptions to make your links stand out.
91 |Optimize your links for maximum impact on social media platforms.
96 |
115 |
173 | Rebecca
175 |left on seen
176 |Custom Link
190 |Click to view
191 |https://shrlnk.icu/your-link
192 |