Skip to content

Latest commit

 

History

History
113 lines (84 loc) · 2.96 KB

README.md

File metadata and controls

113 lines (84 loc) · 2.96 KB

redeqo

Web-based template mapper for terminals. Map your website (blog, portfolio, project wiki, etc) contents to plain text, shell scripts, Python or others.

Also, You can share the URL and anybody can show or run the response via curl.

Example

curl "https://redeqo.deta.dev/?s=https://0xtadash1.github.io/redeqo/"

screenshot-plain

or colorful version

echo -e """$(curl -s "https://redeqo.deta.dev/?s=https://0xtadash1.github.io/redeqo/&d=pj-intro-card.ansi.njk")"""

screenshot-colorful

The first defines the template to be used by <meta name="redeqo-dst" content="..."> in ?s=... HTML. The second overrides it with another template in &d=... query.

TODO

  • Configuring
    • Njk env by <meta>/query
    • JSDom's options by <meta>/query
      • runScripts

  • Custom Filtters/Tags(Extensions)
    • ANSI Color Codes (use chalk module)
    • strip: Alias for striptags(true)
    • sindent(n=4, doIndentFirstLine=false): strip() and indent()
    • si-wrap(len, n=4, doIndentFirstLine=false): sindent() and Line-wrapping. len is line-length.

  • Other
    • RootPage without queries such as ?src=...
      • User-Agent == curl
      • else
    • Documents
    • Sample/Default templates
      • ANSI Colored
      • Bash
      • Python

Develop

Run

  1. Start server
    IS_DEBUG=true node index.js
  2. Test curl
    curl "http://localhost:3000/"
    redeqo -- Web-based template mapper for terminals
    https://github.com/0xTadash1/redeqo
    
    or
    curl "https://localhost:3000/?s=https://0xtadash1.github.io/redeqo/"
    =============================================================================
      redeqo
    -----------------------------------------------------------------------------
      Get a different look for your website, specialized for terminals!
    
     ---
      Web-based template mapper for terminals.
      Map your website (blog, portfolio, project wiki, etc) contents to
      plain text, shell scripts, Python or others.
    
      Also, You can share the URL and anybody can show or run the response via curl.
    
     ---
      Home     https://0xTadash1.github.io/redeqo
      Doc      https://github.com/0xTadash1/redeqo/blob/main/README.md
    
      Repo     https://github.com/0xTadash1/redeqo
      License  MIT
               https://github.com/0xTadash1/redeqo/blob/main/LICENSE
    
    =============================================================================
    

Deploy

deta deploy

env vars (for debug)

These are case-sensitive.

  • IS_DEBUG, default: false
    • true || anything else (null, false, False, 0, 1, True, etc.)
  • PORT, default: 3000
    • numeric || anything else