Code Monkey home page Code Monkey logo

truncateddinosour / arigram Goto Github PK

View Code? Open in Web Editor NEW
75.0 75.0 6.0 7.57 MB

[Migrated to self-hosted ari-web Forgejo: https://git.ari.lt/ari/arigram] A fork of tg -- a hackable telegram TUI client [EOL https://github.com/TruncatedDinoSour/arigram/releases/tag/v0.1.8]

Home Page: https://git.ari.lt/ari/arigram

License: The Unlicense

Dockerfile 0.22% Python 98.69% Shell 1.09%
docker linux python shell telegram telegram-cli telegram-client tg tui

arigram's Introduction

This repository has been migrated to the self-hosted ari-web Forgejo instance: https://git.ari.lt/ari/TruncatedDinosour

i have migrated to a self-hosted forgejo instance !! https://git.ari.lt/ari

#StandWithUkraine

hello profile views, im ari

my cat

she likes boxes

thanks to my supporters

https://ari.lt/page/thanks

statistics and stuff

name statistics
languages languages
streak streak
commits scommits
trophes trophes
activity ( basically a mental health tracker lol ) github activity
tools and orgs ari-web badge
octoring Octo Ring logo
previousrandomnext
check out other github profiles in the octo ring

username

i fucked up my username a while ago when i was channging, 'a while ago' being multiple yrs, before it was bubbletea in 13775p34k and some stuff changed, well rn im kinda stuck w TruncatedDinoSour ( i mispelled dinosour when i was changing it and now im stuck w it lol, so i at least made it look like not an accident )

arigram's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

arigram's Issues

launch stalls with 'Valid api_|id must be provided

Ho, looks really good, but this error occurs, implyiing app_id authentication.

raise RuntimeError(f'Telegram error: {self.error_info}') RuntimeError: Telegram error: {'@type': 'error', 'code': 400, 'message': 'Valid api_id must be provided. Can be obtained at https://my.telegram.org', '@extra': {'request_id': 'updateAuthorizationState'}}

Arigram was installed from aur community package , V. 0.1.6-1

I dont have an app_id myself , although i have a telegram account of course. I had expected the ap_id would be registered somehwhere in the installe d package.

My telephone number, as entered on the command after arigram, has been recorded in the arigram/config.py

Any help, appreciated.
John

window

hey can u make it possible for window

such as on powershell . with arigram.exe
also with scoop-package installtion :D

Not compatible with latest python-telegram.

This program is not compatible w/ python-telegram 0.16.0

Here is log:
Enter your phone number in international format, including country code (example: +5037754762346)
(phone) +5037754762346
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/pkg_resources/init.py", line 581, in _build_master
ws.require(requires)
File "/usr/lib/python3.10/site-packages/pkg_resources/init.py", line 909, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3.10/site-packages/pkg_resources/init.py", line 800, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (python-telegram 0.16.0 (/usr/lib/python3.10/site-packages), Requirement.parse('python-telegram==0.15.0'), {'arigram'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/bin/arigram", line 33, in
sys.exit(load_entry_point('arigram==0.1.4', 'console_scripts', 'arigram')())
File "/usr/bin/arigram", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.10/importlib/metadata/init.py", line 171, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/usr/lib/python3.10/site-packages/arigram/main.py", line 10, in
from arigram import config, update_handlers, utils
File "/usr/lib/python3.10/site-packages/arigram/update_handlers.py", line 9, in
from arigram.controllers import Controller
File "/usr/lib/python3.10/site-packages/arigram/controllers.py", line 19, in
from arigram.models import Model
File "/usr/lib/python3.10/site-packages/arigram/models.py", line 10, in
from arigram.tdlib import (
File "/usr/lib/python3.10/site-packages/arigram/tdlib.py", line 4, in
from telegram.client import AsyncResult, Telegram
File "/usr/lib/python3.10/site-packages/telegram/client.py", line 28, in
from telegram.tdjson import TDJson
File "/usr/lib/python3.10/site-packages/telegram/tdjson.py", line 8, in
import pkg_resources
File "/usr/lib/python3.10/site-packages/pkg_resources/init.py", line 3260, in
def _initialize_master_working_set():
File "/usr/lib/python3.10/site-packages/pkg_resources/init.py", line 3234, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3.10/site-packages/pkg_resources/init.py", line 3272, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3.10/site-packages/pkg_resources/init.py", line 583, in _build_master
return cls._build_from_requirements(requires)
File "/usr/lib/python3.10/site-packages/pkg_resources/init.py", line 596, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python3.10/site-packages/pkg_resources/init.py", line 795, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'python-telegram==0.15.0' distribution was not found and is required by arigram

Can I use this repo to export public channal chats?

Hello:
I have joined about 30 public channels, I want to export 2 of them, the channel chats every day.
I am using Windows 10, and Telegram desktop version 4.0.1, I can export channel chats by hand from Telegram desktop by setting 6 different parameters.
However, this type of job is tedious, I want to know if I can use this repo to make channel chats exporting job as a Python script, so I can call the Python script later on, I don't have to do the job by hand every day.
Please advise,
Thanks,

Notifications

Hello, I would like you to better explain part of the configuration of the notifications. I would like to have them running, I am currently using Dunst in Archlinux.

Your fork is very good, but I only wanted to be able to have the notifications so that it is perfect.

thank you. :)

can't send/reply to messages

using the latest version, on Arch. However, I noticed things worked fine prior to commit 22c5457 (tested in a virtual environment). From 22c5457 onwards, replies don't work. I also noticed that if I used python-telegram v0.15 instead of 0.16, things, replies and sending messages worked again, (at 22c5457)

ImportError: cannot import name 'AsyncResult' from 'telegram.utils'

Traceback (most recent call last):
  File "/home/ari/.local/bin/arigram", line 5, in <module>
    from arigram.__main__ import main
  File "/home/ari/.local/lib/python3.9/site-packages/arigram/__main__.py", line 8, in <module>
    from arigram import config, update_handlers, utils
  File "/home/ari/.local/lib/python3.9/site-packages/arigram/config.py", line 98, in <module>
    config_params = runpy.run_path(CONFIG_FILE)  # type: ignore
  File "/usr/lib/python3.9/runpy.py", line 268, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "/usr/lib/python3.9/runpy.py", line 97, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/ari/.config/arigram/config.py", line 14, in <module>
    from arigram.controllers import msg_handler
  File "/home/ari/.local/lib/python3.9/site-packages/arigram/controllers.py", line 15, in <module>
    from telegram.utils import AsyncResult
ImportError: cannot import name 'AsyncResult' from 'telegram.utils' (/home/ari/.local/lib/python3.9/site-packages/telegram/utils/__init__.py)

Can't launch and log in after unfinished login try

Traceback (most recent call last):
  File "/home/main/.local/bin/arigram", line 8, in <module>
    sys.exit(main())
  File "/home/main/.local/lib/python3.10/site-packages/arigram/__main__.py", line 72, in main
    tg.login()
  File "/home/main/.local/lib/python3.10/site-packages/telegram/client.py", line 583, in login
    self.authorization_state = self._wait_authorization_result(result)
  File "/home/main/.local/lib/python3.10/site-packages/telegram/client.py", line 523, in _wait_authorization_result
    return AuthorizationState(authorization_state)
  File "/usr/lib/python3.10/enum.py", line 385, in __call__
    return cls.__new__(cls, value)
  File "/usr/lib/python3.10/enum.py", line 710, in __new__
    raise ve_exc
ValueError: 'authorizationStateLoggingOut' is not a valid AuthorizationState

readme

from readme.md :

This is not an actively-developed project as of now, meaning don't expect much stuff now, I might start working on it again, although it works for me so I use it, anyways, I'm rlly sorry, kthxbye :)

