Skip to content

Instantly share code, notes, and snippets.

View palikhov's full-sized avatar
🐉
E5E / SRD 5.1 rus / Excel GM Tools

Anton Palikhov palikhov

🐉
E5E / SRD 5.1 rus / Excel GM Tools
View GitHub Profile
[
{
"title": "Aboleth",
"icon": "imp-laugh",
"contents": [
"subtitle | Large aberration, lawful evil",
"rule",
"property | Armor class | 17 (Natural Armor)",
"property | Hit points | 135 (18d10 + 36)",
"property | Speed | 10 ft., swim 40 ft. ",
@palikhov
palikhov / docx2md.md
Created November 23, 2022 00:36 — forked from jesperronn/docx2md.md
Convert a Word Document into MD

Converting a Word Document to Markdown in One Move

The Problem

A lot of important government documents are created and saved in Microsoft Word (*.docx). But Microsoft Word is a proprietary format, and it's not really useful for presenting documents on the web. So, I wanted to find a way to convert a .docx file into markdown.

Installing Pandoc

On a mac you can use homebrew by running the command brew install pandoc.

The Solution

@palikhov
palikhov / docx2md.sh
Created November 23, 2022 00:35 — forked from Christian-G/docx2md.sh
Convert Word documents into Markdown
#!/bin/bash
#
# generate a Markdown version of a word document. Goes in separate folder, since
# images are extracted and converted as well (separate folder avoids naming clashes).
#
# REQUIREMENTS: pandoc
#
#
# with pandoc
# --extract-media=[media folder]
@palikhov
palikhov / docx2md.sh
Created November 23, 2022 00:35 — forked from Christian-G/docx2md.sh
Convert Word documents into Markdown
#!/bin/bash
#
# generate a Markdown version of a word document. Goes in separate folder, since
# images are extracted and converted as well (separate folder avoids naming clashes).
#
# REQUIREMENTS: pandoc
#
#
# with pandoc
# --extract-media=[media folder]
@palikhov
palikhov / monsters2cards.rb
Created November 23, 2022 00:33 — forked from tkfu/monsters2cards.rb
A quickie script to turn the monsters scraped with [this script](https://gist.github.com/tkfu/bc5dc2c6cee4d1e582a3d369c3077bb5) into cards you can use [here](https://crobi.github.io/rpg-cards/generator/generate.html)
# Probably only works on Ruby 2.5.0
require 'json'
def create_monster mon
cont = []
cont.append("subtitle | #{mon['meta']}")
cont.append("rule")
cont.append("property | Armor class | #{mon['Armor Class']}")
cont.append("property | Hit points | #{mon['Hit Points']}")
@palikhov
palikhov / beyond-scraper.rb
Created November 23, 2022 00:33 — forked from tkfu/beyond-scraper.rb
Script to scrape SRD-licensed monster data from DnD Beyond. Brittle, simple, but it works as of the posting of this gist.
require 'json'
require 'nokogiri'
require 'open-uri'
require 'rails-html-sanitizer'
def get_monster_list
monster_urls = []
firstpage = Nokogiri::HTML(open("https://www.dndbeyond.com/monsters?filter-search=&filter-source=1&filter-type=0&page=1"))
num_pages = firstpage.xpath('//li[@class="b-pagination-item"]')[firstpage.xpath('//li[@class="b-pagination-item"]').length - 2].text.to_i
puts "Found #{num_pages} pages..."
@palikhov
palikhov / TOOLS-OSR.TXT
Created November 23, 2022 00:30
TOOLS and RESOURCES FOR OLD SCHOOL RENAISSANCE ROLE-PLAYING GAMES
TOOLS and RESOURCES FOR OLD SCHOOL RENAISSANCE ROLE-PLAYING GAMES
Update 1.14 MAY-20-2018
For a list of OSR blogs check out http://pastebin.com/ZwUBVq8L
==================================================
https://alexschroeder.ch/wiki/RPG
(Some generators including: characters, Traveler sectors, hex maps.)
http://anydice.com
@palikhov
palikhov / Avrae Commands
Created September 2, 2022 20:12 — forked from tawilliams/Avrae Commands
Avrae Commands from Tutorials
https://avrae.io/commands
Arguments in brackets like <this> are required, and arguments in brackets like [this] are optional. Make sure not to include the brackets themselves! Semicolons ; will be used to separate commands and descriptions in this document.
!help COMMANDNAME ; view the syntax and check that that is correct.
### Tutorial Quickstart
!roll d20 ; rolls 1d20 and posts the result.
@palikhov
palikhov / srd_5e_monsters.json
Created August 25, 2022 22:09 — forked from tkfu/srd_5e_monsters.json
A JSON file with all the D&D 5e SRD monster data
[
{
"name": "Aboleth",
"meta": "Large aberration, lawful evil",
"Armor Class": "17 (Natural Armor)",
"Hit Points": "135 (18d10 + 36)",
"Speed": "10 ft., swim 40 ft. ",
"STR": "21",
"STR_mod": "(+5)",
"DEX": "9",
@palikhov
palikhov / README.md
Created April 8, 2022 09:48 — forked from hawkrives/README.md
VB Word-to-Markdown converter

from http://tips.naivist.net/2006/02/02/word_to_markdown_converter/ Word to Markdown converter

Some smart people who didn’t want to teach users how to code in HTML invented Textile markup language

Someone more lazy invented MarkDown syntax which is much easier to learn. MarkDown is really nice for small content management systems, blogging engines etc.

For instance, to mark text as bold, you write the “bold text” like “bold text”. Other rules can be found in the syntax page.

However, when you have a MS Word document with several pages of bolds, italics and lists, you don’t really want to re-code all the markup.