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
from bs4 import BeautifulSoup | |
from pygments import highlight | |
from pygments.lexers import RubyLexer | |
from pygments.formatters import HtmlFormatter | |
if __name__ == "__main__": | |
with open("pyg.html") as fp: | |
soup = BeautifulSoup(fp, 'html.parser') | |
code_tags = soup.find_all('code', class_="language-ruby") | |
for code_tag in code_tags: |
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
defmodule Mix.Tasks.Phx.RoutesCheck do | |
use Mix.Task | |
@shortdoc "Checks all routes for undefined modules and functions." | |
@version 1 | |
# Code modified from | |
# phx.routes.ex -https://github.com/phoenixframework/phoenix/blob/22a71bd339783aa08a727b24ef8822fc5d66a511/lib/mix/tasks/phx.routes.ex#L1) | |
# console_formatter.ex - https://github.com/phoenixframework/phoenix/blob/22a71bd339783aa08a727b24ef8822fc5d66a511/lib/phoenix/router/console_formatter.ex#L1 |