Git Product home page Git Product logo

url-shortener's Introduction

URL Shortener

このアプリケーションは、PythonとStreamlitを使用して構築されたシンプルなURLショートナーです。長いURLに対して短縮されたURLを作成することができ、短縮されたURLを管理してアクセスするためのユーザーフレンドリーなインターフェースを提供します。

サンプルアプリ

https://shrturl.streamlit.app/

機能

  • ユーザー登録とログイン機能
  • オプションのカスタムURLを使用したURL短縮
  • UTMトラッキングのためのキャンペーンパラメータサポート
  • クリックトラッキングと分析
  • Altairを使用したグラフによるクリック分析の可視化
  • 分析テストのための手動クリック登録
  • エラー処理とログ記録

インストール

  1. リポジトリをクローンします:

    git clone https://github.com/stillnotitle/url-shortener.git
    
  2. プロジェクトディレクトリに移動します:

    cd url-shortener
    
  3. 仮想環境を作成します:

    python -m venv venv
    
  4. 仮想環境をアクティベートします:

    • Windowsの場合:

      venv\Scripts\activate
      
    • macOSとLinuxの場合:

      source venv/bin/activate
      
  5. 必要な依存関係をインストールします:

    pip install -r requirements.txt
    

使用方法

  1. アプリケーションを実行します:

    streamlit run app.py
    
  2. ウェブブラウザを開き、http://localhost:8501にアクセスしてアプリケーションを使用します。

  3. 新しいアカウントを登録するか、既存のアカウントにログインします。

  4. サイドバーから目的のアクションを選択します:

    • URL短縮: 長いURLを入力し、必要に応じてカスタムの短いURLを指定します。"短縮"ボタンをクリックして、短縮されたURLを生成します。
    • キャンペーンパラメータ付きURL短縮: ウェブサイトのURLとキャンペーンパラメータ(UTMソース、メディア、キャンペーン、ターム、コンテンツ)を入力します。"短縮URLを生成"ボタンをクリックして、パラメータ付きの短縮URLを生成します。
    • 分析: ドロップダウンから短縮URLを選択して、そのクリック分析を表示します。合計クリック数、ユニークビジター数、クリックトレンド、リファラー分布が表示されます。
    • 手動クリック登録: 短縮URL、リファラー、ユーザーエージェント、IPアドレスを入力して、テスト目的でクリックを手動で登録します。

今後の機能拡張

  • ユーザー固有の短縮URLリストと管理機能の実装
  • URL有効期限機能の追加
  • 短縮URLをプログラムで作成してアクセスするためのAPIエンドポイントの公開
  • より多くのスタイリングとビジュアル要素によるユーザーインターフェースのさらなる改善
  • デプロイとスケーラビリティを容易にするためのアプリケーションのDockerize

貢献

貢献は大歓迎です!問題を見つけたり、改善のための提案がある場合は、Issueを開くかPull Requestを提出してください。

ライセンス

このプロジェクトはMITライセンスの下で公開されています。

謝辞

url-shortener's People

Contributors

stillnotitle avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.