2023/10/26 -- the project is not in development, if u wanna go fork this project, fix any feature losses and improve the project as a whole, currently its dead and i just hold it at a state of 'if it works for me it works for everyone', feel free to advertise ur forks in issues and solve the issues reported there, thanks

final release 2024/01/02 : https://github.com/TruncatedDinoSour/arigram/releases/tag/v0.1.8

thanks everyone

[Request] I've got some ideas.

Hi dev. I'm trying to get some features here. I don't know if it's possible but i think yes.

  1. Keybind to send files don't work if i want to reply to someone. I think you can improve it!
  2. I don't know if it's possible because i see in your README.md (FILE_PICKER_CMD = "ranger --choosefile={file_path}" ). I can't open ranger to select a file. When i do sd, sv, sp. Maybe it's can be a good feature if you add ranger to select a file. (like graphical).

It's only ideas! nothing really important. I love the work with arigram! Thx for do this!

Sending messages in secret chats not working

A few days ago sending messages in secret chats is not working. The other party does not receive the messages, they remain unread. They do receive typing notifications however. I guess something in the protocolchanged?

Keep sensitive information out of conf.py

In order to make conf.py more portable across systems (e.g. via git repos), sensitive information such as PHONE, ENC_KEY, etc should be stored in a separate file.

[ISSUE] Issues with arch linux pip (python 3.10) while installing arigram, TypeError: SafeFileCache.set() got an unexpected keyword argument 'expires'

