Repository: jugglerchris/rust-html2text Branch: main Commit: 1f57ca869d10 Files: 37 Total size: 466.7 KB Directory structure: gitextract_ep3xu7e5/ ├── .circleci/ │ └── config.yml ├── .github/ │ ├── dependabot.yml │ └── workflows/ │ ├── ci.yml │ └── jekyll-gh-pages.yml ├── .gitignore ├── CHANGELOG.md ├── Cargo.toml ├── LICENSE ├── README.md ├── benches/ │ └── tables.rs ├── examples/ │ └── html2term.rs ├── html2text-cli/ │ ├── Cargo.toml │ ├── README.md │ └── src/ │ └── main.rs ├── html2text-web-demo/ │ ├── .cargo/ │ │ └── config.toml │ ├── .gitignore │ ├── Cargo.toml │ ├── Trunk.toml │ ├── index.html │ └── src/ │ └── lib.rs ├── pages/ │ ├── .gitignore │ ├── _config.yml │ ├── _includes/ │ │ └── head.html │ ├── assets/ │ │ ├── demo-main.js │ │ └── demo.css │ └── index.markdown ├── rust.yml └── src/ ├── ansi_colours.rs ├── css/ │ ├── parser.rs │ └── types.rs ├── css.rs ├── lib.rs ├── macros.rs ├── markup5ever_rcdom.rs ├── render/ │ ├── mod.rs │ └── text_renderer.rs └── tests.rs ================================================ FILE CONTENTS ================================================ ================================================ FILE: .circleci/config.yml ================================================ version: 2.1 orbs: win: circleci/windows@2.2.0 jobs: build-stable: docker: - image: cimg/rust:1.85.1 steps: - checkout - run: cargo --version - run: cargo build --workspace - run: cargo test - run: name: Install tools command: | rustup component add rustfmt clippy - run: name: Check formatting command: | cargo fmt --all -- --check --color=auto - run: name: Clippy command: | cargo clippy --all-features build-css: docker: - image: cimg/rust:1.90 steps: - checkout - run: cargo --version - run: cargo build --features=css,css_ext,xml --workspace - run: cargo test --features=css,css_ext,xml build-1-85: docker: - image: cimg/rust:1.85 steps: - checkout - run: cargo --version - run: cargo build --features=css - run: cargo test --features=css build-windows: executor: name: win/default size: medium shell: bash.exe environment: PATHk steps: - checkout - run: name: Install Rust command: | curl https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe --output rustup-init.exe ./rustup-init.exe -y - run: name: Update PATH and cargo config command: | echo "[net]" >> $USERPROFILE/.cargo/config echo "git-fetch-with-cli = true" >> $USERPROFILE/.cargo/config echo 'export PATH=$USERPROFILE/.cargo/bin:$PATH' >> $BASH_ENV - run: name: Build command: | cargo build - run: name: Tests command: | cargo test workflows: version: 2 build: jobs: - "build-stable" - "build-css" - "build-1-85" - "build-windows" ================================================ FILE: .github/dependabot.yml ================================================ version: 2 updates: - package-ecosystem: "cargo" directory: "/" schedule: interval: "weekly" day: "friday" rebase-strategy: "disabled" ================================================ FILE: .github/workflows/ci.yml ================================================ name: CI on: pull_request: push: branches: - main env: CARGO_TERM_COLOR: always jobs: test-action: name: Check semver compatibility runs-on: ubuntu-latest steps: - name: Checkout sources uses: actions/checkout@v2 - name: Install stable toolchain uses: actions-rs/toolchain@v1 with: toolchain: stable profile: minimal override: true - name: Check semver uses: obi1kenobi/cargo-semver-checks-action@v2 with: version-tag-prefix: '' ================================================ FILE: .github/workflows/jekyll-gh-pages.yml ================================================ # Sample workflow for building and deploying a Jekyll site to GitHub Pages name: Build and deploy demo site on: # Allows you to run this workflow manually from the Actions tab workflow_dispatch: # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: contents: read pages: write id-token: write # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. concurrency: group: "pages" cancel-in-progress: false jobs: # Build job: build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Pages uses: actions/configure-pages@v5 - name: Install trunk run: cargo install trunk --version=0.21.13 - name: Install WASM rust target run: rustup target add wasm32-unknown-unknown - name: Build WASM module run: trunk build working-directory: ./html2text-web-demo - name: Copy WASM assets run: cp html2text-web-demo/dist/html2text-web-demo{.js,_bg.wasm} ./pages/assets/ - name: Build with Jekyll uses: actions/jekyll-build-pages@v1 with: source: ./pages destination: ./_site - name: Upload artifact uses: actions/upload-pages-artifact@v3 # Deployment job deploy: environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest needs: build steps: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 ================================================ FILE: .gitignore ================================================ target ================================================ FILE: CHANGELOG.md ================================================ # Changelog Possible log types: - `[added]` for new features. - `[changed]` for changes in existing functionality. - `[deprecated]` for once-stable features removed in upcoming releases. - `[removed]` for deprecated features removed in this release. - `[fixed]` for any bug fixes. - `[security]` to invite users to upgrade in case of vulnerabilities. ### 0.17.1 - [added] Add support for XHTML (for the cases where it doesn't quite behave like HTML). ### 0.17.0 - [changed] Split `html2text` example into `html2text-cli` crate - [fixed] A possible panic when syntax-highlighting - [changed] Update html5ever to 0.39.0 ### 0.16.7 - [added] Support `` tags as bold (thanks amir) - [changed] Update html5ever to 0.38.0 (thanks mtorromeo) ### 0.16.6 - [changed] Update html5ever and tendril dependencies. ### 0.16.5 - [fixed] Fix a subtract with underflow with rowspans and empty rows (thanks mdierksen) ### 0.16.4 - [fixed] Further fix for RcDom::serialize() when there is a ``. ### 0.16.3 - [fixed] RcDom::serialize() panicked. - [changed] Bumped html5ever dependency - [fixed] Fixed a subtraction underflow in the `html2term` example. ### 0.16.2 - [fixed] Removed spurious `dbg!()` accidentally left in. ### 0.16.1 - [added] Add `Config::empty_img_mode()` to configure how images with no alt text are handled. ### 0.16.0 - [changed] Updated MSRV to 1.85. - [fixed] Fix a panic in debug mode (subtraction underflow) with some table/rowspan edge cases (thanks mtorromeo) ### 0.15.5 - [fixed] Fix an assertion and some missing styles with rowspan cells in rich mode. ### 0.15.4 - [added] Support handling `rowspan` in tables. ### 0.15.3 - [fixed] Parse `