Giter Site home page Giter Site logo

z-shell / giturl Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 70 KB

A tool that allows you to pack Git repository data into a single URL. (( Z-Shell ))

Home Page: https://github.com/z-shell/giturl

License: Other

Makefile 0.96% Shell 99.04%
giturl zsh-plugin

giturl's Introduction

GITURL


What is Giturl?

It's a tool that allows you to pack Git repository data into single URL. For example:

% giturl https://github.com/z-shell/giturl -r devel -p lib/coding_functions.cpp

Protocol: https
Site:     github.com
Repo:     z-shell/giturl
Revision: devel
File:     lib/coding_functions.cpp

gitu://ŬṽǚǫoŒẗ6ẏȅcЭÑẩőn4ầŘїệαЃȣϟṈӛŀї

% giturl -d gitu://ŬṽǚǫoŒẗ6ẏȅcЭÑẩőn4ầŘїệαЃȣϟṈӛŀї
Protocol: https
Site:     github.com
Repo:     z-shell/giturl
Revision: devel
File:     lib/coding_functions.cpp

This is Zsh implementation. You don't have to use Zsh as your shell, just have it installed, like Ruby. There is C++11 implementation too.

The resulting URL is highly compressed thanks to use of Huffman codes and base-1024 encoding. Compare length of the above data to the gcode in URL:

ŬṽǚǫoŒẗ6ẏȅcЭÑẩőn4ầŘїệαЃȣϟṈӛŀї
https://github.com/z-shell/giturldevellib/coding_functions.cpp

It is 29 vs 62 characters, and you would normally need additional description like "the branch is: ", etc. Giturl allows to easily grab repository data from web page and terminal.

Limitations

Only following characters can appear in input data – in the server, repository path, revision, etc.: [a-zA-Z0-9._~:-]

Characters used in base-1024 encoding

The characters are carefully chosen so that double clicking GitURL selects the whole gcode. Asian scripts are not used because characters from them are double-width and they would consume the space saved by the compressions.

0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
µºÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáãäæçèéêëìíîïðñòóôõöøúûüýþÿĀ
āĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľ
ĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻż
ŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐƑƒƓƔƖƗƘƙƚƛƜƝƞƟƠơƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽ
ƾƿǀǁǂǃǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZdzǴǵǷǸǹǺǻǼǽǾǿȀȁȂȃȄȅȆ
ȇȈȉȊȋȌȍȎȏȐȑȒȓȔȕȖȗȘșȚțȜȝȞȟȠȡȢȣȤȥȦȧȨȩȪȫȬȭȮȯȰȱȲȳȴȵȶȷȸȹȺȻȼȽȾȿɀɁɂɃɄ
ɅɆɇɈɋɌɍɎɏḀḁḂḃḄḅḆḇḈḉḊḋḌḍḎḏḐḑḒḓḔḕḖḗḘḙḚḛḜḝḞḟḠḡḢḣḤḥḦḧḨḩḪḫḬḭḮḯḰḱḲḳḴ
ḵḶḷḸḹḺḻḼḽḾḿṀṁṂṃṄṅṆṇṈṉṊṋṌṍṎṏṐṑṒṓṔṕṖṗṘṙṚṛṜṝṞṟṠṡṢṣṤṥṦṧṨṩṪṫṬṭṮṯṰṱṲ
ṳṴṵṶṷṸṹṺṻṼṽṾṿẀẁẂẃẄẅẆẇẈẉẊẋẌẍẎẏẐẑẒẓẔẕẖẗẘẙẚẛẜẝẟẠạẢảẤấẦầẨẩẪẫẬậẮắẰằ
ẲẳẴẵẶặẸẹẺẻẼẽẾếỀềỂểỄễỆệỈỉỊịỌọỎỏỐốỒồỔổỖỗỘộỚớỜờỞởỠỡỢợỤụỦủỨứỪừỬửỮữ
ỰựỲỳỴỵỶỷỸỹỻͻͼͽΆΈΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩΫάέήίΰαβγδεζηθικλμνξοπ
ρςστυφχψϋόύώϐϑϒϔϕϖϗϘϙϚϛϜϝϞϟϠϥϧϨϩϫϬϭϮϯϰϱϲϵϷϸϹϻϼϽϾϿЀЁЂЃЄЅІЇЈЉЊЋЌ
ЍЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъ
ыьэюяѐёђѓєѕіїјљњћќѝўџѡѢѣѥѫѱѲѳѵѷѻѽѿҀҁҋҌҍҎҏҐґҒғҔҕҖҗҘҙҚқҜҝҞҟҡҢңҤҥ
ҩҪҫҬҭҮүҰұҲҳҵҶҷҸҹҺһӀӁӂӃӄӅӆӇӈӉӊӋӌӎӐӑӒӓӔӕӖӗӘәӚӛӜӝӞӟӠӡӢӣӤӥӦӧӨөӪӫӬӭ
ӮӯӰӱӲӳӴӵӶӷӸӹӺӻӼӽӾӿאבגדטךכלםמסעףפץצקרשװ

giturl's People

Contributors

ss-o avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 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.