Rename to scel-buc

This commit is contained in:
bursa-pastoris 2023-09-20 19:00:14 +02:00
parent aaec76e89c
commit ea79870465
7 changed files with 109 additions and 590 deletions

View File

@ -1,6 +1,6 @@
`bousc` (`bo`t `us`er `c`lient) is a set of scripts to use a Telegram bot to
send and receive messages as if it was a regular user account. It's being
developed because I lost access to my Telegram account, so it follows the "just
make it work" philosophy. It may be refined in future.
`scel-buc` (`sc`ripts for T`el`egram `b`ot `u`ser `c`lient) is a set of scripts
to use a Telegram bot to send and receive messages as if it was a regular user
account. It's being developed because I lost access to my Telegram account, so
it follows the "just make it work" philosophy. It may be refined in future.
`bousc` is distributed under the [AGPL-3.0-only license](./LICENSE).
`scel-buc` is distributed under the [AGPL-3.0-only license](./LICENSE).

View File

@ -1,10 +1,10 @@
# This file is part of bousc.
# This file is part of scel-buc.
#
# bousc is free software: you can redistribute it and/or modify it under the
# scel-buc is free software: you can redistribute it and/or modify it under the
# terms of the GNU Affero General Public License as published by the Free
# Software Foundation, version 3 of the License.
#
# bousc is distributed in the hope that it will be useful, but WITHOUT ANY
# scel-buc is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.

View File

@ -1,21 +1,21 @@
#!/bin/env python3
# bousc - scripts to send and receive messages through a Telegram bot
# scel-buc - scripts to send and receive messages through a Telegram bot
# Copyright (C) 2023 bursa-pastoris
#
# This file is part of bousc.
# This file is part of scel-buc.
#
# bousc is free software: you can redistribute it and/or modify it under the
# scel-buc is free software: you can redistribute it and/or modify it under the
# terms of the GNU Affero General Public License as published by the Free
# Software Foundation, version 3 of the License.
#
# bousc is distributed in the hope that it will be useful, but WITHOUT ANY
# scel-buc is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License
# along with bousc. If not, see <https://www.gnu.org/licenses/>.
# along with scel-buc. If not, see <https://www.gnu.org/licenses/>.
import urllib.request
import json

View File

