https://github.com/bchao1/extract-readme

📑 extract-readme extracts the README markdown file from a GitHub repository and generates a corresponding formatted HTML that can be rendered on any website.

https://github.com/bchao1/extract-readme

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • â—‹
    CITATION.cff file
  • ✓
    codemeta.json file
    Found codemeta.json file
  • â—‹
    .zenodo.json file
  • ✓
    DOI references
    Found 2 DOI reference(s) in README
  • ✓
    Academic publication links
    Links to: acm.org
  • â—‹
    Academic email domains
  • â—‹
    Institutional organization owner
  • â—‹
    JOSS paper metadata
  • â—‹
    Scientific vocabulary similarity
    Low similarity (13.4%) to scientific vocabulary
Last synced: 6 months ago · JSON representation

Repository

📑 extract-readme extracts the README markdown file from a GitHub repository and generates a corresponding formatted HTML that can be rendered on any website.

Basic Info
  • Host: GitHub
  • Owner: bchao1
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 2.34 MB
Statistics
  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 3 years ago · Last pushed over 3 years ago
Metadata Files
Readme

README.md

extract-readme

extract-readme extracts the README markdown file from a GitHub repository and generates a corresponding formatted HTML that can be rendered on any website.

What for?

Sometimes you may want to mirror a README file of your project on your personal website. However, you might encounter serveral problems:

  1. Your website does not support vanilla markdown.
  2. File paths in the README file are relative to the repository folder structure, and cannot be accessed from outside of the repository.
  3. Image and table sizes are not dynamically adjusted to fit the website frame.
  4. ...

This script takes care of these issues.

Features

  • Parses, formats, and renders ...
    • Images, video content
    • Tables
    • HTML embedded in markdown
  • Peforms regex matching for readme files (README, readme.md, ReAdMe.md, etc)
  • Dynamic scaling of image, video, and table content

Usage

Install the package: cmd git clone https://github.com/bchao1/extract-readme.git cd extract-readme python3 -m pip install .

Run the following command: cmd extract-readme user repo

  • user: the GitHub user handle
  • repo: repository name

The formatted HTML file will be copied to your clipboard. Simply embed the copied content in your website HTML code.

Example

Original markdown: ```markdown

Poisson image editing

A fast, scalable, and extensive implementation of the Poisson Image Editing paper by Perez et al. 2003.

teaser ```

Generated HTML: html <h1>Poisson image editing</h1> <p>A fast, scalable, and extensive implementation of the <a href="https://dl.acm.org/doi/10.1145/882262.882269">Poisson Image Editing</a> paper by Perez et al. 2003.</p> <p> <p align="center"><img src="https://raw.githubusercontent.com/bchao1/poisson-image-editing/master/data/teaser.png" alt="teaser" width="80%" /></p> </p>

|Original markdown|Generated HTML| |---|---| ||| |||

Note that this script only generates a bare-bones HTML. You can either customize it later by defining your own style.css file that complements the HTML, or the HTML with directly inherit the style of your website.

Todo

  • Additional size logic for svg/xml files.

Owner

  • Name: Brian Chao
  • Login: bchao1
  • Kind: user
  • Location: Stanford, California
  • Company: Stanford University

Stanford Ph.D. student. Research in computational photography, displays, and computer graphics. Open source enthusiast.

GitHub Events

Total
Last Year

Issues and Pull Requests

Last synced: 12 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels