GithubHelp home page GithubHelp logo

chsh-ssi's Introduction

Web-PPT

Made brief by HTML, and running web server by simple script, providing the any device in the local network to access。

Feature

  1. Easy to deploy.
  2. Host anywhere, even on an android phone.
  3. Support markdown files.
  4. Free for all.

How to Run

  1. Create a virtual environment of python and activate(Optional).

    python -m venv .venv
    .\.venv\Scripts\activate
    
  2. Install the package.

    pip install -r .\requirements.txt
    
  3. Run - There are two method to run the script.

    • Use Command Line.
    uvicorn main:app --host 0.0.0.0 --port 8080
    
    • Use Python Script.
    python main.py
    
    # The first times run with python script will generate a config.
    # Default values of host and port are 0.0.0.0 and 8080.
    # You can modify it by edit config.json in the directory
    
  4. Open the browser on any device oin the local network, and connect to the ip and port display on the terminal windows of the server you run the script.

Modify the Page

The method of changing page is using hash in the url, therefore there is needless to reload the website when switch the page.

The kernel of the front-site operation is in the templates/index.html, the only place user need to modify is style.

If you want to create a new page, you can create a new file named page-<index>.html in the pages directory. Remember that the index must follow the order starting from 1 or it will not be loaded. If you want to switch to another page which not the sibling of the page, you can easily done it by change the url hash to the page-<index> py run the javascript: windows.hash = "page-<index>";.

To embed an markdown file into the page, you can use the zero-md tag like <zero-md src="/markdowns/README.md"><zero-md>(there is an example in pages/page-2.html). The files under the markdowns directory will map to the route /markdown as static to /static.

Develope Environment

 - Windows:
    - Version: Windows 10 Pro 22H2
    - OS Build: 19045.2251
 
 - Environment
    - Python: 3.10.4
    - pip: 22.0.4
    - FFmpeg: 2022-04-28-git-ec07b15477-full_build
 
 - Browser
    - Opera GX
       - Version: LVL 4 (core: 94.0.4606.79)
       - Chromium Version: 108.0.5359.125

 - IDE
    - Visual Studio Code     v1.74.3
    - Extensions
       - Pylance             v2022.3.1
       - Python              v2022.20.2
       - HTML CSS Support    v1.13.1
       - Markdown All in One v3.5.0

Developer Say

If you like this repo, please click the star button at the upper right corner of this page.

If there some bugs in the code, please open a issue.

chsh-ssi's People

Contributors

zhihao1021 avatar

Stargazers

Neoxy avatar  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.