./do local                                                                                                                            src/arigram  

+ main local
++ dirname ./do
+ SRC=.
+ cd .
+ ARG=local
+ case $ARG in
+ python3 -m poetry check
All set!
+ python3 -m poetry lock
Updating dependencies
Resolving dependencies... (0.2s)
+ python3 -m poetry install
Installing dependencies from lock file

No dependencies to install or update

Installing the current project: arigram (0.1.1)
+ python3 -m pip install --user --upgrade .
Processing /home/linuxmobile/.local/src/arigram
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
ERROR: Exception:
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 223, in _main
    status = self.run(options, args)
  File "/usr/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 180, in wrapper
    return func(self, options, args)
  File "/usr/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 320, in run
    requirement_set = resolver.resolve(
  File "/usr/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 121, in resolve
    self._result = resolver.resolve(
  File "/usr/lib/python3.10/site-packages/resolvelib/resolvers.py", line 454, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/usr/lib/python3.10/site-packages/resolvelib/resolvers.py", line 348, in resolve
    failure_causes = self._attempt_to_pin_criterion(name, criterion)
  File "/usr/lib/python3.10/site-packages/resolvelib/resolvers.py", line 208, in _attempt_to_pin_criterion
    criteria = self._get_criteria_to_update(candidate)
  File "/usr/lib/python3.10/site-packages/resolvelib/resolvers.py", line 200, in _get_criteria_to_update
    name, crit = self._merge_into_criterion(r, parent=candidate)
  File "/usr/lib/python3.10/site-packages/resolvelib/resolvers.py", line 176, in _merge_into_criterion
    crit = Criterion.from_requirement(self._p, requirement, parent)
  File "/usr/lib/python3.10/site-packages/resolvelib/resolvers.py", line 83, in from_requirement
    if not cands:
  File "/usr/lib/python3.10/site-packages/resolvelib/structs.py", line 124, in __bool__
    return bool(self._sequence)
  File "/usr/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 99, in __bool__
    return any(self)
  File "/usr/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 220, in iter_index_candidates
    result = self._finder.find_best_candidate(
  File "/usr/lib/python3.10/site-packages/pip/_internal/index/package_finder.py", line 882, in find_best_candidate
    candidates = self.find_all_candidates(project_name)
  File "/usr/lib/python3.10/site-packages/pip/_internal/index/package_finder.py", line 825, in find_all_candidates
    package_links = self.process_project_url(
  File "/usr/lib/python3.10/site-packages/pip/_internal/index/package_finder.py", line 789, in process_project_url
    html_page = self._link_collector.fetch_page(project_url)
  File "/usr/lib/python3.10/site-packages/pip/_internal/index/collector.py", line 618, in fetch_page
    return _get_html_page(location, session=self.session)
  File "/usr/lib/python3.10/site-packages/pip/_internal/index/collector.py", line 430, in _get_html_page
    resp = _get_html_response(url, session=session)
  File "/usr/lib/python3.10/site-packages/pip/_internal/index/collector.py", line 127, in _get_html_response
    resp = session.get(
  File "/usr/lib/python3.10/site-packages/requests/sessions.py", line 555, in get
    return self.request('GET', url, **kwargs)
  File "/usr/lib/python3.10/site-packages/pip/_internal/network/session.py", line 428, in request
    return super(PipSession, self).request(method, url, *args, **kwargs)
  File "/usr/lib/python3.10/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3.10/site-packages/requests/sessions.py", line 697, in send
    r.content
  File "/usr/lib/python3.10/site-packages/requests/models.py", line 836, in content
    self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
  File "/usr/lib/python3.10/site-packages/requests/models.py", line 758, in generate
    for chunk in self.raw.stream(chunk_size, decode_content=True):
  File "/usr/lib/python3.10/site-packages/urllib3/response.py", line 579, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "/usr/lib/python3.10/site-packages/urllib3/response.py", line 522, in read
    data = self._fp.read(amt) if not fp_closed else b""
  File "/home/linuxmobile/.local/lib/python3.10/site-packages/cachecontrol/filewrapper.py", line 96, in read
    self._close()
  File "/home/linuxmobile/.local/lib/python3.10/site-packages/cachecontrol/filewrapper.py", line 76, in _close
    self.__callback(result)
  File "/home/linuxmobile/.local/lib/python3.10/site-packages/cachecontrol/controller.py", line 329, in cache_response
    self.cache.set(
TypeError: SafeFileCache.set() got an unexpected keyword argument 'expires'

TODO: Sponsored messages support

Telegram has dropped support for forks with no sponsored messages support

Traceback (most recent call last):
  File "/home/ari/.local/bin/arigram", line 8, in <module>
    sys.exit(main())
  File "/home/ari/.local/lib/python3.9/site-packages/arigram/__main__.py", line 72, in main
    tg.login()
  File "/home/ari/.local/lib/python3.9/site-packages/telegram/client.py", line 574, in login
    self.authorization_state = self._wait_authorization_result(result)
  File "/home/ari/.local/lib/python3.9/site-packages/telegram/client.py", line 504, in _wait_authorization_result
    result.wait(raise_exc=True)
  File "/home/ari/.local/lib/python3.9/site-packages/telegram/utils.py", line 45, in wait
    raise RuntimeError(f'Telegram error: {self.error_info}')
RuntimeError: Telegram error: {'@type': 'error', 'code': 406, 'message': 'UPDATE_APP_TO_LOGIN', '@extra': {'request_id': 'updateAuthorizationState'}}

So have to make a TODO, refer to https://core.telegram.org/api/layers#layer-132

Can't list contacts or create chats.

Hello, good people.

I have installed arigram from the AUR on Artix Linux with the 6.0.12-artix1-1 kernel and Python 3.10.8.

I have found that several things do not work while looking at the chat list:

  • Pressing c does not show a list of contacts
  • Typing ns or ng does not create a new group or secret chat. Pressing both keys at the same time just has the same effect as just pressing g if the keys are n and g, and does absolutely nothing if the keys are n and s.

Commands within the actual chats (the "Msgs" section in the Readme file), appear to work as intended.

Are these issues foibles on my part or an issue with the software?

Thank you.

brew install does not work

on BigSur 11.6.6
brew tap TruncatedDinosour/dino-bar
brew install arigram

launching

arigram
Enter your phone number in international format, including country code (example: +5037754762346)
(phone) +*********
Traceback (most recent call last):
File "/usr/local/bin/arigram", line 5, in
from arigram.main import main
File "/usr/local/Cellar/arigram/0.1.1/libexec/lib/python3.9/site-packages/arigram/main.py", line 8, in
from arigram import config, update_handlers, utils
File "/usr/local/Cellar/arigram/0.1.1/libexec/lib/python3.9/site-packages/arigram/update_handlers.py", line 6, in
from arigram.controllers import Controller
File "/usr/local/Cellar/arigram/0.1.1/libexec/lib/python3.9/site-packages/arigram/controllers.py", line 12, in
import pyfzf
ModuleNotFoundError: No module named 'pyfzf'

installing fzf
pip3 install pyfzf

launching again

arigram
Traceback (most recent call last):
File "/usr/local/bin/arigram", line 8, in
sys.exit(main())
File "/usr/local/Cellar/arigram/0.1.1/libexec/lib/python3.9/site-packages/arigram/main.py", line 62, in main
tg = Tdlib(
File "/usr/local/Cellar/arigram/0.1.1/libexec/lib/python3.9/site-packages/arigram/tdlib.py", line 61, in init
super().init(*args, kwargs)
File "/usr/local/Cellar/arigram/0.1.1/libexec/lib/python3.9/site-packages/telegram/client.py", line 136, in init
self._tdjson = TDJson(library_path=library_path, verbosity=tdlib_verbosity)
File "/usr/local/Cellar/arigram/0.1.1/libexec/lib/python3.9/site-packages/telegram/tdjson.py", line 22, in init
library_path = ctypes.util.find_library("libtdjson")
NameError: name 'ctypes' is not defined
find: /Users/
***/.cache/arigram/files: No such file or directory

Python 3.10

Port arigram to python 3.10 when it becomes more "mainstream"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.