{"id":18999093,"url":"https://github.com/crossr/nvim_diary_template","last_synced_at":"2025-04-22T14:44:49.019Z","repository":{"id":139441228,"uuid":"134882549","full_name":"CrossR/nvim_diary_template","owner":"CrossR","description":"Diary Templates for VimWiki in Neovim","archived":false,"fork":false,"pushed_at":"2020-03-06T15:10:23.000Z","size":875,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-17T04:19:01.075Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/CrossR.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-25T16:50:16.000Z","updated_at":"2024-11-22T09:58:44.000Z","dependencies_parsed_at":"2023-04-03T22:18:01.796Z","dependency_job_id":null,"html_url":"https://github.com/CrossR/nvim_diary_template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrossR%2Fnvim_diary_template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrossR%2Fnvim_diary_template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrossR%2Fnvim_diary_template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrossR%2Fnvim_diary_template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CrossR","download_url":"https://codeload.github.com/CrossR/nvim_diary_template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250262168,"owners_count":21401624,"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-11-08T17:49:18.006Z","updated_at":"2025-04-22T14:44:49.000Z","avatar_url":"https://github.com/CrossR.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nvim Diary Template\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://travis-ci.org/CrossR/nvim_diary_template\"\u003e\u003cimg alt=\"Build Status\" src=\"https://travis-ci.org/CrossR/nvim_diary_template.svg?branch=master\"\u003e\u003c/a\u003e\n\u003ca href=\"https://codecov.io/gh/CrossR/nvim_diary_template\"\u003e\u003cimg src=\"https://codecov.io/gh/CrossR/nvim_diary_template/branch/master/graph/badge.svg\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/ambv/black\"\u003e\u003cimg alt=\"Code style: black\" src=\"https://img.shields.io/badge/code%20style-black-000000.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nTest repo for a plugin to generate a suitable template for a markdown diary\n(for me). This was mainly made to let me mess with various Python features,\nlike the NeoVim API, poetry, mypy and more, there is a million and one\nsimpler ways to achieve this. The README here currently mainly stands more to\ngive myself a reminder where and how things are setup.\n\n## Features:\n- Google Calendar Integration:\n    - Make a Diary entry, and have it auto-populated with todays events\n      from GCal.\n    - Any new events that are added, can be synced to GCal.\n    - Deoplete source for calendar names to specify which calendar to be used.\n    - **TODO**: Add rename and remove syntax, such that events can be removed\n      or edited.\n- GitHub Issues Integration:\n    - Use a Private repo on GitHub as an issue tracker, synced with your text\n      diary. This is useful for ToDos, as well as keeping logs of how the todos\n      are progressing.\n    - Issues you make online and in-diary are synced, along with all\n      comments.\n    - Support for Github labels (including Deoplete source), including sorting\n      by labels.\n- Diary outline generation:\n    - Builds a diary file with metadata in and the defined headings.\n\n## Screenshot:\n\n![The basic setup with GitHub and GCal integration](./docs/screenshot.PNG)\n\nThe diary file is auto-populated with the days Google Calendar events, as\nwell as any open issues from the repo that the plugin is connected to. The\nissues are folded (twice, once for the issue itself, and once for each\ncomment) and can be edited and uploaded back to GitHub. They may also be\nsorted depending on their urgency.\n\n## Config:\n\nInstall with `vim-plug` like so, as well as ensuring the python env used with\nNeovim has the required packages.\n\n```viml\nif has('nvim')\n    Plug 'CrossR/nvim_diary_template', { 'do': ':UpdateRemotePlugins', 'for': 'markdown' }\nelse\n    Plug 'CrossR/nvim_diary_template', { 'for': 'markdown' }\n    Plug 'roxma/vim-hug-neovim-rpc'\n    Plug 'roxma/nvim-yarp'\nendif\n```\n\n### Basics:\n\nAdd the following to  your `init.vim`, which sets the location of your\nnotes and the location of your config.\n\n```viml\nlet g:nvim_diary_template#notes_path = \"some/path/wiki/docs/\"\nlet g:nvim_diary_template#config_path = \"some/path/wiki/config/\"\n\n\" If you don't want GCal or GitHub integration.\nlet g:nvim_diary_template#use_github_repo = 0\nlet g:nvim_diary_template#use_google_calendar = 0\n```\n\nGoogle Calendar and GitHub integration need a bit of manual work to get them\nsetup, which is outlined below.\n\n### GitHub\n\nGenerate an access token at Settings \u003e Developer Settings \u003e Personal access\ntokens on GitHub. Put this generated token in your config folder, in a json file\ncalled `github_credentials.json` with the structure:\n\n```json\n{\"access_token\": \"XXX\"}\n```\n\nOnce this is added, add the following to your `init.vim`, to tell the plugin\nwhere your GitHub repo is:\n\n```viml\nlet g:nvim_diary_template#repo_name = 'CrossR/nvim_diary_template'\n```\n\nNow, when generating a diary, all issues should be pulled in.\n\n### Google\n\nThis requires a few things, so a script (`generate_google_credentials.py`)\nis included, to help produce the correct auth file.\n\nFirst, generate a set of API keys on the [Google API\nDashboard](https://console.developers.google.com).\nThis is done by making a new project, then making a new set of credentials under\n\"Credentials\". After giving it any name, download the config file and rename it\nto `client_secret.json`, before running the included\n`generate_google_credentials.py` script on it, to make the final authentication\nfile. This final `credentials.json` should then be put in your config folder.\n\nNow, just add the following to your `init.vim` to configure the plugin to use\nGoogle Calendar:\n\n```viml\n\" This sets the calendar the plugin will use, and must already exist.\nlet g:nvim_diary_template#google_cal_name = 'NVim Notes'\n\n\" This is an array that lets you ignore certain calendars.  It may be easiest\n\" to sync once, then check the calendar names from the cache file (in the config\n\" folder) to set this array.\nlet g:nvim_diary_template#calendar_filter_list = ['Holidays in United Kingdom']\n```\n\n### Other options\n\nThe expected time zone for both issues and calendar events can be set with:\n\n```viml\nlet g:nvim_diary_template#timezone = 'Europe/London'\n```\n\nThe heading list (outside of Issues and Schedule), can be set with:\n\n```viml\nlet g:nvim_diary_template#daily_headings = [\"Notes\", \"Meetings\"]\n```\n\nThe issue sort order is based on the labels that a given issue has, as well\nas the completion state. The highest number for a given issue is used to sort\nit.\n\nThe `issue.complete` value is assigned to any completed issue.\n\nIssues are sorted such that the lower the score, the higher it appears on the\nlist. That is, with the default settings, completed issues are at the bottom\nand in progress issues are at the top.\n\n```viml\nlet g:nvim_diary_template#sort_order = {\n            \\ \"issue.complete\": 10000,\n            \\ \"backlog\": 5000,\n            \\ \"blocked\": 1000,\n            \\ \"default\": 100,\n            \\ \"inprogress\": 0,\n            \\ }\n```\n\nThe issue grouping (i.e. add a subheading under issues for certain issues, and\n\"Other\" for the remaining) can be set with the following\n\n```viml\nlet g:nvim_diary_template#issue_groups = [['work', 'personal']]\n```\n\nWhere this is a list of lists, for alternative sorting methods. Calling\n`:DiarySwapGroupSorting` will move to the next sorting style.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrossr%2Fnvim_diary_template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrossr%2Fnvim_diary_template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrossr%2Fnvim_diary_template/lists"}