Skip to content

Get a different look for your website, specialized for terminals! -- Web-based template engine for terminals

License

Notifications You must be signed in to change notification settings

0xTadash1/redeqo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Get a different look for your website, specialized for terminals! -- Web-based template engine for terminals

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages