{"id":13682466,"url":"https://github.com/akhater/Lupin","last_synced_at":"2025-04-30T09:32:44.742Z","repository":{"id":44247874,"uuid":"336625445","full_name":"akhater/Lupin","owner":"akhater","description":null,"archived":false,"fork":false,"pushed_at":"2021-04-13T14:42:34.000Z","size":104,"stargazers_count":160,"open_issues_count":2,"forks_count":18,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-08-02T13:34:10.157Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akhater.png","metadata":{"files":{"readme":"readme.md","changelog":"change.log","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-06T20:04:02.000Z","updated_at":"2024-07-18T10:19:30.000Z","dependencies_parsed_at":"2022-08-01T01:38:56.685Z","dependency_job_id":null,"html_url":"https://github.com/akhater/Lupin","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akhater%2FLupin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akhater%2FLupin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akhater%2FLupin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akhater%2FLupin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akhater","download_url":"https://codeload.github.com/akhater/Lupin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224206079,"owners_count":17273384,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T13:01:46.431Z","updated_at":"2024-11-12T02:30:48.222Z","avatar_url":"https://github.com/akhater.png","language":"Python","funding_links":[],"categories":["Python","💡 Workflows and Innovations","others"],"sub_categories":[],"readme":"# Who am I ?\nHey I am Lupin, an Open Source [Telegram](https://telegram.org/) [Python Chat Bot](https://github.com/python-telegram-bot/python-telegram-bot) build to supercharge your [LogSeq](https://github.com/logseq/logseq/) with great features like \nInterstitial Journaling | Flashcards | Brainmaps | PDF / Web Annotations |  {TODO; DOING; LATER} | Bookmarks | Images upload and more\n\n\n# Getting Started\nThere are two methods to deploy Lupin. You can install it manaully or your can use Docker. Either method will require that you place information in a `config.ini` file.\n\n## Manually via Python and PIP:\nAssuming you are already using [LogSeq](https://logseq.com) \u0026 are familar with Python.\n\nLupin requires Python version \u003e= 3.x\n\n1. Clone me `git clone https://github.com/akhater/Lupin`\n1. [Create a telegram bot](https://core.telegram.org/bots#creating-a-new-bot)\n1. Install [Python Telegram Bot](https://github.com/python-telegram-bot/python-telegram-bot) library using `pip install python-telegram-bot` or `pip3 install python-telegram-bot`\n1. Install [PyGithub](https://github.com/PyGithub/PyGithub) library using `pip install pyGitHub` or `pip3 install pyGitHub`\n1. Install the `requests` library using `pip install requests` or `pip3 install requests`\n1. Generate a Github token from `https://github.com/settings/tokens`\n1. Rename `config.sample.ini` to `config.ini`\n1. Change values in `config.ini` to fit your environment \n1. Run the bot using `python main.py` or `python3 main.py` \n\n## Docker\nThe container is based off the [official python 3](https://hub.docker.com/_/python/) images.\n\nThe only requirement is that you have [Docker](https://www.docker.com/) installed.\n\nBefore pulling the container please follow these steps:\n1. Create a telegram bot: [https://core.telegram.org/bots#creating-a-new-bot](https://core.telegram.org/bots#creating-a-new-bot)\n1. Generate a Github personal token from [https://github.com/settings/tokens](https://github.com/settings/tokens)\n1. Download [config.sample.ini](https://raw.githubusercontent.com/akhater/Lupin/master/config.sample.ini) and save it as`config.ini`\n1. Change values in `config.ini` to fit your environment \n\n**Note**: That if you do not change the time zone _(TZ)_ your timestamp will reflect Eastern US Time _(America/New_York)_. You can see a [list of time zones here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) that way you can have the timestamp reflect a time zone of your choosing.\n\nYou can run an instance of Lupin where your `config.ini` is located by typing this in your terminal:\n```\ndocker run -d \\\n--name lupin \\\n--mount type=bind,source=$(pwd)/config.ini,target=/app/config.ini \\\n-e TZ=America/New_York \\\n--restart unless-stopped \\\ndigitalknk/lupin\n```\n\nYou could also create a `docker-compose.yaml` file and copy/paste the text from below or [download it](https://raw.githubusercontent.com/akhater/Lupin/master/docker-compose.yaml) from the repo, save it where your `config.ini` is located. You can then deploy Lupin by typing this in your terminal `docker-compose up -d` in the same directory.\n\n```\nversion: \"3.2\"\nservices:\n  lupin:\n    container_name: lupin\n    image: digitalknk/lupin\n    volumes:\n      - type: bind\n        source: ./config.ini\n        target: /app/config.ini\n    environment:\n      TZ: America/New_York\n    restart: unless-stopped\n```\n\nWhen a new update to the container is released, you can update your pulled image by running one of these depending your deployment strategy where your `config.ini` is located:\n\nIf you used the `docker run` command:\n```\ndocker stop lupin\ndocker rm lupin\ndocker run -d \\\n--name lupin \\\n--mount type=bind,source=$(pwd)/config.ini,target=/app/config.ini \\\n-e TZ=America/New_York \\\n--restart unless-stopped \\\ndigitalknk/lupin\n```\n\nIf a `docker-compose.yaml` is used:\n```\ndocker-compose stop\ndocker-compose rm -f\ndocker-compose pull   \ndocker-compose up -d\n```\n\n# Features\n* Privacy always - self hosted \u0026 open source\n* Security \n    * Entries are only accepted from telegram BotAuthorizedIDs so not anyone can add entries to your journal\n* Fully customization with config.ini file\n   * Rename it\n   * Translate it (no hard coded messages)\n   * much more\n* Send a thought (any text) and Lupin will make your Interstitial Journaling a breeze \n   * Timestamp it: supporting both 12 and 24 hrs format\n   * You can also turn off the timestamp all together if that's what you want \n   * Enter it in your Github hosted Jounral \n* Send your TODO list (by including TODO in the text) and Lupin will convert it to a LogSeq TODO\n    * TODO command is customizable\n* Send a link and Lupin automatically create a #bookmark entry in your Journal in the form of \n    * 18:48 #bookmark [title](link)\n    * #bookmark tag is customizable \n* Send a YouTube video link and Lupin will automatically embedded in your Journal in the form of \n    * 18:52 {{Youtube link}}\n* Send `/anno uri` to import all your annotations from for the uri from [Hypothesis](https://web.hypothes.is/)\n* Support for both LogSeq regular Journal and custom Journal folder and/or file\n* Spaced Repetion: Spaced Repetition capabilities based on SuperMemo2 Algorithm \n* Calendar Generation: Auto generates [PiotrSss](https://piotrsss.github.io/logseq-tools/public/#/mini-calendar) calendar and puts them in the sidebar\n* Theme Switcher: Switch between multiple themes by calling /themes\n* Generate Mindmaps of your pages by called /getMM PageTitle\n* Support for [AGE encryption](https://age-encryption.org/) and encrypted Graphs\n## Spaced Repetition\nSupported format for flaschards is\n```\n## #flashcardtag\n### Question 1\n#### answer line 1\n#### answer line 2\n### Question 2\n#### Answer 2\n```\nFlashcard tag is customizable\nAlgorithm used is SuperMemo2\nTriggers are \n/tsr import --\u003e scan - import - update your flashcards\n/tsr x -\u003e retrieve x flashcards from you pending pool\n/tsr -\u003e retrieve the default number of cards set in your config .ini file\nBelow entry in config.ini specifies you default number of flashcards\n```\n[TimeSpacedRepetion]\nflashcardDailyGoal=10\n```\n## Theme Switcher\nBefore being able to use this feature you need to name your various themes in the format `ThemeName.custom.css` and place them in the /logseq folder\n\n## Commands summary \n| Command          | Description                                   |\n|------------------|-----------------------------------------------|\n| /start           | Just a greeting                               |\n| /uptime          | returns Lupin Uptime                          |\n| /ver             | returns Lupin running Version                 |\n| /help            | help command (WIP)                            |\n| /anno URL        | Import hypothesis annotations from URL        |\n| /importFC        | Imports your Flashcards into Lupin            |\n| /srs import      | alias of /importFC                            |\n| /srs x           | starts a round of SRS for x flashcards        |\n| /getMM pageTitle | Generates a dynamic MindMap for pageTitle     |\n| /pullNow         | Pulls all pages from your Git for fast access |\n| /themes          | calls the theme changer                       |\n| /encryptAll      | Encrypts all your pages with AGE keys         |\n| /decryptAll      | Decrypts all your pages back to clear text    |\n## Screenshots\nImported [Hypothesis](https://web.hypothes.is/) notes into LogSeq\n![](https://media.discordapp.net/attachments/808007880988426250/808378985016721408/unknown.png?width=998\u0026height=821)\n# Credits\n* [Python Telegram Bot](https://github.com/python-telegram-bot/python-telegram-bot)\n* [PyGithub](https://github.com/PyGithub/PyGithub)\n* [LogSeq](https://github.com/logseq/logseq/)\n* [Hypothesis](https://web.hypothes.is/)\n* [PiotrSss](https://piotrsss.github.io/logseq-tools/public/#/mini-calendar)\n* [Doctorpangloss](https://gist.github.com/doctorpangloss/13ab29abd087dc1927475e560f876797)\n* [Markmap](https://markmap.js.org/)\n* [PyAge](https://github.com/jojonas/pyage/tree/master/src/age)\n## License\n[MIT License](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakhater%2FLupin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakhater%2FLupin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakhater%2FLupin/lists"}