-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7b65293
commit 1acef9b
Showing
6 changed files
with
76 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ verify_ssl = true | |
|
||
[packages] | ||
markdown = "*" | ||
beautifulsoup4 = "*" | ||
|
||
[requires] | ||
python_version = "3.7" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import os | ||
import markdown | ||
from bs4 import BeautifulSoup | ||
|
||
SOURCE_FILE = os.path.join(os.path.dirname(__file__), '..', 'README.md') | ||
DEST_PATH = os.path.join(os.path.dirname(__file__), '..', 'build') | ||
|
||
if __name__ == '__main__': | ||
if not os.path.exists(DEST_PATH): | ||
os.makedirs(DEST_PATH) | ||
|
||
with open(SOURCE_FILE, 'r') as source: | ||
html = markdown.markdown(source.read()) | ||
soup = BeautifulSoup(html, 'html.parser') | ||
|
||
# Remove title | ||
soup.find('h1').decompose() | ||
# Remove build badges | ||
soup.find('p').decompose() | ||
|
||
# Set image widths | ||
for img in soup.find_all('img'): | ||
img['width'] = '700' | ||
|
||
# Add margin above images | ||
for img in soup.find_all('img'): | ||
img.insert_before(soup.new_tag('br')) | ||
|
||
# remove installation | ||
installation = soup.find('h2', text='Installation') | ||
installation.find_next('ol').decompose() | ||
installation.decompose() | ||
|
||
with open(os.path.join(DEST_PATH, 'README.html'), 'w') as output_file: | ||
output_file.write(str(soup).strip()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,14 @@ | ||
<idea-plugin> | ||
<id>com.vermouthx.idea</id> | ||
<name>Dracula Theme</name> | ||
<vendor email="[email protected]" url="https://github.com/WhiteVermouth"> | ||
VermouthX | ||
</vendor> | ||
<id>com.vermouthx.idea</id> | ||
<name>Dracula Theme</name> | ||
<vendor email="[email protected]" url="https://github.com/WhiteVermouth"> | ||
VermouthX | ||
</vendor> | ||
|
||
<description><![CDATA[ | ||
<div> | ||
<p><a href="https://github.com/dracula/dracula-theme">Dracula</a> color UI theme for JetBrains IDEs.</p> | ||
<p><img src="https://i.imgur.com/RwnIKbb.png" width="700"/></p> | ||
<div> | ||
]]> | ||
</description> | ||
<depends>com.intellij.modules.lang</depends> | ||
|
||
<depends>com.intellij.modules.lang</depends> | ||
|
||
<extensions defaultExtensionNs="com.intellij"> | ||
<themeProvider id="371dce76-a3c5-4429-91af-41cf86094744" path="/themes/Dracula.theme.json"/> | ||
</extensions> | ||
<extensions defaultExtensionNs="com.intellij"> | ||
<themeProvider id="371dce76-a3c5-4429-91af-41cf86094744" path="/themes/Dracula.theme.json"/> | ||
</extensions> | ||
|
||
</idea-plugin> |