Skip to content

About

Generate titles for the Lasagna Futurists

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

33 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

LFD Server

LFD Server is a simple Flask-based web server that generates random titles and shuffles lists. It provides several API endpoints for generating titles and shuffling lists.

Table of Contents

Installation

  1. Clone the repository:

    git clone https://github.com/souza-dan/lfd_title_generator.git
    cd lfd_title_generator
  2. Create a virtual environment and activate it:

    python3 -m venv venv
    source venv/bin/activate
  3. Install the required dependencies:

    pip install -r requirements.txt

Usage

  1. Run the server:

    python server.py
  2. The server will start on http://0.0.0.0:5000.

API Endpoints

GET /api/v1/hello

Returns a simple "hello world" message.

GET /api/v1/title

Generates a random title in the format "Title of Noun".

GET /api/v1/title2

Generates a random title in the format "Title of Noun and Noun".

POST /api/v1/shuffle

Shuffles a list of items provided in the request.

  • Request Parameters:

    • list (string): A comma-separated list of items to shuffle.
    • separator (string, optional): The separator to use in the response. Defaults to a comma.
  • Example Request:

    curl -X POST -F "list=item1,item2,item3" -F "separator=," http://0.0.0.0:5000/api/v1/shuffle
  • Example Response:

    ["item3,item1,item2"]

Configuration

The server uses two JSON files for generating titles and nouns:

  • titles.json: Contains a list of titles.
  • nouns.json: Contains a list of nouns.

You can specify different files using the -t and -n command-line arguments when starting the server.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Generate titles for the Lasagna Futurists

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages