Giter Club home page Giter Club logo

get-activity's Introduction

get-activity

Activity aggregation and formatting.

OCaml-CI Build Status

An experimental script to collect your recent activity from e.g. GitHub and format it as markdown. The idea is that you keep a journal (e.g. log.md) and instead of manually copying and pasting things into it, you just run a command in your text editor and it pastes in everything you did since the last paste. You can then edit this text as required.

For example, after creating this repository and making a PR against it, I press F5 in Vim and it inserts:

Created repository [talex5/get-activity](https://github.com/talex5/get-activity).

Better output for zero or one repositories [#1](https://github.com/talex5/get-activity/pull/1).  
If there is no activity, display a suitable message. If only one repository
has activity, don't add a heading for it.

This renders as:

Created repository talex5/get-activity.

Better output for zero or one repositories #1.
If there is no activity, display a suitable message. If only one repository has activity, don't add a heading for it.

Installation

Install opam if you don't already have it, and set up tarides/opam-repository. Then you can install get-activity with:

opam install get-activity

Activity sources

At the moment, GitHub activity is the only source it queries.

GitHub

  1. Go to https://github.com/settings/tokens and generate a new token. It only needs read access; I selected public_repo, read:discussion, read:org, read:user.

  2. Save the generated token as ~/.github/github-activity-token.

Editors

Vim

Put this in your ~/.vimrc:

au BufRead,BufNewFile **/log.md noremap <F5> Go<Esc>:r! get-activity<CR>
au BufRead,BufNewFile **/log.md inoremap <F5> <C-O>:r! get-activity<CR>

Then, pressing F5 will paste recent activity. In normal mode, it pastes it at the end of the file. In insert mode, it pastes it at the cursor.

Tip: if you want to be able to open the URLs it adds in a browser, you can use something like this:

" gx to open URLs in Firefox
let g:netrw_browsex_viewer= "firefox"

get-activity's People

Contributors

gpetiot avatar talex5 avatar samoht avatar

Stargazers

 avatar

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.