Skip to content

Commit e3b0b02

Browse files
authored
feat: add GetPrivacy and SetPrivacy method.
- also bring back documentation.
1 parent d8bb491 commit e3b0b02

File tree

128 files changed

+5998
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+5998
-5
lines changed

.github/workflows/docs.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Build-docs
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
branches:
8+
- err
9+
workflow_dispatch:
10+
{}
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-22.04
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Build
20+
run: bash build-docs.sh
21+
env:
22+
DOCS_KEY: ${{ secrets.GX_TOKEN }}

Makefile

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
VENV := venv
2+
PYTHON := $(VENV)/bin/python
3+
HOST = $(shell ifconfig | grep "inet " | tail -1 | cut -d\ -f2)
4+
TAG = v$(shell grep -E '__version__ = ".*"' pyrogram/__init__.py | cut -d\" -f2)
5+
6+
RM := rm -rf
7+
8+
.PHONY: venv clean-build clean-api clean api build
9+
10+
venv:
11+
$(RM) $(VENV)
12+
python3 -m venv $(VENV)
13+
$(PYTHON) -m pip install -U pip wheel setuptools
14+
$(PYTHON) -m pip install -U -e .
15+
@echo "Created venv with $$($(PYTHON) --version)"
16+
17+
clean-docs:
18+
$(RM) docs/build
19+
$(RM) docs/source/api/bound-methods docs/source/api/methods docs/source/api/types docs/source/telegram
20+
21+
clean-build:
22+
$(RM) *.egg-info build dist
23+
24+
clean-api:
25+
$(RM) pyrogram/errors/exceptions pyrogram/raw/all.py pyrogram/raw/base pyrogram/raw/functions pyrogram/raw/types
26+
27+
clean:
28+
make clean-build
29+
make clean-api
30+
31+
api:
32+
cd compiler/api && ../../$(PYTHON) compiler.py
33+
cd compiler/errors && ../../$(PYTHON) compiler.py
34+
35+
build:
36+
make clean
37+
$(PYTHON) setup.py sdist
38+
$(PYTHON) setup.py bdist_wheel
39+
40+
tag:
41+
git tag $(TAG)
42+
git push origin $(TAG)
43+
44+
dtag:
45+
git tag -d $(TAG)
46+
git push origin -d $(TAG)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
This repository is a personal clone of Pyrofork, created specifically for my project and modified to suit my needs. It is intended for personal use only.
1+
This repository is a personal clone of Pyrogram, created specifically for my project and modified to suit my needs. It is intended for personal use only.
22

33
Please understand that any issues, modifications, or deviations from the original project are solely my responsibility. Do not hold me accountable for any problems or discrepancies that may arise from using this repository.
44

5-
Thank you for your understanding.
5+
Thank you for your understanding.

build-docs.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/bash
2+
3+
export DOCS_KEY
4+
VENV="$(pwd)/venv"
5+
export VENV
6+
7+
8+
make clean
9+
make clean-docs
10+
make venv
11+
make api
12+
"$VENV/bin/pip" install -e '.[docs]'
13+
14+
cd compiler/docs
15+
"$VENV/bin/python" compiler.py
16+
cd ../..
17+
18+
"$VENV/bin/sphinx-build" -b html "docs/source" "docs/build/html" -j auto
19+
20+
git clone https://5hojib:"$DOCS_KEY"@github.com/5hojib/Electrogram-docs.git
21+
cd Electrogram-docs
22+
23+
mkdir -p main
24+
cd main
25+
26+
rm -rf _includes api genindex.html intro py-modindex.html sitemap.xml \
27+
support.html topics _static faq index.html objects.inv \
28+
searchindex.js start telegram
29+
30+
cp -r ../../docs/build/html/* .
31+
32+
git config --local user.name "5hojib"
33+
git config --local user.email "yesiamshojib@gmail.com"
34+
35+
git add --all
36+
git commit -a -m "docs: main: Update docs $(date '+%Y-%m-%d | %H:%m:%S %p %Z')" --signoff
37+
git push -u origin --all

compiler/docs/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)