{"id":16697953,"url":"https://github.com/richfitz/ghwiki","last_synced_at":"2025-04-10T02:53:50.613Z","repository":{"id":16837698,"uuid":"19597250","full_name":"richfitz/ghwiki","owner":"richfitz","description":"Tools for pushing files generated by R to a github wiki","archived":false,"fork":false,"pushed_at":"2014-05-21T10:02:19.000Z","size":172,"stargazers_count":6,"open_issues_count":6,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-02T18:25:00.579Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/richfitz.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}},"created_at":"2014-05-09T03:11:25.000Z","updated_at":"2016-02-23T15:22:03.000Z","dependencies_parsed_at":"2022-07-25T05:46:23.178Z","dependency_job_id":null,"html_url":"https://github.com/richfitz/ghwiki","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/richfitz%2Fghwiki","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richfitz%2Fghwiki/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richfitz%2Fghwiki/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richfitz%2Fghwiki/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/richfitz","download_url":"https://codeload.github.com/richfitz/ghwiki/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239126447,"owners_count":19586097,"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-10-12T17:49:53.582Z","updated_at":"2025-02-16T11:31:55.652Z","avatar_url":"https://github.com/richfitz.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wiki Workflow\n\n[![Build Status](https://travis-ci.org/richfitz/ghwiki.png?branch=master)](https://travis-ci.org/richfitz/ghwiki)\n\nThis package sets up a lab notebook on a GitHub wiki by running a series of R scripts and knitr documents, collecting figures and updating a wiki.  It has grown out of a set of scripts, but is currently used across many of my (not-yet-open) research projects.\n\nThe wiki for [rodeint](https://github.com/richfitz/rodeint) is updated\nusing ghwiki.  [This page](https://github.com/richfitz/rodeint/wiki/compiled) was\ngenerated from [this script](https://github.com/richfitz/rodeint/blob/master/tutorial/compiled.R) and can be recomputed and updated by running a single command.\n\nghwiki needs to be used within a project that is a git repository.  The git repository must have a github remote, and the *first* remote that has a github url will be used.  The remote must *already* have a wiki.\n\nInstall with (from R)\n\n```\ndevtools::install_github(\"richfitz/ghwiki\")\n```\n\nInitialise with\n\n```\nRscript -e \"ghwiki::init()\"\n```\n\nThis will also clone the github wiki into a directory 'wiki' in the project root.  If the command failed (e.g., the wiki was not initialised yet),\npull down the project wiki manually with:\n\n```\nmake wiki_clone\n```\n\nAdd names of `R` or `Rmd` scripts to the file `.wiki_scripts`.  A template is generated by running the command above.  Blank lines and lines beginning with \"#\" are ignored, and whitespace is trimmed.  If `.md` files are added, they will be copied to the wiki, along with any figures named following the same conventions we convince knitr to follow.  At the moment, any file *not* ending with `.R`, `.Rmd` or `.md` is simply ignored.\n\nRun\n\n```\nmake\n```\n\nto run all the scripts listed in `.wiki_scripts`, generating `md` files, figures etc.  A bunch of knit tweaks are applied to normalise figure paths, improve default settings, etc.\n\nRun\n\n```\nmake wiki_update\n```\n\nto update the local copy of the wiki repo, and\n\n\n```\nmake wiki_publish\n```\n\nto push it up.  You're on your own with resolving conflicts.  Other make targets:\n\n* `make clean` -- clean up generated .md and .Rmd files.\n* `make wiki_rollback` -- undo a commit in the wiki repo\n* `make wiki_reset` -- destructively clean up an unclean state in the wiki repo\n\nOther commands can be run via `./.ghwiki`:\n\n* `./.ghwiki reset_to \u003cSHA\u003e` -- move the wiki to a particular SHA (can undo a rollback this way)\n* `./.ghwiki git [commands]` -- run git commands in the wiki repo (e.g., `./.ghwiki git log`)\n\nAnd yet more commands via `./.ghwiki scripts`\n\n* `./.ghwiki scripts list` -- list of scripts that we know about\n* `./.ghwiki scripts base` -- basename of the scripts (without extension)\n* `./.ghwiki scripts generated_Rmd` -- `Rmd` files that are candidates for deletion during cleanup\n* `./.ghwiki scripts targets` -- list of `md` files that will be generated by `make`.\n\nIf you get fed up with typing `./.ghwiki` (which gets tedious) run\n\n```\nRscript -e \"ghwiki:::install_scripts('~/bin')\"\n```\n\nwhich will install the scripts `ghwiki` into \"~/bin\" (assuming that it exists!).  If that is in your `$PATH` then you can run `ghwiki git log` and things like that.  Note that these scripts just redirect to the true scripts within the package, so can be left in place through package upgrades -- the scripts that are run are those in the package.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichfitz%2Fghwiki","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frichfitz%2Fghwiki","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichfitz%2Fghwiki/lists"}