summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 881f65cdb4281402ea882e0de0279f4a40e2e7c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Maintainer: orkut
# Contributor: envolution
# shellcheck shell=bash disable=SC2034,SC2154

pkgname=python-markitdown
_pkgname=${pkgname#python-}
pkgver=0.1.7
pkgrel=1
pkgdesc="Utility tool for converting various files to Markdown"
arch=(any)
url="https://github.com/microsoft/markitdown"
license=(MIT)
depends=(
  python
  python-beautifulsoup4
  python-charset-normalizer
  python-defusedxml
  python-magika
  python-markdownify
  python-requests
)
makedepends=(
  python-build
  python-hatchling
  python-installer
)
optdepends=(
  'python-pptx: .pptx support'
  'python-mammoth: .docx support'
  'python-lxml: .docx support'
  'python-pandas: .xlsx and .xls support'
  'python-openpyxl: .xlsx support'
  'python-xlrd: legacy .xls support'
  'python-pdfminer: PDF support'
  'python-pdfplumber: PDF table extraction'
  'python-olefile: Outlook .msg support'
  'python-pydub: audio transcription'
  'python-speechrecognition: audio transcription'
  'python-youtube-transcript-api: YouTube transcripts'
)
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/microsoft/markitdown/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=('94256b82ff6e5b4d7907135a97bbd6313631c372876c43cd8ff13e95385eca56')

_pkgdir="$_pkgname-$pkgver/packages/markitdown"
build() {
  cd "$_pkgdir"
  python -m build --wheel --no-isolation
}

package() {
  cd "$_pkgdir"
  python -m installer --destdir="$pkgdir" dist/*.whl

  install -Dm644 ../../LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}
# vim: ts=2 sw=2 et: