Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
AliOsm committed Jul 18, 2024
0 parents commit bf01a88
Show file tree
Hide file tree
Showing 10 changed files with 365 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "Tahweel",
"image": "mcr.microsoft.com/devcontainers/python:3.12",

// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/git:latest": {},
"ghcr.io/jungaretti/features/vim:latest": {},
"ghcr.io/devcontainers/features/common-utils:latest": {
"username": "vscode",
"uid": 1000,
"gid": 1000,
"installZsh": true,
"installOhMyZsh": true,
"configureZshAsDefaultShell": true,
"upgradePackages": true
}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": ".devcontainer/setup.sh",

// Configure tool-specific properties.
"customizations": {
"vscode": {
"settings": {
"workbench": {
"iconTheme": "vscode-icons"
},
"editor": {
"formatOnSave": true,
"rulers": [80, 120],
"codeActionsOnSave": {
"source.organizeImports": true
}
}
},
"extensions": [
"KevinRose.vsc-python-indent",
"eamodio.gitlens",
"ms-python.debugpy",
"ms-python.isort",
"ms-python.mypy-type-checker",
"ms-python.python",
"ms-python.vscode-pylance",
"oderwat.indent-rainbow",
"tamasfe.even-better-toml",
"vscode-icons-team.vscode-icons",
"waderyan.gitblame"
]
}
}

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
3 changes: 3 additions & 0 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
curl -sSL https://install.python-poetry.org | python3 -
poetry install
poetry run pre-commit install
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
19 changes: 19 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: pre-commit

on:
push:
pull_request:

jobs:
pre-commit:
name: pre-commit
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Run pre-commit
uses: pre-commit/[email protected]
40 changes: 40 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-builtin-literals
- id: check-case-conflict
- id: check-docstring-first
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-vcs-permalinks
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
types: [python]
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: name-tests-test
args: [--pytest-test-first]
- id: trailing-whitespace
types: [python]
- repo: https://github.com/hhatto/autopep8
rev: v2.2.0
hooks:
- id: autopep8
args: ['-i', '--max-line-length=120', '--indent-size=2', '--ignore=E121']
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0
hooks:
- id: mypy
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# تحويل
183 changes: 183 additions & 0 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 48 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[tool.poetry]
name = "tahweel"
version = "0.0.1"
description = "تحويل ملفات PDF إلى Word و TXT"
authors = ["EasyBooks <[email protected]>"]
license = "MIT"
readme = "README.md"
packages = [{ include = "tahweel" }]
keywords = ["tahweel", "ocr", "pdf", "word", "txt"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
homepage = "https://tahweel.ieasybooks.com"
repository = "https://github.com/ieasybooks/tahweel"

[tool.poetry.dependencies]
python = ">=3.10<4.0"

[tool.poetry.scripts]
tahweel = "tahweel.cli:main"

[tool.poetry.group.dev.dependencies]
pre-commit = "^3.7.1"

[tool.autopep8]
max-line-length = 120
indent-size = 2
ignore = ["E121"]

[tool.isort]
line_length = 120
src_paths = ["tahweel"]
lines_between_types = 1
lines_after_imports = 2

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Empty file added tahweel/__init__.py
Empty file.
Empty file added tahweel/main.py
Empty file.

0 comments on commit bf01a88

Please sign in to comment.