@ -1,13 +1,14 @@
`bousc`'s icon is an adapted work from the following works:
`scel-buc`'s icon is an adapted work from the following works:
- [OpenMoji-black 1F464](https://commons.wikimedia.org/wiki/File:OpenMoji-black_1F464.svg)
from OpenMoji, distributed under [CC-BY-SA 4.0 International
license](https://creativecommons.org/licenses/by-sa/4.0/deed.en)
- [Font Awesome 5 brands
telegram-plane](https://commons.wikimedia.org/wiki/File:Font_Awesome_5_brands_telegram-plane.svg)
from @fontawesome, distributed under
[CC-BY 4.0 Internation
license](https://creativecommons.org/licenses/by/4.0/deed.en)
- [Gear
icon-72a7cf](https://commons.wikimedia.org/wiki/File:Gear_icon-72a7cf.svg)
from Offnfopt, in the public domain
- [Meuble héraldique Cerf
courant](https://commons.wikimedia.org/wiki/File:Meuble_h%C3%A9raldique_Cerf_courant.svg)
from Syryatsu, distributed under the following licenses:
- GFDL-1.2-or-later
- CC BY-SA 3.0 Unported
- CC BY-SA 2.5 Generic
- CC BY-SA 2.0 Generic
- CC BY-SA 1.0 Generic
- [Beaker font
awesome](https://commons.wikimedia.org/wiki/File:Beaker_font_awesome.svg)
from Dave Gandy, distributed under the following licenses:
- CC BY-SA 3.0 Unported

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -1,298 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
version="1.1"
id="emoji"
x="0px"
y="0px"
viewBox="0 0 72 72"
enable-background="new 0 0 72 72"
xml:space="preserve"
sodipodi:docname="icon_dev.svg"
inkscape:export-filename="icon_dev.png"
inkscape:export-xdpi="1600"
inkscape:export-ydpi="1600"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs927"><inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 11 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="22 : 11 : 1"
inkscape:persp3d-origin="11 : 7.3333333 : 1"
id="perspective23" /><linearGradient
id="ShadowGradient"><stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop3393" /><stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop3395" /></linearGradient><linearGradient
id="StandardGradient"><stop
style="stop-color:#000000;stop-opacity:0.86274511;"
offset="0"
id="stop3389" /><stop
style="stop-color:#000000;stop-opacity:0.47058824;"
offset="1"
id="stop3391" /></linearGradient><linearGradient
inkscape:collect="always"
xlink:href="#StandardGradient"
id="linearGradient3381"
x1="9.9375"
y1="3"
x2="9.9375"
y2="19.017569"
gradientUnits="userSpaceOnUse" /><linearGradient
inkscape:collect="always"
xlink:href="#StandardGradient"
id="linearGradient3782"
x1="9.75"
y1="5"
x2="9.75"
y2="19.055693"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(0,-1)" /><linearGradient
inkscape:collect="always"
xlink:href="#StandardGradient"
id="linearGradient2400"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-9,10)"
x1="9.75"
y1="5"
x2="9.75"
y2="19.055693" /><linearGradient
inkscape:collect="always"
xlink:href="#StandardGradient"
id="linearGradient3174"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.7071068,0.7071068,-0.7071068,0.7071068,0.8856249,4.1536343)"
x1="9.75"
y1="5"
x2="9.75"
y2="19.055693" /><linearGradient
inkscape:collect="always"
xlink:href="#StandardGradient"
id="linearGradient3178"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0,1,-1,0,12.009822,7.0098219)"
x1="9.75"
y1="5"
x2="9.75"
y2="19.055693" /><linearGradient
inkscape:collect="always"
xlink:href="#StandardGradient"
id="linearGradient3182"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-0.7071068,0.7071068,-0.7071068,-0.7071068,17.856188,16.895447)"
x1="9.75"
y1="5"
x2="9.75"
y2="19.055693" /><linearGradient
inkscape:collect="always"
xlink:href="#StandardGradient"
id="linearGradient3186"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-1,0,0,-1,15,28.019644)"
x1="9.75"
y1="5"
x2="9.75"
y2="19.055693" /><linearGradient
inkscape:collect="always"
xlink:href="#StandardGradient"
id="linearGradient3190"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-0.7071068,-0.7071068,0.7071068,-0.7071068,5.1143752,33.866009)"
x1="9.75"
y1="5"
x2="9.75"
y2="19.055693" /><linearGradient
inkscape:collect="always"
xlink:href="#StandardGradient"
id="linearGradient3194"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0,-1,1,0,-6.0098215,31.009821)"
x1="9.75"
y1="5"
x2="9.75"
y2="19.055693" /><linearGradient
inkscape:collect="always"
xlink:href="#StandardGradient"
id="linearGradient3198"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.7071068,-0.7071068,0.7071068,0.7071068,-11.856186,21.124197)"
x1="9.75"
y1="5"
x2="9.75"
y2="19.055693" /><linearGradient
inkscape:collect="always"
xlink:href="#StandardGradient"
id="linearGradient3224"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.7071068,0.7071068,-0.7071068,0.7071068,11.292893,-6.263456)"
x1="9.75"
y1="5"
x2="9.75"
y2="19.055693" /><linearGradient
inkscape:collect="always"
xlink:href="#StandardGradient"
id="linearGradient2407"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-22,-5)"
x1="9.75"
y1="5"
x2="9.75"
y2="19.055693" /><linearGradient
inkscape:collect="always"
xlink:href="#StandardGradient"
id="linearGradient3228"
x1="6.7010484"
y1="1"
x2="6.7010484"
y2="15.001111"
gradientUnits="userSpaceOnUse" /><inkscape:perspective
id="perspective3648"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" /><inkscape:perspective
id="perspective2876"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" /><linearGradient
y2="45.017357"
x2="20.758585"
y1="1"
x1="20.758585"
gradientTransform="matrix(0.41860332,0,0,0.41860332,0.9535131,1.3721447)"
gradientUnits="userSpaceOnUse"
id="linearGradient4427"
xlink:href="#StandardGradient"
inkscape:collect="always" /><linearGradient
inkscape:collect="always"
xlink:href="#StandardGradient"
id="linearGradient2891"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.27906888,0,0,0.27906888,1.3023421,2.5814282)"
x1="20.758585"
y1="1"
x2="20.758585"
y2="45.017357" /><linearGradient
inkscape:collect="always"
xlink:href="#StandardGradient"
id="linearGradient2893"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.27906888,0,0,0.27906888,1.3023421,1.5814282)"
x1="20.758585"
y1="1"
x2="20.758585"
y2="45.017357" /><linearGradient
inkscape:collect="always"
xlink:href="#StandardGradient"
id="linearGradient3679"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.27906888,0,0,0.27906888,-18.697658,1.5814282)"
x1="20.758585"
y1="1"
x2="20.758585"
y2="45.017357" /><clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath3686"><path
style="fill:#ff00ff;fill-opacity:1;stroke:none;display:inline"
d="m -20,0 0,16 16,0 0,-16 -16,0 z m 7.15625,2 1.6875,0 c 0.236127,0 0.40625,0.1973338 0.40625,0.4375 l 0,0.84375 c 0.422214,0.1124949 0.818378,0.2853208 1.1875,0.5 l 0.625,-0.59375 c 0.169822,-0.1698 0.426778,-0.1982162 0.59375,-0.03125 l 1.1875,1.1875 c 0.166988,0.166968 0.13857,0.4239286 -0.03125,0.59375 l -0.59375,0.625 c 0.214677,0.3691225 0.387506,0.7652869 0.5,1.1875 l 0.84375,0 C -6.197338,6.75 -6,6.9201224 -6,7.15625 l 0,1.6875 C -6,9.0798786 -6.197348,9.2500183 -6.4375,9.25 l -0.84375,0 c -0.112494,0.4222147 -0.285323,0.81838 -0.5,1.1875 l 0.59375,0.625 c 0.1698,0.169822 0.198217,0.426782 0.03125,0.59375 l -1.1875,1.1875 c -0.166968,0.166988 -0.42393,0.13857 -0.59375,-0.03125 l -0.625,-0.59375 c -0.369122,0.214678 -0.765286,0.387506 -1.1875,0.5 l 0,0.84375 c 0,0.240164 -0.170121,0.4375 -0.40625,0.4375 l -1.6875,0 C -13.07988,14 -13.25,13.802664 -13.25,13.5625 l 0,-0.84375 c -0.422213,-0.112494 -0.818378,-0.285322 -1.1875,-0.5 l -0.625,0.59375 c -0.169822,0.1698 -0.426783,0.198218 -0.59375,0.03125 l -1.1875,-1.1875 c -0.166988,-0.166968 -0.138572,-0.423928 0.03125,-0.59375 l 0.59375,-0.625 c -0.214677,-0.36912 -0.387503,-0.7652854 -0.5,-1.1875 l -0.84375,0 C -17.802664,9.25 -18,9.079878 -18,8.84375 l 0,-1.6875 C -18,6.9201214 -17.802654,6.75 -17.5625,6.75 l 0.84375,0 c 0.112497,-0.422214 0.28532,-0.8183783 0.5,-1.1875 l -0.59375,-0.625 c -0.169801,-0.1698223 -0.198217,-0.426782 -0.03125,-0.59375 l 1.1875,-1.1875 c 0.08348,-0.083478 0.202616,-0.1259428 0.3125,-0.125 0.109883,9.3e-4 0.19634,0.071341 0.28125,0.15625 l 0.625,0.59375 c 0.369122,-0.2146783 0.765286,-0.387506 1.1875,-0.5 l 0,-0.84375 C -13.25,2.1973355 -13.07988,2 -12.84375,2 z M -12,6.1875 c -1.001298,0 -1.8125,0.8112009 -1.8125,1.8125 0,1.0013006 0.811202,1.8125 1.8125,1.8125 1.001299,0 1.8125,-0.8111994 1.8125,-1.8125 0,-1.0012991 -0.811199,-1.8125 -1.8125,-1.8125 z"
id="path3688" /></clipPath><linearGradient
inkscape:collect="always"
xlink:href="#StandardGradient"
id="linearGradient3991"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.27906888,0,0,0.27906888,1.3023421,1.5814282)"
x1="24.000017"
y1="1.4998871"
x2="20.758585"
y2="45.017357" /></defs><sodipodi:namedview
id="namedview925"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:showpageshadow="2"
inkscape:pageopacity="1"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
showgrid="false"
inkscape:zoom="9.1435619"
inkscape:cx="33.95832"
inkscape:cy="41.340564"
inkscape:window-width="1574"
inkscape:window-height="847"
inkscape:window-x="10"
inkscape:window-y="37"
inkscape:window-maximized="1"
inkscape:current-layer="emoji" />
<g
id="_xD83D__xDC64_"
transform="matrix(0.62366791,0,0,0.62366791,13.547955,13.924287)"
style="fill:#000000;fill-opacity:1;stroke-width:4.28273;stroke-dasharray:none"
inkscape:label="guy">
<path
fill="none"
stroke="#040404"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
d="M 58,69.620505 C 58,69.620505 58,58 57,54 55.8,49.2 53,46 47,46 H 25 c -6,0 -8.8,3.2 -10,8 -1,4 -1,15.620505 -1,15.620505"
id="path919"
style="fill:#000000;fill-opacity:1;stroke-width:4.28273;stroke-dasharray:none"
inkscape:label="torso"
sodipodi:nodetypes="cssssc" />
<path
fill="none"
stroke="#040404"
stroke-width="2"
stroke-linejoin="round"
d="m 26,26 c 0,3.7 0.5,7.8 2,10 1.9,2.8 5,4 8,4 3.1,0 6.1,-1.2 8,-4 1.5,-2.2 2,-6.3 2,-10 0,-2.8 -1,-12 -10,-12 -9,0 -10,7.3 -10,12 z"
id="path921"
style="fill:#000000;fill-opacity:1;stroke-width:4.28273;stroke-dasharray:none"
inkscape:label="head" />
</g><path
id="path1592"
style="stroke-width:0.29414"
inkscape:label="gear"
d="m 30.042969,4.8691408 v 6.3437502 c -2.598723,0.622693 -5.084477,1.64904 -7.365235,3.042968 L 18.197266,9.7753908 9.7753908,18.197266 14.263672,22.6875 c -1.395634,2.277935 -2.425234,4.760169 -3.050781,7.357422 H 4.8691408 v 11.910156 h 6.3437502 c 0.622429,2.599666 1.648923,5.08643 3.042968,7.367188 l -4.4804682,4.480468 8.4218752,8.421875 4.490234,-4.488281 c 2.277935,1.395634 4.760168,2.425235 7.357422,3.050781 v 6.34375 h 11.910156 v -6.34375 c 2.599459,-0.622488 5.08477,-1.648982 7.365234,-3.042968 l 4.482422,4.480468 8.421875,-8.421875 -4.488281,-4.488281 c 1.395692,-2.278111 2.425294,-4.761826 3.050781,-7.359375 h 6.34375 V 30.044922 h -6.34375 c -0.622487,-2.599461 -1.648983,-5.08477 -3.042968,-7.365234 L 62.228516,18.201172 53.804688,9.7792971 49.316406,14.267578 C 47.038297,12.871887 44.554579,11.842285 41.957031,11.216797 V 4.871094 H 30.046875 Z M 36,15.763672 A 20.236864,20.236864 0 0 1 56.236328,36 20.236864,20.236864 0 0 1 36,56.236328 20.236864,20.236864 0 0 1 15.763672,36 20.236864,20.236864 0 0 1 36,15.763672 Z" />
<path
d="m 38.523163,28.179631 -1.173225,5.532902 c -0.08851,0.390496 -0.319339,0.487686 -0.647356,0.303719 l -1.787607,-1.317275 -0.862563,0.829588 c -0.09545,0.09545 -0.17529,0.17529 -0.359257,0.17529 l 0.12843,-1.820582 3.313146,-2.993806 c 0.14405,-0.128431 -0.03124,-0.199588 -0.223885,-0.07116 l -4.095874,2.579013 -1.763309,-0.551902 c -0.383555,-0.119752 -0.390497,-0.383554 0.07983,-0.567521 l 6.897037,-2.657112 c 0.31934,-0.119752 0.598761,0.07116 0.494629,0.558844 z"
id="path1491"
style="display:inline;fill:#ffffff;stroke-width:0.0173554"
inkscape:label="telegram" /><g
id="g1518"
inkscape:label="flask"
transform="translate(0,0.74945009)"><path
d="m 39.161127,50.570466 q 0.254723,0.404795 0.09783,0.693625 -0.156894,0.288831 -0.639054,0.288831 h -5.239806 q -0.48216,0 -0.639054,-0.288831 -0.156893,-0.28883 0.09783,-0.693625 l 2.287865,-3.606917 v -1.814831 h -0.291076 q -0.118294,0 -0.204644,-0.08643 -0.08643,-0.08643 -0.08643,-0.204643 0,-0.118294 0.08643,-0.204643 0.08643,-0.08643 0.204644,-0.08643 h 2.32881 q 0.118294,0 0.204643,0.08643 0.08643,0.08643 0.08643,0.204643 0,0.118294 -0.08643,0.204643 -0.08643,0.08643 -0.204643,0.08643 h -0.291077 v 1.814831 z m -3.543236,-3.297623 -1.237179,1.951285 h 3.238493 l -1.237179,-1.951285 -0.09101,-0.141004 v -0.16829 -1.814831 H 35.70878 v 1.814831 0.16829 z"
id="path3029"
inkscape:connector-curvature="0"
style="fill:#ffffff;stroke-width:0.00454844"
inkscape:label="glassh" /><circle
style="fill:#ffffff;stroke:none;stroke-width:1.92579"
id="circle1510"
cx="34.935696"
cy="43.251236"
r="0.5"
inkscape:label="big_bubble" /><circle
style="fill:#ffffff;stroke:none;stroke-width:1.54063"
id="circle1512"
cx="35.867058"
cy="42.131092"
r="0.40000001"
inkscape:label="bubble_1" /><circle
style="fill:#ffffff;stroke:none;stroke-width:1.54063"
id="circle1520"
cx="36.64616"
cy="43.624294"
r="0.40000001"
inkscape:label="bubble_2" /></g></svg>

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@ -1,21 +1,21 @@
#!/bin/env python3
# bousc - scripts to send and receive messages through a Telegram bot
# scel-buc - scripts to send and receive messages through a Telegram bot
# Copyright (C) 2023 bursa-pastoris
#
# This file is part of bousc.
# This file is part of scel-buc.
#
# bousc is free software: you can redistribute it and/or modify it under the
# scel-buc is free software: you can redistribute it and/or modify it under the
# terms of the GNU Affero General Public License as published by the Free
# Software Foundation, version 3 of the License.
#
# bousc is distributed in the hope that it will be useful, but WITHOUT ANY
# scel-buc is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License
# along with bousc. If not, see <https://www.gnu.org/licenses/>.
# along with scel-buc. If not, see <https://www.gnu.org/licenses/>.
import urllib.request, urllib.parse
import json