Skip to content

Commit

Permalink
Fixed vhost template, add preview
Browse files Browse the repository at this point in the history
  • Loading branch information
gerardbalaoro committed Jun 17, 2019
1 parent 66df509 commit 21f7089
Show file tree
Hide file tree
Showing 4 changed files with 193 additions and 2 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<h1 align="center">VHoster</h1>
<p align="center">Virtual Host Helper for XAMPP Windows</p>
<p align="center">
Virtual Host Helper for XAMPP Windows<br><br>
<img align="center" src="preview.gif">
</p>



## Usage
Expand Down
2 changes: 1 addition & 1 deletion engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def add(self, hostname:str, path:str, port=80):
ui.line('Writing Apache Configuration')
content = f.read().strip()
f.write(
'\n\n## StartHost: ' + hostname + '\n<VirtualHost ' + hostname + ':' + str(port) + '>\n' +
'\n\n## StartHost: ' + hostname + ':' + str(port) + '\n<VirtualHost *:' + str(port) + '>\n' +
'\tDocumentRoot "' + os.path.abspath(os.path.join(self.DOCUMENT_ROOT, path)) + '"\n' +
'\tServerName ' + hostname + '\n' +
'\t<Directory "' + os.path.abspath(os.path.join(self.DOCUMENT_ROOT, path)) + '">\n' +
Expand Down
Binary file added preview.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
187 changes: 187 additions & 0 deletions preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
# The configurations that used for the recording, feel free to edit them
config:

# Specify a command to be executed
# like `/bin/bash -l`, `ls`, or any other commands
# the default is bash for Linux
# or powershell.exe for Windows
command: powershell.exe

# Specify the current working directory path
# the default is the current working directory path
cwd: C:\Users\Gerard\Desktop\vhoster

# Export additional ENV variables
env:
recording: true

# Explicitly set the number of columns
# or use `auto` to take the current
# number of columns of your shell
cols: 120

# Explicitly set the number of rows
# or use `auto` to take the current
# number of rows of your shell
rows: 30

# Amount of times to repeat GIF
# If value is -1, play once
# If value is 0, loop indefinitely
# If value is a positive number, loop n times
repeat: 0

# Quality
# 1 - 100
quality: 100

# Delay between frames in ms
# If the value is `auto` use the actual recording delays
frameDelay: auto

# Maximum delay between frames in ms
# Ignored if the `frameDelay` isn't set to `auto`
# Set to `auto` to prevent limiting the max idle time
maxIdleTime: 1600

# The surrounding frame box
# The `type` can be null, window, floating, or solid`
# To hide the title use the value null
# Don't forget to add a backgroundColor style with a null as type
frameBox:
type: floating
title: Vhoster
style:
border: 0px black solid
# boxShadow: none
# margin: 0px

# Add a watermark image to the rendered gif
# You need to specify an absolute path for
# the image on your machine or a URL, and you can also
# add your own CSS styles
watermark:
imagePath: null
style:
position: absolute
right: 15px
bottom: 15px
width: 100px
opacity: 0.9

# Cursor style can be one of
# `block`, `underline`, or `bar`
cursorStyle: block

# Font family
# You can use any font that is installed on your machine
# in CSS-like syntax
fontFamily: "Monaco, Lucida Console, Ubuntu Mono, Monospace"

# The size of the font
fontSize: 12

# The height of lines
lineHeight: 1

# The spacing between letters
letterSpacing: 0

# Theme
theme:
background: "transparent"
foreground: "#afafaf"
cursor: "#c7c7c7"
black: "#232628"
red: "#fc4384"
green: "#b3e33b"
yellow: "#ffa727"
blue: "#75dff2"
magenta: "#ae89fe"
cyan: "#708387"
white: "#d5d5d0"
brightBlack: "#626566"
brightRed: "#ff7fac"
brightGreen: "#c8ed71"
brightYellow: "#ebdf86"
brightBlue: "#75dff2"
brightMagenta: "#ae89fe"
brightCyan: "#b1c6ca"
brightWhite: "#f9f9f4"

# Records, feel free to edit them
records:
- delay: 3013
content: "\e[0m\e[0K"
- delay: 1814
content: "\e]0;Administrator: \aWindows PowerShell\e[0K\e[?25l\r\nCopyright (C) Microsoft Corporation. All rights reserved.\e[0K\r\n\e[0K\r\n\e[0K\e[?25h"
- delay: 343
content: "PS C:\\Server>\e[0K\e[37G"
- delay: 1907
content: "\e[?25l\rPS C:\\Server> \e[0;33;93mv\e[0m\e[0K\e[?25h"
- delay: 31
content: "\e[0;33;93mh\e[0m\e[0K"
- delay: 219
content: "\e[0;33;93mo\e[0m\e[0K"
- delay: 406
content: "\e[0;33;93ms\e[0m\e[0K"
- delay: 312
content: "\e[0;33;93mt\e[0m\e[0K"
- delay: 188
content: "\e[0;33;93me\e[0m\e[0K"
- delay: 187
content: "\e[0;33;93mr\e[0m\e[0K"
- delay: 719
content: "\e[45G"
- delay: 297
content: "\e[?25l\rPS C:\\Server> \e[0;33;93mvhoster\e[0m a\e[0K\e[?25h"
- delay: 160
content: "d\e[0K"
- delay: 160
content: "d\e[0K"
- delay: 160
content: "\e[49G"
- delay: 160
content: "\e[?25l\rPS C:\\Server> \e[0;33;93mvhoster\e[0m add m\e[0K\e[?25h"
- delay: 160
content: "y\e[0K"
- delay: 160
content: "b\e[0K"
- delay: 160
content: "l\e[0K"
- delay: 160
content: "o\e[0K"
- delay: 160
content: "g\e[0K"
- delay: 160
content: ".\e[0K"
- delay: 160
content: "t\e[0K"
- delay: 160
content: "e\e[0K"
- delay: 160
content: "s\e[0K"
- delay: 160
content: "t\e[0K"
- delay: 160
content: "\e[61G"
- delay: 160
content: "\e[?25l\rPS C:\\Server> \e[0;33;93mvhoster\e[0m add myblog.test b\e[0K\e[?25h"
- delay: 160
content: "l\e[0K"
- delay: 160
content: "o\e[0K"
- delay: 160
content: "g\e[0K"
- delay: 312
content: "\e[?25l\r\n\e[0K\e[?25h"
- delay: 501
content: "╔══════════════════════════════════════════════════╗\e[0K\e[?25l\r\n║ VHOSTER ║\e[0K\r\n╠══════════════════════════════════════════════════╣\e[0K\r\n║ Virtual Host Helper for XAMPP ║\e[0K\r\n║ by: Gerard Balaoro ║\e[0K\r\n║ ║\e[0K\r\n║ https://github.com/GerardBalaoro/VHoster ║\e[0K\r\n╚══════════════════════════════════════════════════╝\e[0K\r\n\e[0K\e[?25h"
- delay: 156
content: " - Writing Apache Configuration\e[0K\e[?25l\r\n - Creating myblog.test:80, at blog\e[0K\r\n\e[0K\e[?25h"
- delay: 30
content: " - Writing System Hosts File\e[0K\e[?25l\r\n\e[0K\e[?25h"
- delay: 95
content: " - Writing Apache Configuration\e[0K\e[?25l\r\n - Virtual Host Created\e[0K\r\n - Restarting Apache Service\e[0K\r\n\e[0K\e[?25h"
- delay: 2968
content: "PS C:\\Server>\e[0K\e[37G"

0 comments on commit 21f7089

Please sign in to comment.