mirror of https://github.com/realaravinth/gitpad
Aravinth Manivannan
18865552e1
SUMMARY Data::write_file Creates a new files and commits them to "master" branch on the bare repository allocated for the gist. If multiple files are supplied, all files are written and committed in a single commit. Currently, empty commit message is used but this should probably be changed. If filename includes spaces it is escaped. Example "foo bar".txt is escaped and converted into "foo\ bar".txt. Data::read_file Reads files already committed to the repository allocated for the gist. This method expects filenames provided to be already escaped. Failure would result in file not found errors Data::get_repository_path Receives gist public ID and returns path of the repository allocated for the gist. Programmers are expected to use this method to work on the repositories instead of manually constructing paths. crate::utils::escape_spaces Escapes spaces in the provided string, "foo bar".txt is converted to "foo\ bar".txt |
||
---|---|---|
.github | ||
config | ||
database | ||
docs | ||
src | ||
.env-sample | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
LICENSE.md | ||
Makefile | ||
README.md | ||
build.rs | ||
sqlx-data.json |
README.md
Features
- Upload code snippets
- Syntax Highlighting
- Comments
- Versioning through Git
- Fork gists
- Gist privacy: public, unlisted, private
- Git clone via HTTP and SSH
- Activity Pub implementation for publishing native gists and commenting
Why?
Gists are nice, while there are wonderful forges like Gitea, there isn't a libre pastebin implementation that can rival GitHub Gists.
Usage
- All configuration is done through
./config/default.toml(can be moved to
/etc/gists/config.toml
).